Counting Eulerian circuits in subexponential time, assuming the new #SAT algorithms
Version 1 / Nov 04, 2026 / CC BY 4.0
Abstract
Counting the Eulerian circuits of an undirected graph is #P-complete, even for planar 4-regular graphs, while for directed graphs the BEST theorem counts them in polynomial time. However, we are unaware of any exact algorithm for undirected graphs of bounded degree that runs in time , where is the number of edges. We show that such an algorithm follows from the exact counting of Hamiltonian cycles that we proved earlier on top of Anthropic's claimed #SAT algorithm. The reduction is classical: by Kotzig's description, the Eulerian circuits of are in bijection with the Hamiltonian cycles of the line graph of the double subdivision of , which has vertices and at most edges. We prove in Lean 4 (theoremEuler, theoremEuler_noIso, theoremEuler_rate; axioms propext, Classical.choice, Quot.sound) that for every and a finite-alphabet Mathlib Turing machine outputs the number of Eulerian circuits of every graph of maximum degree at most within steps, and within steps when there is no isolated vertex; and that one machine does so for all graphs within steps. The factor pays for reading the -bit adjacency matrix and cannot be dropped. The bijection is checked by brute force on twelve small graphs, for example 132 circuits for . The formal object is Kotzig's transition-system definition; its agreement with Mathlib's Eulerian walks is not formalised. The constants are astronomical, and the proof rests on Anthropic's Lean development of its claimed refutation of the Exponential Time Hypothesis, which is under review.
Provenance statement
Tools used
- Anthropic
- Claude Fable
- Anthropic
- Claude Opus
- Lean
- Lean
References
- Claude (Anthropic), A time algorithm for 3-SAT , preprint dated 26 October 2026. Paper and Lean formalisation in the repository https://github.com/anthropics/formal-math, folder eth ; we use commit 16a5ce41304fcdaea4e0be7c132e1c361dc26da5 .link
- N. Balaji, S. Datta and V. Ganesan, Counting E uler tours in undirected bounded treewidth graphs , 35th IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science (FSTTCS 2015), LIPIcs, vol. 45, 2015, pp. 246--260; arXiv:1510.04035.arXiv
- T. van Aardenne-Ehrenfest and N. G. de Bruijn, Circuits and trees in oriented linear graphs , Simon Stevin 28 (1951), 203--217.
- G. Brightwell and P. Winkler, Counting E ulerian circuits is P -complete , Proc. 7th Workshop on Algorithm Engineering and Experiments and 2nd Workshop on Analytic Algorithmics and Combinatorics (ALENEX/ANALCO 2005), SIAM, 2005, pp. 259--262; arXiv:cs/0405067.arXiv
- P. Chebolu, M. Cryan and R. Martin, Exact counting of E uler tours for generalized series-parallel graphs , J. Discrete Algorithms 10 (2012), 110--122.
- Q. Ge and D. Štefankovič, The complexity of counting E ulerian tours in -regular graphs , LATIN 2010: Theoretical Informatics, Lecture Notes in Comput. Sci., vol. 6034, Springer, 2010, pp. 638--649.
- A. Kotzig, Eulerian lines in finite -valent graphs and their transformations , Theory of Graphs (Proc. Colloq., Tihany, 1966), Academic Press, New York, 1968, pp. 219--230.
- A. Kotzig, Moves without forbidden transitions in a graph , Mat. Časopis 18 (1968), no. 1, 76--80.
- L. de Moura and S. Ullrich, The L ean 4 theorem prover and programming language , Automated Deduction -- CADE 28, Lecture Notes in Comput. Sci., vol. 12699, Springer, 2021, pp. 625--635.
- The mathlib Community, The L ean mathematical library , Proc. 9th ACM SIGPLAN International Conference on Certified Programs and Proofs (CPP 2020), 2020, pp. 367--381.
Show all 16 referencesShow fewer references
- OEIS Foundation, The On-Line Encyclopedia of Integer Sequences , sequence A007082, https://oeis.org/A007082.link
- OpenAI, The E xponential T ime H ypothesis is false , preprint dated 17 October 2026, revised 25 October 2026. Paper and Lean formalisation in the repository https://github.com/openai/math.link
- A. Schrijver, Bounds on the number of E ulerian orientations , Combinatorica 3 (1983), no. 3--4, 375--380.
- C. A. B. Smith and W. T. Tutte, On unicursal paths in a network of degree , Amer. Math. Monthly 48 (1941), 233--237.
- V. Tulsyan, Counting H amiltonian cycles in sparse graphs in subexponential time, assuming the new SAT algorithms , Hexagon preprint hexagon:2610.00672v1, October 2026; source and Lean development at https://github.com/xennygrimmato/eth-hamiltonicity.hexagon
- V. Tulsyan, eth-hamiltonicity: L ean 4 formalisation and research notes , public repository https://github.com/xennygrimmato/eth-hamiltonicity, 2026; Lean sources as of commit 394740c .link
Version history
- v1 · 8 pagesSubmitted by Vaibhav TulsyanInitial depositCurrentNov 04, 2026