David Madore's WebLog: How to solve Rubik's cube easily

Index of all entries / Index de toutes les entréesXML (RSS 1.0) • Recent comments / Commentaires récents

Entry #0838 [older|newer] / Entrée #0838 [précédente|suivante]:


How to solve Rubik's cube easily

I've promised this at the very beginning of this blog and I will now honor this promise: let me explain the method I use for solving the (3×3×3) Rubik's cube. I hope I don't need to describe what this devilish puzzle of Ernő Rubik's consists of: unless you've been spending the last thirty[#] years on a desert island somewhere, you must surely have seen one of the artefacts in question (often it is encountered for the first time lying on a shelf in the house of friends or relatives — generally in a scambled state because another visitor was there before). I hold the Magic Cube to be one of the most mind-boggingly amazing (if useless) inventions of all times, and, to my eyes, the real puzzle was that of solving the engineering problem of getting the cube to hold together and just “work” much more than unscrambling it. But, anyway.

Obviously there are many methods to solve the puzzle (here's one, here's another, here's yet another and here's a (very concise) fourth one). Some people start by getting the corners in place, and then they handle the edges; others start by doing one side, then the middle slice, and then the last third; yet others have more “global” solutions, or more “orthogonal” ones. Every method has its advantages and disadvantages: a tradeoff must somehow be made between efficiency and simplicity, between appeals to geometry and symetry, and so on. What I like about the solution I use is that it is simple to remember (a good thing for people, like me, who have a bad memory for motions in space) and relatively simple to describe, and that it relies very little upon geometric insight; as a counterpart, it is not very efficient, whether in terms of speed or in terms of number of moves. But when there are thee objects that must be put in place (say), I find it simpler to randomly permute them until they fall in place than to try to figure out how to achieve the right permutation in a single stroke.

How I learned to solve the Rubik's cube

