Solved

It was 1981 and Ernő Rubik had a lot to answer for. The 3x3x3 cube was already driving the world crazy. By now it was commonplace for competitions to be held to see who could solve the puzzle in the fastest time. Everyone knew that every scrambled cube could be solved, since it became scrambled by starting with a solved cube and every twist can be reversed. What was more interesting was that solving a cube didn’t require one to reverse the scramble, but instead there appeared to be a systematic approach to the solution.

While Groups, Matrix Permutations, Transforms and other quirky stuff of Number Theory were largely unknown to me at the time, I did reason that a solution might be obtained through a series of refinements, gradually bringing order into the cube. Through experimentation I observed that some short sequences of moves had somewhat local effects (i.e. they moved or reoriented the smaller cubes while leaving most of the others untouched). Reversing the movement was easy, and if you go forward and back enough times you get a sense for the part of the cube that is unaffected by your twisting. Then you start wondering what would happen if you made some extra adjustment in the middle of the forward/back sequence. That’s when I discovered that these mid-sequence operations could be used to correct parts of the cube without affecting the parts you had already corrected.

My solution, based on gradual refinement, would operate as follows:

  • Start with a random cube.
  • Correct the four corners of one face.
  • Using various forward/reverse sequences, add operations to the middle of these sequences that will (eventually) correct the remaining four corners.
  • Without touching the corrected corners, ensure that the correct colour is in the top and bottom faces.
  • Using forward/operation/reverse sequences, keeping the eight corners in place, correct the edges of the top and bottom layers.
  • Finally, apply sequences to correct the middle layer.

Finding these sequences was the biggest challenge, but was made a little easier by the fact that the cube could be dismantled so that sequences could be tested with a pristine cube, which made the effect of the sequences all the more obvious. In time I could visualise these effects in my head without having to resort to the screwdriver.

One unfortunate consequence of this approach is that it was at odds with the prevailing wisdom at the time. Certainly people were using refinement algorithms to solve the cube, but everyone seemed to be doing it by first solving a top (or bottom) layer, then the middle and finally the bottom layer. Not significant, I suppose, until you realise how competitions were being devised. The first round was based on speed of solving one layer. The second round based on solving the first and middle together. The final speed test was for the full cube. I had some difficulty getting the first layer, but no hope of getting past the second round, because my technique was so different. Yet I could regularly beat anyone in solving the full cube.

I never won any competition, but I still had fun showing how I could easily solve the cube in about 45 seconds. For the record, I am going to outline my solution as I originally defined it. Now that I do have an understanding of the mathematical underpinning, I will openly admit that “my” solution is not unique because it can be mapped to bits of many other solutions, but maybe my way of describing it is unique. Anyway, here goes…

Solution to Rubik’s Cube

Nomenclature

Like all formal systems you need some nomenclature to avoid confusion. Originally I used my own shorthand but I have since amended it to be somewhat like the more popular notations. Mine, however, is still (in my opinion) the easiest to remember.

To learn the names for the faces and twists, you must first hold the cube in a special way. Looking from above, note the small cube at the top right corner and also consider the small cube at the bottom directly beneath. This is like a stack of three small cubes. Using index finger and thumb of your right hand, hold the entire cube by this stack. This is the Anchor, and you keep it to the far right. Then, working clockwise (from above) the other three stacks are named A, B and C. The diagram below shows the anchor in grey, the three named stacks, and the Front and Right faces clearly marked.

There are only four faces you need to know. The Upper face (U) is on top. The Right face (R) is to your right. The Front face (F) is directly in front of you, and the Downward face (D) is on the bottom. Ignore the other two. My solution doesn’t require you to know about them.

A single twist is always 90 degrees. When doing a twist, most of the small cubes must stay exactly where they are. This keeps the faces from getting confused. A twist of the face clockwise is written as the name of the face in upper case. An anti-clockwise twist uses a lower case.

The term “clockwise” refers to how your wrist twists. The “F” twist is in front of you, and moves exactly like a clock would. (And the “f” twist would be going backwards.) The “U” twist on top is also quite obvious, though you should notice that it moves a piece of the Anchor. The “D” twist can be confusing, because you are approaching the face from below, so your clockwise twist of the wrist will actually turn the face in the opposite direction to that of the upper face. The diagram below should make this clear.

The “R” and “r” twists completely move the Anchor stack. But do not panic. This just positions some new small cubes into the Anchor position. Keep the rest of the cube steady!

There is only one other twist, which is called a “yaw”. This one involves moving the middle layer while keeping the upper and downward faces steady. It can be hard to do (until you realise you can do it by combining U and D). The yaw is written as Y and the direction is the same as U. (Which then means that “y” is the same direction as “u”.)

