Donald Knuth's 'Claude's Cycles': Claude Opus 4.6 solves an open Hamiltonian-cycle problem ('Shock! Shock!')
Donald Knuth published a note opening 'Shock! Shock!' describing how Claude Opus 4.6 found, in about an hour of guided exploration, a general construction decomposing the arcs of a 3D torus digraph on m³ vertices into three Hamiltonian cycles for all odd m. Knuth had worked on the problem for weeks for a future TAOCP volume. He then proved Claude's construction correct.
Key facts
- Note dated 28 Feb 2026, revised 4 Mar 2026
- Graph: vertices (i,j,k) mod m, arcs increment one coordinate; goal: split all arcs into 3 directed Hamiltonian cycles
- Claude found the odd-m construction in 31 guided explorations over about an hour; the even case remains largely open
- Knuth wrote the proof; the result was later formalised in Lean (kim-em/KnuthClaudeLean)
Science result
- Field
- mathematics / combinatorics / graph theory
- Problem
- Decomposing the 3D torus digraph on m³ vertices into three Hamiltonian cycles
- Result
- General explicit construction for all odd m, found by Claude and proved by Knuth.
- AI system
- Claude Opus 4.6
- Human role
- AI-assisted: colleague Filip Stappers ran the Claude session; Knuth verified and proved
- Verification
- Human proof by Knuth; formalised in Lean
- Status
- confirmed
- Why surprising
- The author of The Art of Computer Programming titled his note's opening 'Shock! Shock!' after an AI solved a problem he had been stuck on.
What happened
Knuth posed a Hamiltonian-cycle decomposition problem he planned for TAOCP. Working through it with Claude Opus 4.6 over dozens of explorations, a collaborator got a pattern that works for every odd m. Knuth then proved it and wrote up the story.
Why it matters
Coming from one of computing's most respected and AI-sceptical elders, the note became a cultural marker that frontier LLMs could contribute original mathematical constructions.
Changelog
- 2026-09-29: created
Related events
Sources (3)
- paperDonald Knuth: Claude's Cycles (PDF)
- codeGitHub: kim-em/KnuthClaudeLean (Lean formalisation)
- pressAdafruit blog: Don Knuth wrote a paper thanking Claude
id: 2026-02-28-knuth-claudes-cycles · updated 2026-09-29 · open in the interactive timeline