contents
§24

Random walks on G

"Random scrambling" is actually a Markov chain on G: each step uniformly picks one of 18 HTM generators. The natural question: after how many steps is the distribution "close enough" to uniform on G? The answer is the mixing time, deeply linked to the cutoff phenomenon in random-walk theory (Diaconis–Shahshahani 1981 style).

Definition 24.1 — total variation distance
For two probability distributions P, Q on G, defineThe mixing time is the smallest t such that .

24.1 Interactive: random-walk simulator

The random walk below ticks at 80 ms per step. Bars show a "proxy distance" (mismatched positions + orientations); watch it climb from 0 to ~40 and plateau. The three invariants stay pinned along the trajectory — visual proof that the walk lives inside the reachable coset.

steps: 0current d (proxy): 0
Σco mod 3
0
must = 0
Σeo mod 2
0
must = 0
sgn(cp) · sgn(ep)
+1
must = +1
Every 80 ms we apply a random HTM generator. The three invariants stay pinned on the trajectory — a visual proof that the random walk lives entirely inside the reachable coset. The mixing time (TV-distance < 1/(2e)) for the 18-generator walk is on the order of ~25 steps, which is why WCA uses 25-move scrambles.

24.2 Asymptotic estimate of mixing time

For a simple random walk on a general finite group with k generators, Diaconis–Shahshahani give an exact bound via representation theory:where is the Fourier coefficient of measure μ at irreducible representation ρ. For the cube, a back-of-envelope evaluation gives

WCA's 25-move scramble length is no accident: 25 sits near the mixing-time bound while staying away from the 20-move God's-number ceiling (meaningful scrambles shouldn't be known extremal states). In practice scramblers impose "no consecutive same-face" (aperiodic restrictions) to push the distribution closer to uniform — this is the heart of TNoodle, WCA's scramble generator.

24.3 The cutoff phenomenon

Diaconis's cutoff phenomenon (1980s): for many natural random walks on groups, stays near 1 for a long time, then drops sharply to near 0 within a narrow window:

Canonical example (Bayer–Diaconis 1992): 52 cards need riffles to mix. 7 still leaves traces; 9 is humanly indistinguishable from uniform. The cube's cutoff is not yet rigorously established; estimates put it at 22 ± 3 HTM moves.

24.4 Spectral gap & mixing rate

View the walk's transition matrix as a giant matrix. Its eigenvalues govern mixing speed. The "spectral gap" dominates:

Large gap = fast mixing = close to an expander. Whether the 18-generator Cayley graphs form an expander family (over n × n × n) is an active question. Numerical experiments put the 3×3's , gap ≈ 0.35 — moderately fast.

24.5 Why does WCA pick 25 moves?

WCA's 25-move scramble is deliberate:

2×2 / 4×4 / 5×5 use longer scrambles (40+ steps), reflecting larger mixing times. Megaminx uses 70 steps because its generating set is smaller (slower mixing per step).

24.4 Transition matrix P on the Cayley graph

The random walk is a Markov chain on G with transition kernelwhere is the 18-move HTM generator set. This is exactly "uniform-random-neighbour jump" on the cube's Cayley graph.

P is doubly stochastic (each row and column sums to 1, since S = S⁻¹): immediately giving as the stationary distribution. Moreover P is reversible w.r.t. π: , so as an operator on P is self-adjoint, hence has real spectrum.

24.5 Spectrum and the mixing-time bound

By the spectral theorem, P has real eigenvalues , with for the uniform eigenvector. The spectral gap controls mixing:

The matching lower bound: . With and the empirically observed , the bound yields — matching the simulation in 24.7.

24.6 Diaconis–Shahshahani on Sₙ

The classical Diaconis–Shahshahani result (1981): on the random transposition walk on , , with a sharp cutoff near . For cards (transposition model): transpositions. (Different model from the 7-riffle-shuffle result, but the spectral argument is the same flavour.)

For the cube, contributes as the "permutation" mixing scale — but the orientation part separately mixes in ~7 and ~11 steps. Together this predicts 15–20, matching the empirical value below.

24.7 Empirical: cube t_mix ≈ 18–22 steps

Steps tInterpretation
5≈ 1.00all mass within d ≤ 5 neighbourhood
10≈ 0.99still far from uniform
15≈ 0.85entering the cutoff region
18≈ 0.45cutoff midpoint
20≈ 0.20nearly uniform; WCA 25-move scramble adds safety margin
25≈ 0.05essentially uniform
30< 0.01exponential tail

Data from Monte Carlo: estimating across ~10⁵ random-walk trajectories on G. The cutoff midpoint ≈ 18 is no coincidence with §23's "random scramble average distance ~18" — both come from the same saturation of the Cayley graph at depth 18.

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