<<

The Slice in Rubik's Cube

DAVID HECKER RANAN BANERJI SainitJoseph 's Universitv Philaidelphia,PA 19131

The differentmaneuvers on Rubik'scube can be thoughtof as a setof transformationsforming a subgroupof thegroup of all permutationsof thecube's 54 facelets.In thispaper, we shalldo a completestudy of thesmall of thisgroup generated by turningonly the layers of thecube. This is knownas theslice group. Our purpose in thisstudy is to use thecube to illustrate severalfundamental group theoretic techniques. Beforean accuratestatement of theproblem can be made,we mustintroduce some notation, mostof whichis standardin thecube literature [4]. We shalldescribe all maneuversas ifthey were carriedout withrespect to the cube held in a fixedposition, referring to the six facesby the "colors" F, B, R, L, U, and D forfront, back, right,left, up, and down. The cube will be assumedto startwith all six faceshaving solid colors,known as theclean stateof thecube (see FIGURE 1). A clockwise900 turnof any of thesesix faces(clockwise looking at theface "from outside")will be denotedby TF,TB, etc.(see FIGupE 2). We shallalso talkabout a 90? clockwise turnof theentire cube looking at thecorresponding face from outside and denotethese by CF,BC,, etc. Everypossible maneuver M can be writtenas a finitesequence of thesefundamental moves, hence thesemoves generate the group of all possibletransformations of the cube. The inverseof any move M, denotedby M1, is themaneuver required to undo theeffect of themove M. Note thatthe actual twistsof the cube neededto accomplishthis will not be unique.To avoid this problem,when speakingof a move or maneuveron the cube, we referonly to its effective permutationof the cube's 54 facelets,and not to the actual twistsrequired. Two different sequencesof twistshaving the same effectare consideredto be thesame move.Repeating any movea numberof timeswill be expressedwith the usual exponential notation. In additionto referringto thecube's facelets, we shallalso referto the27 subcubesof thecube,

IB I B- I ? BB B BB

IU uU U U /UU U U /U R LllI u u I L F F F ~~~R/R /U R 1R IRI RR / F F F R LF F F R R R L R F F F RR F FEF

F F F DDD

(a) (b)

FiGuKEL 1. (a) Rubik'scube in the clean state.(b) Rubik'scube in the clean statewith hidden sides displayed.

VOL. 58, NO. 4, SEPTEMBER 1985 211

This content downloaded from 65.206.22.38 on Mon, 19 May 2014 12:55:43 PM All use subject to JSTOR Terms and Conditions U F

U U

F F R

FIGuRE 2. The moveTR. oftencalled cubiesin theliterature [4]. One of thesecubies lies in theinterior of thecube and cannot be seen. Eight othersappear on the cornersof the cube; theseeach have 3 facelets showing.Twelve are edgecubies with 2 faceletsshowing, and theremaining six lie at thecenter of each face and have onlyone faceletvisible. The cubiesare importantsince the facelets on each cubie stay on that cubie so thata large numberof the 54! permutationsin the groupof all permutationsof the 54 faceletsare prohibited.Also, everymove takescorner cubies to corner positions,edge cubies to edgepositions, and centercubies to centerpositions, thus further limiting thepossible . The positionof anyfacelet or cubiewhen the cube is in theclean state is called thehome position of thatfacelet or cubie.The clean stateis completelycharacterized by all faceletsbeing in theirhome position. We thinkof thisposition as representingthe identity permutationon thecube. The slice group The slice groupis thegroup of transformationsof the cube generatedby thefollowing three movesequences: TBTF CB , TLTR1CL1, TUT-1C-1 (1) These are illustratedin FIGURE 3. One can thinkof themin twoways. First, consider them as turningtwo opposite faces "parallelly," one clockwiseand one counterclockwise,then turning the wholecube to returnthose two faces to theiroriginal positions. Alternately, one can considerthe overalleffect, which is to turnthe center slice of thecube clockwise 900 whenlooking at theF, R, and D facesrespectively. Our discussionwill be fromthis latter point of view. We shalldenote the three sequences in (1) by thesingle letter F, R, and D, whichwill stand for turns of thecorresponding center slice. We

