Demigod's Number — a high-probability 36-move bound for 3×3
In 2010 Rokicki et al. used 35 CPU-years on a Google cluster to prove 3×3 God's number is exactly HTM — a result almost no one has ever independently reproduced. In late 2024, Merino & Subercaseaux proposed a fundamentally different approach: settle for the weaker bound, in exchange for needing only 500,000 random samples and ~100 hours of single-machine compute, each one certified by a short Kociemba solution. Anyone with a laptop and a Kociemba solver can replicate it overnight. This page walks through the paper end-to-end — proof, concentration bound, sampling algorithm, and its place beside God's number.
TL;DR
- What: a re-derivation of the 3×3 diameter, relaxed from the exact down to a probabilistic , but reproducible on a single laptop. The authors dub this "trade compute for a weaker conclusion" pattern a demigod number.
- How: (i) on any vertex-transitive graph, (basic triangle inequality); (ii) the 3×3 Cayley graph is vertex-transitive; (iii) Hoeffding pins close to the empirical .
- Key trick: Plain Hoeffding with (Human's number as worst case) demands ~ samples; proving " of states need moves" lets , cutting samples to .
- Experiment: MacBook Pro M3 ran 500k samples in 5 hours. Every sample solves in , mean , total error probability .
- Generalises: applies to any vertex-transitive graph that admits uniform sampling — Pyraminx, Megaminx, 5×5, the 15-puzzle on a torus — even where God's number is unknown.
3. Preliminaries
Model the cube as a group: every position is a permutation of (54 stickers); face turns are generators; the six fixed centres let us embed it in . Classical setup:
Given group and generators , the Cayley graph has vertex set with edge iff some gives .
For the cube, this gives
"God's number" = ; the demigod's number is a high-probability upper bound on .
4. Core theorem: vertex-transitive ⇒ D < 2μ
For general graphs can blow up — the paper gives the clique-plus-tail example reaching , which Wu et al. 2011 prove tight. Vertex transitivity, however, forces the ratio below 2.
For any vertex-transitive graph with diameter and mean distance , we have .
First a lemma: in a vertex-transitive graph, the mean distance equals the average distance from any fixed vertex:
(For each there is an automorphism sending to , and automorphisms preserve distances; double-summing and using this collapses the .)
Now take with . Apply Lemma 4 twice:
Triangle inequality: . ∎
5. Why Cayley graphs are vertex-transitive — interactive
This is the step that hooks the cube onto Theorem 2. The proof is a one-liner and makes "group structure = symmetry" concrete.
Every Cayley graph is vertex-transitive.
Given , set . It sends to , has inverse , and preserves edges:
so . ∎
Watch Theorem 2 act on the simplest non-trivial Cayley graph, — drag to see the triangle inequality flexing:
6. Theorem 1: the master probability bound + Hoeffding interactive
The headline. Combine with Hoeffding's inequality.
For i.i.d. with mean and empirical mean , for any :
For a state , let be its distance to the identity; let be a uniformly sampled set with empirical mean . Then:
Lemma 8 (Human's number) yields . Plug , into Hoeffding:
Then by Theorem 2 ():
∎
The panel below exposes the three knobs: sample size , tolerance , and the Hoeffding constant . Two curves show the naive vs refined decay; the dot marks your current selection.
7. The Human's-Number trick — squeezing 205 down to 20
Theorem 1 with demands samples for a 1% error — about a year of single-core compute. The fix: most states actually solve in moves; only a vanishing fraction are "far apart".
For a pair , call it far apart if , otherwise close.
Let "at least 0.03% of pairs are far apart". Lemma 6: if holds, the probability of 500,000 samples turning up zero far-apart pair is:
Yet they observed exactly zero. So is overwhelmingly false: of pairs are far apart, and on the close pairs , hence . Hoeffding's coefficient drops from to , cutting sample size by times.
Where the Human's number comes from: 7-step beginner's method
Appendix A presents a generous-but-rigorous beginner's-method bound. Step by step:
Comically loose — any beginner averages moves — but as a worst case that you can prove in a single page it's plenty.
8. How to sample cube states uniformly
The theorem is proven, but you still need a true uniform sampler. The paper invokes the classical Fundamental Theorem of Cubology:
If you take all corners + edges off and reattach them, the reassembly is reachable from solved iff (a) corner sign = edge sign (parity); (b) corner twists sum to (twist sum); (c) edge flips sum to (flip sum).
The three constraints partition equivalence classes; exactly one is legal. Naive "uniform permute + reject" averages 12 retries. The paper picks the smarter route: after one random reassembly, apply at most three deterministic correctives:
- Flip the F-U edge (toggles edge-flip parity)
- Swap F-U-L and F-U-R corners (flips corner parity)
- Twist the D-U-R corner clockwise (shifts twist sum mod 3)
The 12 invalid operations fibre every state above the legal subgroup; reassemble once + apply the three correctives gives 1 effective sample per pass.
9. Experiment: 500k samples, 5 hours, Kociemba
The paper's experiment ran on a MacBook Pro M3 (36 GB RAM, 16 cores) using the open-source Kociemba implementation efrantar/rob-twophase. Results:
- Total samples |S|:
- Empirical mean :
- Longest solution: 20 HTM (matches Rokicki's 2010 exact diameter)
- Wall time: ≈ 5 hours
- Total error probability:
The exact counts of Figure 5, redrawn with a log-toggle and per-bin hover:
10. Run it yourself — in-browser Kociemba
The button below spins up a Web Worker that, in a loop, (i) draws a uniformly random 3×3 state, (ii) solves via Kociemba, (iii) histograms the solution length. Watch creep toward the paper's . Your samples are overlaid in green on the histogram above.
11. History of bounds (paper Table 1)
From Thistlethwaite's 52-move bound in 1981 to the 20/20 closure in 2010 — three decades of gap-shrinking. Each cell is one historical (lower, upper) snapshot:
The three "numbers" side by side
| Name | Value | Tightness | Compute to verify | Who can audit | Source |
|---|---|---|---|---|---|
| God's | 20 | exact | 35 CPU·yr | must re-run the Google-scale solve | Rokicki 2010 |
| Demigod | 36 | upper, >10⁻¹⁰ confidence | ~5 h MacBook | one laptop overnight | Merino & Subercaseaux 2024 |
| Human's | 205 | upper, deterministic but loose | pen and paper | anyone who can solve a Rubik's cube | Paper App. A |
12. Generalisation — what else gets a demigod number
Two ingredients: (i) vertex transitivity (so holds); (ii) efficient uniform sampling. Every Cayley graph gives (i) for free; (ii) depends on the group's computable structure. The paper names several candidates:
| Puzzle | |G| | Known diameter | demigod doable? |
|---|---|---|---|
| 2×2 | 3.67×10⁶ | 11 | BFS finishes the full graph — no need |
| Pyraminx | 933,120 | 11 | BFS suffices |
| Skewb | 3.15×10⁶ | 11 | BFS suffices |
| Square-1 (face) | 2.4×10¹⁴ | 31 | Chen 2017 used 722GB BFS; demigod is the citizen-grade alternative |
| Megaminx | 1.0×10⁶⁸ | 48–~110 (HTM) | ✓ — needs a megaminx solver; D unknown, demigod gives an upper bound |
| 5×5×5 | 2.83×10⁷⁴ | ?–~120 (OBTM) | ✓ — reduction solvers exist; gap is wide, demigod immediately useful |
| 15-puzzle on a torus | ~10¹³ | ? | ✓ — paper explicitly cites this as a target |
The 5×5 lower/upper-bound gap is wider than a factor of 2 — exactly where demigod buys the most. So Hirata's 2024 papers (refs [12,13] in the paper) attack the same problem via girth and branching factor — complementary to this approach.
13. A side note on probabilistic vs traditional proof
The paper's closing argument is worth recording: it places demigod-class results on the spectrum of plausibility alongside probabilistic primality tests and machine-assisted proofs (Kepler's conjecture). Whether is prime is a deterministic fact, but in practice we accept "Miller-Rabin gives error " as if it were one.
The paper's closing summary: "if the cube's diameter were actually greater than 36, the probability of observing an empirical mean of ~18.3 and zero samples in 500,000 draws is ". Compare this to the chance of someone finding a SHA-256 collision overnight on a 2024 laptop — which is more believable?
References
- Merino & Subercaseaux — "A Demigod's Number for the Rubik's Cube" (arXiv:2501.00144, 2024) — the subject of this page
- Rokicki, Kociemba, Davidson & Dethridge — "The Diameter of the Rubik's Cube Group Is Twenty" — SIAM Review 2014, peer-reviewed God's number = 20
- cube20.org — Rokicki team's hub
- Kociemba — Two-Phase Algorithm — 1992 original description
- efrantar/rob-twophase — the actual solver the paper used
- Herman & Pakianathan — "On the distribution of distances in homogeneous compact metric spaces" (2015) — the original of Theorem 2 in the more general metric-space setting
- Demaine et al. — "Algorithms for Solving Rubik's Cubes" (ESA 2011, arXiv:1106.5736) — rigorous Θ(N²/log N) for NxN
- Mulholland — "Permutation Puzzles: Rubik's Cube" — standard reference for the Fundamental Theorem of Cubology
- Paper supplementary materials (anonymous git) — 500k sample data + solution certificates
- Wikipedia — Vertex-transitive graph
- Wikipedia — Hoeffding's inequality
- /math/god — back to the all-WCA-events God's number overview