Intermezzo: The Rubik’s cube & group theory
🧩 A puzzle with links to abstract algebra
A standard Rubik’s cube has six faces, each of which is covered by nine stickers of one of six solid colors.
- Eight corner pieces, each with three colored stickers
- Twelve edge pieces, each with two colored stickers
- Six center pieces, which determine the face colors and remain fixed to one another during ordinary face turns.
👨💻 Rubik’s cube
🔗 Links with abstract algebra
Moves form a group
The moves for the Rubik’s cube are denoted as follows:
- R \(\to\) right face clockwise
- L \(\to\) left face clockwise
- F \(\to\) front face clockwise
- B \(\to\) back face clockwise
- U \(\to\) upper face clockwise
- D \(\to\) down face clockwise
To make the group complete, we also include the identity and inverse moves, denoted with a prime symbol:
\[\{ \operatorname{I}, \operatorname{R}, \operatorname{R'}, \operatorname{L}, \operatorname{L'}, \operatorname{F}, \operatorname{F'}, \operatorname{B}, \operatorname{B'}, \operatorname{U}, \operatorname{U'}, \operatorname{D}, \operatorname{D'} \}\]
The moves for the Rubik’s cube form a non-Abelian group:
- Closure: For every move in the group, the combination of two moves is also in the group.
- Associativity: Moves are trivially associative
- Identity element: The identity element is leaving the cube unchanged.
- Inverses: For each move, there is an inverse move that undoes it.
The group is non-Abelian because the order of moves matters:
\[ \operatorname{R}\operatorname{U} \neq \operatorname{U}\operatorname{R} \]
Generators
A set \(S \subseteq G\) generates a group \(G\) if every element of \(G\) can be expressed as a finite product of elements of \(S\) and their inverses.
Only six moves are needed to generate the entire group of moves (and hence permutations) for the Rubik’s cube:
\[\{ \operatorname{R}, \operatorname{L}, \operatorname{F}, \operatorname{B}, \operatorname{U}, \operatorname{D} \}\]
For example, the sequence
\[ \operatorname{S} = \operatorname{RUF} \]
is one group element. Its inverse is found by reversing the order of the moves and taking the inverse of each move:
\[ \operatorname{S}^{-1} = \operatorname{F^{-1}U^{-1}R^{-1}} \]
Indeed:
\[ \operatorname{S}\operatorname{S}^{-1} = \operatorname{RUF}\operatorname{F^{-1}U^{-1}R^{-1}} = \operatorname{I} \]
Thus, a small generating set can describe an extraordinarily large finite group.
Configurations
The cube has 8 corner pieces, 12 edge pieces, and 6 center pieces. The center pieces are fixed relative to each other, so we can ignore them when counting configurations.
Legal face turns preserve three imporant conditions:
- Corner orientation: the total twist is \(0 \bmod 3\), so only \(3^7\) of the \(3^8\) twist assignments are possible.
- Edge orientation: the total flip is \(0 \bmod 2\), so only \(2^{11}\) of the \(2^{12}\) flip assignments are possible.
- Permutation parity: the corner and edge permutations must have the same parity, so only half of the \(8! \cdot 12!\) permutations are possible.
Therefore, the total number of configurations of a Rubik’s cube is:
\[ |\operatorname{G}| = \frac{8! \cdot 12!}{2} \cdot 3^7 \cdot 2^{11} = 43,252,003,274,489,856,000 \approx 4.33 \times 10^{19} \]