IB B IB| B B

B

L I R > - U /UF /F U U U u D uu u U F U R u F L R F FE F F U F U RI u U uL

L D RR R

RR F D F F F F DD

F:TBTF 1C1 R:TLT,lC7-1 D:TuTi1Ci

FIGURE3. The threemoves which generate the slice group.

212 MAGAZINE

This content downloaded from 65.206.22.38 on Mon, 19 May 2014 12:55:43 PM All use subject to JSTOR Terms and Conditions have thusgiven these letters two meanings, as we have also used themto representcolors of the faces.The meaningin a giveninstance should be clearfrom the context. To discoverthe structure of theslice group G of permutationsgenerated by themoves F, R, and D, we analyze the actionsof slice moves on differentsets of cubies,thus constructing homomorphismsfrom G to knowngroups. Recall thatif H is anygroup of permutationson a set X, and if Y is a subsetof X suchthat forevery h E H and y E Y, we have h(y) E Y, thenY is said to be closedunder the action of H. When we have such a closed subset,a homomorphismis inducedfrom H into the groupof permutationsof Y: simplymap h in H to thepermutation it induceson theset Y. In our case, G is a groupof permutationson theset of cubies and facelets.We willfind subsets of cubiesthat are closedunder G, thusinducing homomorphisms of thetype just described. Returningto thecube, first notice that every corner cubie is leftfixed, or unmoved,by each slice move,thus the slice group induces the identity on theset of cornercubies and theirfacelets. This is convenient,since the colors on thesecorner cubies act as benchmarksin case we forgetwhich face is front,back, etc. Next,slice movesalways move center cubies to centerpositions, hence the set of six center cubiesis closed underthe action of G. We denoteby T thehomomorphism this induces from G intoS6, thegroup of permutations on six objects(in thiscase, thecenter cubies). The imageT(G) in S6 ignoresthe actionof G on all cubiesexcept the centers. By examiningthe cube, one notes thateach slice movehas thesame effecton thecenters as some rigidmotion of theentire cube. For example,the move F takescenters to thesame positions that CF does. Therefore,T maps G into T, the groupof rigidmotions (rotations) of the cube (a subgroupof S6). The map T is actuallyonto T since T is generatedby CF, CR, and CD, and -(F)= CF, i-(R)= CR, and Ti(D) = CD. It is well knownthat T is isomorphicto S4, and thus has 24 elements.(The isomorphismwith S4 is unimportantin whatfollows. The interestedreader can constructthe isomorphismby thinkingof T as actingon theset of 4 diagonalline segmentslinking opposing cornersof a rigidcube.) The twelveedge cubiescan be partitionedinto threesubsets of foureach, EF, ER, and ED, whereeach set containsthe edge cubieson the centerslice parallelto the F, R, and D faces, respectively.By manipulatingthe cube, one noticesthat the generators F, R, and D (and hence everyslice move in G) takeedge cubiesin thesesets to edge cubiesin the same set. Hence, as above,we gethomomorphisms OF' 9kR, and OD, each mappingG intothe group of permutations of EF, ER, and ED, respectively.Again, by examiningthe cube,one noticesthat F inducesa 4-cycleon theelements of EF, whileR and D each inducethe identity permutation on EF. Hence OF (F) is a 4-cycle,OF (R) = OF (D) = id, and we see thatOF(G) is generatedby OF (F) and is isomorphicto Z4. For anyelement g of G, OF (g) is thenumber of timesmod 4 thatF appearsin any sequenceof movesgenerating g, withF-1 countedas -1 (or 3 since F-1 = F3). A similar analysiscan be made of thehomomorphisms OR and OD. We thushave fourhomomorphisms of G: one onto T and threeonto Z4. By combiningthe fourhomomorphisms, one obtainsa homomorphismfrom G into T x Z4 x Z4 x Z4 givenby g --*( T( 9),9OD ( 9),9OR ( 9),9OF ( 9)) - (2) The kernelof thishomomorphism is clearly the intersection of thekernels of thefour homomor- phismsdefining it, which is theset of elementsin G leavingall centercubies and all elementsof ED, ER, and EF fixed.Such a permutationmust leave thecube in its clean state,and is thusthe identity.Therefore, the homomorphism is injective and G is isomorphicto its image,a subgroup of TX Z4 X Z4X Z4. Next,we noticethat each generatorof theslice group acts as theidentity on twosets of edge cubies,as a 4-cycleon one set of edgecubies, and as a 4-cycleinside T, thegroup of motionsof the centers.Therefore, overall, each generatoracts as a productof twodisjoint 4-cycles, yielding an evenpermutation. It followsthat G is isomorphicto a subgroupof the even permutationsin T X Z4 X Z4 X Z4. We willshow that the image of G containsall sucheven permutations. (Note

