Rubik's Cube Cycles

mathgroup-theory

If you've ever played around with a Rubik's cube, you may have encountered an interesting pattern where repeating any sequence of moves will always eventually return the cube to its original state. You can try this out:

Click a color to add moves
2.0/s

The proof for why this is the case turns out to be quite simple. It relies on two observations:

  1. A Rubik's cube has a finite number of possible states, so repeating any sequence of moves indefinitely must eventually revisit some state.
  2. Every move is invertible. If you turn a face clockwise, you can turn it counterclockwise to undo it.

The first observation alone doesn't guarantee you'll return to the original state. You might loop back to some intermediate state rather than the starting one. So let's say repeating the moves times produces the same state as repeating them times, where .

Now we can use invertibility. If the states after and repetitions are the same, we can reverse the moves once from both. That gives us the states after and repetitions, which must also be the same. We can keep reversing like this until we find that repetitions produce the same state as repetitions, so the cube is back where it started after repetitions.


The proof above can be generalized using a branch of math called group theory, which I avoided mentioning to keep things simple. I think group theory would be more understandable if it were taught through specific examples like this rather than with abstract groups from the start.