Solving the Cube
Classic permutation puzzles such as Rubik’s Cube, whose object is to rearrange the pieces into some target configuration, can usually be solved by following a two-step strategy.
By trial and error, select a short, random sequence of moves, such as YBY–1B–1.
Repeat the random sequence several times. Often that will lead to an arrangement in which only a few cubies have been moved—a helpful tool in solving the cube. Here three repetitions, or (YBY–1B–1)3, switch two pairs of corner cubies: the pair bordering the blue and orange faces (cubies labeled P and Q at the below) and the pair bordering the yellow and red faces.
Modify and generalize the useful move you found. For example, to interchange the pair of corner cubies bordering the red and white faces (cubies labeled E and F on a “virgin” cube shown below, for clarity, in orientation GWR), look for a move that “sets up” your “useful move.” Applying the short setup sequence W2O–1 moves corner cubies E and F into positions P and Q (for clarity, the cube faces are reoriented from GWR to OYB). You can now apply the useful move (YBY–1B–1)3, undo the setup sequence by making the opposite moves in reverse order, OW–2, and restore the initial orientation of the cube faces, GWR. The net effect is to interchange the two corner cubies E and F (below).
A similar setup sequence can be found for moving any pair of corner cubies to one of the two pairs interchanged by (YBY–1B–1)3. You can thus construct a custom move for interchanging any pair of corner cubies. Proceeding in the same way with other random sequences gives enough flexibility to solve the cube and any other classic permutation puzzle.