VOL. 58, NO. 4, SEPTEMBER 1985 213

This content downloaded from 65.206.22.38 on Mon, 19 May 2014 12:55:43 PM All use subject to JSTOR Terms and Conditions thatparity in T x Z4 X Z4 X Z4 is inheritedfrom S18, the groupof all permutationsof the 18 centerand edge cubies, of which T x Z4 X Z4 X Z4 is a subgroup.) Using(2), G can be identifiedas a subgroupof T x Z4 X Z4 X Z4, and T is theprojection onto thefirst coordinate of theproduct. Hence, ker T can onlycontain elements of theform (id, a, b, c) in T x Z4 X Z4 X Z4, witha + b + c evenfor the reasons discussed above. The followingmoves generatethe indicated elements:

(i) RF-1DF (id,1, 1,0) (ii) RDFD-1 (id, 0, 1, 1) (iii) FDR-lD-lFD-lRD (id, 0, 0, 2). Rememberthat the last threecomponents of theseelements refer to thecyclic permutation of the edge cubiesin the D, R, and F planes,respectively. It can be shownthat the three moves (i), (ii), (iii) generateevery element of theform (id, a, b, c) witha + b + c even.The procedurefor doing thisis similarto thatof expressingthe vector (a, b, c) as a linearcombination of (1, 1,0), (0,1, 1), and (0,0, 2) as done in linearalgebra, only here we workwith integers and do arithmeticmod 4. Therefore,ker T is preciselythe set of elementsof thisform, and thushas 32 elements.Im T has 24 elementssince T is onto T. Hence G has 24 x 32 = 768 elements..But theset of evenpermuta- tionsin T x Z4 X Z4 X Z4 also has 768 elements,so G mustequal thisset. Let us use thisanalysis of thestructure of G to solvea cube thathas been mixedup through slice moves.For example,consider the cube orientedas in FIGURE4. (Shouldthe reader wish to followthis discussion on an actualcube, the move R2FR2F- 1DF2R- 1 willput a cubein theclean state into this position.)The firstrequirement is thatwe be able to recognizethe position's expressionas an elementof T x Z4 X Z4 X Z4. One findsthe first coordinate by writingdown the permutationin S6 of thecenter cubies. For the otherthree coordinates, one examinesthe edge cubiesin ED, ER, and EF9 respectively,and countsthe number of D, R, and F movesthat were requiredto put thecubies in theircurrent position. The resultof thiscomputation for FIGuPE 4 is ([(F, L, U)(B, R, D)],1,3,2). To solvethe cube, first make slice moves mimicking the rigid motions of thecube to bringthe centercubies to theirhome positions. At mosttwo 900 or 1800 turnswill always be sufficientto do this.In our example,the move FT-I puts the right and leftcenters in theirhome position (see FIGuRE5(a)). The moveR willthen return the remainingcenters to theirhome position, as in FIGUR,E5(b). The cube is nowin theposition (id, 1,0,1). The purposeof thismaneuver is to put the cube's positionalrepresentation in keri. The advantagehere is thatkeri, havingonly 32 /B|DI BI D/DIR /B/D|

\D\LD R

FIGURE 4.The cube in position (I(FL U)(B,R,D)I,1,3,2)

214 MATHEMATICS MAGAZINE

This content downloaded from 65.206.22.38 on Mon, 19 May 2014 12:55:43 PM All use subject to JSTOR Terms and Conditions UB IU /U /UU LBILR LU L R U B U UU U U U/

F U F RIF F F R F R FR L U L UL F L U REUEa R FG R ~~~~~~~Rb E F U F F F F

