/-
Copyright 2026 The Formal Conjectures Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-/importFormalConjecturesUtil
Fix m ≥ 2. Consider the directed graph with vertex set (ZMod m)³, where from each vertex
(i, j, k) there are directed arcs to (i+1, j, k), (i, j+1, k), and (i, j, k+1)
(arithmetic mod m). The goal is to partition all 3m³ directed arcs into three
edge-disjoint directed Hamiltonian cycles (each of length m³).
Knuth describes an explicit construction, found by Claude (Anthropic), that achieves this
decomposition for all odd m ≥ 3. The case m = 2 is known to be impossible [Aub82].
The even case m > 2 is also settled. Knuth's paper says so in its final section, added in the
14 April 2026 revision: "Breaking news: The problem for even values of m is no longer in doubt!"
Ho Boon Suan's algorithm [Ho26] is proved correct for even m ≥ 8 in [GPT26], and
Aquino-Michaels [AM26] gives a decomposition for the even case that is simpler. The statement
below starts at m = 4, which is below the range [GPT26] covers, so it also rests on the
explicit solutions in [Kn26], whose header gives even m ≥ 4.
References
[Knu26] D. E. Knuth, "Claude's Cycles" (2026).
[Aub82] J. Aubert, B. Schneider, "Graphes orientés indécomposables en circuits hamiltoniens",
J. Combin. Theory Ser. B 32 (1982), 347–349.
[AM26] K. Aquino-Michaels, "Completing Claude's cycles: Multi-agent structured exploration on
an open combinatorial problem", https://github.com/no-way-labs/residue
A permutation σ on vertices is a directed Hamiltonian cycle of a digraph with adjacency
adj if every arc (v, σ v) is an edge, σ is a single cycle, and σ moves every vertex.
The three arcs leaving a vertex are distinct, which is what makes the ∃! in
HasHamiltonianArcDecomposition a condition about arcs rather than about heads that might
coincide. It needs 1 < m.
The arcs of the cube digraph on (ZMod m)³ can be decomposed into three directed
Hamiltonian cycles: there exist three permutations, each forming a directed Hamiltonian
cycle, such that every arc (v, bumpAt b v) belongs to exactly one cycle.
The hypothesis 1 < m on cube_hamiltonian_arc_decomposition is load-bearing. At m = 1
the vertex type has one element, so the only permutation of it is the identity, which is not a
cycle. Note that Odd 1 holds, so without 1 < m the odd statement would be false.
For even m > 2, the cube digraph on (ZMod m)³ has a Hamiltonian arc decomposition.
Knuth records this as settled in the final section of [Knu26], by [Ho26] with the proof in
[GPT26] for even m ≥ 8, and by [AM26] for the even case generally.