Rubik's+Cube+Challenge

Thinking about solving a Rubik’s Cube

A Common Strategy for Approaching Such a Problem Determine what does not change, what changes, how changes can be undone, and how the problem can be broken into parts. Since the 6 face-center cubies never change places, they serve as reference points. The 12 edge-center cubies can appear in any of 12 locations, with 2 orientations; there are 8 places for corner-cubies and 3 orientations.

A single twist of any face can be undone by the inverse twist, e.g., Fi negates F. For a sequence, the order must be reversed while replacing each operation with its inverse, e.g., [Ri Ui] negates [U R]. Negation quickly gets tricky for longer sequences of twists. Additionally, after any single twist of a face, the prior state of the cube can be restored by completing a cycle of restoration, e.g., the state prior to move [U], can be restored by repeating the twist [U] three times more [U U U]. With sequences of twists, restoration by repetition becomes impractical very quickly.

Can the problem be broken into manageable sub-problems? That depends on what you can manage. It asks, “What can you recognize and remember?” The “7 Step Guide” is confusing. Manageable, for me, demands some measure of progress, “achieved goals” that can be remembered. And it is very helpful to be able to characterize “manageable” sub-problems. I see the Rubik’s cube solution in 3 initiatives: Solve the bottom layer: this is the easy problem. (Steps 1 and 2) Solve the middle layer: this is the tricky problem. (Step 3) Solve the top layer: this is the challenging problem. (Steps 4-7)

Part I: Solving the Bottom Layer The booklet’s first goal: solve the green cross.15 This is easy since you don’t have to think about cubies that do not have a green side. Turn the cube so the green center cubie is on the upper face. Find any edge-cubie with a green face. Rotate that face so the green face of the edge-cubie is next to the green center-cubie. Rotate the top (green-centered) face so that the edge-cubie’s second face is next to the centercubie of the same color. Good start, you have the first edge-cubie in its place!

Next, put a second green edge-cubie in the “same” relation to the green center-cubie and its other face color center-cubie—without permanently moving the first edge-cubie away from its matching side face. Get all four green-edge cubies in place. You can do it by trial and error, for the second, third, and fourth “greenand-X” edge cubies. (This will take a while, but it’s easy and it’s good familiarization and practice.)

Fixing orientation problems: it often happens that some of these cubies are oriented so the green color of the cubie is on the “wrong face” (the one adjacent to its second color center-cubie). The booklet presents a 4-move procedure to flip this cubie to the goal orientation; [Ri U Fi Ui], where the lower case “i” means: “for this move, rotate the specific face counter-clockwise.” To explicitly specify the rotation-sense of moves, we represent a clockwise twist with a “+” sign, and counterclockwise twists with a “-”. Thus: [Ri U Fi Ui] -> [R- U+ F- U-]. “How to view the cube” is important too.

See: 3 faces visible, green on top; edge-cubie flip-target on right face. Do: procedure: [R- U+ F- U-]; after, verify the target cubie’s orientation.

Review: why does this work? You have to be able to answer for yourself. I find it helpful to reverse the procedure by [U+ F+ U- R+], thus restoring the prior state, then to step through the procedure again, carefully watching the target cubie to see how each move affects its orientation and relation to the other cubies.

With the first five cubies in place, if we can do the four corners, we’ll have a direct solution for the bottom layer! How to do it? One cubie at a time.

Reflection: notice that we have modified the representation of the operations performed on the faces of the cube. This is done to explicitly specify an aspect (sense of turning) of the operation. This is important because it brings into concrete specification an element of the operation that otherwise would be “assumed as a default,” i.e., remembered.

The greencross, step one’s now “achieved goal,” marks a significant change. One must begin to think about changes using procedures that do not relocate other cubies already in their target positions. With the green face on top, the booklet proposes locating a cubie in the current bottom then rotating that bottom layer until that cubie is directly under the place it must go; call that the cubie’s home position. The goal is to get the four green corner-cubies home. The booklet proposes [R- D- R+ D+]. This rotates the corner-cubie’s home position into the face opposite the green face and twists that opposite layer to insert the target cubie into the “home” position, then restores the home position to the green face. The booklet directs execution of this procedure 1, 3, or 5 times. Why is this number variable? It’s neither obvious to a novice nor explained.

The number of execution required depends on the original orientation of the target cubie when under the home position. There are three possibilities:

