Mathwords logoMathwords

Rubik's Cube — Definition, Formula & Example

The Rubik's Cube is a 3×3×3 twisting puzzle. In group theory it defines a group: every sequence of face turns is an element, and doing one sequence after another is the group operation.

Label the 48 movable facelets (the 54 stickers minus the 6 fixed centers). The Rubik's Cube group is the subgroup G=⟨U,D,L,R,F,B⟩≤S48G = \langle U, D, L, R, F, B \rangle \le S_{48} generated by the six permutations induced by clockwise quarter turns of the faces. Its structure is G≅(Z37×Z211)⋊((A8×A12)⋊Z2)G \cong (\mathbb{Z}_3^7 \times \mathbb{Z}_2^{11}) \rtimes \big((A_8 \times A_{12}) \rtimes \mathbb{Z}_2\big), where the first factor records corner twists and edge flips, and the second records how the 8 corners and 12 edges are permuted.

Key Formula

∣G∣=8!⋅38⋅12!⋅21212=43,252,003,274,489,856,000|G| = \frac{8! \cdot 3^8 \cdot 12! \cdot 2^{12}}{12} = 43{,}252{,}003{,}274{,}489{,}856{,}000
Where:
  • 8!8! = Ways to place the 8 corner pieces
  • 383^8 = Orientations of the corners (3 twists each)
  • 12!12! = Ways to place the 12 edge pieces
  • 2122^{12} = Orientations of the edges (2 flips each)
  • 1212 = Factor removed by the three invariants that legal turns preserve

Worked Example

Problem: Suppose you take a Rubik's Cube apart and snap the pieces back in at random. How many of these assemblies can be solved by turning the faces?
Step 1: Count every possible reassembly. Each corner can go in any corner slot with any of 3 twists. Each edge can go in any edge slot with either of 2 flips.
8!⋅38⋅12!⋅212=519,024,039,293,878,272,0008! \cdot 3^8 \cdot 12! \cdot 2^{12} = 519{,}024{,}039{,}293{,}878{,}272{,}000
Step 2: Face turns preserve three invariants. The total corner twist is 0(mod3)0 \pmod 3. The total edge flip is 0(mod2)0 \pmod 2. The corner permutation and the edge permutation always have the same parity. Each invariant cuts the count by its modulus, and together they cut it by a factor of 12.
3⋅2⋅2=123 \cdot 2 \cdot 2 = 12
Step 3: Divide by 12. Every arrangement that satisfies all three invariants can actually be reached, so the quotient is the order of GG.
519,024,039,293,878,272,00012=43,252,003,274,489,856,000\frac{519{,}024{,}039{,}293{,}878{,}272{,}000}{12} = 43{,}252{,}003{,}274{,}489{,}856{,}000
Answer: Only 1 in 12 random reassemblies can be solved. The group has order 43,252,003,274,489,856,000, which is about 43 quintillion.

Why It Matters

Abstract algebra courses use the cube to show cosets, parity, homomorphisms and commutators on one concrete object. Speedcubing algorithms are built from commutators xyx−1y−1xyx^{-1}y^{-1}, which disturb only a few pieces. Computer searches over coset decompositions of GG proved in 2010 that every position can be solved in at most 20 moves when a half turn counts as one move.

Common Mistakes

Mistake: Assuming any arrangement of the pieces can be solved, for example a cube with just one edge flipped.
Correction: Turns never change the total edge flip mod 2, so a single flipped edge lies outside GG. Before you search for an algorithm, check the three invariants: corner twist, edge flip and permutation parity.

Related Terms

  • Permutation Group — The cube group is a permutation group on 48 facelets
  • Normal Subgroup — Twist-and-flip moves form a normal subgroup of the cube group
  • Symmetric Group — Contains the cube group as a subgroup of S48
  • Commutator — Builds the cube algorithms that move only a few pieces