FIGupUiE5 (a) FIGuRE 5 (b)

elements,is a much simplergroup to work withthan G. To complete the solution,we now use the generatorsfor kerT given by equations (i), (ii), and (iii) to produce the inverse element of the currentcube position so that the cube can be restoredto the clean state. The inverseof (id, 1,0, 1) is (id, 3,0, 3), which can be obtained by move (i) 3 times followedby (ii) and then (iii). Denoting this sequence of moves by M we write M = (i)3 (ii)(iii). Hence, startingfrom FIGURE 4, we can make the followingsequence of moves to restorethe cube:

F-'RM = F-'R( RF-'DF)( RF-'DF)( RF-'DF)( RDFD')( FDR-'D'-FD-'RD). This is definitelynot the shortestpossible solution,but it works. One method of shorteningthe answer is to use the fact that (i)3 = (i)- = F- D -FR'-; this yields the solution F-1R ( F-'D-'FR-')( RDFD-1)( FDR-'D'-FD'-RD) . (3) Note that R - 'R appears in this expressionand can be cancelled out; however,very little else can be done to shortenthis process withouta whole new approach to the problem. The method used here is typical of cube-solvingstrategies. One finds a sequence of nested of the group of allowable positions; in our case, G D ker1 D 1. Then, for each position in the sequence, one findsmoves for a representativein each coset of the smaller subgroup in the larger. One calculates the cube's position, then performsthe moves correspondingto the known coset representativeof the position's inverseto reduce the cube's state to one in the next subgroupdown the sequence. In our example, the firstsuch reductionwas made by performingthe move F- 'R, a representativeof the coset over kerT of the inverseof the cube's original position. All the published cube solutions (see references)use this strategy,although differentsolutions use differentsubgroup series. For example, Taylor and Rylands [8] solve a slice group problem by utilizingthe series G D kere D 1 where E is the projectionof G onto Z4 X Z4 X Z4. This solution firstputs all edge cubies in their home positions to obtain a "spot pattern." Then generatorsof kerE are given to solve that pattern. In the case of the slice group,more efficientsolutions could be found by an exhaustivesearch (a good exercise for those with a backgroundin computerprogramming) since thereare only 768 possible positions. This, however,is an unrealisticapproach for solving a generallyscrambled cube, since there are about 1018 possible differentcube positions [1]. The series of subgroups approach seems to be the only one to generate practical algorithmsfor solving larger cube problems. For furtherinformation on thisapproach, and some interestingsubgroup series used for larger cube problems,we referthe reader to Frey and Singmaster[4]. The oriented slice group Some of the cubes on the markettoday have symbolsor designs pasted on the faceletsinstead of solid colors. Some even have pictures,and one must unscramble all six pictures to solve the cube. In solving a scrambled cube of this type,one mightnotice that some of the centerfacelets

VOL. 58, NO, 4, SEPTEMBER 1985 215

This content downloaded from 65.206.22.38 on Mon, 19 May 2014 12:55:43 PM All use subject to JSTOR Terms and Conditions havebeen rotated with respect to theother designs on thefaces on whichthey lie. Move sequences are known[8] thatyield rotations of individualcenter cubies. We will studythe rotations which are possibleusing slice moves. To analyzethe effect of slicemoves on centercubies, we shallredefine the identity transforma- tion of the cube to includefixed orientation of the centers.This, of course,redefines the term "clean state"for the cube as well(see FIGupE 6). We thenget a largergroup G* of possiblecube positions,the oriented slice group. If one does nothave a cube withdesigns or pictures,one can experimentwith G* by pastingpieces of mailinglabels over the centerand upperright hand cornerof each face,and thendrawing arrows on thelabels, both in thesame direction, to signify orientation.The arrowson thecorners provide benchmarks of orientationsince the corner facelets remainfixed under slice moves. In whatfollows, we willassume that the arrows have been drawn on thecube in thedirections indicated in FIGupE 6. To describethe positionof the cube aftersome slice moves,one must firstdescribe the positionsof all the centerfacelets and edge cubieswith some elementof G, thendescribe the orientationof each of thesix centerfacelets. We representthe orientation of a givencenter as an elementof Z4 in the followingway. One findsthe centerfacelet in questionon thecube, then comparesthe directionof the arrowpasted on it withthe directionof thearrow on thecorner cubie of the face on whichthe centerfacelet currently resides. The elementin Z4 countsthe numberof 900 clockwiserotations the center has made fromthe standard direction noted on the cornercubie. Using one copyof Z4 foreach centerfacelet, the cube's position can be represented as an elementof the set G x Z4X Z4X Z4X Z4X Z4X Z4= GX (Z4)6, where the last six coordinatesrepresent the orientation of the U, D, F, B, R, and L coloredcenters, respectively. The representationsof the threegenerators of the orientedslice group,using this notation are givenin TABLE 1. It is importantto notethat we haveyet to definea groupoperation on theset G x (Z4)6. We will writethe representationof a slice move in G x (Z4)6 as (p,(A, B, C),(a, b, c, d, e, f )), where p is in T, a subgroupof S6, (A, B, C) is in Z4 X Z4 X Z4, and (a, b, c, d, e,f) is in (Z4)6. Note that(p, (A, B, C)) comprisesthe G componentof theslice move. Then given two slice moves, g=(p,(A,B,C),(a,b,c,d,e,f)) and h =(a,(X, Y, Z), ( u,I , w , x , y, z)), we definetheir composition (the group operation in G x (Z4)6) to be

hg= (p,((A, B,C) +(X,Y, Z)),((a, b,c,d, e,f) + p-1(u, v,w,x,y,z)))

B BITEI B/f

L ~U/ Lu u L

L ~~R R

LJF F

\D \<, D\ D D D

FIGURE 6. An orientedcube in the clean state.

216 MATHEMATICS MAGAZINE

This content downloaded from 65.206.22.38 on Mon, 19 May 2014 12:55:43 PM All use subject to JSTOR Terms and Conditions G 'l Permutationof Center Cyclesof Rotationsof Center Move Facelets Edge Planes Facelets

ED I R IE F 'BI I L I I I I D ~~(F.R. B.L) I 0O 0O O O 1 1 2 1 2 1 O R (U, B, D, F) O 1 l 01 1 1 I o I 1o I

TABLE 1 whereadditions are componentwise,mod 4. The purposeof applyingp-1 beforeadding the last six componentsis to makesure the orientation changes are appliedto theproper center facelets. The representationof a positionin G X (Z4)6 assumesthat moves were made startingfrom the clean state.However, composing moves requires the second move to startfrom where the first one leftoff, so the centercubies are not startingfrom their home positions.Since p indicatesthe centers'positions after the move g, applyingp- 1 beforeadding permutes the orientation changes beingmade by h so thatthey are appliedto theproper facelets' coordinates. The resultinggroup structureis called a semidirectproduct of groups.We referthe reader to theliterature [5] formore informationon thistopic. It can be shownthat G* can be representedas a subgroupof theset G X (Z4)6 withthe group operationdescribed above. In fact,G* is the subgroupgenerated by the moves R, D, and F whoserepresentations are givenin TABLE 1. Let v: G*- G be thehomomorphism which projects G* onto G, thatis, S focuseson cubie positionand ignorescenter facelet orientations. Then ker S is theset of slicemoves that leave all cubiesin theirhome position, but mayrotate center facelets. Note thatin kerv, thecomposition of moves correspondsto ordinaryaddition in (Z4)6 since the G componentis the identity element.This greatlysimplifies matters. The followingtwo moves, a. and ,B,are in kerv. Theirlast six coordinates in ourrepresentation are given. a. = RF- DFR1F- 'D-1F (0,0,2,2,0,0) P = RF-1DFDIYFR1-F-1 (3,1,0,0,3,1) One can constructsimilar moves by conjugatingthese with rigid motions of thecube (thinkof holdingthe cube withdifferent faces forward and up and usingthe same twists)to obtain a* = Cu aCU' (0,0,0,0,2,2), = CuLC/3 (3,1,1,03?00), (5) a/ = C1aoC7 (2,2,0,0,0,0), /3'==C/3C7 (0,0,1,3,3,1).I The six movesin (4) and (5) generateker v. We outlinea proofof this,but leave thedetails to the reader. First,show that for any element of G*, thenumber of odd numbersin thelast six coordinates is either0 or 4. (This is trueof the generators.Show that thisproperty is preservedunder compositionin G*. You willneed otherproperties of the generatorsand the factthat opposite centersalways remainopposite to each other.)Next, prove that withinker r, the sum over coordinatescorresponding to orientationsof oppositefaces is 0 mod4. (This is onlytrue in kerS and is more difficultto prove.Consider the generatorsR, D, and F withoutthe finalrigid motiongiven in theirdefinition, and rememberthat in kerr, all centersend up in theirhome position.)Then countand findthat there are 32 six-tupleshaving these two properties, and check thatall 32 can be generatedusing a., a.*, a,,B*, a' and ,B'.

VOL. 58, NO. 4, SEPTEMBER 1985 217

This content downloaded from 65.206.22.38 on Mon, 19 May 2014 12:55:43 PM All use subject to JSTOR Terms and Conditions FIGURE7. The CUbein position( id, (0,0,0), (2, 2,3,1, 3,1)).

From theinformation above, we findthat IG*I= kerIs7 Im~s7 kers1II = 32 X 768 =24576. This is the totalnumber of distinctpossible positions of an orientedRubik's cube scrambledby slice moves. Althoughwe do nothave a simpledescription of which elements of G X (Z4)6 arein G*,we do have an algorithmfor solving an orientedcube problemby usinga seriesof subgroups.If we let -i': G* -~T be thecomposition G* -~G AT, thenthe series G* D kerr' D kerrTD 1 providesour solution.The passage fromG* to kerT throughkerr' is preciselythe methodof solutiongiven previously, which ignores orientation; that is, firstget the centersin theirhome positions(pass to ker-'), thenmove the edge cubies to theirhome positions leaving centers fixed (pass to ker7) usingthe moves (i), (ii), and (iii). Now expressthe inverse of thecurrent position (in kerT) as a productof thegenerators ae, oa*, a', ,B,,B*, and ,B' and performthese moves to orientthe center facelets, thus solving the cube. For example,suppose an orientedcube is putinto the positionof FIGURE 4 by makingthe move R2FR2F1lDF2R1l on a cube in theclean state. One solvesthis cube problemby firstignoring the orientation arrows and followingthe solution techniquedescribed for an unorientedcube. According to our previouscalculations, this requires us to make the move given in formula(3). This will leave the cube in the position ( id,(0,0,0), (2,2, 3, 1,3,1)), as shownin FIGURE 7. Since thisposition is in kerS, its inverseis ( id, (0,0, 0), (2,2,1, 3, 1,3)), and thisinverse can be expressedas a productof theknown generators of kerT. The composition&e*o'fi' is one of manythat work. Making this move will restorethe cube to theclean state. One of us (Ranan Banerji)is supportedpart-time by the National Science Foundationunder Grant MCS-821 7964 to Saint Joseph'sUniversity.

References [1] C. Bandelow,Inside Rubik's Cube and Beyond,Birkhauser, Boston, Mass., 1982. [2] E. Berlekamp,J. H. Conway,and R. Guy, WinningWays, Academic Press,1982, pp. 760-768, 808-809. [3] T. Davis, Teachingmathematics with Rubik's cube, Two-Year College Math J.,13 (1982) 178-185. [4] A. H. Frey and D. Singmaster,Handbook of Cubik Math, Enslow Publishers,Hillside, N.J., 1982. [5] S. MacLane and G. Birkhoff,Algebra, Macmillan Co., New York, 1967, p. 461. [6] J. G. Nourse, The SimpleSolution of Rubik's Cube, BantamBooks, New York, 1981. [7] D. Singmaster,Notes on Rubik's Magic Cube, Enslow Publishers,Hillside, N.J., 1980. [8] D. Taylor and L. Rylands,Cube Games, Holt, Rinehart,and Winston,New York, 1981.

218 MATHEMATICS MAGAZINE

This content downloaded from 65.206.22.38 on Mon, 19 May 2014 12:55:43 PM All use subject to JSTOR Terms and Conditions