contents
§32

Useful mathematics — the cuber's toolbox

The Useful Mathematics note on jaapsch.net argues that cube enthusiasts rarely need abstract group theory — just a handful of visual tricks: two-line notation, cycle decomposition, crossing-number-as-parity, and lcm-as-order. This section rolls those tricks (and ten more) into a single practical reference: type any permutation and see all the structural data live; type A, B and watch σ A σ⁻¹, [A, B], σk, ⟨A, B⟩ computed on the spot. Think of it as the essay's pocket handbook.

32.1 Four equivalent views

For a permutation of elements, the same object can be written four equivalent ways:

The 5-cycle (1 2 3 4 5) has order 5 and parity (5−1) = 4, even. A transposition (a b) has order 2 and parity (2−1) = 1, odd. On the cube, R acts as a 4-cycle on corners (odd) and a 4-cycle on edges (odd) — product is even, matching §5's "joint parity = +1" invariant.

visualiser
type any permutation of 1..n; live lines + cycles + parity + order
123456123456
two-line
(1 2 3 4 5 6 / 2 3 1 5 4 6)
cycle decomp.
(1 2 3)(4 5)
crossings
3
parity sgn(σ)
−1 (odd)
order ord(σ)
6 = lcm(3, 2)

32.2 Connection to the cube

