Rubik's Cube

In my Algebra class recently, I was wondering if it was possible to make a sequence of moves such that you can keep repeating this sequence (e.g. R U2 F L in standard Rubik’s Cube notation, which I will write as R U^2 F L from now on) such that you will eventually solve the Rubik’s Cube after some (probably many) integer number of turns, no matter how the cube was initially shuffled. It only took me a few minutes to figure out that the answer was [spoiler — answer below the verse]. But nonetheless I thought it might be a interesting post. So, before you scroll over this beautiful verse that serves the sole purpose of not accidentally spoiling the answer, see if you can figure it out.

O, gentle reader, pause and lend thine ear,
For what doth come shall soon enough appear.
A tale unfolds, but not in haste we go,
For secrets kept in time shall surely show.
Let not impatience grip thee in its snare,
The future waits, with treasures rich and rare.

A moonlit night doth grace the tranquil sky,
Where stars, like diamonds, in their brilliance lie.
But hark! This night is neither long nor brief,
’Tis but a dream, a momentary thief.
With words we play, yet say not what shall come,
For silence sings a more resounding drum.

So here we dwell, in realms of words and rhyme,
To bide the course of ever-patient time.
In shadows cast, in whispers yet unseen,
The truth doth wait, like grass ‘neath growing green.
Now rest thee well, in verses light and fair,
The tale proceeds, when time allows its share.

The answer is no. Such a sequence doesn’t exist. I.e., we cannot simply repeat a sequence many, many times, guaranteeing to solve the cube (after a whole number of repeated sequences). Let me show you why.

Assume for a contradiction, that it is indeed possible, and call such a sequence S. For example, maybe S = R U^2 F L, which would mean that we can we repeat this sequence again and again, sooner or later solving the cube, no matter how it was initially shuffled. In other words, all shuffles can be obtained by repeatedly applying this sequence backwards on a solved cube. I will denote S performed backwards as S^{-1}. So, for any shuffle P of the Rubik’s Cube, we can achieve P from the solved state by applying S^{-1} a lot of times, say, k times. I.e.

    \[ P = (S^{-1})^k. \]

However! S must have order at most 166320 as explained below (indeed, a stronger correct bound is 1260 as explained in this post but that will not be relevant for proving the impossibility of S).

So why can’t the order of a shuffle exceed 166320? Note that a shuffle permutes the 8 corners and 12 edges (and might rotate these too). Thus, ignoring the rotations for now, only checking whether the individual “cubies” are in the right position, we get that the order is bounded by

    \[ \textnormal{lcm}\{\textnormal{lcm}\{1,\dots,8\}, \textnormal{lcm}\{1,\dots,12\}\} = 27720. \]

Now, the pieces are in the right positions, but potentially rotated. If we repeat S 5 more times though (for a total of 6 times), all pieces are now correctly placed and rotated, because 6 is even so all edges flip an even number of times (or don’t flip at all), and 6 is divisible by 3 so all corners rotate two full turns (or never rotate at all). This gives the upper bound on the order of S as

    \[ \textnormal{ord}(S) \leqslant 6\cdot27700 = 166 320 \]

as claimed. Yay! That means we can get at most 166320 distinct shuffles from doing S backwards, meaning doing S forwards can at most solve 166320 distinct shuffles. But we both know there are way more shuffles of the Rubik’s Cube (about 43 quintillion), showing that it can’t solve everything.

Anyway, that was it. I thought it was a fun application of Abstract Algebra.

Note that I am not talking about a Hamiltonian Path through the Rubik’s Cube (which does exist). This differs, because if we used this sequence, we would most likely complete the Rubik’s Cube during our move sequence, not after finishing it some number of times (i.e., it wouldn’t be an integer number of moves).

Leave a Reply

Your email address will not be published. Required fields are marked *