/
2E.D.Demaine,M.L.Demaine,S.Eisenstat,A.Lubiw,A.WinslowartistknownasSpa 2E.D.Demaine,M.L.Demaine,S.Eisenstat,A.Lubiw,A.WinslowartistknownasSpa

2E.D.Demaine,M.L.Demaine,S.Eisenstat,A.Lubiw,A.WinslowartistknownasSpa - PDF document

stefany-barnette
stefany-barnette . @stefany-barnette
Follow
408 views
Uploaded On 2016-11-11

2E.D.Demaine,M.L.Demaine,S.Eisenstat,A.Lubiw,A.WinslowartistknownasSpa - PPT Presentation

AlgorithmsforSolvingRubiksCubes3Thuswesettlethediameterofthennnandnn1RubiksCubesuptoconstantfactorsTheseresultsaredescribedinSections4and3respectivelyn21puzzleAnotherpuzzlethatcanbedescrib ID: 487464

AlgorithmsforSolvingRubik'sCubes3Thuswesettlethediameterofthennnandnn1Rubik'sCubes uptoconstantfactors.TheseresultsaredescribedinSections4and3 respectively.n21puzzle.Anotherpuzzlethatcanbedescrib

Share:

Link:

Embed:

Download Presentation from below link

Download Pdf The PPT/PDF document "2E.D.Demaine,M.L.Demaine,S.Eisenstat,A.L..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