See: 3 faces visible, green on top; the target cubie under its home. > if its green color is on the front face, then do variation 1 [D- R- D+ R+] > if its green color is on the right face, then do variation 2 [D+ F+ D- F-] > if target-cubie’s green color is the bottom face, Do setup procedure [R- DD- R+ D+]; it puts the green color on the right face, under its home. Then do procedure variation 2 [D+ F+ D- F-].

Review: why does this work? The symmetrical variations are “the same” in the general sense of bringing the home position to the bottom layer where a different cubie can be inserted into the target edge. When the target-cubie’s green color is on the bottom, the setup procedure changes its position to the right face where variation 2 is used.

There is an issue here which some would see as one of principle, i.e., is it better to represent knowledge by a uniform procedure which is harder to understand or is it better to represent knowledge by multiple alternatives which may be easier to learn and remember? I see the issue as one of choice, yours, which depends on your personal style and established ways of thinking. Do you understand why these procedures work? ... Yes? Congratulations then, you have mastered the first layer of Rubik’s Cube!

Part II: Solving the Middle Layer When you turn the cube, setting it down on the green face, you will see that the middle layer is already “half-solved,” because all the face-center cubies are where they belong (they always are). What’s tricky in the middle layer is inserting four edgecubies in their own home positions, with the proper orientation. Of course, this must be done without changing any cubies in the bottom layer, except temporarily.

The typical situation is that an edge-cubie belonging in the middle layer can be placed over a color matching face-center cubie. Assuming the cube is oriented so that the home for the target cubie is on the vertical forward edge, it must be true that the “unmatched” face of the edge cubie is either on the current right face or the current front face. These symmetrical states require solution by symmetrical procedures. Look for any edge-cubies that are already in their home positions. If there is one, turn the cube so the next vertical edge is forward. Observe the colors of the front and right center-cubies. Find an edge-cubie that has both those colors on its faces. Choose that cubie and rotate the top layer so that the side color of the chosen cubie matches either the front or right face-center cubie color. The booklet specifies an eight-step procedure and a symmetrical variation to insert that chosen cubie in its home.

For me, eight steps is too many to remember. The risk is significant confusion and errors, which require starting over. I need an idea that appears simpler than either [U R Ui Ri Ui Fi U F] or [Ui Fi U F U R Ui Ri]. But think about it. If the states are symmetrical, then there must be some symmetry in the procedures which reveal their internal structure.... Notice that the last four moves of the first procedure are identical to the first four moves of the second, and the last four moves of the second are identical to the first four of the first procedure. I can represent this as two “sub-procedures:”

> for a target cubie on the right face, do: sub 1 [U- F- U+ F+] sub 2 [U+ R+ U- R-] > for a target cubie on the front face, do: sub 2 [U+ R+ U- R-] sub 1 [U- F- U+ F+]

Reflection: this specification of sub-procedures is based on a need to understand, resolved by observations on the structure manifest in a set of operations. This defines a “manageable” sub-problem by aspects of the problem, as distinct from the needs and limitations of the problem solver.

Remembering these sequences of four moves is still hard. We cannot change the specific moves or their sequence, but we can group the moves by what sequences have in common, their “sense of twist” (signs plus or minus, meaning clockwise or counter clockwise), thus:

> right face cubie: sub 1 [U- F- U+ F+] sub 2 [U+ R+ U- R-] -> [-UF +UF] [+UR -UR] > front face cubie: sub 2 [U+ R+ U- R-] sub 1 [U- F- U+ F+] -> [+UR -UR] [-UF +UF]

One can even pronounce the move sequences as syllables; this could aid recall, even though the syllables be non-sense. Now, wherever there is a middle layer home position not occupied by its color specified appropriate cubie, one specifies:

See: 3 faces visible, green on bottom; forward edge “empty”; chosen cubie above right or front face-center cubie. Do: either the front face or right face procedure above, as appropriate.

Review: Think about what’s needed to replace the forward edge-cubie while keeping the base layer cubie “under” it. In completing the bottom (green) layer corners, it was enough to “slice” a single cubie into an edge to complete a single color edge, then rotate that edge into the green layer. For the middle layer, one must assemble a two-chunk portion of the forward edge which can be rotated to the vertical in a single move. But that can only be done after the “two-chunk” forward edge is joined perpendicularly to the bottom layer edge which shares the corner cubie. Apply your visual imagination; understanding THIS point is worth all the time it takes you.

