Double-click anywhere on
the page to scroll down
automatically. Click once to
stop scrolling.

Rubik cube - a solution

Years ago, when the first solutions to the Rubik cube were available, I created a file on an old Univac computer containing a solution. For a while it was the most accessed file on that old mainframe. Recently, I was trying to solve a cube and couldn't find a copy of my old solution. So here's a new version.

There are six faces to a cube, we'll call them:
U for Upper, or top face
D for Down, or bottom face
L for Left face
R for Right face
F for Front face
B for the Back face
 
We can turn each face either clockwise or anti-clockwise - always viewed as if you are looking directly at that face.

A 90-degree turn clockwise for a face, is shown using just the letter for that face, eg U. If it's an anti-clockwise turn there's a little apostrophe after the letter, eg U'. A 180-degree turn can be either clockwise or anti-clockwise - it's shown as U2.

Middle pieces along an edge are referred to by two letters (eg FL) Corners are referred to by three letters (eg UFR).

Step 1 First face

This is the step that everyone can do. It's included here for completeness. Chose a colour, and get all the pieces of that colour to form a complete face. These must also be in the correct relative location.

First, we will do the middle edge pieces. Let's say we pick white as the side to complete first. Turn the cube so that the white centre piece is on the U face. Note that the centres on all the faces (sides) are attached, so that they are always in the same position with respect to one another.

First, we put the middle edge pieces (those with 2 colours) in the right place. There are several possibilities (note that when moving pieces around you should have the piece that you are working on in the F face):

  • White piece is on the D face. Rotate the D face so that it is directly underneath the place where it needs to go (on the U face). If the white side of the piece is on the D face, apply F2, and it will be correct. If the white side of the piece is not on the D face, apply D R F' R'.
  • White piece is on the centre slice (ie middle portion of the cube). Apply F or F' to get the piece on the D face, and then perform the moves described above.
  • White piece is in correct position, but incorrectly rotated. Apply F2 and do the moves described above as necessary.

Second, we do the corners. There are six main possibilities for each of the four corner pieces:

  • Corner piece in correct place. Do nothing.
  • Corner piece is in the correct place, but needs rotating clockwise. Hold the cube so that this piece is in the URF location, and apply F D F' D' F D F'.
  • Corner piece is in the correct place, but needs rotating anti-clockwise. Hold the cube so that this piece is in the URF location, and apply R' D' R D R' D' R.
  • Corner piece on D face. Rotate D face so that the corner piece you want to move into position is directly underneath its intended location. If the corner piece has white (or whatever colour you chose) on the bottom, and the destination of the piece is URF (ie the upper right hand corner on the front of the cube), apply R' D2 R D R' D' R.
  • Corner piece on D face, and white side of the corner is on the left-hand side (assuming that the piece is going to the URF). Apply F D F'.
  • Corner piece on D face, and white side of the corner is on the right-hand side (assuming that the piece is going to the URF). Apply R' D' R.

The white surface should be complete.

 

Step 2 - Do the middle layer edge pieces

Next we have to get the middle (or edge) pieces of the middle layer in place, that is the FR, FL, BR, BL pieces.

There are three possibilities:

  • Edge piece is in the correct place and oriented correctly. Do nothing.
  • Edge piece is in correct place, but oriented incorrectly. In this case, you have to replace it with another piece temporarily. Choose an edge piece that is on the D face, and move it to the position of the aforementioned edge piece using the move described below.
  • Edge piece is on the D face. Turn the cube so that the colour side you are building is now the F side (and, of course white is still U). Rotate D so that the piece you want is located at the front (DF). Which side of the F centre piece do you want the new piece to go? For FL, apply D L D' L' D' F' D F. If FR, then apply D' R' D R D F D' F'.

This will probably have to be repeated four times to get all four middle-layer edge pieces into place.

The first two layers are now correct.

 

Step 3 - Form cross on last layer

Turn the cube upside-down, so that the white face is the D face. It will stay like way until the cube is complete.