2E.D.Demaine,M.L.Demaine,S.Eisenstat,A.Lubiw,A.WinslowartistknownasSpaceInvader.)Itisthebaneofmanycomputers,whichspentabout35CPUyearsdeterminingin2010thatthebestalgorithmtosolvetheworstcon gurationrequiresexactly20moves|referredtoasGod'sNumber[22].Toamathematician,orastudenttakingabstractalgebra,theRubik'sCubeisashiningexampleofgrouptheory.Thecon gurationsoftheRubik'sCube,orequivalentlythetransformationsfromonecon gurationtoanother,formasubgroupofapermutationgroup,generatedbythebasictwistmoves.Thisperspectivemakesiteasiertoprove(andcompute)thatthecon gurationspacefallsintotwoconnectedcomponents,accordingtotheparityofthepermutationonthecubies(theindividualsubcubesthatmakeupthepuzzle).See[7]forhowtocomputethenumberofelementsinthegroupgeneratedbythebasicRubik'sCubemoves(oranysetofpermutations)inpolynomialtime.Toatheoreticalcomputerscientist,theRubik'sCubeanditsmanygen-eralizationssuggestseveralnaturalopenproblems.WhataregoodalgorithmsforsolvingagivenRubik'sCubepuzzle?Whatisanoptimalworst-caseboundonthenumberofmoves?Whatisthecomplexityofoptimizingthenumberofmovesrequiredforagivenstartingcon guration?AlthoughGod'sNumberisknowntobe20forthe333,theoptimalsolutionofeachcon gurationinthisconstant-sizepuzzlestillhasnotbeencomputed[22].Whilecomputingtheexactbehaviorforlargercubesisoutofthequestion,howdoestheworst-casenumberofmovesandcomplexityscalewiththesidelengthsofthecube?Inparallelwithourwork,thesequestionswererecentlyposedbyAndyDruckerandJe Erickson[4].Scalabilityisimportantgiventhecommerciallyavailable444Rubik'sRevenge[25];555Professor'sCube[13];the666and777V-CUBEs[27];LeslieLe's3D-printed121212[14];andOskarvanDeventer's171717OvertheTopandhis2220OverlapCube,bothavailablefrom3Dprintershapeways[28].Diameter/God'sNumber.Thediameterofthecon gurationspaceofaRubik'sCubeseemsdiculttocaptureusingjustgrouptheory.Ingeneral,asetofpermutations(moves)cangenerateagroupwithsuperpolynomialdiameter[3].Ifwerestricteachgenerator(move)tomanipulateonlykelements,thenthediameterisO(nk)[16],butthisgivesveryweak(superexponential)upperboundsfornnnandnn1Rubik'sCubes.Fortunately,wecon rmthatthegeneralapproachtakenbyfolkalgorithmsforsolvingRubik'sCubesofvarious xedsizescanbegeneralizedtoperformaconstantnumberofmovespercubie,foranupperboundofO(n2).Thisresultisessentiallystandard,butwetakecaretoensurethatallcasescanbehandled.Surprisingly,thisboundisnotoptimal.Eachtwistmoveinthennnandnn1Rubik'sCubessimultaneouslytransformsn(1)cubies(withtheexpo-nentdependingonthedimensionsandwhetheramovetransformsaplaneorahalf-space).Thispropertyo ersaformofparallelismforsolvingmultiplecubiesatonce,totheextentthatmultiplecubieswantthesamemovetobeappliedataparticulartime.Weshowthatthisparallelismcanbeexploitedtoreducethenumberofmovesbyalogarithmicfactor,toO(n2=logn).Furthermore,aneasycountingargumentshowsanaverage-caselowerboundof (n2=logn). AlgorithmsforSolvingRubik'sCubes3Thuswesettlethediameterofthennnandnn1Rubik'sCubes,uptoconstantfactors.TheseresultsaredescribedinSections4and3,respectively.n2�1puzzle.AnotherpuzzlethatcanbedescribedasapermutationgroupgivenbygeneratorscorrespondingtovalidmovesisthenngeneralizationoftheclassicFifteenPuzzle.Thisn2�1puzzlealsohaspolynomialdiameter,thoughwithoutanyformofparallelism,thediameterissimply(n3)[20].Interestingly,computingtheshortestsolutionfromagivencon gurationofthepuzzleisNP-hard[21].Moregenerally,givenasetofgeneratorpermutations,itisPSPACE-completeto ndtheshortestsequenceofgeneratorswhoseproductisagiventargetpermutation[5,11].ThesepapersmentiontheRubik'sCubeasmotivation,butneitheraddressesthenaturalquestion:isitNP-hardtosolveagivennnnornn1Rubik'sCubeusingthefewestpossiblemoves?Althoughthennnproblemwasposedasearlyas1984[2,21],bothquestionsremainopen[12].Wegivepartialprogresstowardhardness,aswellasapolynomial-timeexactalgorithmforaparticulargeneralizationoftheRubik'sCube.Optimizationalgorithms.Wegiveonepositiveandonenegativeresultabout ndingtheshortestsolutionfromagivencon gurationofageneralizedRubik'sCubepuzzle.Onthepositiveside,weshowinSection6howtocomputetheex-actoptimumfornO(1)O(1)Rubik'sCubes.Essentially,weprovestructuralresultsabouthowanoptimalsolutiondecomposesintomovesinthelongdimen-sionandthetwoshortdimensions,andusethisstructuretoobtainadynamicprogram.Thisresultmayproveusefulforoptimallysolvingcon gurationsofOskarvanDeventer's2220OverlapCube[28],butitdoesnotapplytothe333Rubik'sCubebecauseweneedntobedistinctfromtheothertwosidelengths.Onthenegativeside,weproveinSection5thatitisNP-hardto ndanoptimalsolutiontoasubsetofcubiesinannn1Rubik'sCube.Phraseddi erently,optimallysolvingagivennn1Rubik'sCubecon gurationisNP-hardwhenthecolorsandpositionsofsomecubiesareignored(i.e.,theyarenotconsideredindeterminingwhetherthecubeissolved).2CommonDe nitionsWebeginwithsometerminology.An`mnRubik'sCubeiscomposedof`mncubies,eachofwhichhassomeposition(x;y;z),wherex2f0;1;:::;`�1g,y2f0;1;:::;m�1g,andz2f0;1;:::;n�1g.Eachcubiealsohasanorientation.EachcubieinaRubik'sCubehasacoloroneachvisibleface.Therearesixcolorsintotal.WesaythataRubik'sCubeissolvedwheneachfaceofthecubeisthesamecolor,uniqueforeachface.Anedgecubieisanycubiewhichhasatleasttwovisiblefaceswhichpointinperpendiculardirections.Acornercubieisanycubiewhichhasatleastthreevisiblefaceswhichallpointinperpendiculardirections.AsliceofaRubik'sCubeisasetofcubiesthatmatchinonecoordinate(e.g.allofthecubiessuchthaty=1).AlegalmoveonaRubik'sCubeinvolves 10E.D.Demaine,M.L.Demaine,S.Eisenstat,A.Lubiw,A.Winslow x1x2x3~x1~x2y1y2y3~y1~y2~y3Fig.2.AsampleofthebetweennessgadgetfromLemma1.Importantcubiesareorange(solved)andblue(unsolved).Unimportantcubiesarewhite.AnyidealsolutionmusteitherhaveI1(x1)I1(x2)I1(x3)orI1(x3)I1(x2)I1(x1).Forourhardnessreduction,wedevelopagadget(depictedinFig.2)whichforcesabetweennessconstraintontheorderingofthreedi erentrowmoves:Lemma1.Giventhreecolumnsx1;x2;x3bn=2c,thereisagadgetusingsixextrarowsandtwoextracolumnsensuringthatI1(x2)liesbetweenI1(x1)andI1(x3).ThisgadgetalsoforcesI2(x2)I2(x1),I2(x2)I2(x3),andmaxx2fx1;x2;x3gI1(x)minx2fx1;x2;x3gI2(x):ThebetweennessproblemisaknownNP-hardproblem[8,19].Inthisproblem,wearegivenasetoftriples(a;b;c),andwishto ndanorderingonallitemssuchthat,foreachtriple,eitherabcorcba.Inotherwords,foreachtriple,bshouldliebetweenaandcintheoverallordering.Lemma1givesusagadgetwhichwouldat rstseemtobeperfectlysuitedtoareductionfromthebetweennessproblem.However,becausethelemmaplacesadditionalrestrictionsontheorderofallmoves,wecannotreducedirectlyfrombetweenness.Instead,weprovideareductionfromanotherknownNP-hardproblem,Not-All-Equal3-SAT[8,23].Inthisproblem,sometimesknownas6=-SAT,theinputisa3-CNFformulaandthegoalistodeterminewhetherthereexistsanassignmenttothevariablesofsuchthatthereisatleastonetrueliteralandonefalseliteralineveryclause.Ourreductionfrom6=-SATtoidealRubiksolutionscloselyfollowsthereductionfromhypergraph2-coloringtobetweenness[19]. AlgorithmsforSolvingRubik'sCubes11Theorem5.Givena6=-SATinstance,itispossibletocomputeintimepoly-nomialinthesizeofannn1con gurationandasubsetofthecubiesthathasanidealsolutionifandonlyifhasasolution,i.e.,belongsto6=-SAT.6OptimallySolvinganO(1)O(1)nRubik'sCubeForthec1c2nRubik'sCubewithc16=n6=c2,theasymmetryofthepuzzleleadstoafewadditionalde nitions.Wecallasliceshortifthematchingcoordinateisz;otherwise,asliceislong.Ashortmoveinvolvesrotatingashortslice;alongmoveinvolvesrotatingalongslice.Wede necubieclusteritobethepairofslicesz=iandz=(n�1)�i.Thisde nitionmeansthatanyshortmovea ectsthepositionandorientationofcubiesinexactlyonecubiecluster.Eachshortmovea ectsexactlyonecluster.Hence,intheoptimalsolution,thenumberofshortmovesa ectingaparticularclusterisatmostthenumberofcon gurationsofthatcluster.EachclusterhasO(1)con gurations,soinanyoptimalsolution,anyparticularshortmovewillbeperformedO(1)times.Anysequenceoflongmovescorrespondstoanarrangementofc1c2blocksofcubieswithdimensions11n.Wecalleachsucharrangementalongcon gu-ration.Thereareaconstantnumberoflongcon gurations,sotheremustexistalongmovetour:aconstant-lengthsequenceoflongmoveswhichpassesthrougheverylongcon gurationbeforereturningtotheinitiallongcon guration.Thee ectofashortmovedependsonlyonthecurrentlongcon guration.Hence,tosolveaparticularc1c2npuzzle,itissucienttoknowasequenceofshortmovesforeachcluster,annotatedwiththelongcon gurationthateachsuchmoveshouldbeperformedin.Ifwehavesuchasequenceforeachcluster,wemayconstructafullsolutiontothepuzzlebyrepeatedlyperformingalongmovetour,andinsertingshortmovesintotheappropriateplaces.Thenweareguaranteedtobeabletoperformthekthshortmoveforeveryclusterduringthekthlongmovetour.Hence,thenumberoflongmovetoursnecessaryisboundedbythemaximumlengthofanyshortmovesequence,whichisO(1)inanyoptimalsolution.Therefore,anyoptimalsolutioncontainsO(1)longmoves.Thisboundonthenumberoflongmovesallowsustoconstructanalgorithmthatdoesthefollowing:Theorem6.Givenanyc1c2nRubik'sCubecon guration,itispossibleto ndtheoptimalsolutionintimepolynomialinn.References1.WorldCubeAssociation.Ocialresults.http://www.worldcubeassociation.org/results/,2010.2.StephenA.Cook.Cancomputersroutinelydiscovermathematicalproofs?Pro-ceedingsoftheAmericanPhilosophicalSociety,128(1):40{43,1984.3.JamesR.DriscollandMerrickL.Furst.Onthediameterofpermutationgroups.InProceedingsofthe15thAnnualACMSymposiumonTheoryofcomputing,pages152{160,1983. 12E.D.Demaine,M.L.Demaine,S.Eisenstat,A.Lubiw,A.Winslow4.AndyDruckerandJe Erickson.IsoptimallysolvingthennnRu-bik'sCubeNP-hard?TheoreticalComputerScience|StackExchangepost,August{September2010.http://cstheory.stackexchange.com/questions/783/is-optimally-solving-the-nnn-rubiks-cube-np-hard.5.ShimonEvenandOdedGoldreich.Theminimum-lengthgeneratorsequenceprob-lemisNP-hard.JournalofAlgorithms,2(3):311{313,1981.6.FrankFox.Spherical3x3x3.U.K.Patent1,344,259,January1974.7.MerrickFurst,JohnHopcroft,andEugeneLuks.Polynomial-timealgorithmsforpermutationgroups.InProceedingsofthe21stAnnualSymposiumonFoundationsofComputerScience,pages36{41,1980.8.MichaelR.GareyandDavidS.Johnson.ComputersandIntractability:AGuidetotheTheoryofNP-Completeness(SeriesofBooksintheMathematicalSciences).W.H.Freeman&CoLtd, rsteditionedition,January1979.9.WiliamO.Gustafson.Manipulatabletoy.U.S.Patent3,081,089,March1963.10.TerutoshiIshige.JapanPatent55-8192,1976.11.MarkR.Jerrum.Thecomplexityof ndingminimum-lengthgeneratorsequences.TheoreticalComputerScience,36(2{3):265{289,June1985.12.GrahamKendall,AndrewParkes,andKristianSpoerer.Asurveyofnp-completepuzzles.InternationalComputerGamesAssociationJournal,31(1):13{34,2008.13.UdoKrell.Threedimensionalpuzzle.U.S.Patent4,600,199,July1986.14.LeslieLe.Theworld's rst12x12x12cube.twistypuzzles.comforumpost,Novem-ber2009.http://www.twistypuzzles.com/forum/viewtopic.php?f=15&t=15424.15.SevenTownsLtd.30yearson...andtheRubik'sCubeisaspopularasever.Pressbrief,May2010.http://www.rubiks.com/i/company/media library/pdf/Rubiks%20Cube%20to%20celebrate%2030th%20Anniversary%20in%20May%202010.pdf.16.PierreMcKenzie.Permutationsofboundeddegreegenerategroupsofpolynomialdiameter.InformationProcessingLetters,19(5):253{254,November1984.17.LarryD.Nichols.Patternformingpuzzleandmethodwithpiecesrotatableingroups.U.S.Patent3,655,201,April1972.18.MuseumofModernArt.Rubik'scube.http://www.moma.org/collection/browse results.php?object id=2908.19.JaroslavOpatrny.Totalorderingproblem.SIAMJournalonComputing,8(1):111{114,1979.20.IanParberry.Areal-timealgorithmforthe(n2�1)-puzzle.InformationProcessingLetters,56(1):23{28,1995.21.DanielRatnerandManfredWarmuth.The(n2�1)-puzzleandrelatedrelocationproblems.JournalofSymbolicComputation,10:111{137,1990.22.TomasRokicki,HerbertKociemba,MorleyDavidson,andJohnDethridge.God'snumberis20,2010.http://cube20.org.23.ThomasJ.Schaefer.Thecomplexityofsatis abilityproblems.InProceedingsofthe10thAnnualACMSymposiumonTheoryofComputing,pages216{226,SanDiego,CA,1978.24.IngoSchutze.V-cubesSolutions.http://solutions.v-cubes.com/solutions2/.25.PeterSebesteny.Puzzle-cube.U.S.Patent4,421,311,December1983.26.JerrySlocum.TheCube:TheUltimateGuidetotheWorld'sBestsellingPuzzle|Secrets,Stories,Solutions.BlackDog&LeventhalPublishers,March2009.27.V-CUBE.V-cube:the21stcenturycube.http://www.v-cubes.com/.28.OskarvanDeventer.Overlapcube2x2x23.shapewaysdesign.http://www.shapeways.com/model/96696/overlap cube 2x2x23.html.