The cube alg FR acts as a 5-cycle on corners and a 7-cycle on edges (per Singmaster's Cubic Circular issue 2/3), so order(FR) = lcm(5, 7) = 35. Every alg's order follows this recipe: look at corner/edge cycle lengths and take the lcm. G has exactly 73 distinct element orders (§7.2); maximum is 1260, realised by R U2 D' B D' (in the pattern gallery as "Order-1260").

32.3 Two-line notation — Cauchy's original idea

In 1815, 23-year-old Augustin-Louis Cauchy treated "permutation" as a free-standing mathematical object for the first time in his Mémoire sur le nombre des valeurs qu'une fonction peut acquérir. His two-line notation (made standard in the 1844 Mémoire sur les arrangements) is

Observation 32.1 — bijection ↔ permutation
The bottom row must be a bijective rearrangement of the top row: each integer 1..n appears exactly once. Equivalently, is a bijection. So "two-line notation" = an element of .

Computation rule: the bottom row of is obtained by feeding τ's bottom row as indices into σ's bottom row. That isNote σ is outer (apply τ first, then σ): this is the mathematician's convention. Cubers reverse it (see 32.5).

two-line ↔ cycle toggle
12345
31452

32.4 Cycle decomposition — algorithm and shape

Given σ, the cycle decomposition algorithm is one you can do by hand in a minute:

  1. Find the smallest unvisited i (start at i = 1).
  2. Iterate σ: i → σ(i) → σ(σ(i)) → …, stopping when you return to i. Mark all visited.
  3. Repeat until every element has been visited.

The result is σ's disjoint cycle decomposition, unique up to (a) rotating each cycle and (b) reordering disjoint cycles (which trivially commute). The unordered multiset of cycle lengths — the cycle type — is σ's fundamental fingerprint, and determines σ's conjugacy class in (§21.4).

Theorem 32.2 — conjugation = relabelling
For any , Concretely, if τ = (a b c …)(d e …)…, then σ τ σ⁻¹ = (σ(a) σ(b) σ(c) …)(σ(d) σ(e) …)…. Conjugation only renames; it never changes the shape.

This theorem is the soul of §8 (conjugation) and §21.4 (conjugacy classes), and the algebraic basis of blindsolving setups: "use σ to bring the target piece into position, apply τ, then σ⁻¹ to restore" corresponds exactly to σ τ σ⁻¹, which has the same cycle shape as τ but moved to new locations.

step-by-step cycle decomposer
click "next" to watch the algorithm trace each orbit starting from i = 1
1 / 7
(1)

32.5 Composition order — the math-vs-cuber trap

Here is the trap every beginner falls into: the same string "σ τ" denotes different products for a mathematician and for a cuber.

Two conventions

Math convention: σ τ denotes function composition σ∘τ — "first τ, then σ" — so (σ τ)(i) = σ(τ(i)). Comes from right-action on functions.

Cuber convention: the alg "R U" means "do R, then U" — matching the writing order. Also called the left action or diagram order.

Consequence: in a cube book, [A, B] = A B A⁻¹ B⁻¹ means "do A, then B, then A⁻¹, then B⁻¹"; in a group theory book the same four letters mean "do B⁻¹, then A⁻¹, then B, then A" (the reverse). Translating between conventions is a matter of inverting the order.

Concrete example: σ = (1 2)(3 4), τ = (1 3). Compute σ τ under both conventions:

What does this essay use? The cuber convention (since the subject is the cube). But the widget below shows both results side by side so you can flip mentally between them.

composition convention comparator
math σ∘τ
first τ then σ — (σ∘τ)(i) = σ(τ(i))
(1 4 3 2)
cuber "σ τ"
first σ then τ — read left to right
(1 2 3 4)

32.6 Parity — three definitions, one invariant

The sign sgn(σ) ∈ {+1, −1} is the most useful invariant on . It admits three equivalent definitions, each useful in a different setting:

  1. (i) Crossings: draw the two-line diagram and count line crossings. sgn(σ) = (−1)#crossings. Geometric, ideal for visual quick checks.
  2. (ii) Cycle count: , where c(σ) is the cycle count (including fixed points). Equivalently sgn(σ) = ∏ (−1)|cᵢ|−1. Algebraic — best when cycles are known.
  3. (iii) Transposition decomposition: write σ = t₁ t₂ … t_k as a product of transpositions. sgn(σ) = (−1)k, and crucially the parity of k is independent of the decomposition. The fact that "parity is well-defined" is the most non-trivial of the three.
Why all three agree
Key lemma: composing σ with one transposition (a b) exactly changes the cycle count by ±1 (depending on whether a, b lie in the same cycle of σ). So "add one transposition" = "flip cycle count by 1" = "flip sgn". Writing σ as k transpositions amounts to "k sign flips starting from e," and the final parity depends only on k. This bridges (ii) and (iii); (i) ↔ (ii) follows from "inversion count = crossing count" (Knuth, TAOCP §5.1).
transposition sequence → parity check
type any sequence of (a b) transpositions; the count k and sgn(product) always agree.
count k: 4
product: (2 3 4)
(−1)k: +1
sgn(σ): +1 (even)
✓ (−1)ᵏ = sgn(σ)

32.7 Order — the lcm rule and Landau's function

The order ord(σ) is the smallest positive integer k with σk = e. Formula:

where c_i ranges over σ's disjoint cycles. The reasoning is simple: σk rotates each cycle c by k steps, which equals identity iff |c| divides k. All cycles satisfy this simultaneously iff k is a common multiple of every |c_i| iff the smallest such k = lcm.

order calculator
ord(σ) = lcm(3, 2, 6) = 6

32.7.1 Landau's function — maximum order in Sₙ

Across all of , the largest possible order is Landau's function g(n) (Edmund Landau 1903, Über die Maximalordnung der Permutationen gegebenen Grades). It is the answer to the combinatorial optimisation "partition n = n₁ + n₂ + … + n_r so that lcm(n₁, …, n_r) is maximal".

The extremal partitions are surprisingly delicate: g(5) = 6 from 2 + 3; g(7) = 12 from 3 + 4; g(11) = 30 from 2 + 3 + 5 + 1 (note the spare fixed point). Asymptotically (Landau).

For the cube: corners cp ∈ S₈, edges ep ∈ S₁₂. g(8) = 15 (from 3 + 5) and g(12) = 60 (from 3 + 4 + 5). With orientations layered on (CO ∈ ℤ/37, EO ∈ ℤ/211), orders become lcm of "(cycle length × orientation order)" — pushing the maximum on G to 1260 = lcm(4, 5, 7, 9), far above either g(8) or g(12). See §13.

Landau's function (n = 1..20)
ng(n) = max ordextremal cycle type
11(1)
22(1 2)
33(1 2 3)
44(1 2 3 4)
56(1 2)(3 4 5)
66(1 2 3)(4 5 6) / (1 2 3 4 5 6)
712(1 2 3)(4 5 6 7)
815(1 2 3)(4 5 6 7 8)
920(1 2 3 4)(5 6 7 8 9)
1030(1 2)(3 4 5)(6 7 8 9 10)
1130(1 2 3)(4..8)(9 10 11) → 30
1260(1..3)(4..7)(8..12) — 3·4·5 ⇒ 60
1360+ fixed point
1484(1..3)(4..7)(8..14) — 3·4·7
15105(1..3)(4..8)(9..15) — 3·5·7
16140(1..4)(5..9)(10..16) — 4·5·7
17210(1..2)(3..5)(6..10)(11..17) — 2·3·5·7
18210same partition + fixed
19420(1..4)(5..7)(8..12)(13..19) — 4·3·5·7
20420same partition + fixed

32.8 Conjugation visualiser — the relabel rule

Theorem 32.2 says conjugation is "rename via σ", but the verbal statement is hard to internalise. The widget below lets you type σ and τ, computes σ τ σ⁻¹ live, and shows cycle by cycle how each cycle of τ is relabelled into a cycle of σ τ σ⁻¹.

Cube interpretation: τ is "an alg you already know" (e.g. an edge 3-cycle); σ is "a setup move that brings the target pieces into τ's home position"; σ τ σ⁻¹ then "relocates τ's effect to the new spot". This is the shared grammar of BLD, FMC and ZBLL setup work.

conjugation visualiser
σ τ σ⁻¹ — same cycle shape, every entry relabelled by σ
σ τ σ⁻¹ =(2 3)(4 5)
relabel rule
(1 2) (2 3)
(3 4) (4 5)

32.9 Commutator visualiser — when [A, B] is a 3-cycle

Recall [A, B] = A B A⁻¹ B⁻¹ measures how badly A and B fail to commute. Its key cube application (§9): when A and B affect almost disjoint regions but share exactly one piece, [A, B] is a clean 3-cycle — that shared piece, plus one companion each from A's and B's region, cycle among themselves while everything else returns home.

Pure permutations show this too: A = (1 2 3 4 5), B = (3 4 5 6 7) — overlap {3, 4, 5}, and [A, B] is a 5-cycle. Switch B to (5 6 7) so overlap shrinks to {5}, and [A, B] reduces to a clean 3-cycle. This is the precise criterion for "commutator = 3-cycle" — the same arithmetic that backs the four atom algs in §9.1.

Fact 32.3 — [A, B] is always even
sgn([A, B]) = sgn(A) sgn(B) sgn(A⁻¹) sgn(B⁻¹) = sgn(A)² sgn(B)² = +1. So commutators never carry parity — they live inside the alternating group . On the cube, every commutator lies in the kernel of (sgn ∘ cp, sgn ∘ ep), which is why the cube's derived subgroup [G, G] = G' has index 2 (§9.2).
commutator computer
change A, B overlap and watch [A, B] react; single-point overlap usually yields a 3-cycle.
[A, B] = A B A⁻¹ B⁻¹ =(1 6)(3 4)
ord([A,B]) = 2 · sgn([A,B]) = +1 (commutators are always even)

32.10 Powers — σ^k and the loop home

The cycle structure of σk follows a simple rule: a cycle of length L breaks into gcd(k, L) cycles of length L / gcd(k, L) under σk. When k is a multiple of L, that cycle splinters into L fixed points. So σord(σ) = e is automatic.

Cube application: applying any alg X repeatedly eventually returns the cube to its start, after ord(X) repetitions. R has order 4 (R⁴ = e); R U has order 105 (5-cycle corners × 7-cycle edges × flips → lcm 105); a typical "R U R'" repeats back in 6. Drag the slider below to feel the cycle.

power slider
ord(σ) = 6
σ1 = (1 2 3)(4 5)

32.11 Generated subgroups — how big do two elements get?

Given two permutations g₁, g₂ ∈ , how large is the subgroup ⟨g₁, g₂⟩? An apparently elementary question with deep consequences. Classical examples:

Theorem 32.4 (Jordan)
For n ≥ 5: ⟨n-cycle, transposition⟩ = iff the "distance" between the two transposition elements (along the n-cycle) is coprime to n. If they share a factor d > 1, the subgroup collapses to a wreath-style product strictly smaller than .

The widget below uses the most naive BFS (works for n ≤ 9; n ≥ 10 has > 3.6M states, too big). The same idea scales via the Schreier-Sims algorithm (Sims 1970) — GAP can compute |⟨U, R⟩| in milliseconds despite |G| = 4.3 × 10¹⁹.

order of ⟨g₁, g₂⟩ (BFS)
⟨g₁, g₂⟩ ⊆ S5, |⟨g₁, g₂⟩| = 120S_5

32.12 Cycle index polynomial — the colouring formula

When a group G acts on n objects, the cycle index polynomial ZG(z₁, …, zn) encodes the cycle type of each element on the n-object action, averaged over G:

where c_k(g) is the number of length-k cycles in g's action on the n objects. Pólya's enumeration theorem: the number of distinct c-colourings up to G-equivalence equals ZG(c, c, …, c).

Worked example: the dihedral group D₄ (8 elements) acting on the 4 vertices of a square. List the cycle structure of each of the 8 elements on those 4 vertices, then average to get ZD₄. This is the root of the "square necklace" counting problem.

cycle index of D₄ on 4 vertices
gcycles on 4 verticesmonomial
e(1)(2)(3)(4)
r(1 2 3 4)
(1 3)(2 4)
(1 4 3 2)
v₁ (through 1,3)(1)(3)(2 4)
v₂ (through 2,4)(2)(4)(1 3)
e₁ (edge 12-34)(1 2)(3 4)
e₂ (edge 14-23)(1 4)(2 3)
Number of distinct c-colourings of 4 vertices up to D₄: . At c = 2: 6 patterns; at c = 3: 21 patterns — the classical D₄ "necklace" count.

For the cube's outer symmetry Oh (48 elements, 24 rotations + 24 mirror rotations) acting on 6 faces, a similar computation gives ZOh(c, …, c) = (c⁶ + 3c⁴ + …) / 48. At c = 6 the count is exactly 30 — the number of essentially distinct 6-colour cubes (§21.7).

32.13 Memorising algs as math objects

One last practical takeaway: don't memorise PLL / OLL / ZBLL by finger sequence — recognise them as mathematical objects.

This is why §22's "cycle then orientation" subgroup chain (CF → F2L → OLL → PLL) is as much a memory architecture as a solving architecture: it stratifies 4.3 × 10¹⁹ states so that each layer has only tens of equivalence classes — a count the human brain can hold.

Section summary: the 11 new widgets plus 32.1's PermutationVisualiser cover 99% of the "everyday group theory" a cuber uses — two-line ↔ cycles ↔ crossings ↔ order ↔ conjugation ↔ commutator ↔ powers ↔ generated subgroups ↔ Pólya counting. Follow-up reading: D. Joyner, Adventures in Group Theory (Johns Hopkins 2008), chapters 4–7 — the textbook treatment of exactly these tools on the cube [joyner].
cuberoot.me · Rubik's Cube as a Group · 2026