contents
§25

Computational group theory: BSGS & Schreier–Sims

How do we exactly compute |G| = 43,252,003,274,489,856,000? Not by formula — by a recursive algorithm called Schreier–Sims. It constructs G's BSGS (Base + Strong Generating Set), the canonical internal representation used by GAP, Magma, and SageMath for all finite permutation groups.

Definition 25.1 — base & stabilizer chain
Let G act on Ω (cube: |Ω| = 48 stickers). Choose a base giving a stabilizer chainwhere . Then (product of orbit sizes).

25.1 Interactive: the cube's stabilizer chain

levelfixed stickers|stab|orbit size
004.33e+1948
119.01e+1724
225.63e+1616
334.69e+1512
444.69e+1410
554.70e+1310
10102.00e+9small
151550000small
2020240tiny
232382
242411
View G as permutations of 48 stickers. Schreier–Sims iteratively fixes one sticker at a time, restricting to its stabilizer subgroup, producing a chain . Multiplying orbit sizes at each level gives . This is how GAP / Magma exactly compute .

25.2 Schreier–Sims algorithm (1970)

Idea (Schreier 1927 + Sims 1970): given generators , recursively build the base B and the strong generating set . Use Schreier's lemma at each level to compute generators of the next stabilizer. The algorithm runs in polynomial time with n = |Ω|.

GAP code (verify |G| = 4.3 × 10¹⁹):
gap> G := Group( > (1,3,8,6)(2,5,7,4)(9,33,25,17)(10,34,26,18)(11,35,27,19), > # ... 5 more generators encoding U, D, L, R, F, B as permutations of 48 stickers > );; gap> Size(G); 43252003274489856000 gap> StructureDescription(G); "(C2 x C2 x C2 x C2 x C2 x C2 x C2) : ((C3 x C3 x C3 x C3 x C3 x C3 x C3) : (A8 x A12))"

25.3 Schreier's lemma + pseudocode

Schreier's lemma (1927)
Let have index , a left transversal of H in G (with ), and a generating set for G. For , write for its T-representative. ThenSo H is generated by these "Schreier generators".

Applying "H is generated by G-generators + transversal" recursively yields the Schreier–Sims algorithm:

SchreierSims(S, base B): for i = 1 to |B|: compute orbit O_i = G^(i-1) · b_i via BFS on S^(i-1) record Schreier vector V_i (transversal lookup) derive S^(i) = { Schreier generators for Stab(b_i) } recurse on (S^(i), B[i+1:]) return BSGS = (B, S* = union of S^(i)) Size(G) = ∏_i |O_i| Membership(g): for i = 1 to |B|: let j = position of g(b_i) in O_i if j undefined: return false g = g · V_i[j]^(-1) return (g == identity)

25.4 The cube's stabilizer chain, explicitly

Take Ω = the 20 movable cubies (8 corners + 12 edges, position layer). A natural base yields:

ibase point b_i|O_i|stabilizes to
1corner URF8G⁽¹⁾
2corner UFL7G⁽²⁾
8last corner3cor twists ÷ 3
9edge UR12G⁽⁹⁾
19last edge2edge flip ÷ 2
20parity1{e}

Multiplying the orbit sizes gives precisely . This is why BSGS is more fundamental than the closed-form factorization — it doesn't assume the invariants; it derives them from generators.

25.5 Complexity & related algorithms

Deterministic Schreier–Sims runs in time, memory. Improved variants:

BSGS-adjacent algorithms in the computational toolkit:

25.6 Why does this matter for cube algorithms?

BSGS is the natural data structure for the membership test: given g, is g ∈ G? Layer-by-layer reduce via Schreier transversals; total fully reduced ⇒ yes. Time . Not directly useful for solvers (they need short presentations; BSGS gives long ones, average moves), but indispensable for group questions:

cuberoot.me · Rubik's Cube as a Group · 2026