I first “solved” the cube somewhere around '92, after reading an article[#2] about it in a (then already) old issue of Scientific American, but I solved it in a completely theoretical (and mathematical) fashion: I did it all on paper, by writing simple computations of group-theoretical nature, without ever looking at a real cube and without appealing to my sense of 3D vision (I have none whatsoever), and the solution consisted of a list of “recipes” (operations, or explicitely presented group elements) for exchanging two edges or two corners, flipping two edges or rotating three corners. In theory, knowing these recipes is sufficient to get the cube from any accessible configuration to any other (and, in particular, to unscramble the puzzle), but in practice, following without error the very long sequence of moves that served to, say, rotate three corners (without altering anything else in the cube) turned out to be very difficult, remembering (or reading from the abstruse mathematical notation) which three corners would be rotated and in which direction was also a pain, and, quite generally, solving the puzzle using these computations was more than a little unpractical. I did it once — it took me hours — and I abandoned the cube, satisfied that I had defeated the beast. The idiocy in my way (which reminds one of many mathematical jokes) is that it is quite useless to have an operation that, for example, rotates three corners without altering anything else in the cube: if one decides to solve the cube “corners first”, then it doesn't matter if the operation used to rotate three corners also messes up with the edges, since they will be dealt with later: now that simplifies the task considerably. And, quite generally, at every step of the resolution except the very last, it is permissible for the operations to mess up with some parts of the cube which will be put in place later on. So my solution had the interesting “feature” that it could be applied in any order (start with the edges, or with the corners, or with the top, or with the bottom, it doesn't matter since every operation does a very simple and precise job). But that was also the reason why the operations were so long and complicated. And why there were so many of them.

Then around '96 I encountered (a French translation of) a little German book — or pamphlet, perhaps I should call it — by a Prof. Dr. Kurt Endl, which claimed to describe the fastest elementary solution, without mathematics. Well, that was something I needed: I bought the book and learned the method. So it is from this Kurt Endl that I know the tricks I am about to describe. I then totally forgot about the cube for years, until, in early 2003, someone put one into my hands and asked me to solve it. Well, it took me a whole evening of twiddling with it before I came up with a solution that was similar to the one I had learned although quite different in some parts. Since the way I rediscovered it is not as good as the way I had learned about it in the first place, and since I found again the book that I had lost, I will stick to the original method.

Anyway, on to business. I will not explain all the details, because it would take a tremendous number of words to do so (or a fair number of pictures, and producing pictures is a pain), and it is probably best to let the reader discover them by himself. The basic strategy is: first do one side, call it the top one just to settle things, then do the middle slice (except possibly for one edge), then do the bottom corners, then the missing edge in the middle slice, then place the bottom edges, and finally orient them correctly.

I will not explain how to do the top slice: doing one side is something that people discover very well by themselves (and although some are naïve and do the side without caring about the adjacent colors of the cubies — that won't do, of course: a full slice has to be done, not a mere side — it isn't really any harder to do the job properly). Essentially, start by doing the edges, and then the corners. It isn't difficult (though the exact details would be exceedingly tedious to write down), because one doesn't care how the rest of the cube becomes scrambled, so one can move things in place rather freely (if something already in place gets in the way of something that needs to be put in place, just “move it out of the way, perform the motion, and then move it back”). So let's assume that the top slice (red, say) is done.

After that, one needs to learn just three basic operations, which I will call Operation One, Operation Two, and Rubik's Operation (because, apparently, Rubik himself discovered the double-edge-flipper in question). Leave aside Rubik's Operation for the moment. Operation One and Operation Two leave the top slice intact; Operation One leaves the middle slice intact except for just one edge (the front-right cubie[#3], say) while Operation Two leaves the middle slice entirely intact. Both Operation One and Operation Two start by moving a corner cubie (the top-front-right corner cubie) out of place in the same manner, and then putting it back in place (since the top slice must be preserved at the end of the operation) in one of two different ways. Now let us describe these operations in detail.

Operation One

[Visual explanation of Operation One][Result of Operation One]The image on the left (read from left to right) graphically displays the sequence of seven moves that make up Operation One, starting on a pristine cube. The cubie to keep track of is the top-front-right (red-white-green) corner cubie. The first three moves (common with Operation Two) move that cubie away from its natural position, while the rest of the operation gets it back in place. For those who prefer instructions in words rather than in pictures, Operation One is: Right³ · Bottom³ · Right · Bottom · Front · Bottom · Front³, where Right means turn the right cube face one quarter turn clockwise (when looking at the face in question), Right³ means turn the right cube face one quarter turn counterclockwise (or, equivalently, three quarters turn clockwise), and so on, and the operations are to be performed in the order given (note that I have written Front·Bottom·Front³ whereas the picture shows a movement of the back and middle slices instead, but up to rotation of the cube this is equivalent, it's just that what is Bottom in one case should be Right if we are moving the back and middle slices: or Front·Bottom·Front³ = (Back&Middle)·Right·(Back&Middle)³ if you wish, it's all a matter of viewpoint).

The picture on the right, above, shows the result performing Operation One on a pristine cube. Two things should be noticed: first, only one edge of the middle slice has been displaced (the front-right edge cubie), and the cubie that got in its place is the one that was previously the bottom-left edge cubie; second, the two right bottom corners got exchanged, whereas the two left bottom corners stayed in place.

Of course, Operation One can be performed with right and left exchanged, in a perfectly symmetrical fashion. To keep track of this, we can call the one described here Operation Right-One, and its symmetric counterpart Operation Left-One.

Operation Two

[Visual explanation of Operation Two][Result of Operation Two]The image on the left (read from left to right) graphically displays the sequence of seven moves that make up Operation Two, starting on a pristine cube. Again, the cubie to keep track of is the top-front-right (red-white-green) corner cubie. The first three moves (common with Operation One) move that cubie away from its natural position, while the rest of the operation gets it back in place, but in a way different from Operation One. For those who prefer instructions in words rather than in pictures, Operation One is: Right³ · Bottom³ · Right · Bottom³ · Right³ · Bottom² · Right, and obviously Bottom² means turn the bottom cube face one half turn (either way) (to make this clear on the picture, a smaller cube has been added, showing the position after a quarter turn counterclockwise).

The picture on the right, above, shows the result performing Operation Two on a pristine cube. The top and middle slices are unaffected by the operation. The bottom corners are exchanged in opposite pairs (that is irrelevant, really: a half-turn rotation of the bottom face will get them back in place if necessary — although we do not include this in Operation Two) and three of them are rotated; and the bottom edges are permuted in some way.

Of course, just as Operation One, Operation Two can be performed with right and left exchanged, in a perfectly symmetrical fashion. To keep track of this, we can call the one described here Operation Right-Two, and its symmetric counterpart Operation Left-Two.

Well, that's about all one needs to remember. Here's how to use these two operations to solve the puzzle, starting from the top slice already in place. First get all the edges of the middle slice in place using Operation One: this is easy because Operation One will move one edge from the bottom slice to the middle slice, so by positioning the edge in the appropriate place and then using Operation One we can always get it to go where it should be (and if we choose intelligently between Operation Left-One and Operation Right-One we can even get it properly oriented: it's not all that important, because Rubik's Operation is a universal edge-flipper, but we might as well get things right when we can). Only put three of the middle slice edges in place, ignore the fourth one for the moment, it will be displaced in the next step. Second, get the bottom corners in place (but possibly badly oriented), again using Operation One: since the latter exchanges the two (bottom) right corners, this is easy (use the “unsolved” middle slice edge as a sort of “work space” which will get continually modified by Operation One, but so far we don't care about it); one rotation (of the bottom slice) and at most two exchanges of pairs will always position do the trick. The third step is to get that last edge from the middle slice in place, without disarranging the corners: the trick to do this is to use Operation One twice in a row (without rotating the cube or anything in between), either Right-One twice or Left-One twice, because that will do a double exchange of (the same) corners, which doesn't hurt, and still move the edges around; basically, doing Operation Right-One twice will get the bottom right edge in the front right position (again, choosing intelligently between Right-One and Left-One avoids an annoying flip later on).

Almost done! We must still rotate the bottom corners. This is done with Operation Two: since Operation Two rotates three corners (in the same direction) and since there is a total rotation invariant over all corners, it can be done — just remember that Operation Right-Two (followed, if need be, by a half-turn rotation of the bottom slice) rotates (counterclockwise) every bottom corner cubie except the bottom front left one. The penultimate step is to get the bottom edges right (except possibly for orientation): for this, we just have to know how to permute three cyclically; the trick is to use Operation Right-Two followed, after a rotation of the full cube, by Operation Left-Two, where the rotation is chosen (clockwise when looking from the top) so that both Operations Two are performed on the same corner cubie (performed on means that that cubie is the one from the top slice which gets shifted out and back in place); this combination will cyclically permute three edges from the bottom slice, so we are done.

Only one thing might be amiss now: some edges might be incorrectly oriented (always an even number: this is another invariant). To solve this problem, we introduce the third operation, Rubik's Operation, which is rather longer than Operations One and Two, but it is also very easy to remember because of its elegant structure. Here it is:

Rubik's Operation

[Visual explanation of Rubik's Operation][Result of Rubik's Operation]The image on the left (read from left to right) graphically displays the sequence of fourteen moves that make up Rubik's Operation, starting on a pristine cube. It's simplicity will become evident if we write it as follows: calling Down the opertion which consists of lowering the central slice of the front face (so that the top center cubie goes to front, front center goes to bottom, bottom center goes to back, and back center goes to top, and of course the top front edge goes to bottom front and so on), and Up the inverse operation, then Rubik's operation is: Down · Bottom · Down · Bottom · Down · Bottom · Bottom · Up · Bottom · Up · Bottom · Up · Bottom · Bottom (I chose to write Bottom·Bottom rather than Bottom² so as to make the pattern more apparent; perhaps it is even more apparent if we move the last Bottom at the start of the sequence, which merely changes which edges get flipped in the final result).

The picture on the right, above, shows the result performing Rubik's Operation on a pristine cube: this is merely a double edge flipper.

To get everything in place, take a pair of edges that has to be flipped, get them in place for Rubik's Operation (this might require one or two rotations to get the edges in opposite position if they are not so initially), apply Rubik's Operation to flip the edges, and then if necessary move them back where they were. Repeat until every edge has been flipped to its correct state. The cube is solved!

[#] I don't know the exact date, but the Rubik's cube turned thirty quite recently.

[#2] By Martin Gardner, or Douglas Hofstadter, or Ian Stewart, or another one of these mathematical chroniclers for the monthly.

[#3] The word cubie refers to one of the 3×3×3=27 little cubes which form the big cube. Of these, 8 are corner cubies, 12 are edge cubies, 6 are face-center cubies (which determine the color of the face), and one is they hidden (and utterly irrelevant) central cubie.

↑Entry #0838 [older|newer] / ↑Entrée #0838 [précédente|suivante]

Recent entries / Entrées récentesIndex of all entries / Index de toutes les entrées