arXiv:2610.01240math.COOct 2026

Manuscript Offprint

arXiv:2610.01240

A proof of Lehmer's permutation conjecture for neighbor-swap graphs

Tom Verhoeff

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original. This text is shared under the same licence.

Abstract

In 1965, D. H. Lehmer conjectured that the permutations of every multiset admit an imperfect Hamiltonian traversal by adjacent swaps: a walk in the neighbor-swap graph that visits every word, with some words visited twice in order to reach a neighbor and return. The question is posed as an unsolved research problem in Knuth's Art of Computer Programming. Verhoeff (2017) chose the stutter words, in which every domino is a double, as the words to be reached this way, and reformulated the conjecture as the Hamiltonicity of the graph N(S)N(S) on the non-stutter words, with two exceptional families — binary signatures with an odd multiplicity, and the permutations of (2k,1,1)(2k,1,1) — that admit a Hamiltonian path but no cycle. This article proves the reformulated conjecture, and with it Lehmer's conjecture. The key structure is a partition of the words into hypercubes: the swaps inside dominoes turn each class of words with the same domino contents into a hypercube, and the stutters are exactly the 0-dimensional classes. When every multiplicity is even, Hamiltonian cycles of the hypercubes are glued along a spanning tree, with no finite check. The case of exactly one odd multiplicity reduces to the all-even case and to a theorem of Stachowiak (1992), the one inherited Hamiltonianity input, which also settles two or more odd multiplicities. The only finite ingredients are two explicit cycles, of 28 and 84 words. Every construction is implemented in Python and checked against brute-force graphs, and the proof is formalized in Lean 4 over Mathlib.

Contents

1 Introduction 2
1.1 Lehmer's permutation conjecture 2
1.2 The result 3
1.3 The proof in outline 3
1.4 Provenance: how the proof was found 5
1.5 Relation to prior work 6
1.6 Machine verification and formalization 6
1.7 Organization 6

2 Preliminaries 6
2.1 Signatures, words, and the neighbor-swap graph 6
2.2 Stutter words 7
2.3 From Lehmer's conjecture to the non-stutter graph 8
2.4 The reformulated conjecture, and its two exceptions 8
2.5 Parallel edges, gadgets, and gluing along a tree 9
2.6 Hypercubes: the orbits of the intra-domino swaps 10

3 Inherited base results 11
3.1 The binary classification (Verhoeff) 11
3.2 The multi-odd case (Stachowiak) 11
4 Two tools: hypercube cycles and spanning matching trees 12
5 The all-even case: all multiplicities even 14
5.1 Families and rung stitches 15
5.2 Descent and root stitches 15
6 The one-odd case: exactly one odd multiplicity 16
6.1 Blocks and parallel pairs 17
6.2 Shifted stutters and the assembly 17
6.3 Choosing the shifted stutters 18
6.4 Conclusion of the proof 19
7 The family (2j, 2, 1) 20
7.1 The grid of G(2j,1,1)G(2j, 1, 1) 20
8 The main theorem 22
9 Conclusion 23
9.1 Future work 23
Acknowledgments 24
Note on authorship and AI collaboration 24
The ornamental braid 25
References 25
A The two explicit cycles 26
A.1 (2, 2, 1) (used for j = 1) 26
A.2 (2, 2, 2) 26
B Machine verification 27
C Lean formalization 28