Useraintadecidedtopaintawall.Thewallconsistsofn2tiles,thatarearrangedinann × ntable.Sometilesarepainted,andtheothersarenot.Ashewantstopaintitbeautifully,hewillfollowtherulesbelow.Firstlyuseraintalooksatthewall.Ifthereisatleastonepaintedcelloneachrowandatleastonepaintedcelloneachcolumn,hestopscoloring.Otherwise,hegoestostep2.Useraintachooseanytileonthewallwithuniformprobability.Ifthetil...
OnanITlessonValerastudieddatacompression.Theteachertoldaboutanewmethod,whichweshallnowdescribetoyou.Let{a1, a2, ..., an}bethegivensequenceoflinesneededtobecompressed.Hereandbelowweshallassumethatalllinesareofthesamelengthandconsistonlyofthedigits0and1.Let'sdefinethecompressionfunction:f(emptysequence) = emptystringf(s) = s.f(s1, s2) = thesmallestinlengthstring,whichhasoneofthepre...
近期评论