I’ll show you how.
If you’ve tried to solve a Rubik’s Cube before, You might have come across this famous YouTube video from 2008 that claims you can solve the cube with only two moves:
The video is clickbait. The creator deliberately set the cube up so that he could solve it by repeating the same two moves.
He twists the upper face once clockwise and the left face once anti-clockwise until the cube is solved. He would have started from the solved cube and performed these moves in reverse before recording the video.
His sequence of moves has order 63, which means that starting from the solved cube, you have to repeat his two moves 63 times before the cube solves itself again. This means that you’ll only cycle through 126 of the 43,252,003,274,489,856,000 possible configurations of the cube!
Unlike the video, I can demonstrate that it is indeed possible to solve the Rubik’s Cube with just two specially designed moves.
Background
In my second year of university, I wrote a paper on the mathematics of the Rubik’s Cube, appropriately titled ‘The Rubik’s Cube Group’.
The paper is about modelling the cube mathematically. With some group theory and a bit of combinatorics, the ultimate result is that there are 43,252,003,274,489,856,000 possible configurations of the cube, and more importantly that we can tell exactly which ones are possible. For example — you can’t swap exactly two edges but you can swap three.
While researching, I discovered that it’s possible to express any configuration of the Rubik’s Cube in terms of just two moves. To describe the moves, We’ll need to define some terminology.
Generators
There are six basic moves on the cube. Each basic move is a 90° clockwise twist of a face. Hold the cube in place. Then:
- U means a 90° clockwise twist of the upper face
- F means a 90° clockwise twist of the front face
- Similarly: R for right, L for left, B for back and D for down
Any configuration of the Rubik’s Cube can be written as a combination of these six basic twists. U² means two turns and U’ means an anti-clockwise turn. We read these sequences left to right. Try the combination R²L²U²D²F²B², it makes a nice pattern!
<F, B, L, R, U, D> denotes the set of cube configurations that can be reached using the moves inside the angle brackets. This set is said to be generated by F, B, L, R, U and D. For example, <R> would be a set of four configurations, one for each twist of the right face. R generates this small set.
F, B, L, R, U and D generate the set of all possible cube configurations. They are the six basic moves after all! We’ve now shown that the Rubik’s Cube can be solved using only six moves, but that’s obvious and it’s not what we’re after!
We want to find the smallest possible collection of moves which generates the set of all possible cube configurations. The largest set that a single move can generate is of size 1260, which is a little bit smaller than the 43 quintillion configurations of the cube. We’ll have to try two moves.
We’re after two moves A and B such that <A, B> is every configuration of the cube.
Finding the two moves
In Singmaster, I discovered that thanks to Frank Barnes, we have our magical pair A and B. They are:
- A = L²BRD’L’
- B = UFRUR’U’F’
Barnes specially designed these moves with certain properties. There are eight corners and twelve edges on the Rubik’s Cube. A¹¹ (A performed eleven times) cycles seven of these eight corners. A⁷ cycles eleven of these twelve edges.
B affects the corner and edge that are fixed by A. Let’s first focus on the eight corners. Think of it like this machine:
By cleverly cycling with A and swapping with B, you can produce any configuration of the eight corners with the machine!
The edges use a similar machine, with eleven edges on the wheel and one spare edge which can be subbed in by B.
By permuting the corners and edges as we please with the A and B machines, we can produce any configuration of the Rubik’s Cube. Therefore <A, B> is the entire set of configurations. ✅
That’s how you solve the Rubik’s Cube with only two moves. In reality, I really wouldn’t recommend doing it like this!
We’ve already solved the problem but as a little extension, let’s find out how to perform the basic moves using A and B. That way, if you already know how to solve the cube, you can technically use A and B to solve it how you usually would.