Image: Lars Karlsson (Keqs) (CC BY-SA 3.0)Why only one in twelve Rubik's Cubes can be solved
Ernő Rubik built his first cube in 1974 to show architecture students how a block of 26 pieces could move without falling apart, and the number that every description of it repeats is 43,252,003,274,489,856,000, the number of positions it can reach by turning its faces. The number is right. A second number is less often quoted and more interesting: if you prise the pieces out and press them back in at random, the cube you get is solvable with probability exactly one in twelve. Both numbers come from the same short calculation, and the calculation is an application of the permutation theory of Unit 6.
Counting the ways to reassemble
A cube has 8 corner pieces, each showing three colours, and 12 edge pieces, each showing two. The six centre pieces never move relative to one another, so they fix which colour belongs on which face. A reassembly places the 8 corners in the 8 corner slots in \(8!\) ways, and each corner can be inserted in 3 orientations, giving a factor \(3^8\). The 12 edges go into 12 slots in \(12!\) ways with 2 orientations each, a factor \(2^{12}\). The total is
\[ 8! \cdot 3^8 \cdot 12! \cdot 2^{12} = 519{,}024{,}039{,}293{,}878{,}272{,}000. \]That is the number of cubes you can build with a screwdriver. The number you can reach by turning is this divided by 12, and the division comes from three facts about what a single face turn does.
The three constraints
The first constraint is about corner twists. Mark one sticker of each corner piece and watch how far each corner is rotated from its home orientation, counting 0, 1, or 2 thirds of a turn clockwise. A quarter turn of a face moves four corners around a cycle, and if you add up how much each is twisted before and after, the total changes by a multiple of 3. This takes five minutes to check with a cube in hand and is true for each of the six faces. So the sum of all eight corner twists, modulo 3, never changes, and since it is 0 on the solved cube it is 0 on every reachable cube. A random reassembly has sum 0 with probability one third. That is a factor 3.
The second constraint is about edge flips. An edge is either flipped or not, relative to a fixed convention, and a face turn always flips an even number of edges: either none or all four of the edges it moves, depending on which face and which convention, and in both cases the total number of flipped edges keeps its parity. The solved cube has zero flipped edges, so no reachable cube has an odd number. In particular, a single flipped edge with everything else correct cannot be reached, which is the position that every beginner eventually meets after a sibling has taken the cube apart. A random reassembly has even flip parity with probability one half. That is a factor 2.
The third constraint is the one that uses the theory of permutations properly. A quarter turn moves four corners in a 4-cycle and four edges in a 4-cycle. A 4-cycle is an odd permutation, the product of three transpositions. So each face turn applies an odd permutation to the corners and an odd permutation to the edges, which means the two parities always agree: either both corner and edge arrangements are even permutations of the solved state, or both are odd. A reassembly in which the corners are an even permutation and the edges an odd one, for instance two edges swapped and nothing else, can never be reached. That is the last factor 2, and \(3 \times 2 \times 2 = 12\).
Putting the three together: the reachable positions form one twelfth of the reassemblies, which is 43,252,003,274,489,856,000, about \(4.3 \times 10^{19}\). The three constraints are also sufficient, which means that every reassembly satisfying them can be solved; proving that takes more work and is usually done by exhibiting move sequences that achieve any desired even permutation and any allowed twist and flip. Unit 6 proves the necessity with the sign of a permutation and leaves the sufficiency to a remark.
The cube as a group
The face turns generate a group in the sense of Unit 5: a sequence of turns composed with another sequence is a sequence of turns, every sequence can be undone by performing its inverse in reverse order, and doing nothing is the identity. Its order is the 43 quintillion above, and it sits inside the group of all permutations of the 48 movable stickers. Every move sequence has an order, the number of repetitions after which the cube returns to where it started. The sequence "right face clockwise, then top face clockwise", repeated, comes back after 105 repetitions; the beginners' favourite, right, top, right inverse, top inverse, comes back after 6; and no sequence has order greater than 1260. These numbers are least common multiples of cycle lengths, which is the theorem about the order of a permutation that Unit 6 proves. Computer algebra systems such as GAP define the cube group from its six face turns and compute all of this in a fraction of a second; the GAP manual's Rubik's Cube example does exactly that.
Cube solvers use commutators without calling them that. A commutator is a sequence of the form \(ABA^{-1}B^{-1}\), and when the moves \(A\) and \(B\) overlap in only a few pieces, the commutator moves those few pieces and leaves everything else alone. The three-cycle of corners that every method relies on is a commutator, and so is the sequence that twists two corners in opposite directions. The same construction is what group theorists use to measure how far a group is from being commutative, which it will do in Unit 15 for a very different purpose.
God's number
The hardest question about the cube took 30 years. What is the largest number of face turns that any position needs? The answer is called God's number, on the grounds that only an all-knowing solver could use the shortest route every time. In 1981 Morwen Thistlethwaite proved that 52 turns always suffice; the bound crept down through the 1990s, and the lower bound of 20 was established in 1995, when Michael Reid showed that the "superflip" position, in which every edge is flipped in place, needs 20. In July 2010, Tomas Rokicki, Herbert Kociemba, Morley Davidson, and John Dethridge closed the gap: every position can be solved in at most 20 face turns. The proof used symmetry to cut the positions into about 56 million sets of 20 billion, and about 35 CPU-years of computing donated by Google to deal with the sets. The paper appeared in the SIAM Journal on Discrete Mathematics in 2013, and the authors keep a readable account at cube20.org. If quarter turns are counted rather than face turns, the answer is 26, settled in 2014.
Fewer than one position in ten million needs the full 20; a random position needs about 18. Human speedsolvers use nothing like optimal solutions, averaging about 50 moves and under six seconds for the current records, which is a different kind of achievement.
Why the cube is a good teacher
Almost every idea of elementary group theory can be felt in the hands with a cube. Permutations and their cycle structure, parity, the order of an element, generators, commutators, subgroups (the positions reachable using two faces only form one), cosets (the positions that differ from a given one by a move of the top face only), and the orbit-stabilizer counting of Unit 10 all have concrete meanings. The masterclass uses the cube in Unit 6 for the parity argument above and again in Unit 10 as a group acting on a set of stickers. The whole curriculum is at the link, and for the "one in twelve" the only equipment needed is a cube and a screwdriver.