And that’s it. You just need to remember: how to recognise the Anchor; the three stacks A, B and C; the face twists U/u, D/d, F/f, R/r and the yaws Y/y.

Step 1.1: the top corners.

I don’t provide any rules for setting up the first four corners. This bit is fun and almost anybody can do it, and if you can’t have fun doing this step then you really should not be playing with a Rubik’s Cube. Go do some gardening instead… Pick any colour and twist the corners into place. The first corner is the easiest. The second one needs to go in without moving the first. This is also relatively easy. The third and fourth are the most fun for beginners. Old pros will do this bit in a blur. Hold the cube so that the correctly arranged corners are on the bottom face.

Include the face colour in this step, so that when all four corners at the bottom are in place, the middle will be the right colour. A few yaws will put this into place if you forget.

Step 1.2: arranging the remaining corners.

With the four solved corners at the bottom, perform some U twists so that the upper small cube of the anchor is now in the correct position. This should mean that two of the colours of the upper anchor are the same as those of the downward anchor. Do not worry if the small cube on the upper face is not properly aligned, as this will be fixed later.

If the middle of the downward face is the correct colour (i.e. it matches the corners) then the current upper middle must also be the correct colour. We’ll assume this is grey. (I choose grey because you don’t find that on cubes, and I don’t want to give the impression that certain colours are special.)

Consider now the upper small cube in stack A (the one near you on the right). Part of this is grey and the other two sides are (say) lilac and orange. If the cube was solved already then the corresponding small cube at the bottom of stack A would also have lilac and orange (plus whatever colour corresponded to the downward face). But mid-puzzle the matching small cube might not be in position A. It might be in position B, or C. Make a note of where it is. What you are doing is working out which stack the small cube should be in.

Now do the same for the small cube currently at the top of stack B. Make a note of which stack this small cube should be in.

Your notes should now consist of two letters. If the letters are “AB” then you are very lucky as the corresponding small cubes on the downward face are already in the stacks they should be in, though they might be a little mis-aligned. You are lucky because you don’t have to do step 1.3.

Step 1.3: re-ordering the bottom corners

If you are here then the small cubes on the top are not in their correct stacks.

There are five possible wrong orderings of the top corners, depending on the pair of letters you noted. These are AC, BA, BC, CA and CB. (Remember, AB means that you have them in the right order, so you don’t have to do this sub-step.)

Depending on the pair of letters you noted, you will need two numbers. The letter pairs and corresponding numbers are: AC-01, BA-11, BC-13, CA-21 and CB-02. Let’s refer to the two numbers as M and N.

Hold the cube by the anchor, take a deep breath and perform the following sequence:

  • U (M times) F R f r U (N times) R F r f

What does this all mean? Well, U means a 90 degree clockwise twist of the upper face. You do this M times. (If M is zero then you do it zero times, which means you don’t do it.) Then comes F, a 90 degree clockwise twist of the front face. Then R, a clockwise twist of the right face. Then f, an anti-clockwise twist of the front face. And so on.

So, if your top small cubes were wrongly ordered according to code BC, then the numbers would be 1 and 3, and you would perform the following twists: U F R f r U U U R F r f.

(If you are paying attention, you might notice that “U U U” is exactly the same as “u”, so you can do the same twists as: U F R f r u R F r f.)

Observe the “F R f r” and “R F r f” parts. These are my forward and backward sequences for this stage. They shift and then restore the position of the corner cubes, but mid-way you can perform a U operation, so that the restoration is not perfect. The side-effect is that the upper corner cubes don’t go back to the same positions, even though the corner cubes on the downward face are unaffected. This is exactly the kind of operation I want. Pick the right number of U twists and you affect the restoration just enough to rearrange the corner cubes into the positions they should be in. You don’t have to work out these numbers. I’ve already given them to you above.

Step 2: aligning the four remaining corners

In step 1 we ensure that all eight corners are in the right stacks. However, the operation does not guarantee that the top corner cubes are properly aligned. They should all be showing the same colour as the middle of the top face, but the face colour may be on the side instead. So now we need operations that twist just the corners. Fortunately I have a forward/reverse sequence that will twist two corner cubes without affecting the overall stack positions.

Hold the cube so that the front face contains a top corner cube whose “top” face is mis-aligned and actually on the front face instead. So if the upper face has a grey centre, then the mis-aligned top right of the front face will be grey. We are about to perform an operation that will fix this, and move the grey to the upper face. Hold the cube steady and perform the following:

  • r D R F D f

Now start twisting the upper face (U/u twists) so that you put another mis-aligned corner into stack A, only this time the “grey” face of the mis-aligned corner will be on the face on the right hand side. Now do the following:

  • F d f r d R

If you started with four mis-aligned corners, you will have to perform the procedure again to fix the remaining two.