We must now try to form a cross (plus sign), out of the colour opposite white, using the centre and the four middle edge pieces that surround it. Don't worry if the edge pieces

There are 4 possibilities:

  • All four pieces are correct, and you have cross on the U face. Do nothing.
  • Two adjacent edge pieces are correct. For example, the UF and UR pieces have the correct colour on the top, but the UL and UB pieces show the wrong colour. Rotate the whole cube so that the UF and UR pieces are the right colour, and apply B U L U' L' B'.
  • Two opposite edge pieces only are correct. For example, UR and UL are correct (forming a straight line across the middle of the U face). If UB and UF are correct, turn the whole cube so the straight line runs across the middle. Apply B L U L' U' B'.
  • No edge pieces show the right colour. Hold the cube any way (keeping the white face on the bottom) and apply B L U L' U' B' F U R U' R' F'.

Now the bottom two layers are all correct, as before, and a cross is on the top face.

 

Step 4 - Rotate U face edge pieces

You have a cross (plus sign) on the U face, but the edge pieces may not be in the correct place. They’re the right way up, but don’t match up with the colour of the centre pieces on the sides. This step involves rotating them so that the can be lined up with their respective colours on the side faces..

The possibilities:

  • All four pieces are correct. (This means that the entire cube is correct except for four corner pieces on the top layer.) Do nothing.
  • One piece is correct. Rotate the whole cube so that this piece is in the UL position (make sure white is still on the bottom). If the remaining 3 edge pieces need to be rotated clockwise, apply R2 D' U2 R' L F2 R L' D R2. If the pieces need to be rotated anti-clockwise, apply R2 D' R' L F2 R L' U2 D R2.
  • If two 'adjacent' edge pieces are correct. (By 'adjacent' I mean pairs such as UF and UL, or UB and UL, not UF and UB, or UR and UL.), Rotate the U face so that only one edge piece is correct, and follow that rule. Take care with this step!
  • Two opposite (ie not adjacent!) edge pieces are correct. Apply U or U' and follow the rule for no edge pieces correct (below).
  • No edge pieces are correct. Turn the U face so that for the UF piece (which can be any piece), the F side of that piece is the same colour as the R face centre. Now apply R2 D2 B2 D L2 F2 L2 F2 L2 F2 D' B2 D2 R2. Start Step 4 again!

The four U face edge pieces should now be in the correct place. The cube will be correct except for the four corner pieces on the U face.

 

Step 5 - Position U face corner pieces

How to move the corner pieces into the right places.

There are three possibilities:

  • All four corner pieces are in the right place, although not necessarily rotated correctly. Do nothing.
  • One corner piece is in the right place. Hold the cube so that that piece is in the UFR position. If the remaining three corner pieces need to be rotated clockwise round the cube, apply L' U R U' L U R' U'. If they need to be rotated anti-clockwise, apply U R U' L' U R' U' L.
  • No corner pieces are in the right place. If they all need to go to opposite corners, apply R' B2 F R F' R' F R F' R' F R F' R' B2 R. If they need to go to adjacent corners, hold the cube so that the UFR and UFL pieces need swapping, and so do the UBR and UBL pieces. Apply B L U L' U' L U L' U' L U L' U' B'.

All the corner pieces should be in the right place.

 

Step 6 - Rotate corner pieces

Warning: don't panic with the next step. It will leave the cube in disarray after the first correction is applied. Everything will correct itself as the other corrections are made.

Hold the cube so that an incorrectly rotated corner piece is in the UFR position. If it needs to be rotated clockwise, apply F D F' D' F D F' D'. If it needs to be rotated anti-clockwise, apply D F D' F' D F D' F'.

Next (and this is extremely important) turn the U face only, so that the next incorrectly rotated corner piece is in the UFR position. Apply one of the above moves, depending on which way it needs rotating. Repeat if more than two corner pieces are incorrectly rotated.

After all the pieces are rotated, turn the U face to complete the cube.