"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).
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.
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.
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.
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.
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).
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.
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.
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.
| Steps t | Interpretation | |
|---|---|---|
| 5 | ≈ 1.00 | all mass within d ≤ 5 neighbourhood |
| 10 | ≈ 0.99 | still far from uniform |
| 15 | ≈ 0.85 | entering the cutoff region |
| 18 | ≈ 0.45 | cutoff midpoint |
| 20 | ≈ 0.20 | nearly uniform; WCA 25-move scramble adds safety margin |
| 25 | ≈ 0.05 | essentially uniform |
| 30 | < 0.01 | exponential 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.