Part III: Solving the Top Layer The “7 Step Solution” for part III involves four steps in this order: 1. solve the top (blue) cross 2. re-order the top edges 3. re-order the top corners (1) 4. re-orient the top corners (2) The first three of these appear simple because they are designed to return to the initial state, except for movement of the targeted cubie.

1. Solving the Top (Blue) Cross This goal places top layer edge-cubies in the correct orientation (blue on the top layer). There are four such edge-center cubies. Either zero, two, or four of these will have the upper face (blue) color. If four, then the blue cross is already completed. The six moves of the procedure below flip two of these cubies with every execution, one in each three-step sub-procedure:

See: 3 faces visible, green on bottom; turn the cube until you see the top center cubie blue, or a blue arrow (3 cubies) pointing at you, or a blue bar (3 cubies) from the left to the right face. Do: procedure: sub 1 [+FRU] sub 2 [-RUF] once, or two times if needed, until you see a blue cross (possibly with more blue cubies) on the top face. THEN turn the top layer so that a maximum number of top-edge cubies are adjacent to the same-colored side face-center cubies.

Review: If the top layer shows none or 2 edge-cubies blue on top, this implies there are four or two top-edge cubies that are blue on the side. The procedure flips the toplayer edge cubies then restores the lower level layers. 2. Re-Ordering the Top-Edge Cubies Since now all the top-edge cubies will be of the same face color, we can distinguish them by naming each for its side face color. You can always match at least one top-edge cubie with its same-color side face-center cubie. Choose one and consider this the head of a list, e.g., yellow. As I rotate my cube clockwise on its green base (viewed from the top), the sequence of side-face colors is [yellow orange white red]. To solve the top edges, it is necessary to put every top-edge cubie in alignment with its side-edge color-matching center-cubie. If I list in sequence the topedge cubie face colors during the same cube rotation, I might see they are [yellow orange red white]. The order of the last two top-edge cubies needs to be swapped. The booklet provides an eight-step list of moves to do it [R U Ri U R U U Ri]. Using exactly the same moves, I describe it this way:

See: 3 faces visible, with green on bottom, orient the cube so that the two cubies to be swapped are to the left of the forward vertical edge. Do: procedure: sub 1 [+RU-R+U] sub 2 [+RUU -R]. If a second set of top edge-cubies needs to be swapped, do it again. No more executions should be needed.

Review: The procedure matches each side face with its top-edge side-color cubie. One is always possible. Two swaps are all that is needed to re-order the other three.

What remains to complete part three? Get all top-corner cubies in appropriate corners (1), and make sure each top corner cubie is oriented to color match its side faces (2).

3. Re-Ordering the Top-Corner Cubies As with the top edge-center cubies, where we needed a procedure to reorder the sequence to get them “in the right place,” so here we also need a procedure to sort the corner cubies into their appropriate home positions. This is how I represent it:

See: 3 faces visible, with green on bottom; if any top-corner cubie is in its appropriate home position, rotate the cube to make it top of the forward edge. Do: procedure: [+UR -UL][+U -RU +L] (this re-sequences the corners list; you may need to do it twice). > if there is no corner cubie “in the right place,” execute this procedure once as a setup procedure, then follow “what to do.” (This implies a maximum of three executions).

4. Flipping the Top-Corner Cubies The solution’s nearly complete. Go on carefully. It would be a shame to mess it up now!

See: three faces visible, with green on bottom, red as front face. Do NOT change the orientation of the cube until the solution is complete.

Do: rotate the top layer until a cubie needing to be flipped is top of the vertical edge; > do procedure: [-RD +RD] 2 or 4 times, pausing when the cubie has been flipped. > Rotate the top layer to bring another cubie needing to be flipped to the top vertical edge. For each cubie needing to be flipped, do procedure [-RD+RD] 2 or 4 times, pausing when the cubie has been flipped. (Expect the lower layers of the cube to appear “messed up” at this point. Moves to flip the last corner cubie, done faultlessly, will restore order to the lower layers as well as completing the top layer solution.)

When no more cubies need to be flipped, align the top edge pieces with their side color matches. The solution should be complete; stop.

Review: During this final stage, the configuration of cubies can still appear to be a mess. One might think a miracle would be needed to solve the cube at this point... and then a miracle happens: at some point while performing this procedure, the cube “solves itself.” Any one who has succeeded in solving the cube will know from experience that this DOES happen. A novice will have to take the statement on trust. Best for everyone is an understanding of why the inter-dependencies of cubies, moves, and patterns make this conclusion necessary and obvious.