Think carefully about this sequence. The first phase takes whatever small cube is in the top-right nearest corner and rotates it 120 degrees clockwise. The second phase reverses the procedure and rotates the top-right nearest corner 120 degrees anticlockwise. However, mid-sequence we switch in a different corner. So the overall effect is that the first corner gets rotated +120 and the second -120, and all the time the corners remain in the same stacks.

When you are finished with these sequences, perform a few U twists if necessary to ensure that all eight corners are correctly positioned.

Step 3: fill in the top and bottom layers

This is my favourite part of the solution, and yet I have never formalised it. It’s one of those things that mathematicians have a tendency to describe as “obvious”, when in fact it is anything but. The objective is to complete the top and bottom layers (the upper and downward faces), without disrupting the eight corners. This is surprisingly easy to do, if you do the small edge cubes in pairs.

We observe that if you perform a yaw operation, it has no effect on the corners. Furthermore, if you perform a twist of the front face, then do a yaw, and then untwist the front face, the corners are still unaffected. It turns out that using just yaws and twist/untwist of the front face it is possible to complete the top and bottom layers.

First arrange the cube so that the front face is not yet completed. In your mind, imagine the small cube that should be in the lower middle of this face. Let’s imagine that the bottom of this small cube should be brown (and out of sight) while the visible part of the small cube is purple. Now imagine what would happen if you vertically yawed the small cube upwards: so now the purple is on top and the brown is facing you. This condition is the first objective in the procedure. Find the small edge cube and using only twist/yaw/untwist operations, get that small edge cube into place at the top middle of the front face.

At this point, with a good spacial imagination, you should be able to see that if you vertically roll that small cube downwards it will fit neatly into its correct position. However, you need to make sure that the other small cube for the top layer will also be slotted into place. Again, using only basic twist/untwist and yaws you can put the second small cube into the middle layer. Now arrange so that the second small cube is at the back of the cube. It should be at the right or left side, depending on the colours. You want to position it so that you can twist the front face and bring its partner small cube into line with it, colours matching, then perform a yaw to slot both small cubes into the front face, before finally untwisting the front face into position. See the bottom of the diagram.

The sequence to bring a small edge cube from the back right into position would be “F Y f”, while getting it from the back left would be “f y F”. Again notice the symmetry in the sequence.

Repeat this procedure four times (picking a new front face each time) to complete the top and bottom layers.

Step 4: re-arranging the edge pieces in the middle layer

At this point you should have the top and bottom layers fully completed, but the middle layer could be a mess. Pick an anchor and yaw the middle layer until the correct edge is in the anchor stack. Don’t worry if the edge is not pointing the right way. Holding the anchor in the correct way (at the back right), observe the small edge cubes in the middle at stack positions A and B, and make a note of the stacks they should be in. If you note “AB” then all your middle edges are already in the correct stack positions. Otherwise do the following:

  • Use the code to get your M and N numbers.
  • Perform the following sequence: Y (M times) F F Y (N times) f f

Now yaw the middle layer to ensure that all the middle edges are in the correct stacks.

Step 5: flipping the edges

This is the part of the solution that I hate. It involves a long symmetric transformation sequence that really makes the cube look like it is totally messed up. After spending so long getting all the corners and edges into place, this phase seems to break everything. However, it does not. Like all the previous sequences, it just sets up a particular arrangement that allows a subtle change so that when the reverse sequence is performed, the subtle change causes the necessary correction to the orientation of the small cubes.

At this point you have the top and bottom layers completed. Turn the entire cube so that now you have the left and right sides completed. Looking at the cube now you will see that the mis-aligned edge cubes are all in the vertical middle section. Rotate the cube towards you (along the left-right axis) so that one of the mis-aligned edges is in the top middle. Hold the cube steady and perform the following operation:

  • u F r U f

Now, vertically yaw the middle section so that another mis-aligned edge is in the top middle, then perform the following:

  • F u R f U

If you started with four mis-aligned edges then you will have to perform the above sequence twice. The first part of the sequence flips an edge, but you are then able to yaw the middle section so that when the un-flip is performed it causes a different edge to be flipped. That’s two edges per sequence.

Step 6: middles

I have assumed that you have kept the middle small cube of the upper and downward faces at the correct colour, so now you may find that you still have the remaining four small middle cubes in the wrong position. This can be fixed by rolling the vertical middle 180 degrees, doing a yaw (Y) of the horizontal middle, doing another 180 degree roll and finally an un-yaw (y).

At this point the Rubik’s Cube is solved.

The following diagram will help you remember the solution. The only bits you really need to memorize are in the box at the top left. Have fun!

Categorised as: LUE

Comment Free Zone

Comments are closed.