Why Does the Double [-RD +RD] Work? Let’s assume the cube is now solved. How did that actually happen? Talk of “miracles” is a metaphor here. Such “happy accidents” are excuses we accept as explanations if we cannot or will not pursue deeper understanding. HERE is an opportunity to understand complex inter-dependencies, if you want to.

A key point is one never need to do so in full detail, so long as you are satisfied that: when you change one cubie, you do something similar to but different from that for other cubies in comparable positions, interconnection of the cubies guarantees eventual return of a solved state.

> why “guarantees?” > there are only FEW cubies in play (you can see the four corner cubies that are changed) < the operation is designed to change the orientation of a single cubie, but all four in play are being changed at the same time.

The complete cycle of executions is six to restore the original location and orientation. As Groucho Marx once asked, “Who’re you gonna believe? Me? or you own eyes?”

An execution of [-RD+RD] moves the target cubie to its front face diagonal corner. There are two ways to return that cubie to its home position. The first is to undo the execution by running the procedure in reverse, with the signs changed, that is, [-DR+DR]. This restores the cubie to its original location and orientation (but if it needs to be flipped, why do that?)

The second is to repeat the execution of [-RD+RD] twice. This restores the location of the target cubie but changes the orientation, rotating the blue face from

top to front. Then rotating it from front to right. Two more repetitions will move the blue face from right to top, then from top to front. Two final repetitions will restore the original orientation by moving the blue face from front to right then from right to top. These six repetitions comprise a cycle of restoration.

Think about what is happening with other cubies as you focus on the target. They are changed also as a “side-effect” of your actions on the target cubie. If you undo the procedure for the target cubie, you also undo the side effect changes to the other cubies.

But what happens when you repeat the procedures in a cycle of restoration? Since the six executions of [-RD+RD] suffice to restore the location and orientation of the target cubie, the interdependence of the cubies’ states, created by their mechanical connection, argues that pairs of executions will repeat location changes and triplets of pairs will restore the original orientations—when no errors are made. This explains “the miracle of the cube solving itself” in the final step.

Succinct Solution Summary: 1. solve the bottom layer: 1). by forming the green cross with edge-center cubies color-matched to corresponding face-centered cubies; 2). by bringing the corner-cubies home in the color matched orientations. 2. solve the middle layer: by making the bottom layer the “down” face then inserting four edge-center cubies in their doubly color-matched “homes.” 3. solve the top layer: 1). by forming a blue cross with edge-center cubies colormatched to corresponding face-centered cubies (at need, swap edge-center cubies); 2). by bringing the corner-cubies home in the color matched orientations (at need, swap the corner-cubies); 3). flip faces of corner cubies for colormatching at need. 4. remember the procedures for each step of the solution.

Remembering This Solution Mnemonics, enhancing recall with various schemes, has been a theme in our culture for a very long time.16 Today, the acronym “HOMES” helps school children recall the list of Great Lakes (Huron, Ontario, Michigan, Erie, Superior). The hopeful sentence “Good Boys Do Fine Always” may aid recalling the lines of the base clef. Cicero depended on tours through architectural sites to structure and recall his famous orations. My memory needs all the help it can get, so I developed a set of mnemonics to counter the confusion potential of Rubik’s Cube (they’re set out in Figure 4). They are useful to me because they connect to things I’ve long known, and are strange enough to minimize confusion. My main point is that they are personal, useful to me, of little use to anyone else, except as examples. Consider #2, “Blue Cross is not frou-frou.” Frou-frou means “frilly.” This works for me because I was a computer consultant for Blue Cross nearly 50 years ago, and I know well their business attire was as staid as IBM, for whom I worked then.

Similarly, I enjoy employing Saint Anselm’s Ontological Argument for the existence of God in mnemonic #3, partly because his slogan “credo quia absurdum” (I believe BECAUSE it is absurd) has annoyed me for a lifetime. (A petty revenge, ‘tis true.) The bizarre monologue ascribed to Tonto (#4) —politically incorrect indeed, and reflecting the uncertainty of my children about my political leanings—reveals the key functional component. These mnemonics are formulae for translating a silly verbal construct into a procedure for twisting Rubik’s Cube. This is clearest in #1, which starts with algebraic sums of sub-procedure representation terms and ends with unconnected words whose syllable rhymes reflect the sequence of sub-procedure twists. Finally, mnemonic #5, which is little more than a name for the results of the operation, is for me a connection to some kind of muscle memory for executing the procedure. This works for me too. You

