Introduction
Background
The Exponential Time Hypothesis (ETH) of Impagliazzo and Paturi [27 ] asserts that there is δ > 0 \delta> 0 δ > 0 such that 3-SAT on n n n variables cannot be solved in time O ( 2 δ n ) O(2^{\delta n}) O ( 2 δ n ) . Together with the sparsification lemma [28 ] it underlies a large body of conditional lower bounds [33 , 18 ] . Among them is the statement that, unless ETH fails, Hamiltonian Cycle has no 2 o ( n + m ) 2^{o(n+m)} 2 o ( n + m ) -time algorithm on graphs with n n n vertices and m m m edges [18 Ch. 14] (see also [33 Thm. 3.3] , stated there as the absence of a 2 o ( n ) 2^{o(n)} 2 o ( n ) -time algorithm for Hamiltonian Path).
In October 2026 two manuscripts appeared, by OpenAI [35 ] and by Anthropic [15 ] , each claiming a deterministic algorithm that counts the satisfying assignments of a k k k -CNF in subexponential time, and hence a refutation of ETH. Both are accompanied by Lean 4 formalisations of their top-level statements. We stress that these are claimed results that are, at the time of writing, still under review by the community. We write [A] for the Anthropic manuscript [15 ] . Its Main Theorem gives one deterministic algorithm that counts the models of a k k k -CNF with m m m clauses on n n n variables in time
2 O ( min { k m / log m , k 2 n log log n / log n } ) 2^{O(\min\{km/\sqrt{\log m},\, k^2n\log\log n/\sqrt{\log n}\})} 2 O ( m i n { k m / l o g m , k 2 n l o g l o g n / l o g n })
with an absolute constant in the O O O . The bound of [35 ] that is machine-checked is 2 O k ( ρ ( n ) ) 2^{O_k(\rho(n))} 2 O k ( ρ ( n )) with ρ ( N ) = N ( log log N ) 2 / log N \rho(N)=N(\log\log N)^2/\sqrt{\log N} ρ ( N ) = N ( log log N ) 2 / log N .
A refutation of ETH does not by itself yield fast algorithms for connectivity problems. ETH lower bounds for Hamiltonicity come from linear-size reductions from 3-SAT to Hamiltonian Cycle; an algorithm needs the reverse direction, an encoding of Hamiltonicity as a counting problem on O ( n ) O(n) O ( n ) Boolean variables with short clauses. Connectivity is a global property and no such encoding is known. Accordingly, the consequences listed by both labs (Independent Set, Vertex Cover, Dominating Set, colouring, circuit lower bounds) are all local problems.
Results
Throughout, G = ( V , E ) G=(V,E) G = ( V , E ) is a finite simple undirected graph with n = ∣ V ∣ n=|V| n = ∣ V ∣ and m = ∣ E ∣ m=|E| m = ∣ E ∣ , and # H C ( G ) \#\mathrm{HC}(G) # HC ( G ) is the number of Hamiltonian cycles of G G G , each counted once as a subgraph (so # H C ( K 4 ) = 3 \#\mathrm{HC}(K_4)=3 # HC ( K 4 ) = 3 ); # H C ( G ) = 0 \#\mathrm{HC}(G)=0 # HC ( G ) = 0 if n ≤ 2 n\le2 n ≤ 2 . Running times are counted as in [A]: operations on words long enough to hold an address, plus table queries. All logarithms are to base 2.
Our main results are corollaries of [A]: they are conditional on three results of [A], which we recall precisely in § 2 , and they inherit whatever doubt attaches to those results. If [A] is wrong, the theorems below lose their proofs.
Hypothesis (HA _A A ). The following statements of [A] hold as stated there: Lemma 8, case (i) (the reduction from general networks to cliques, Theorem 2.4); Theorem A(a), (b) (one algorithm for the ( K ℓ , λ ) (K_\ell,\lambda) ( K ℓ , λ ) -cliques of all levels ℓ \ell ℓ , Theorem 2.5); and Theorem B (pieces with parameters ( 1 / 2 , c ) (1/\sqrt{2},c) ( 1/ 2 , c ) , Theorem 2.6).
For Theorem 1.1 it suffices to have the pieces of [A, Lemma 2] (parameter 11 / 12 11/12 11/12 ) in place of Theorem B, or alternatively the main-text pair [A, Lemma 1, Proposition 3] (Theorem 2.7). Nothing else of [A] is used; in particular we do not use its CNF Main Theorem, which does not suffice for our purposes (the fermionic sign below is not local at the level of vertices).
Theorem 1.1 (Exact counting, fixed density). Assume (HA _A A ). For every real δ > 0 \delta> 0 δ > 0 and every D ≥ 1 D \ge1 D ≥ 1 there is a deterministic algorithm that, given a graph G G G with n n n vertices and at most D n Dn D n edges, outputs # H C ( G ) \#\mathrm{HC}(G) # HC ( G ) within O ( 2 δ n ) O(2^{\delta n}) O ( 2 δ n ) operations.
Theorem 1.2 (Exact counting, explicit rate). Assume ( H A ) (\mathrm{H}_{\mathrm{A}}) ( H A ) . There are an absolute constant C ∗ C^{*} C ∗ and one deterministic algorithm that, given any graph G G G with n ≥ 2 n \ge2 n ≥ 2 vertices and m m m *edges, outputs # H C ( G ) \#\mathrm{HC}(G) # HC ( G ) within 2 C ∗ max ( m , n ) / log n 2^{C^{*}\max(m,n)/\sqrt{\log n}} 2 C ∗ m a x ( m , n ) / l o g n operations. In particular it runs in time 2 O ( D n / log n ) 2^{O(Dn/\sqrt{\log n})} 2 O ( D n / l o g n ) on graphs with m ≤ D n m \le Dn m ≤ D n , where the O O O -constant is absolute and D D D may depend on n n n .
When the density grows with n n n , a variant of the network gives a much better dependence on the degree. Write d ˉ : = 2 m / n \bar d := 2m/n d ˉ := 2 m / n for the average degree and Δ \Delta Δ for the maximum degree.
Theorem 1.3 (Exact counting, maximum/average degree; machine-checked). Assume ( H A ) (\mathrm{H}_{\mathrm{A}}) ( H A ) . There are an absolute constant C ♯ C^{\sharp} C ♯ and one deterministic algorithm that, given any graph G G G with n ≥ 2 n \ge2 n ≥ 2 vertices, average degree d ˉ \bar d d ˉ and maximum degree Δ \Delta Δ , outputs # H C ( G ) \#\mathrm{HC}(G) # HC ( G ) within
2 C ♯ n log ( 2 e max ( d ˉ , 2 ) ) / log n ≤ 2 C ♯ n log ( 2 e max ( Δ , 2 ) ) / log n 2^{C^{\sharp} n\log(2e\max(\bar d,2))/\sqrt{\log n}} \le2^{C^{\sharp} n\log(2e\max(\Delta,2))/\sqrt{\log n}} 2 C ♯ n l o g ( 2 e m a x ( d ˉ , 2 )) / l o g n ≤ 2 C ♯ n l o g ( 2 e m a x ( Δ , 2 )) / l o g n operations. In particular it runs in time 2 o ( n ) 2^{o(n)} 2 o ( n ) whenever log d ˉ = o ( log n ) \log\bar d=o(\sqrt{\log n}) log d ˉ = o ( log n ) , for example for d ˉ = ( log n ) O ( 1 ) \bar d=(\log n)^{O(1)} d ˉ = ( log n ) O ( 1 ) or d ˉ = 2 ( log n ) 0.49 \bar d=2^{(\log n)^{0.49}} d ˉ = 2 ( l o g n ) 0.49 .
Theorem 1.3 is machine-checked: the Lean theorem theorem3 gives one Turing machine that outputs # H C ( G ) \#\mathrm{HC}(G) # HC ( G ) in binary within ⌊ C ⋅ 2 C n log 2 ( 2 m / n + 2 ) / log 2 ( n + 2 ) ⌋ \left\lfloor C\cdot2^{Cn\log_2(2m/n+2)/\sqrt{\log_2(n+2)}}\right\rfloor ⌊ C ⋅ 2 C n l o g 2 ( 2 m / n + 2 ) / l o g 2 ( n + 2 ) ⌋ steps for every graph G G G with n n n vertices and m m m edges, and theorem3\_maxdeg gives the same with log 2 ( Δ + 2 ) \log_2(\Delta+2) log 2 ( Δ + 2 ) ; both use the standard axioms only (§ 12 ). For bounded d ˉ \bar d d ˉ it gives the same order 2 O ( n / log n ) 2^{O(n/\sqrt{\log n})} 2 O ( n / l o g n ) as Theorem 1.2; it is stronger when d ˉ → ∞ \bar d\to\infty d ˉ → ∞ , because a pair of blobs then shares only the set of used crossing edges between them, rank-encoded, and the labels of those edges, so the total number of shared bits is about 2 n log ( 2 e d ˉ ) 2n\log(2e\bar d) 2 n log ( 2 e d ˉ ) instead of 2 log 2 5 ⋅ m ≈ 2.32 d ˉ n 2\log_2 5\cdot m\approx2.32\bar d n 2 log 2 5 ⋅ m ≈ 2.32 d ˉ n . It does not reach dense graphs: for d ˉ = Θ ( n ) \bar d=\Theta(n) d ˉ = Θ ( n ) the bound is 2 O ( n log n ) 2^{O(n\sqrt{\log n})} 2 O ( n l o g n ) , above 2 n 2^n 2 n (§ 1.6 ).
Corollary 1.4 (Decision, search and paths; machine-checked). Assume ( H A ) (\mathrm{H}_{\mathrm{A}}) ( H A ) . Within time bounds of the same form as Theorems 1.1 and 1.2 (with a larger constant C C C ), one can deterministically decide whether G G G is Hamiltonian, output a Hamiltonian cycle if one exists, and, for n ≥ 2 n\ge2 n ≥ 2 , count, decide and find Hamiltonian paths. The search machine makes n 2 + 1 n^2+1 n 2 + 1 calls to the counting machine, deleting candidate edges in a fixed order; Hamiltonian paths of G G G correspond bijectively to Hamiltonian cycles of G G G plus an apex vertex.
In Lean these are decision\_TM, search\_TM (fixed density) and decision\_TM\_rate, search\_TM\_rate (rate form), and for paths hamPaths\_count\_TM, hamPaths\_decision\_TM, hamPaths\_search\_TM and their \_rate versions, with the bijection card\_hamPaths\_eq; all use the standard axioms only.
The weighted version is the sparse travelling-salesman problem; it is machine-checked as well.
Theorem 1.5 (Sparse TSP; machine-checked). Assume ( H A ) (\mathrm{H}_{\mathrm{A}}) ( H A ) . For every real δ > 0 \delta>0 δ > 0 and every D ≥ 1 D\ge1 D ≥ 1 there are a deterministic algorithm and a constant C C C such that, given a graph G G G with $n vertices and at most D n Dn D n edges and integer edge weights w : E → { 0 , … , W } w:E\to\{0,\ldots,W\} w : E → { 0 , … , W } , the algorithm outputs within C ⋅ 2 δ n ( W + 2 ) C ∗ s t e p s t h e i n t e g e r ∗ C\cdot2^{\delta n}(W+2)^C *steps the integer* C ⋅ 2 δ n ( W + 2 ) C ∗ s t e p s t h e in t e g er ∗ n\sum_H 2^{bw(H)}$, b = n 2 + n b=n^2+n b = n 2 + n , the sum running over the Hamiltonian cycles H H H of G G G . *Its base-*2 digit j j j is n n n times the number of tours of weight exactly j j j ; the minimum tour weight is the position of the lowest non-zero digit, and the number of optimal tours is that digit divided by n n n . In particular the sparse TSP is solved exactly, with its optimum counted, in time 2 δ n poly ( W ) 2^{\delta n}\operatorname{poly}(W) 2 δ n poly ( W ) for every δ > 0 \delta>0 δ > 0 : subexponential for all weights W = 2 o ( n ) W=2^{o(n)} W = 2 o ( n ) .
In Lean this is theoremTSP and theoremTSP\_decode, built on [A]’s development with the standard axioms only (§ 12 ). What it does not give is as important: the running time grows with the number of edges, so dense and metric instances (complete graphs, Euclidean TSP) are untouched, and the O ∗ ( 2 n ) O^{*}(2^n) O ∗ ( 2 n ) dynamic programme of Bellman and of Held and Karp [3 , 26 ] remains essentially the record there (improved only to 2 n − Ω ( n / log ( n W ) ) poly ( W ) 2^{n-\Omega(\sqrt{n/\log(nW)})}\operatorname{poly}(W) 2 n − Ω ( n / l o g ( nW ) ) poly ( W ) for integer weights up to W W W [5 ] , and, for bipartite instances, to O ( 1.9999 n ) O(1.9999^n) O ( 1.999 9 n ) assuming quadratic-time matrix multiplication [34 ] ); and weights W = 2 Θ ( n ) W = 2^{\Theta(n)} W = 2 Θ ( n ) remain open (§ 1.6 ). The identity behind the theorem is the Kronecker substitution z = 2 b z = 2^b z = 2 b in n n n ∑ H z w ( H ) = ∑ X z w ( X ) κ ( X ) \sum_H z^{w(H)} = \sum_X z^{w(X)}\kappa(X) ∑ H z w ( H ) = ∑ X z w ( X ) κ ( X ) , the weighted form of Theorem 5.7 .
The next two results are weaker but depend only on the top-level theorems of the labs, which are themselves machine-checked; the first is machine-checked end to end on top of them.
Theorem 1.6 (Parity; machine-checked). There is one deterministic algorithm that, for every graph G G G with n ≥ 2 n \ge2 n ≥ 2 vertices and m m m edges, computes # H C ( G ) m o d 2 \#\mathrm{HC}(G) \bmod2 # HC ( G ) mod 2 within 2 O ( ( m + n ) / log ( m + n ) ) 2^{O((m+n)/\sqrt{\log(m+n)})} 2 O (( m + n ) / l o g ( m + n ) ) steps, assuming the Main Theorem of [A]. Assuming instead the Lean theorem of [35 ] , it does so in time 2 O ( ρ ( 5 m + 3 n ) ) 2^{O(\rho(5m+3n))} 2 O ( ρ ( 5 m + 3 n )) and polynomial space. Both statements are proved in Lean, and the hypotheses are discharged by the labs’ own Lean proofs, rebuilt from source; the resulting theorems depend only on the standard axioms p r o p e x t \mathtt{propext} propext , C l a s s i c a l . c h o i c e \mathtt{Classical.choice} Classical.choice , Q u o t . s o u n d \mathtt{Quot.sound} Quot.sound . The analogous statement holds for directed Hamiltonian cycles in digraphs of bounded in- and out-degree.
Theorem 1.7 (Randomized decision).
(a) (Machine-checked, assuming the Lean theorem of [35 ] .) For every Δ \Delta Δ and every δ > 0 \delta> 0 δ > 0 there is a randomized algorithm with one-sided error that decides Hamiltonicity of graphs of maximum degree Δ \Delta Δ in time 2 δ n 2^{\delta n} 2 δ n . The same holds for digraphs of bounded in- and out-degree.
An earlier version also stated a part (b), a randomized 2 O D ( n ( log log n ) 2 / log n ) 2^{O_D(n(\log\log n)^2/\sqrt{\log n})} 2 O D ( n ( l o g l o g n ) 2 / l o g n ) decision procedure for graphs with ∣ E ∣ ≤ D n |E| \le Dn ∣ E ∣ ≤ D n . It is superseded by Theorem 1.2 (deterministic, and faster) and is no longer claimed; see Theorem 10.3.
Theorem 1.6 and Theorem 1.7 (a) are from an earlier stage of this work and are superseded, as statements, by Theorems 1.1 and 1.4 ; we include them because they rest on far less. In (a), Lean checks soundness, the success fraction and the machine; only the outer loop of independent trials is not modelled.
§ 11 records further consequences of the same template, for example directed Hamiltonian cycles, TSP with polynomial weights, Steiner trees, feedback vertex sets and the Tutte polynomial on the line y = 1 y = 1 y = 1 . These are sketched and checked numerically on small instances; they are not fully proved here.
1.3. Prior work. No subexponential algorithm for Hamiltonicity on general sparse graphs was known, consistent with ETH. Planar, bounded-genus and minor-free graphs admit 2 O ( n ) 2^{O(\sqrt{n})} 2 O ( n ) algorithms via treewidth. Table 1 lists the best previous bounds in the settings relevant here; all are of the form c n c^n c n with c > 1 c > 1 c > 1 . The degree-dependent ones are ( 2 − ε ) n (2-\varepsilon)^n ( 2 − ε ) n with ε → 0 \varepsilon\to0 ε → 0 as the degree grows; Björklund’s O ∗ ( 1.657 n ) O^*(1.657^n) O ∗ ( 1.65 7 n ) Monte Carlo decision bound [4 ] does not depend on the degree. The bound of [8 ] is for TSP (hence decision), by a trimmed Bellman–Held–Karp dynamic programme [3 , 26 ] ; it is not stated for counting. For small fixed degree, unconditional counting is much faster than ( 2 − ε ) n (2-\varepsilon)^n ( 2 − ε ) n : for example, Hamiltonian cycles of graphs of maximum degree 3 can be counted in O ( 2 3 n / 8 ) O(2^{3n/8}) O ( 2 3 n /8 ) time [24 ] , or in 6 n / 6 + o ( n ) 6^{n/6+o(n)} 6 n /6 + o ( n ) time through the pathwidth bound p w ≤ n / 6 + o ( n ) \mathrm{pw} \le n/6+o(n) pw ≤ n /6 + o ( n ) for cubic graphs [25 ] and the 6 p w 6^{\mathrm{pw}} 6 pw algorithm of [10 ] .
Table 1. Previous bounds and the bounds of this paper (all of the latter conditional; see the text). Here ρ ( N ) = N ( log log N ) 2 / log N \rho(N)=N(\log\log N)^2/\sqrt{\log N} ρ ( N ) = N ( log log N ) 2 / log N .
Two lines of earlier work are closely related to our technique. Cut&Count [20 ] reduces connectivity to counting modulo 2: a 2-factor X X X is paired with the 2 cc ( X ) − 1 2^{\operatorname{cc}(X)-1} 2 cc ( X ) − 1 cuts that no edge of X X X crosses, so non-Hamiltonian 2-factors cancel in pairs. This is the route to Theorems 1.6 and 1.7 . Björklund’s determinant sums [4 ] pair cycle covers with determinants to enforce connectivity; the identity of Theorem 4.1 below is of the same folklore kind. The fermionic, or Grassmann, form of the matrix-tree theorem that we use is a special case of the generalisation of Kirchhoff’s theorem to non-Gaussian Grassmann integrals by Caracciolo, Jacobsen, Saleur, Sokal and Sportiello [14 ] . Rank bounds for the matchings-connectivity matrix (over F 2 \mathbb{F}_2 F 2 [19 ] , and over Q \mathbb{Q} Q [17 ] , building on Raz and Spieker’s bound for its bipartite variant [36 ] ) show that, across one cut, connectivity costs only O ( b ) O(b) O ( b ) bits over Q \mathbb{Q} Q rather than b log b b\log b b log b ; our construction can be read as making this compose over many cuts simultaneously.
On the hardness side, Dell, Husfeldt, Marx, Taslaman and Wahlén [22 ] and Curticapean [16 ] proved #ETH lower bounds for the permanent, perfect matchings and the Tutte polynomial on sparse graphs, and Brand, Dell and Roth [12 ] completed the #ETH dichotomy for the Tutte plane by treating the line y = 1 y=1 y = 1 . Most of these bounds concern local problems and are already contradicted by the labs’ theorems through local encodings; the line y = 1 y=1 y = 1 (counting forests) is not local, and we return to it in § 11 .
Overview of the technique
§ 4 starts from the identity
n ⋅ # H C ( G ) = ∑ X a 2-factor of G κ ( V , X ) , (1) n\cdot\#\mathrm{HC}(G)=\sum_{X\text{ a 2-factor of }G}\kappa(V,X), \tag*{(1)} n ⋅ # HC ( G ) = X a 2-factor of G ∑ κ ( V , X ) , (1)
where κ ( V , X ) \kappa(V,X) κ ( V , X ) is the number of spanning trees of ( V , X ) (V,X) ( V , X ) : a 2-factor has n n n spanning trees if it is a Hamiltonian cycle and none otherwise. The number of spanning trees is the top coefficient of a product of even elements 1 + q e 1+q_e 1 + q e of a Grassmann algebra, one for each edge (Theorem 4.3). This replaces the colouring filters of Cut&Count, which provably need about log n \log n log n bits per vertex to be exact (Theorem 10.2).
We partition V V V into g g g blobs. Each internal edge is handled inside its blob. Each crossing edge is either unused or used with one of five monomials of $1+q_e$; merging two monomials that live in the same blob gives five labels, i.e. log 2 5 \log_2 5 log 2 5 bits per crossing edge (Table 2 ). Moving the pieces of the crossing edges into blob order produces a sign. We show that this sign factors as a product of blob-local signs and an interleaving sign ( − 1 ) ∑ a < c < b < d π a b π c d (-1)^{\sum_{a<c<b<d}\pi_{ab}\pi_{cd}} ( − 1 ) ∑ a < c < b < d π ab π c d , where π a b \pi_{ab} π ab is the parity of the odd labels on the bundle of edges between blobs a a a and $b ({xref}Theorems 5.3 and 5.5). The interleaving sign is paid for by $O(g^3)$ parity-copy bits ({xref}Theorem 5.6). The outcome is a network in the sense of [A] with arbitrary integer node tables and about $2\log_2 5\cdot m+g^3$ shared bits, whose value is $n\cdot\#\mathrm{HC}(G)$ ({xref}Theorem 6.3). [A]’s network theorem then evaluates it ({xref}Section 7`). One trap is that [A]’s cost depends on the largest number of bits at one node, so a vertex of degree Θ ( n ) \Theta(n) Θ ( n ) must be removed first; we branch on its two cycle edges (Theorem 7.1). § 8 replaces the per-edge digits by a rank code of the set of used crossing edges between two blobs, which costs only logarithmically in the degree and needs no branching (Theorem 1.3 ).
Table 2. Labels of a crossing edge e k e_k e k with low end s s s and high end t t t , and their pieces.
What is new here
Little of the above is new in isolation, and we want to be precise about the credits. The identity (1.1), matrix-tree on 2-factors, is folklore. The fermionic matrix-tree theorem, which writes the number of spanning trees as a Berezin integral of ∏ e ( 1 + q e ) \prod_e(1+q_e) ∏ e ( 1 + q e ) , is a special case of the generalised matrix-tree theorem of Caracciolo, Jacobsen, Saleur, Sokal and Sportiello [14 ] . Partitioning the vertices into blobs and paying for connectivity across the cuts is the pattern of Cut&Count [20 ] . Björklund’s determinant sums [4 ] (FOCS 2010, SIAM J. Comput. 2014) pair cycle covers with determinants to enforce connectivity, a closely related pattern, though there the determinant is evaluated over a field of characteristic 2 and the aim is a randomized O ∗ ( 1.657 n ) O^*(1.657^n) O ∗ ( 1.65 7 n ) bound. The engine that evaluates the final object is [A]’s network theorem; we add nothing to it. The one new step is the observation that connectivity can be encoded with O ( 1 ) O(1) O ( 1 ) bits per edge (log 2 5 \log_2 5 log 2 5 per crossing edge) by a Grassmann determinant whose only non-local part is the fermionic reordering sign, and that this sign factors so that the non-local remainder costs O ( g 3 ) O(g^3) O ( g 3 ) bits for g g g blobs. That is exactly what is needed for the construction to fit the network model of [A], with its linear bit budget and arbitrary node tables; the Cut&Count filters do not (Theorem 10.2), and neither do the b log b b\log b b log b -bit dynamic-programming states over a cut. Everything else is bookkeeping.
Status of the results
The proofs of § 3 to § 7 and 9 are complete, conditional on ( H A ) (\mathrm{H}_A) ( H A ) . They were checked numerically in exact integer arithmetic, and an independent referee re-derived the construction with fresh code and found it sound, conditional on [A]. The mathematical core is machine-checked in Lean. This covers the identity ∑ a σ a χ a I a = n ⋅ # H C ( G ) \sum_a \sigma_a\chi_a I_a=n\cdot\#\mathrm{HC}(G) ∑ a σ a χ a I a = n ⋅ # HC ( G ) behind Theorems 5.7 and 6.3 and the parameter bounds of Theorem 6.4, with the network stated in [A]’s own Lean format. The blob-table procedure is formalised as well, and Theorems 1.1 and 1.2 are both formally verified in Lean end to end, as statements about Turing machines built on [A]’s Lean development [38 ] , with only the standard axioms (theorem1, theorem2); a fresh kernel replay with leanchecker has passed for both theorem1 and theorem2. The sparse TSP theorem (Theorem 1.5 ) is formally verified at the same level (theoremTSP, theoremTSP\_decode). Theorem 1.3 is the exception: its proof (§ 8 ) is written out and was checked numerically and by an independent AI referee, who found it sound, but it is not formalised. § 12 gives the details. The bounds are purely asymptotic: as for the SAT algorithms themselves, the crossover with brute force is astronomically large.
Limitations
The following should be read together with § 12 .
(a) Everything is conditional. The main theorems rest on the claimed ETH refutation of [A], through ( H A ) (\mathrm{H}_A) ( H A ) , and on [A]’s Lean formalisation faithfully capturing its printed theorems. Expert review of both is pending. Lean guarantees that [A]’s proofs establish [A]’s formal statements, not that those statements say what the printed ones say.
(b) The Lean proofs here were written and reviewed by AI. They were produced by AI agents and reviewed by an AI coordinator. No human has yet checked that the formal statements say what the printed theorems say. A human reader who wants to do so needs to read about five definitions: hamCycles (the set of Hamiltonian cycles being counted, and that it counts each cycle once as a subgraph); GraphProblems.code (the input encoding of a graph, and that it is the adjacency matrix); Outputs (what it means for the machine to output # H C ( G ) \#\mathrm{HC}(G) # HC ( G ) in binary); the statements of theorem1 and theorem2 themselves, in particular that the step bound is ⌈ C ⋅ 2 δ n ⌉ \lceil C\cdot2^{\delta n}\rceil ⌈ C ⋅ 2 δ n ⌉ resp. ⌈ C ⋅ 2 C ( m + n ) / log 2 ( n + 2 ) ⌉ \lceil C\cdot2^{C(m+n)/\sqrt{\log_2(n+2)}}\rceil ⌈ C ⋅ 2 C ( m + n ) / l o g 2 ( n + 2 ) ⌉ with C C C independent of G G G ; and [A]’s Net format together with the hypothesis bundle through which our network is handed to [A]’s theorems, to confirm that nothing beyond Theorems 2.4 to 2.6 is assumed.
(c) Sparse graphs only. The network of § 6 has about 2 log 2 5 2\log_2 5 2 log 2 5 bits per edge, so Theorem 1.2 beats 2 n 2^n 2 n only when m = o ( n log n ) m = o(n\sqrt{\log n}) m = o ( n log n ) . The rank-encoded network of § 8 has about 2 log ( 2 e d ˉ ) 2\log(2e\bar d) 2 log ( 2 e d ˉ ) bits per vertex, so Theorem 1.3 extends this, roughly, to average degree d ˉ = 2 o ( log n ) \bar d = 2^{o(\sqrt{\log n})} d ˉ = 2 o ( l o g n ) . Dense graphs are still not covered: at d ˉ ≈ Δ ≈ n \bar d \approx\Delta\approx n d ˉ ≈ Δ ≈ n the bound of Theorem 1.3 is 2 Θ ( n log n / log n ) 2^{\Theta(n\log n/\sqrt{\log n})} 2 Θ ( n l o g n / l o g n ) , which exceeds 2 n 2^n 2 n . General TSP and the Held–Karp O ∗ ( 2 n ) O^*(2^n) O ∗ ( 2 n ) bound are untouched.
(d) “Previous algorithms were exponential” refers to general sparse graphs. Planar, bounded-genus, minor-free and bounded-treewidth graphs already had subexponential or single-exponential-in-treewidth algorithms, and on planar graphs the 2 O ( n ) 2^{O(\sqrt n)} 2 O ( n ) bound is better than ours. The gain is on sparse graphs with no such structure, for example bounded-degree expanders.
(e) Asymptotic only. The crossover with brute force is astronomically large; nothing here is of practical use.
(f) The extensions are sketched. § 11 is checked numerically on small instances and is not proved at the level of the rest of the paper.
(g) Citations. All citations were checked against the primary sources on 30 Oct 2026. In particular, the 6 p w n O ( 1 ) 6^{\mathrm{pwn}O(1)} 6 pwn O ( 1 ) counting bound in Table 1 is O ~ ( 6 p w p w O ( 1 ) n 2 ) \widetilde O(6^{\mathrm{pwpw}O(1)}n^2) O ( 6 pwpw O ( 1 ) n 2 ) in [10 Table 1] , and its SETH-tightness is [17 Thm. 1.1] ; the other constants in that table are as stated in the cited works.
(h) No systematic novelty search has been done. The credits in the previous subsection are to the works we know; a Grassmann-determinant encoding of connectivity in a bit-bounded model may well exist elsewhere, and we have not searched the literature systematically.
Organisation
§ 2 recalls the results of [A] that we use. § 3 collects facts about Grassmann algebras. § 4 proves the fermionic matrix-tree identity for Hamiltonian cycles. § 5 splits it over blobs and proves the sign rule. § 6 builds the network and bounds its parameters. § 7 proves Theorems 1.1 and 1.2 , § 8 proves Theorem 1.3 with a rank-encoded variant of the network, and § 9 proves Theorem 1.4 . § 10 treats the results that rest only on the top-level theorems. § 11 sketches extensions, § 12 describes the verification status, and § 13 lists open problems.
The network theorem of [A]
We recall the definitions and results of [A] that we use, in the notation of [A] except where a letter clashes with ours. Conventions of [A]: log = log 2 \log= \log_2 log = log 2 , [ x = u ] ∈ { 0 , 1 } [x = u] \in\{0,1\} [ x = u ] ∈ { 0 , 1 } and [ K ] = { 1 , … , K } [K] = \{1,\ldots,K\} [ K ] = { 1 , … , K } .
Definition 2.1 ([A, Definition 1]). A function F : X × X ′ → Z F: X \times X' \to\mathbb{Z} F : X × X ′ → Z factors through c c c bits if there are f : X × { 0 , 1 } c → Z f: X \times\{0,1\}^c \to\mathbb{Z} f : X × { 0 , 1 } c → Z and f ′ : X ′ × { 0 , 1 } c → Z f': X' \times\{0,1\}^c \to\mathbb{Z} f ′ : X ′ × { 0 , 1 } c → Z with F ( z , z ′ ) = ∑ θ ∈ { 0 , 1 } c f ( z , θ ) f ′ ( z ′ , θ ) F(z,z') = \sum_{\theta\in\{0,1\}^c} f(z,\theta)f'(z',\theta) F ( z , z ′ ) = ∑ θ ∈ { 0 , 1 } c f ( z , θ ) f ′ ( z ′ , θ ) . In particular, for any h : X → { 0 , 1 } c h: X \to\{0,1\}^c h : X → { 0 , 1 } c and h ′ : X ′ → { 0 , 1 } c h': X' \to\{0,1\}^c h ′ : X ′ → { 0 , 1 } c the function [ h ( z ) = h ′ ( z ′ ) ] = ∑ θ [ h ( z ) = θ ] [ h ′ ( z ′ ) = θ ] [h(z) = h'(z')] = \sum_{\theta}[h(z) = \theta][h'(z') = \theta] [ h ( z ) = h ′ ( z ′ )] = ∑ θ [ h ( z ) = θ ] [ h ′ ( z ′ ) = θ ] factors through c c c bits.
Definition 2.2 ([A, Definition 2]). Let P , B , τ ≥ 1 P, B, \tau\ge1 P , B , τ ≥ 1 be integers. A network on J J J with parameters P , B , τ P, B, \tau P , B , τ consists of a finite set J J J of nodes; for each node a a a a finite set S a S_a S a of settings and a function W a : S a → Z W_a: S_a \to\mathbb{Z} W a : S a → Z ; and for each unordered pair { a , b } \{a,b\} { a , b } of distinct nodes a function Ψ a , b : S a × S b → Z \Psi_{a,b}: S_a \times S_b \to\mathbb{Z} Ψ a , b : S a × S b → Z (with Ψ a , b ( z b , z a ) = Ψ a , b ( z a , z b ) \Psi_{a,b}(z_b,z_a) = \Psi_{a,b}(z_a,z_b) Ψ a , b ( z b , z a ) = Ψ a , b ( z a , z b ) ), an integer c a , b = c b , a ≥ 0 c_{a,b} = c_{b,a} \ge0 c a , b = c b , a ≥ 0 and a factorisation ( f a , b , f b , a ) (f_{a,b},f_{b,a}) ( f a , b , f b , a ) of Ψ a , b \Psi_{a,b} Ψ a , b through c a , b c_{a,b} c a , b bits. The settings of a a a are encoded as bit strings of one fixed length P a ≤ P P_a \le P P a ≤ P , and
(i) ∑ b ≠ a c a , b ≤ P \sum_{b \ne a} c_{a,b} \le P ∑ b = a c a , b ≤ P for every a ∈ J a \in J a ∈ J ;
(ii) all values of all W a W_a W a , Ψ a , b \Psi_{a,b} Ψ a , b , f a , b f_{a,b} f a , b are below 2 B 2^B 2 B in absolute value;
(iii) an algorithm receives P P P , B B B and the numbers P a P_a P a , c a , b c_{a,b} c a , b as input, and can decide membership in S a S_a S a and compute any value of W a W_a W a , Ψ a , b \Psi_{a,b} Ψ a , b , f a , b f_{a,b} f a , b with at most τ \tau τ operations.
The value of the network is Z = ∑ z ∈ ∏ a S a ∏ a ∈ J W a ( z a ) ∏ { a , b } Ψ a , b ( z a , z b ) Z = \sum_{z \in\prod_a S_a} \prod_{a \in J} W_a(z_a) \prod_{\{a,b\}} \Psi_{a,b}(z_a,z_b) Z = ∑ z ∈ ∏ a S a ∏ a ∈ J W a ( z a ) ∏ { a , b } Ψ a , b ( z a , z b ) , and its total is U = ∑ ( a , b ) : a ≠ b c a , b U = \sum_{(a,b):\,a \ne b} c_{a,b} U = ∑ ( a , b ) : a = b c a , b , which counts every shared bit from both ends. By (i), U ≤ ∣ J ∣ P U \le|J|P U ≤ ∣ J ∣ P .
Definition 2.3 ([A, Definition 3]). Let K ≥ 2 K \ge2 K ≥ 2 and λ , B ≥ 1 \lambda, B \ge1 λ , B ≥ 1 . In the ( K , λ ) (K,\lambda) ( K , λ ) -clique with tables W 1 , … , W K W_1,\ldots,W_K W 1 , … , W K , a setting of node w w w is a tuple ( z w ( w ′ ) ) w ′ ≠ w (z_w(w'))_{w'\ne w} ( z w ( w ′ ) ) w ′ = w of λ \lambda λ -bit strings, c w , w ′ = λ c_{w,w'}=\lambda c w , w ′ = λ and Ψ w , w ′ = [ z w ( w ′ ) = z w ′ ( w ) ] \Psi_{w,w'}=[z_w(w')=z_{w'}(w)] Ψ w , w ′ = [ z w ( w ′ ) = z w ′ ( w )] . The tables W w W_w W w , with ∣ W w ∣ < 2 B |W_w|<2^B ∣ W w ∣ < 2 B , are queried at unit cost.
Imported Lemma 2.4 ([A, Lemma 8, case (i)]). Let K ≥ 2 K \ge2 K ≥ 2 , g = 3 K 8 g=3K^8 g = 3 K 8 and ζ = 1 / ( 2 K ) \zeta=1/(2K) ζ = 1/ ( 2 K ) . Take a network on [ g ] [g] [ g ] with parameters P P P , B B B , τ \tau τ and total U U U , and put
L = ⌈ U + g P / K K 2 ⌉ , B ′ = ⌈ 2 g P / K ⌉ + g 2 B . L=\left\lceil\frac{U+gP/K}{K^2}\right\rceil,\qquad B'=\lceil2gP/K\rceil+g^2B. L = ⌈ K 2 U + g P / K ⌉ , B ′ = ⌈ 2 g P / K ⌉ + g 2 B . If an algorithm outputs the value of every ( K , L ) (K,L) ( K , L ) -clique with ∣ W w ∣ < 2 B ′ |W_w|<2^{B'} ∣ W w ∣ < 2 B ′ within T T T operations, then the value of the network is computed within
( K g + T ⋅ 2 2 g P / K ⋅ τ ) ⋅ ( g ( P + B ) ) C 1 (2) \left(K^g+T\cdot2^{2gP/K}\cdot\tau\right)\cdot\left(g(P+B)\right)^{C_1} \tag*{(2)} ( K g + T ⋅ 2 2 g P / K ⋅ τ ) ⋅ ( g ( P + B ) ) C 1 (2) operations, by one procedure, for an absolute constant C 1 C_1 C 1 .
The bound (2.1) is weaker than the printed form of [A, Lemma 8] by at most a polynomial factor, which is irrelevant below; it is the form proved in the Lean development of {citep}[A]asExplicitCost.groupingExplicit`.
Imported Theorem 2.5 ([A, Theorem A]). Suppose there are pieces with parameters ( ρ , c ) (\rho,c) ( ρ , c ) in the sense of [A, Definition 7], and let α ′ = log ( 1 / ρ ) \alpha'=\log(1/\rho) α ′ = log ( 1/ ρ ) . Fix an integer x 0 ≥ 18 x_0\ge18 x 0 ≥ 18 with 2 x 0 ≥ c + 5 2^{x_0}\ge c+5 2 x 0 ≥ c + 5 and define
K 0 = 2 x 0 , ζ ℓ = 2 − ℓ − 5 , g ℓ = 2 3 ℓ + x 0 K ℓ , K ℓ + 1 = g ℓ 2 , e 0 = 1 2 , e ℓ + 1 = ( ρ + 3 ζ ℓ ) e ℓ + 3 K ℓ . K_0=2^{x_0},\qquad\zeta_\ell=2^{-\ell-5},\qquad g_\ell=2^{3\ell+x_0}K_\ell,\qquad K_{\ell+1}=g_\ell^2,\qquad e_0=\frac{1}{2},\qquad e_{\ell+1}=(\rho+3\zeta_\ell)e_\ell+\frac{3}{K_\ell}. K 0 = 2 x 0 , ζ ℓ = 2 − ℓ − 5 , g ℓ = 2 3 ℓ + x 0 K ℓ , K ℓ + 1 = g ℓ 2 , e 0 = 2 1 , e ℓ + 1 = ( ρ + 3 ζ ℓ ) e ℓ + K ℓ 3 . (a) log K ℓ = ( 3 x 0 + 6 ) 2 ℓ − 6 ℓ − 2 x 0 − 6 \log K_\ell=(3x_0+6)2^\ell-6\ell-2x_0-6 log K ℓ = ( 3 x 0 + 6 ) 2 ℓ − 6 ℓ − 2 x 0 − 6 , so K ℓ < K ℓ + 1 ≤ K ℓ 10 K_\ell<K_{\ell+1}\le K_\ell^{10} K ℓ < K ℓ + 1 ≤ K ℓ 10 ; and 1 2 ρ ℓ ≤ e ℓ ≤ 0.85 ρ ℓ \frac{1}{2}\rho^\ell\le e_\ell\le0.85\rho^\ell 2 1 ρ ℓ ≤ e ℓ ≤ 0.85 ρ ℓ , where ρ ℓ ≤ ( ( 3 x 0 + 6 ) / log K ℓ ) α ′ \rho^\ell\le((3x_0+6)/\log K_\ell)^{\alpha'} ρ ℓ ≤ (( 3 x 0 + 6 ) / log K ℓ ) α ′ .
(b) One deterministic algorithm, given ℓ ≥ 0 \ell\ge0 ℓ ≥ 0 , λ \lambda λ , B ≥ 1 B\ge1 B ≥ 1 and query access to tables with ∣ W w ∣ < 2 B |W_w|<2^B ∣ W w ∣ < 2 B , outputs the value of the ( K ℓ , λ ) (K_\ell,\lambda) ( K ℓ , λ ) -clique within
2 e ℓ K ℓ 2 λ ⋅ ( K ℓ ( λ + B ) ) C 0 K ℓ 2 (3) 2^{e_\ell K_\ell^2\lambda}\cdot\left(K_\ell(\lambda+B)\right)^{C_0K_\ell^2} \tag*{(3)} 2 e ℓ K ℓ 2 λ ⋅ ( K ℓ ( λ + B ) ) C 0 K ℓ 2 (3) operations, with C 0 C_0 C 0 depending only on c c c .
Imported Theorem 2.6 ([A, Theorem B and Lemma 2]). There are pieces with parameters ( 1 / 2 , c ) (1/\sqrt{2},c) ( 1/ 2 , c ) for an absolute constant c c c . Moreover, [A, Lemma 2] gives pieces with parameters ( 11 / 12 , c ) (11/12,c) ( 11/12 , c ) for every integer c ≥ 8 c\ge8 c ≥ 8 large enough.
Remark 2.7 (Alternative route for Theorem 1.1 ). [A, Lemma 1] states: if ( K , e ) (K,e) ( K , e ) is achievable and g = 3 K 8 g=3K^8 g = 3 K 8 , every network on [ g ] [g] [ g ] is evaluated within C 1 2 e ( U + g P / K ) + 2 g P / K ( P + B ) C 1 τ C_1 2^{e(U+gP/K)+2gP/K}(P+B)^{C_1}\tau C 1 2 e ( U + g P / K ) + 2 g P / K ( P + B ) C 1 τ operations, with C 1 = C 1 ( K , e ) C_1=C_1(K,e) C 1 = C 1 ( K , e ) ; and [A, Proposition 3] gives, for every η > 0 \eta>0 η > 0 , infinitely many K K K with ( K , η ) (K,\eta) ( K , η ) achievable. This pair can replace ( H A ) (H_{\mathrm A}) ( H A ) in the proof of Theorem 1.1 .
Remark 2.8. [A]’s Lean development proves Theorem 2.4 and Theorem 2.5 (b) as ExplicitCost.groupingExplicit and ExplicitCost.recursionSolves, and Theorem 2.6 as PiecesCounted.halfPieces. There they are instantiated only for the networks that come from CNFs, and Lean’s machine model differs from the printed one (operations are polynomial-time steps or queries, memory is bounded, and K , g , P , B K,g,P,B K , g , P , B are given in unary). Applying these results to the network of § 6 is done here on paper only; see § 12 .
Grassmann algebra
Let Γ \Gamma Γ be a finite set of generators with a total order ≺ \prec ≺ . The exterior algebra Λ ( Γ ) \Lambda(\Gamma) Λ ( Γ ) over Z \mathbb{Z} Z is the free Z \mathbb{Z} Z -module with basis { e S : S ⊆ Γ } \{e_S:S\subseteq\Gamma\} { e S : S ⊆ Γ } and product
e S ⋅ e T = 0 if S ∩ T ≠ ∅ , e S ⋅ e T = ( − 1 ) # { ( s , t ) ∈ S × T : t ≺ s } e S ∪ T otherwise. e_S\cdot e_T=0\quad\text{if }S\cap T\ne\varnothing,\qquad e_S\cdot e_T=(-1)^{\#\{(s,t)\in S\times T:t\prec s\}}e_{S\cup T}\quad\text{otherwise.} e S ⋅ e T = 0 if S ∩ T = ∅ , e S ⋅ e T = ( − 1 ) # {( s , t ) ∈ S × T : t ≺ s } e S ∪ T otherwise.
This is the exterior algebra of Z Γ \mathbb{Z}^{\Gamma} Z Γ [11 Ch. III, §7] ; it is associative with unit e ∅ = 1 e_{\varnothing}=1 e ∅ = 1 . Writing γ \gamma γ for e { γ } e_{\{\gamma\}} e { γ } we have γ γ ′ = − γ ′ γ \gamma\gamma'=-\gamma'\gamma γ γ ′ = − γ ′ γ and γ 2 = 0 \gamma^2=0 γ 2 = 0 , and e S e_S e S is the product of the elements of S S S in increasing ≺ \prec ≺ -order. A product of generators therefore does not depend on ≺ \prec ≺ , and all statements below, being about sums and products of generators, are independent of ≺ \prec ≺ ; changing ≺ \prec ≺ only re-signs the basis.
Parity. Λ = Λ 0 ⊕ Λ 1 \Lambda=\Lambda^0\oplus\Lambda^1 Λ = Λ 0 ⊕ Λ 1 , where Λ p \Lambda^p Λ p is spanned by the e S e_S e S with ∣ S ∣ ≡ p ( m o d 2 ) |S|\equiv p\pmod2 ∣ S ∣ ≡ p ( mod 2 ) . Elements of Λ 0 ∪ Λ 1 \Lambda^0\cup\Lambda^1 Λ 0 ∪ Λ 1 are homogeneous (so 0 0 0 is homogeneous of both parities), and Λ 0 \Lambda^0 Λ 0 is a subring.
Fact 3.1 (Graded commutativity). For x ∈ Λ p x\in\Lambda^p x ∈ Λ p and y ∈ Λ q y\in\Lambda^q y ∈ Λ q we have x y = ( − 1 ) p q y x xy=(-1)^{pq}yx x y = ( − 1 ) pq y x . In particular Λ 0 \Lambda^0 Λ 0 is central.
Proof. For disjoint S , T S,T S , T , every pair in S × T S\times T S × T is counted in exactly one of # { t ≺ s } \#\{t\prec s\} # { t ≺ s } and # { s ≺ t } \#\{s\prec t\} # { s ≺ t } , so e S e T = ( − 1 ) ∣ S ∣ ∣ T ∣ e T e S e_Se_T=(-1)^{|S||T|}e_Te_S e S e T = ( − 1 ) ∣ S ∣∣ T ∣ e T e S . Extend bilinearly. □
Lemma 3.2 (Koszul sign rule). Let y 1 , … , y M y_1,\ldots,y_M y 1 , … , y M be homogeneous of parities p 1 , … , p M p_1,\ldots,p_M p 1 , … , p M and let σ \sigma σ be a permutation of [ M ] [M] [ M ] . Then
y σ ( 1 ) y σ ( 2 ) ⋯ y σ ( M ) = ( − 1 ) N ( σ ) y 1 y 2 ⋯ y M , N ( σ ) = ∑ s < t σ − 1 ( s ) > σ − 1 ( t ) p s p t . y_{\sigma(1)}y_{\sigma(2)}\cdots y_{\sigma(M)}=(-1)^{N(\sigma)}y_1y_2\cdots y_M,\qquad N(\sigma)=\sum_{\substack{s<t\\ \sigma^{-1}(s)>\sigma^{-1}(t)}}p_sp_t. y σ ( 1 ) y σ ( 2 ) ⋯ y σ ( M ) = ( − 1 ) N ( σ ) y 1 y 2 ⋯ y M , N ( σ ) = s < t σ − 1 ( s ) > σ − 1 ( t ) ∑ p s p t . the sum running over the pairs whose relative order σ \sigma σ reverses.
Proof. Induction on the number of reversed pairs. If σ ≠ id \sigma\ne\operatorname{id} σ = id , some adjacent positions j , j + 1 j,j+1 j , j + 1 have σ ( j ) > σ ( j + 1 ) \sigma(j)>\sigma(j+1) σ ( j ) > σ ( j + 1 ) . Exchanging these two factors multiplies the product by ( − 1 ) p σ ( j ) p σ ( j + 1 ) (-1)^{p_{\sigma(j)}p_{\sigma(j+1)}} ( − 1 ) p σ ( j ) p σ ( j + 1 ) by Theorem 3.1; it removes exactly the pair { σ ( j ) , σ ( j + 1 ) } \{\sigma(j),\sigma(j+1)\} { σ ( j ) , σ ( j + 1 )} from the set of reversed pairs and changes no other relative order. □
Subalgebras and top coefficients. For Γ ′ ⊆ Γ \Gamma'\subseteq\Gamma Γ ′ ⊆ Γ , Λ ( Γ ′ ) ⊆ Λ ( Γ ) \Lambda(\Gamma')\subseteq\Lambda(\Gamma) Λ ( Γ ′ ) ⊆ Λ ( Γ ) is the span of the e S e_S e S with S ⊆ Γ ′ S\subseteq\Gamma' S ⊆ Γ ′ . Let ∣ Γ ′ ∣ |\Gamma'| ∣ Γ ′ ∣ be even and ω = ± e Γ ′ \omega=\pm e_{\Gamma'} ω = ± e Γ ′ . For x ∈ Λ ( Γ ′ ) x\in\Lambda(\Gamma') x ∈ Λ ( Γ ′ ) we write [ ω ] ( x ) [\omega](x) [ ω ] ( x ) for the coefficient c c c such that x − c ω x-c\omega x − c ω lies in the span of the e S e_S e S with S ⊊ Γ ′ S\subsetneq\Gamma' S ⊊ Γ ′ . (This is the Berezin integral of x x x , normalised by ω \omega ω .)
Lemma 3.3 (Block factorisation of the top coefficient). Let Γ = Γ 1 ⊔ ⋯ ⊔ Γ g \Gamma=\Gamma_1\sqcup\cdots\sqcup\Gamma_g Γ = Γ 1 ⊔ ⋯ ⊔ Γ g with every ∣ Γ a ∣ |\Gamma_a| ∣ Γ a ∣ even (blocks may be empty). Let ω a = ± e Γ a \omega_a=\pm e_{\Gamma_a} ω a = ± e Γ a , Ω = ω 1 ω 2 ⋯ ω g \Omega=\omega_1\omega_2\cdots\omega_g Ω = ω 1 ω 2 ⋯ ω g and x a ∈ Λ ( Γ a ) x_a\in\Lambda(\Gamma_a) x a ∈ Λ ( Γ a ) . Then
[ Ω ] ( x 1 x 2 ⋯ x g ) = ∏ a = 1 g [ ω a ] ( x a ) . [\Omega](x_1x_2\cdots x_g)=\prod_{a=1}^{g}[\omega_a](x_a). [ Ω ] ( x 1 x 2 ⋯ x g ) = a = 1 ∏ g [ ω a ] ( x a ) .
Proof. Since Ω = ± e Γ \Omega=\pm e_{\Gamma} Ω = ± e Γ , [ Ω ] ( ⋅ ) [\Omega](\mathord{\cdot}) [ Ω ] ( ⋅ ) is defined. Write x a = [ ω a ] ( x a ) ω a + r a x_a=[\omega_a](x_a)\omega_a+r_a x a = [ ω a ] ( x a ) ω a + r a , where r a r_a r a is a combination of e S e_S e S with S ⊊ Γ a S\subsetneq\Gamma_a S ⊊ Γ a . Expanding the product, the term with no r a r_a r a is ∏ a [ ω a ] ( x a ) ⋅ Ω \prod_a[\omega_a](x_a)\cdot\Omega ∏ a [ ω a ] ( x a ) ⋅ Ω . Every other term is a combination of products e S 1 ⋯ e S g e_{S_1}\cdots e_{S_g} e S 1 ⋯ e S g with S b ⊆ Γ b S_b\subseteq\Gamma_b S b ⊆ Γ b for all b b b and S a ⊊ Γ a S_a\subsetneq\Gamma_a S a ⊊ Γ a for some a a a ; such a product is 0 0 0 or ± e ⋃ S b \pm e_{\bigcup S_b} ± e ⋃ S b with ⋃ S b ≠ Γ \bigcup S_b\ne\Gamma ⋃ S b = Γ , and does not contribute to [ Ω ] ( ⋅ ) [\Omega](\mathord{\cdot}) [ Ω ] ( ⋅ ) . □
Spanning trees and Hamiltonian cycles
Fix G = ( V , E ) G=(V,E) G = ( V , E ) with n ≥ 3 n\ge3 n ≥ 3 and a root r ∈ V r\in V r ∈ V . A 2-factor is a set X ⊆ E X\subseteq E X ⊆ E such that every vertex has degree exactly 2 in ( V , X ) (V,X) ( V , X ) . We write κ ( V , X ) \kappa(V,X) κ ( V , X ) for the number of spanning trees of the graph ( V , X ) (V,X) ( V , X ) .
Lemma 4.1. n ⋅ # H C ( G ) = ∑ X κ ( V , X ) n\cdot\#\mathrm{HC}(G)=\sum_X\kappa(V,X) n ⋅ # HC ( G ) = ∑ X κ ( V , X ) , the sum over all 2-factors X X X of G G G .
Proof. A 2-factor X X X makes ( V , X ) (V,X) ( V , X ) a disjoint union of cycles covering V V V . If ( V , X ) (V,X) ( V , X ) is connected it is a single n n n -cycle, i.e. a Hamiltonian cycle, whose spanning trees are obtained by deleting one of its n n n edges; so κ ( V , X ) = n \kappa(V,X)=n κ ( V , X ) = n . If ( V , X ) (V,X) ( V , X ) is disconnected, κ ( V , X ) = 0 \kappa(V,X)=0 κ ( V , X ) = 0 . Conversely, the edge set of a Hamiltonian cycle is a connected 2-factor, and distinct Hamiltonian cycles have distinct edge sets. □
Generators. Let Γ = { ψ ˉ v , ψ v : v ∈ V ∖ { r } } \Gamma= \{\bar{\psi}_v,\psi_v : v \in V \setminus\{r\}\} Γ = { ψ ˉ v , ψ v : v ∈ V ∖ { r }} , in any order. We put ψ ˉ r = ψ r : = 0 \bar{\psi}_r = \psi_r := 0 ψ ˉ r = ψ r := 0 (the zero element), ω v : = ψ ˉ v ψ v ∈ Λ 0 \omega_v := \bar{\psi}_v\psi_v \in\Lambda^0 ω v := ψ ˉ v ψ v ∈ Λ 0 , and for S ⊆ V S \subseteq V S ⊆ V and e = { i , j } ∈ E e = \{i,j\} \in E e = { i , j } ∈ E ,
Ω S : = ∏ v ∈ S ∖ { r } ω v , q e : = ( ψ ˉ i − ψ ˉ j ) ( ψ i − ψ j ) ∈ Λ 0 . \Omega_S := \prod_{v \in S \setminus\{r\}} \omega_v,\qquad q_e := (\bar{\psi}_i-\bar{\psi}_j)(\psi_i-\psi_j) \in\Lambda^0. Ω S := v ∈ S ∖ { r } ∏ ω v , q e := ( ψ ˉ i − ψ ˉ j ) ( ψ i − ψ j ) ∈ Λ 0 .
The order of the factors of Ω S \Omega_S Ω S is irrelevant since they are even and central, and Ω S = ± e Γ S \Omega_S = \pm e_{\Gamma_S} Ω S = ± e Γ S , where Γ S \Gamma_S Γ S is the set of generators of the vertices of S S S . The element q e q_e q e does not depend on the orientation of e e e , since both factors change sign.
Lemma 4.2 (Berezin form of Cauchy–Binet). Let N = n − 1 N = n-1 N = n − 1 and b 1 , … , b N ∈ Z V ∖ { r } b_1,\ldots,b_N \in\mathbb{Z}^{V \setminus\{r\}} b 1 , … , b N ∈ Z V ∖ { r } . Put θ ˉ ( b ) = ∑ u b ( u ) ψ ˉ u \bar{\theta}(b) = \sum_u b(u)\bar{\psi}_u θ ˉ ( b ) = ∑ u b ( u ) ψ ˉ u and θ ( b ) = ∑ u b ( u ) ψ u \theta(b) = \sum_u b(u)\psi_u θ ( b ) = ∑ u b ( u ) ψ u . Then
[ Ω V ] ( θ ˉ ( b 1 ) θ ( b 1 ) θ ˉ ( b 2 ) θ ( b 2 ) ⋯ θ ˉ ( b N ) θ ( b N ) ) = det ( B ) 2 , [\Omega_V]\bigl(\bar{\theta}(b_1)\theta(b_1)\bar{\theta}(b_2)\theta(b_2)\cdots\bar{\theta}(b_N)\theta(b_N)\bigr) = \det(\mathbf{B})^2, [ Ω V ] ( θ ˉ ( b 1 ) θ ( b 1 ) θ ˉ ( b 2 ) θ ( b 2 ) ⋯ θ ˉ ( b N ) θ ( b N ) ) = det ( B ) 2 , where B \mathbf{B} B is the N × N N \times N N × N matrix with columns b k b_k b k , its rows indexed by V ∖ { r } V \setminus\{r\} V ∖ { r } in any fixed order; det ( B ) 2 \det(\mathbf{B})^2 det ( B ) 2 does not depend on that order.
Proof. Enumerate V ∖ { r } V \setminus\{r\} V ∖ { r } as u 1 , … , u N u_1,\ldots,u_N u 1 , … , u N .
(1) By Theorem 3.2, moving each θ ˉ ( b k ) \bar{\theta}(b_k) θ ˉ ( b k ) to the left past θ ( b 1 ) , … , θ ( b k − 1 ) \theta(b_1),\ldots,\theta(b_{k-1}) θ ( b 1 ) , … , θ ( b k − 1 ) gives ∏ k θ ˉ ( b k ) θ ( b k ) = ( − 1 ) N ( N − 1 ) / 2 θ ˉ ( b 1 ) ⋯ θ ˉ ( b N ) ⋅ θ ( b 1 ) ⋯ θ ( b N ) \prod_k \bar{\theta}(b_k)\theta(b_k) = (-1)^{N(N-1)/2}\bar{\theta}(b_1)\cdots\bar{\theta}(b_N)\cdot\theta(b_1)\cdots\theta(b_N) ∏ k θ ˉ ( b k ) θ ( b k ) = ( − 1 ) N ( N − 1 ) /2 θ ˉ ( b 1 ) ⋯ θ ˉ ( b N ) ⋅ θ ( b 1 ) ⋯ θ ( b N ) .
(2) Expanding multilinearly, θ ˉ ( b 1 ) ⋯ θ ˉ ( b N ) = ∑ φ : [ N ] → [ N ] ∏ k b k ( u φ ( k ) ) ψ ˉ u φ ( 1 ) ⋯ ψ ˉ u φ ( N ) \bar{\theta}(b_1)\cdots\bar{\theta}(b_N) = \sum_{\varphi:[N]\to[N]} \prod_k b_k(u_{\varphi(k)})\,\bar{\psi}_{u_{\varphi(1)}}\cdots\bar{\psi}_{u_{\varphi(N)}} θ ˉ ( b 1 ) ⋯ θ ˉ ( b N ) = ∑ φ : [ N ] → [ N ] ∏ k b k ( u φ ( k ) ) ψ ˉ u φ ( 1 ) ⋯ ψ ˉ u φ ( N ) . Only bijections φ \varphi φ survive, because ψ ˉ u 2 = 0 \bar{\psi}_u^2 = 0 ψ ˉ u 2 = 0 , and for those ψ ˉ u φ ( 1 ) ⋯ ψ ˉ u φ ( N ) = sgn ( φ ) ψ ˉ u 1 ⋯ ψ ˉ u N \bar{\psi}_{u_{\varphi(1)}}\cdots\bar{\psi}_{u_{\varphi(N)}} = \operatorname{sgn}(\varphi)\bar{\psi}_{u_1}\cdots\bar{\psi}_{u_N} ψ ˉ u φ ( 1 ) ⋯ ψ ˉ u φ ( N ) = sgn ( φ ) ψ ˉ u 1 ⋯ ψ ˉ u N by Theorem 3.2. Hence
θ ˉ ( b 1 ) ⋯ θ ˉ ( b N ) = det ( B ) ψ ˉ u 1 ⋯ ψ ˉ u N , θ ( b 1 ) ⋯ θ ( b N ) = det ( B ) ψ u 1 ⋯ ψ u N . \bar{\theta}(b_1)\cdots\bar{\theta}(b_N) = \det(\mathbf{B})\bar{\psi}_{u_1}\cdots\bar{\psi}_{u_N},\qquad\theta(b_1)\cdots\theta(b_N) = \det(\mathbf{B})\psi_{u_1}\cdots\psi_{u_N}. θ ˉ ( b 1 ) ⋯ θ ˉ ( b N ) = det ( B ) ψ ˉ u 1 ⋯ ψ ˉ u N , θ ( b 1 ) ⋯ θ ( b N ) = det ( B ) ψ u 1 ⋯ ψ u N . (3) Step (1) applied to the standard vectors gives
ψ ˉ u 1 ⋯ ψ ˉ u N ψ u 1 ⋯ ψ u N = ( − 1 ) N ( N − 1 ) / 2 ω u 1 ⋯ ω u N = ( − 1 ) N ( N − 1 ) / 2 Ω V . \bar{\psi}_{u_1}\cdots\bar{\psi}_{u_N}\psi_{u_1}\cdots\psi_{u_N} = (-1)^{N(N-1)/2}\omega_{u_1}\cdots\omega_{u_N} = (-1)^{N(N-1)/2}\Omega_V. ψ ˉ u 1 ⋯ ψ ˉ u N ψ u 1 ⋯ ψ u N = ( − 1 ) N ( N − 1 ) /2 ω u 1 ⋯ ω u N = ( − 1 ) N ( N − 1 ) /2 Ω V . The two signs cancel and the product equals det ( B ) 2 Ω V \det(\mathbf{B})^2\Omega_V det ( B ) 2 Ω V .
Lemma 4.3 (Fermionic matrix-tree theorem [14 ] ). For every X ⊆ E X \subseteq E X ⊆ E ,
[ Ω V ] ( ∏ e ∈ X ( 1 + q e ) ) = κ ( V , X ) . [\Omega_V]\left(\prod_{e \in X}(1+q_e)\right) = \kappa(V,X). [ Ω V ] ( e ∈ X ∏ ( 1 + q e ) ) = κ ( V , X ) . Proof. The factors are even and commute, so ∏ e ∈ X ( 1 + q e ) = ∑ F ⊆ X ∏ e ∈ F q e \prod_{e \in X}(1+q_e) = \sum_{F \subseteq X}\prod_{e \in F}q_e ∏ e ∈ X ( 1 + q e ) = ∑ F ⊆ X ∏ e ∈ F q e . The term of F F F lies in the span of the e S e_S e S with ∣ S ∣ = 2 ∣ F ∣ |S| = 2|F| ∣ S ∣ = 2∣ F ∣ , while Ω V = ± e Γ \Omega_V = \pm e_\Gamma Ω V = ± e Γ with ∣ Γ ∣ = 2 N |\Gamma| = 2N ∣Γ∣ = 2 N ; so only ∣ F ∣ = N |F| = N ∣ F ∣ = N contributes. For e = { i , j } e = \{i,j\} e = { i , j } we have q e = θ ( b e ) θ ˉ ( b e ) q_e = \theta(b_e)\bar{\theta}(b_e) q e = θ ( b e ) θ ˉ ( b e ) with b e = 1 i − 1 j b_e = \mathbf{1}_i-\mathbf{1}_j b e = 1 i − 1 j restricted to V ∖ { r } V \setminus\{r\} V ∖ { r } (that is, b e = 1 i b_e = \mathbf{1}_i b e = 1 i if j = r j=r j = r ). By Theorem 4.2, F F F contributes det ( B F ) 2 \det(\mathbf{B}_F)^2 det ( B F ) 2 , where B F \mathbf{B}_F B F is the reduced incidence matrix of F F F .
If F F F (with ∣ F ∣ = n − 1 |F| = n-1 ∣ F ∣ = n − 1 ) is not a spanning tree, then ( V , F ) (V,F) ( V , F ) is disconnected, since a connected graph on n n n vertices with n − 1 n-1 n − 1 edges is a tree. Let C C C be a component with r ∉ C r \notin C r ∈ / C . The rows u ∈ C u \in C u ∈ C of B F \mathbf{B}_F B F sum to 0 0 0 : the column of an edge inside C C C has entries + 1 +1 + 1 and − 1 -1 − 1 there, and the other columns vanish on C C C . So det B F = 0 \det\mathbf{B}_F = 0 det B F = 0 .
If F F F is a spanning tree, then det B F = ± 1 \det\mathbf{B}_F = \pm1 det B F = ± 1 , by induction on n n n . For n = 1 n=1 n = 1 the matrix is empty. For n ≥ 2 n \geq2 n ≥ 2 pick a leaf v ≠ r v \ne r v = r (a tree has at least two leaves). Row v v v has one nonzero entry, ± 1 \pm1 ± 1 , in the column of its edge f f f , and expanding along it gives det B F = ± det B F − f \det\mathbf{B}_F = \pm\det\mathbf{B}_{F-f} det B F = ± det B F − f , the reduced incidence matrix of the spanning tree F − f F-f F − f of V − v V-v V − v .
Hence the coefficient is the number of spanning trees F ⊆ X F \subseteq X F ⊆ X , i.e. κ ( V , X ) \kappa(V,X) κ ( V , X ) .
By Cauchy–Binet, Theorem 4.3 is equivalent to Kirchhoff’s theorem κ ( V , X ) = det L X ( r ) \kappa(V,X) = \det L_X^{(r)} κ ( V , X ) = det L X ( r ) ; we do not need this form, but it is checked numerically (§ 12 ).
Corollary 4.4.
n ⋅ # H C ( G ) = ∑ x ∈ { 0 , 1 } E ∏ v ∈ V [ deg x ( v ) = 2 ] ⋅ [ Ω V ] ( ∏ e : x e = 1 ( 1 + q e ) ) . n \cdot\#\mathrm{HC}(G)=\sum_{x\in\{0,1\}^{E}}\prod_{v\in V}[\deg_x(v)=2]\cdot[\Omega_V]\left(\prod_{e:x_e=1}(1+q_e)\right). n ⋅ # HC ( G ) = x ∈ { 0 , 1 } E ∑ v ∈ V ∏ [ deg x ( v ) = 2 ] ⋅ [ Ω V ] ( e : x e = 1 ∏ ( 1 + q e ) ) . Proof. Combine Theorems 4.1 and 4.3.
Blobs, pieces and the sign rule
Conventions
The following conventions are fixed once and for all.
Partition. ϕ : V → [ g ] \phi:V\to[g] ϕ : V → [ g ] is an arbitrary map, and the blobs are V a = ϕ − 1 ( a ) V_a=\phi^{-1}(a) V a = ϕ − 1 ( a ) . Blobs may be empty, and r r r may lie in any blob. The blob indices 1 < 2 < ⋯ < g 1<2<\cdots<g 1 < 2 < ⋯ < g form the “line” on which chords interleave.
Edges. An edge is internal to a a a if both ends lie in V a V_a V a ; the set of these is E i n t ( a ) E_{\mathrm{int}}(a) E int ( a ) . The other edges are crossing ; let m × m_\times m × be their number.
Crossing order. The crossing edges are listed in an arbitrary but fixed total order e 1 , … , e m × e_1,\ldots,e_{m_\times} e 1 , … , e m × ; we write k < l k<l k < l if e k e_k e k comes before e l e_l e l .
Ends. A crossing edge e k e_k e k has a low end s k s_k s k and a high end t k t_k t k , with a k : = ϕ ( s k ) < b k : = ϕ ( t k ) a_k:=\phi(s_k)<b_k:=\phi(t_k) a k := ϕ ( s k ) < b k := ϕ ( t k ) . Its chord is { a k , b k } \{a_k,b_k\} { a k , b k } .
Incidences. ∂ ( a ) : = { k : a ∈ { a k , b k } } \partial(a):=\{k:a\in\{a_k,b_k\}\} ∂ ( a ) := { k : a ∈ { a k , b k }} is the set of crossing edges at a a a . For a < b a<b a < b let E ( a , b ) : = { k : ( a k , b k ) = ( a , b ) } E(a,b):=\{k:(a_k,b_k)=(a,b)\} E ( a , b ) := { k : ( a k , b k ) = ( a , b )} (the bundle of { a , b } \{a,b\} { a , b } ) and m a b : = ∣ E ( a , b ) ∣ m_{ab}:=|E(a,b)| m ab := ∣ E ( a , b ) ∣ , and set m b a : = m a b m_{ba}:=m_{ab} m ba := m ab .
Algebras. Γ a \Gamma_a Γ a is the set of generators of V a ∖ { r } V_a\setminus\{r\} V a ∖ { r } , Λ a : = Λ ( Γ a ) \Lambda_a:=\Lambda(\Gamma_a) Λ a := Λ ( Γ a ) and ω a : = Ω V a \omega_a:=\Omega_{V_a} ω a := Ω V a . Then Ω V = ω 1 ⋯ ω g \Omega_V=\omega_1\cdots\omega_g Ω V = ω 1 ⋯ ω g , and Theorem 3.3 applies to Γ = ⨆ a Γ a \Gamma=\bigsqcup_a\Gamma_a Γ = ⨆ a Γ a .
Labels and pieces
The label set is L = { N , 0 , 1 , 2 , 3 } \mathcal{L}=\{\mathrm{N},0,1,2,3\} L = { N , 0 , 1 , 2 , 3 } , and the parity of a label is π ( ℓ ) : = [ ℓ ∈ { 2 , 3 } ] \pi(\ell):=[\ell\in\{2,3\}] π ( ℓ ) := [ ℓ ∈ { 2 , 3 }] . For the crossing edge e k e_k e k with ends s = s k s=s_k s = s k and t = t k t=t_k t = t k , the pieces α ℓ ( k ) ∈ Λ a k \alpha_\ell(k)\in\Lambda_{a_k} α ℓ ( k ) ∈ Λ a k and β ℓ ( k ) ∈ Λ b k \beta_\ell(k)\in\Lambda_{b_k} β ℓ ( k ) ∈ Λ b k are given in Table 2 .
Remark 5.1 (Why five labels). For a used edge, 1 + q e = 1 + ψ ˉ s ψ s − ψ ˉ s ψ t − ψ ˉ t ψ s + ψ ˉ t ψ t 1+q_e=1+\bar{\psi}_s\psi_s-\bar{\psi}_s\psi_t-\bar{\psi}_t\psi_s+\bar{\psi}_t\psi_t 1 + q e = 1 + ψ ˉ s ψ s − ψ ˉ s ψ t − ψ ˉ t ψ s + ψ ˉ t ψ t has five monomials; together with “unused” this gives six states. The two monomials 1 1 1 and ψ ˉ t ψ t \bar{\psi}_t\psi_t ψ ˉ t ψ t both live entirely in the high blob, and label 0 0 0 merges them into the single high piece 1 + ψ ˉ t ψ t 1+\bar{\psi}_t\psi_t 1 + ψ ˉ t ψ t . This gives five labels, i.e. log 2 5 \log_2 5 log 2 5 bits per crossing edge. (A description as “unused, or one of four bilinear terms” would miss the term 1 1 1 ; the merge above is what makes five labels correct. Other merges work equally well and change only constants.)
Lemma 5.2.
(a) α ℓ ( k ) \alpha_\ell(k) α ℓ ( k ) and β ℓ ( k ) \beta_\ell(k) β ℓ ( k ) are homogeneous of parity π ( ℓ ) \pi(\ell) π ( ℓ ) . This includes the cases s = r s=r s = r or t = r t=r t = r , in which some pieces are 0 0 0 or reduce to 1 1 1 .
(b) α N ( k ) β N ( k ) = 1 \alpha_{\mathrm{N}}(k)\beta_{\mathrm{N}}(k)=1 α N ( k ) β N ( k ) = 1 and ∑ ℓ ∈ { 0 , 1 , 2 , 3 } α ℓ ( k ) β ℓ ( k ) = 1 + q e k \sum_{\ell\in\{0,1,2,3\}}\alpha_\ell(k)\beta_\ell(k)=1+q_{e_k} ∑ ℓ ∈ { 0 , 1 , 2 , 3 } α ℓ ( k ) β ℓ ( k ) = 1 + q e k .
Proof. (a) Read off Table 2 . (b) By bilinearity q e = ψ ˉ s ψ s − ψ ˉ s ψ t − ψ ˉ t ψ s + ψ ˉ t ψ t q_e=\bar{\psi}_s\psi_s-\bar{\psi}_s\psi_t-\bar{\psi}_t\psi_s+\bar{\psi}_t\psi_t q e = ψ ˉ s ψ s − ψ ˉ s ψ t − ψ ˉ t ψ s + ψ ˉ t ψ t for any elements, zero included, and − ψ ˉ t ψ s = ψ s ψ ˉ t -\bar{\psi}_t\psi_s=\psi_s\bar{\psi}_t − ψ ˉ t ψ s = ψ s ψ ˉ t . The four products in the table are 1 + ψ ˉ t ψ t 1+\bar{\psi}_t\psi_t 1 + ψ ˉ t ψ t , ψ ˉ s ψ s \bar{\psi}_s\psi_s ψ ˉ s ψ s , − ψ ˉ s ψ t -\bar{\psi}_s\psi_t − ψ ˉ s ψ t and ψ s ψ ˉ t \psi_s\bar{\psi}_t ψ s ψ ˉ t , which sum to 1 + q e 1+q_e 1 + q e . □
For a labelling η ∈ L m × \eta\in\mathcal{L}^{m_\times} η ∈ L m × write p k : = π ( η k ) p_k:=\pi(\eta_k) p k := π ( η k ) . Define the piece of k k k at a a a as γ k , a ( η ) : = α η k ( k ) \gamma_{k,a}(\eta):=\alpha_{\eta_k}(k) γ k , a ( η ) := α η k ( k ) if a = a k a=a_k a = a k and β η k ( k ) \beta_{\eta_k}(k) β η k ( k ) if a = b k a=b_k a = b k , and the ordered product of the pieces at a a a ,
R a ( η ) : = ∏ → k ∈ ∂ ( a ) γ k , a ( η ) ∈ Λ a R_a(\eta):=\overrightarrow{\prod}_{k\in\partial(a)}\gamma_{k,a}(\eta)\in\Lambda_a R a ( η ) := ∏ k ∈ ∂ ( a ) γ k , a ( η ) ∈ Λ a
(factors in increasing crossing order k k k ).
Finally, let
r k l : = # { ( x , y ) ∈ { a k , b k } × { a l , b l } : y < x } , ε ( η ) : = ( − 1 ) ∑ k < l p k p l r k l . r_{kl}:=\#\{(x,y)\in\{a_k,b_k\}\times\{a_l,b_l\}:y<x\},\qquad\varepsilon(\eta):=(-1)^{\sum_{k<l}p_kp_lr_{kl}}. r k l := # {( x , y ) ∈ { a k , b k } × { a l , b l } : y < x } , ε ( η ) := ( − 1 ) ∑ k < l p k p l r k l .
Proposition 5.3 (Sign rule). For every partition, every crossing order and every η ∈ L m × \eta\in\mathcal{L}^{m_\times} η ∈ L m × ,
∏ k = 1 m × α η k ( k ) β η k ( k ) = ε ( η ) ⋅ R 1 ( η ) R 2 ( η ) ⋅ … R g ( η ) . (4) \prod_{k=1}^{m_\times}\alpha_{\eta_k}(k)\,\beta_{\eta_k}(k)=\varepsilon(\eta)\cdot R_1(\eta)R_2(\eta)\cdot\ldots R_g(\eta). \tag*{(4)} k = 1 ∏ m × α η k ( k ) β η k ( k ) = ε ( η ) ⋅ R 1 ( η ) R 2 ( η ) ⋅ … R g ( η ) . (4)
Proof. The left side is the product of the sequence Y = ( α ( 1 ) , β ( 1 ) , α ( 2 ) , β ( 2 ) , … , α ( m × ) , β ( m × ) ) Y=(\alpha(1),\beta(1),\alpha(2),\beta(2),\ldots,\alpha(m_\times),\beta(m_\times)) Y = ( α ( 1 ) , β ( 1 ) , α ( 2 ) , β ( 2 ) , … , α ( m × ) , β ( m × )) . Give the piece α ( k ) \alpha(k) α ( k ) the key ( a k , k ) (a_k,k) ( a k , k ) and the piece β ( k ) \beta(k) β ( k ) the key ( b k , k ) (b_k,k) ( b k , k ) . Sorting Y Y Y by key, lexicographically, lists blob 1’s pieces in increasing k k k , then blob 2’s, and so on; so the sorted product is R 1 ⋯ R g R_1\cdots R_g R 1 ⋯ R g . By Theorem 5.2(a) all pieces are homogeneous, and Theorem 3.2 counts the pairs of pieces whose relative order is reversed:
Two pieces of the same k k k . In Y Y Y , α ( k ) \alpha(k) α ( k ) comes first, and its key is also smaller since a k < b k a_k<b_k a k < b k . Not reversed.
A piece x x x of k k k and a piece y y y of l l l , with k < l k<l k < l . In Y Y Y , x x x comes first. The keys are ( blob ( x ) , k ) (\operatorname{blob}(x),k) ( blob ( x ) , k ) and ( blob ( y ) , l ) (\operatorname{blob}(y),l) ( blob ( y ) , l ) ; since k < l k<l k < l , the pair is reversed iff blob ( y ) < blob ( x ) \operatorname{blob}(y)<\operatorname{blob}(x) blob ( y ) < blob ( x ) . The product of parities is p k p l p_kp_l p k p l , and the number of such pairs is r k l r_{kl} r k l .
So R 1 ⋯ R g = ( − 1 ) ∑ k < l p k p l r k l ∏ k α ( k ) β ( k ) R_1\cdots R_g=(-1)^{\sum_{k<l}p_kp_lr_{kl}}\prod_k\alpha(k)\beta(k) R 1 ⋯ R g = ( − 1 ) ∑ k < l p k p l r k l ∏ k α ( k ) β ( k ) ; multiply both sides by ε ( η ) = ± 1 \varepsilon(\eta)=\pm1 ε ( η ) = ± 1 . □
Factorisation of the sign
Lemma 5.4. If { a k , b k } ∩ { a l , b l } = ∅ \{a_k,b_k\}\cap\{a_l,b_l\}=\varnothing { a k , b k } ∩ { a l , b l } = ∅ , then r k l ≡ I ( k , l ) ( m o d 2 ) r_{kl}\equiv I(k,l)\pmod2 r k l ≡ I ( k , l ) ( mod 2 ) , where
I ( k , l ) : = [ a k < a l < b k < b l or a l < a k < b l < b k ] I(k,l):=[a_k<a_l<b_k<b_l\text{ or }a_l<a_k<b_l<b_k] I ( k , l ) := [ a k < a l < b k < b l or a l < a k < b l < b k ]
indicates that the chords interleave. In particular r k l m o d 2 r_{kl}\bmod2 r k l mod 2 is symmetric and independent of the crossing order.
Proof. Put Y = { a l , b l } Y=\{a_l,b_l\} Y = { a l , b l } , whose elements differ from a k a_k a k and b k b_k b k . Then r k l = # { y ∈ Y : y < a k } + # { y ∈ Y : y < b k } = 2 # { y ∈ Y : y < a k } + # { y ∈ Y : a k < y < b k } r_{kl}=\#\{y\in Y:y<a_k\}+\#\{y\in Y:y<b_k\}=2\#\{y\in Y:y<a_k\}+\#\{y\in Y:a_k<y<b_k\} r k l = # { y ∈ Y : y < a k } + # { y ∈ Y : y < b k } = 2# { y ∈ Y : y < a k } + # { y ∈ Y : a k < y < b k } . The last number is odd iff exactly one endpoint of chord l l l lies strictly between a k a_k a k and b k b_k b k , that is, iff the chords interleave. □
Two crossing edges k < l k<l k < l share a blob if their chords meet. For such a pair put s ( k , l ) : = min ( { a k , b k } ∩ { a l , b l } ) s(k,l):=\min(\{a_k,b_k\}\cap\{a_l,b_l\}) s ( k , l ) := min ({ a k , b k } ∩ { a l , b l }) ; then k , l ∈ ∂ ( s ( k , l ) ) k,l\in\partial(s(k,l)) k , l ∈ ∂ ( s ( k , l )) . Define the local signs and the bundle parities
σ a ( η ) : = ( − 1 ) ∑ k < l : chords meet s ( k , l ) = a p k p l r k l , π a b ( η ) : = ∑ k ∈ E ( a , b ) p k m o d 2 ( a < b ) . \sigma_a(\eta):=(-1)^{\sum_{\substack{k<l:\ \text{chords meet}\\s(k,l)=a}}p_kp_lr_{kl}},\qquad
\pi_{ab}(\eta):=\sum_{k\in E(a,b)}p_k\bmod2\quad(a<b). σ a ( η ) := ( − 1 ) ∑ k < l : chords meet s ( k , l ) = a p k p l r k l , π ab ( η ) := k ∈ E ( a , b ) ∑ p k mod 2 ( a < b ) .
Thus σ a \sigma_a σ a is a function of η ∣ ∂ ( a ) \eta|_{\partial(a)} η ∣ ∂ ( a ) , and π a b \pi_{ab} π ab of η ∣ E ( a , b ) \eta|_{E(a,b)} η ∣ E ( a , b ) .
Proposition 5.5 (Sign factorisation).
ε ( η ) = ∏ a = 1 g σ a ( η ) ⋅ ( − 1 ) ∑ a < c < b < d π a b ( η ) π c d ( η ) . \varepsilon(\eta)=\prod_{a=1}^{g}\sigma_a(\eta)\cdot(-1)^{\sum_{a<c<b<d}\pi_{ab}(\eta)\,\pi_{cd}(\eta)}. ε ( η ) = a = 1 ∏ g σ a ( η ) ⋅ ( − 1 ) ∑ a < c < b < d π ab ( η ) π c d ( η ) .
Proof. Split ∑ k < l p k p l r k l \sum_{k<l}p_kp_l r_{kl} ∑ k < l p k p l r k l into the pairs whose chords meet and the pairs whose chords are disjoint.
Meeting chords. Each such pair has exactly one s ( k , l ) s(k,l) s ( k , l ) , so these pairs give ∏ a σ a \prod_a \sigma_a ∏ a σ a .
Disjoint chords. By Theorem 5.4 these pairs give, modulo 2, ∑ k < l : I ( k , l ) = 1 p k p l \sum_{k<l:\ I(k,l)=1}p_kp_l ∑ k < l : I ( k , l ) = 1 p k p l . Take an unordered pair { k , l } \{k,l\} { k , l } with disjoint interleaving chords, let { a , b } \{a,b\} { a , b } (a < b a<b a < b ) be the chord with the smaller minimum and { c , d } \{c,d\} { c , d } the other; interleaving means a < c < b < d a<c<b<d a < c < b < d . Conversely, every quadruple a < c < b < d a<c<b<d a < c < b < d with k ∈ E ( a , b ) k\in E(a,b) k ∈ E ( a , b ) and l ∈ E ( c , d ) l\in E(c,d) l ∈ E ( c , d ) gives such a pair. This is a bijection, so the sum equals ∑ a < c < b < d ( ∑ k ∈ E ( a , b ) p k ) ( ∑ l ∈ E ( c , d ) p l ) = ∑ a < c < b < d π a b π c d \sum_{a<c<b<d}\left(\sum_{k\in E(a,b)}p_k\right)\left(\sum_{l\in E(c,d)}p_l\right)=\sum_{a<c<b<d}\pi_{ab}\pi_{cd} ∑ a < c < b < d ( ∑ k ∈ E ( a , b ) p k ) ( ∑ l ∈ E ( c , d ) p l ) = ∑ a < c < b < d π ab π c d (mod 2).
Parity copies. Let Q a : = { ( c , d ) : a < c < d ≤ g } Q_a:=\{(c,d):a<c<d\le g\} Q a := {( c , d ) : a < c < d ≤ g } , so ∣ Q a ∣ = ( g − a 2 ) |Q_a|=\binom{g-a}{2} ∣ Q a ∣ = ( 2 g − a ) . For y ∈ { 0 , 1 } Q a y\in\{0,1\}^{Q_a} y ∈ { 0 , 1 } Q a put
χ a ( η , y ) : = ( − 1 ) ∑ ( c , d ) ∈ Q a y c d ∑ b : c < b < d π a b ( η ) , \chi_a(\eta,y):=(-1)^{\sum_{(c,d)\in Q_a}y_{cd}\sum_{b:\ c<b<d}\pi_{ab}(\eta)}, χ a ( η , y ) := ( − 1 ) ∑ ( c , d ) ∈ Q a y c d ∑ b : c < b < d π ab ( η ) ,
a function of η ∣ ∂ ( a ) \eta|_{\partial(a)} η ∣ ∂ ( a ) and y y y .
Lemma 5.6. If y c d ( a ) = π c d ( η ) y_{cd}^{(a)}=\pi_{cd}(\eta) y c d ( a ) = π c d ( η ) for all a a a and all ( c , d ) ∈ Q a (c,d)\in Q_a ( c , d ) ∈ Q a , then ∏ a χ a ( η , y ( a ) ) = ( − 1 ) ∑ a < c < b < d π a b π c d \prod_a\chi_a(\eta,y^{(a)})=(-1)^{\sum_{a<c<b<d}\pi_{ab}\pi_{cd}} ∏ a χ a ( η , y ( a ) ) = ( − 1 ) ∑ a < c < b < d π ab π c d .
Proof. ∑ a ∑ a < c < d π c d ∑ c < b < d π a b = ∑ a < c < b < d π a b π c d \sum_a\sum_{a<c<d}\pi_{cd}\sum_{c<b<d}\pi_{ab}=\sum_{a<c<b<d}\pi_{ab}\pi_{cd} ∑ a ∑ a < c < d π c d ∑ c < b < d π ab = ∑ a < c < b < d π ab π c d .
So every interleaving pair of chords { a , b } \{a,b\} { a , b } , { c , d } \{c,d\} { c , d } with a < c < b < d a<c<b<d a < c < b < d is charged to node a a a , which knows π a b \pi_{ab} π ab , and node a a a receives a copy of π c d \pi_{cd} π c d from node c c c , over the pair { a , c } \{a,c\} { a , c } .
Blob factorisation
For v ∈ V a v\in V_a v ∈ V a let deg η ( v ) : = # { k ∈ ∂ ( a ) : v ∈ { s k , t k } , η k ≠ N } \deg_\eta(v):=\#\{k\in\partial(a):v\in\{s_k,t_k\},\eta_k\ne\mathsf{N}\} deg η ( v ) := # { k ∈ ∂ ( a ) : v ∈ { s k , t k } , η k = N } , and define the blob sums
I a ( η ) : = ∑ x ∈ { 0 , 1 } E i n t ( a ) ∏ v ∈ V a [ deg x ( v ) + deg η ( v ) = 2 ] ⋅ [ ω a ] ( F a ( x ) R a ( η ) ) , I_a(\eta):=\sum_{x\in\{0,1\}^{E_{\mathrm{int}}(a)}}\prod_{v\in V_a}[\deg_x(v)+\deg_\eta(v)=2]\cdot[\omega_a](F_a(x)R_a(\eta)), I a ( η ) := x ∈ { 0 , 1 } E int ( a ) ∑ v ∈ V a ∏ [ deg x ( v ) + deg η ( v ) = 2 ] ⋅ [ ω a ] ( F a ( x ) R a ( η )) ,
where
F a ( x ) : = ∏ e ∈ E i n t ( a ) : x e = 1 ( 1 + q e ) ∈ Λ a ∩ Λ 0 . F_a(x):=\prod_{e\in E_{\mathrm{int}}(a):\ x_e=1}(1+q_e)\in\Lambda_a\cap\Lambda^0. F a ( x ) := e ∈ E int ( a ) : x e = 1 ∏ ( 1 + q e ) ∈ Λ a ∩ Λ 0 .
I a I_a I a depends only on η ∣ ∂ ( a ) \eta|_{\partial(a)} η ∣ ∂ ( a ) . An empty blob has I a = 1 I_a=1 I a = 1 , and so does a blob that consists of r r r alone and has no edges.
Theorem 5.7 (Blob factorisation). For every partition and every crossing order,
n ⋅ # H C ( G ) = ∑ η ∈ L × m ε ( η ) ∏ a = 1 g I a ( η ) = ∑ η ∈ L × m ∏ a = 1 g σ a ( η ) χ a ( η , π ( η ) ) I a ( η ) , n\cdot\#\mathrm{HC}(G)=\sum_{\eta\in\mathcal{L}^{m}_\times}\varepsilon(\eta)\prod_{a=1}^{g}I_a(\eta)=\sum_{\eta\in\mathcal{L}^{m}_\times}\prod_{a=1}^{g}\sigma_a(\eta)\chi_a(\eta,\pi(\eta))I_a(\eta), n ⋅ # HC ( G ) = η ∈ L × m ∑ ε ( η ) a = 1 ∏ g I a ( η ) = η ∈ L × m ∑ a = 1 ∏ g σ a ( η ) χ a ( η , π ( η )) I a ( η ) , where χ a ( η , π ( η ) ) \chi_a(\eta,\pi(\eta)) χ a ( η , π ( η )) means χ a ( η , y ( a ) ) \chi_a(\eta,y^{(a)}) χ a ( η , y ( a ) ) with y c d ( a ) = π c d ( η ) y_{cd}^{(a)}=\pi_{cd}(\eta) y c d ( a ) = π c d ( η ) .
Proof. The second equality is Theorem 5.5 together with Theorem 5.6. For the first:
Expanding ∏ a I a \prod_a I_a ∏ a I a gives a sum over x i n t ∈ { 0 , 1 } ⋃ a E i n t ( a ) x_{\mathrm{int}}\in\{0,1\}^{\bigcup_a E_{\mathrm{int}}(a)} x int ∈ { 0 , 1 } ⋃ a E int ( a ) of the degree indicators times ∏ a [ ω a ] ( F a R a ) \prod_a[\omega_a](F_aR_a) ∏ a [ ω a ] ( F a R a ) .
By Theorem 3.3, since F a R a ∈ Λ a F_aR_a\in\Lambda_a F a R a ∈ Λ a , ∏ a [ ω a ] ( F a R a ) = [ Ω V ] ( ∏ a F a R a ) \prod_a[\omega_a](F_aR_a)=[\Omega_V](\prod_aF_aR_a) ∏ a [ ω a ] ( F a R a ) = [ Ω V ] ( ∏ a F a R a ) .
The F a F_a F a are even and central, so ∏ a ( F a R a ) = ( ∏ a F a ) ⋅ R 1 ⋯ R g \prod_a(F_aR_a)=(\prod_aF_a)\cdot R_1\cdots R_g ∏ a ( F a R a ) = ( ∏ a F a ) ⋅ R 1 ⋯ R g .
By Theorem 5.3, ε ( η ) R 1 ⋯ R g = ∏ k α η k ( k ) β η k ( k ) \varepsilon(\eta)R_1\cdots R_g=\prod_k\alpha_{\eta_k}(k)\beta_{\eta_k}(k) ε ( η ) R 1 ⋯ R g = ∏ k α η k ( k ) β η k ( k ) .
Fix x i n t x_{\mathrm{int}} x int and the support T : = { k : η k ≠ N } T:=\{k:\eta_k\ne\mathsf{N}\} T := { k : η k = N } . The degree indicators say exactly that x : = x i n t ∪ 1 T x:=x_{\mathrm{int}}\cup1_T x := x int ∪ 1 T is a 2-factor, and they do not depend on the labels on T T T .
By distributivity and Theorem 5.2(b), ∑ η : supp η = T ∏ k α η k ( k ) β η k ( k ) = ∏ k ∈ T ( 1 + q e k ) \sum_{\eta:\ \operatorname{supp}\eta=T}\prod_k\alpha_{\eta_k}(k)\beta_{\eta_k}(k)=\prod_{k\in T}(1+q_{e_k}) ∑ η : supp η = T ∏ k α η k ( k ) β η k ( k ) = ∏ k ∈ T ( 1 + q e k ) .
Hence ∑ η ∏ a I a = ∑ x ∈ { 0 , 1 } E [ x is a 2-factor ] [ Ω V ] ( ∏ x e = 1 ( 1 + q e ) ) = n ⋅ # H C ( G ) \sum_\eta\prod_a I_a=\sum_{x\in\{0,1\}^{E}}[x\text{ is a 2-factor}][\Omega_V]\left(\prod_{x_e=1}(1+q_e)\right)=n\cdot\#\mathrm{HC}(G) ∑ η ∏ a I a = ∑ x ∈ { 0 , 1 } E [ x is a 2-factor ] [ Ω V ] ( ∏ x e = 1 ( 1 + q e ) ) = n ⋅ # HC ( G ) by Theorem 4.4.
:::
Table 4. Numerical checks (exact integers). Counts are for one run with 60 instances.
The network
Fix G G G , r r r , ϕ \phi ϕ and a crossing order as in § 5 . Let enc : L → { 0 , … , 4 } \operatorname{enc}\colon\mathcal{L} \to\{0,\ldots,4\} enc : L → { 0 , … , 4 } be the encoding enc ( N ) = 0 \operatorname{enc}(\mathsf{N})=0 enc ( N ) = 0 and enc ( j ) = j + 1 \operatorname{enc}(j)=j+1 enc ( j ) = j + 1 . For an integer t ≥ 0 t\ge0 t ≥ 0 let w ( t ) : = min { w ≥ 0 : 2 w ≥ 5 t } = ⌈ t log 5 ⌉ w(t):=\min\{w\ge0:2^w\ge5^t\}=\lceil t\log5\rceil w ( t ) := min { w ≥ 0 : 2 w ≥ 5 t } = ⌈ t log 5 ⌉ , and put w a b : = w ( m a b ) w_{ab}:=w(m_{ab}) w ab := w ( m ab ) .
Definition 6.1 (The network N ( G , r , ϕ , order ) \mathcal{N}(G,r,\phi,\operatorname{order}) N ( G , r , ϕ , order ) on [ g ] [g] [ g ] ).
Settings.: A setting of node a a a is a pair z a = ( η ( a ) , y ( a ) ) z_a=(\eta^{(a)},y^{(a)}) z a = ( η ( a ) , y ( a ) ) with η ( a ) ∈ L ∂ ( a ) \eta^{(a)}\in\mathcal{L}^{\partial(a)} η ( a ) ∈ L ∂ ( a ) and y ( a ) ∈ { 0 , 1 } Q a y^{(a)}\in\{0,1\}^{Q_a} y ( a ) ∈ { 0 , 1 } Q a . It is encoded as the concatenation of
for each b ∈ [ g ] ∖ { a } b\in[g]\setminus\{a\} b ∈ [ g ] ∖ { a } , in increasing order, the block block b ( z a ) \operatorname{block}_b(z_a) block b ( z a ) : the w a b w_{ab} w ab -bit binary representation (lowest bit first) of ∑ j = 1 m a b enc ( η k j ( a ) ) 5 j − 1 \sum_{j=1}^{m_{ab}}\operatorname{enc}(\eta^{(a)}_{k_j})5^{j-1} ∑ j = 1 m ab enc ( η k j ( a ) ) 5 j − 1 , where k 1 < ⋯ < k m a b k_1<\cdots<k_{m_{ab}} k 1 < ⋯ < k m ab enumerate E ( min ( a , b ) , max ( a , b ) ) E(\min(a,b),\max(a,b)) E ( min ( a , b ) , max ( a , b )) in crossing order;
the bits y c d ( a ) y^{(a)}_{cd} y c d ( a ) for ( c , d ) ∈ Q a (c,d)\in Q_a ( c , d ) ∈ Q a , in lexicographic order.
Thus P a : = ∑ b ≠ a w a b + ∣ Q a ∣ P_a:=\sum_{b\ne a}w_{ab}+|Q_a| P a := ∑ b = a w ab + ∣ Q a ∣ , and S a S_a S a is the set of strings of length P a P_a P a each of whose blocks is < 5 m a b <5^{m_{ab}} < 5 m ab . These are exactly the encodings, and the encoding is a bijection, so ∣ S a ∣ = 5 ∣ ∂ ( a ) ∣ 2 ∣ Q a ∣ |S_a|=5^{|\partial(a)|}2^{|Q_a|} ∣ S a ∣ = 5 ∣ ∂ ( a ) ∣ 2 ∣ Q a ∣ .
Node functions.: W a ( z a ) : = σ a ( η ( a ) ) ⋅ χ a ( η ( a ) , y ( a ) ) ⋅ I a ( η ( a ) ) W_a(z_a):=\sigma_a(\eta^{(a)})\cdot\chi_a(\eta^{(a)},y^{(a)})\cdot I_a(\eta^{(a)}) W a ( z a ) := σ a ( η ( a ) ) ⋅ χ a ( η ( a ) , y ( a ) ) ⋅ I a ( η ( a ) ) .
Edges.: For a < b a<b a < b ,
Ψ a , b ( z a , z b ) : = ∏ k ∈ E ( a , b ) [ η k ( a ) = η k ( b ) ] ⋅ ∏ d = b + 1 g [ y b d ( a ) = π b d ( η ( b ) ) ] . \Psi_{a,b}(z_a,z_b):=\prod_{k\in E(a,b)}[\eta^{(a)}_k=\eta^{(b)}_k]\cdot\prod_{d=b+1}^{g}[y^{(a)}_{bd}=\pi_{bd}(\eta^{(b)})]. Ψ a , b ( z a , z b ) := k ∈ E ( a , b ) ∏ [ η k ( a ) = η k ( b ) ] ⋅ d = b + 1 ∏ g [ y b d ( a ) = π b d ( η ( b ) )] . and Ψ b , a ( z b , z a ) : = Ψ a , b ( z a , z b ) \Psi_{b,a}(z_b,z_a):=\Psi_{a,b}(z_a,z_b) Ψ b , a ( z b , z a ) := Ψ a , b ( z a , z b ) . The number of shared bits is c a , b = c b , a : = w a b + ( g − b ) c_{a,b}=c_{b,a}:=w_{ab}+(g-b) c a , b = c b , a := w ab + ( g − b ) , and the factorisation is f a , b ( z a , θ ) : = [ h a b ( z a ) = θ ] f_{a,b}(z_a,\theta):=[h_{ab}(z_a)=\theta] f a , b ( z a , θ ) := [ h ab ( z a ) = θ ] , f b , a ( z b , θ ) : = [ h b a ( z b ) = θ ] f_{b,a}(z_b,\theta):=[h_{ba}(z_b)=\theta] f b , a ( z b , θ ) := [ h ba ( z b ) = θ ] , where
h a b ( z a ) : = ( block b ( z a ) , y b , b + 1 ( a ) , … , y b , g ( a ) ) ∈ { 0 , 1 } c a , b , h_{ab}(z_a):=(\operatorname{block}_b(z_a),y^{(a)}_{b,b+1},\ldots,y^{(a)}_{b,g})\in\{0,1\}^{c_{a,b}}, h ab ( z a ) := ( block b ( z a ) , y b , b + 1 ( a ) , … , y b , g ( a ) ) ∈ { 0 , 1 } c a , b , h b a ( z b ) : = ( block a ( z b ) , π b , b + 1 ( η ( b ) ) , … , π b , g ( η ( b ) ) ) ∈ { 0 , 1 } c a , b . h_{ba}(z_b):=(\operatorname{block}_a(z_b),\pi_{b,b+1}(\eta^{(b)}),\ldots,\pi_{b,g}(\eta^{(b)}))\in\{0,1\}^{c_{a,b}}. h ba ( z b ) := ( block a ( z b ) , π b , b + 1 ( η ( b ) ) , … , π b , g ( η ( b ) )) ∈ { 0 , 1 } c a , b . In words: the w a b w_{ab} w ab block bits on { a , b } \{a,b\} { a , b } are the base-5 5 5 code of the labels of the crossing edges between V a V_a V a and V b V_b V b ; both ends hold a copy, and Ψ \Psi Ψ tests that the copies agree. For a < b a<b a < b the remaining g − b g-b g − b bits on { a , b } \{a,b\} { a , b } are copies, held by a a a , of the parities π b d \pi_{bd} π b d for d > b d>b d > b , which node b b b computes from its own labels on E ( b , d ) E(b,d) E ( b , d ) .
Lemma 6.2. ( f a , b , f b , a ) (f_{a,b},f_{b,a}) ( f a , b , f b , a ) factors Ψ a , b \Psi_{a,b} Ψ a , b through c a , b c_{a,b} c a , b bits.
Proof. Both ends list E ( a , b ) E(a,b) E ( a , b ) in the same order, and the base-5 5 5 encoding is injective, so block b ( z a ) = block a ( z b ) \operatorname{block}_b(z_a)=\operatorname{block}_a(z_b) block b ( z a ) = block a ( z b ) iff η ( a ) \eta^{(a)} η ( a ) and η ( b ) \eta^{(b)} η ( b ) agree on E ( a , b ) E(a,b) E ( a , b ) . The remaining coordinates of h a b h_{ab} h ab and h b a h_{ba} h ba agree iff every copy is correct. Hence Ψ a , b = [ h a b ( z a ) = h b a ( z b ) ] \Psi_{a,b}=[h_{ab}(z_a)=h_{ba}(z_b)] Ψ a , b = [ h ab ( z a ) = h ba ( z b )] , and Theorem 2.1 applies. □
Theorem 6.3. The value of N ( G , r , ϕ , order ) \mathcal{N}(G,r,\phi,\operatorname{order}) N ( G , r , ϕ , order ) is n ⋅ # HC ( G ) n\cdot\#\operatorname{HC}(G) n ⋅ # HC ( G ) , for every n ≥ 3 n\ge3 n ≥ 3 , every ϕ : V → [ g ] \phi:V\to[g] ϕ : V → [ g ] , every root r r r and every crossing order.
Proof. The functions Ψ a , b \Psi_{a,b} Ψ a , b are 0 / 1 0/1 0/1 -valued, so a term ∏ a W a ∏ a < b Ψ a , b \prod_a W_a\prod_{a<b}\Psi_{a,b} ∏ a W a ∏ a < b Ψ a , b is nonzero only if all Ψ a , b \Psi_{a,b} Ψ a , b equal 1 1 1 . This means: (i) there is η ∈ L m × \eta\in\mathcal{L}^{m\times} η ∈ L m × with η ( a ) = η ∣ ∂ ( a ) \eta^{(a)}=\eta|_{\partial(a)} η ( a ) = η ∣ ∂ ( a ) for every a a a , because each k k k lies in exactly ∂ ( a k ) \partial(a_k) ∂ ( a k ) and ∂ ( b k ) \partial(b_k) ∂ ( b k ) , and Ψ a k , b k \Psi_{a_k,b_k} Ψ a k , b k tests agreement on k k k ; and (ii) y c d ( a ) = π c d ( η ) y^{(a)}_{cd}=\pi_{cd}(\eta) y c d ( a ) = π c d ( η ) for all a < c < d a<c<d a < c < d , because Ψ a , c \Psi_{a,c} Ψ a , c tests this and π c d ( η c ) = π c d ( η ) \pi_{cd}(\eta^c)=\pi_{cd}(\eta) π c d ( η c ) = π c d ( η ) . Conversely, every η ∈ L m × \eta\in\mathcal{L}^{m\times} η ∈ L m × determines exactly one z z z with (i) and (ii). So Z = ∑ η ∏ a σ a ( η ) χ a ( η , π ( η ) ) I a ( η ) = n ⋅ # H C ( G ) Z=\sum_\eta\prod_a\sigma_a(\eta)\chi_a(\eta,\pi(\eta))I_a(\eta)=n\cdot\#\mathrm{HC}(G) Z = ∑ η ∏ a σ a ( η ) χ a ( η , π ( η )) I a ( η ) = n ⋅ # HC ( G ) by Theorem 5.7 .
Proposition 6.4 (Parameters). Let μ a : = ∑ v ∈ V a deg G ( v ) \mu_a:=\sum_{v\in V_a}\deg_G(v) μ a := ∑ v ∈ V a deg G ( v ) and μ : = max a μ a \mu:=\max_a\mu_a μ := max a μ a , and suppose that G G G has minimum degree at least 2. Then N ( G , r , ϕ , order ) \mathcal{N}(G,r,\phi,\operatorname{order}) N ( G , r , ϕ , order ) is a network in the sense of Theorem 2.2 with
P : = w ( μ ) + g + g 2 , B : = 2 μ + 1 , τ : = 2 1.5 μ n C 2 ( C 2 absolute ) , P:=w(\mu)+g+g^2,\qquad B:=2\mu+1,\qquad\tau:=2^{1.5\mu}n^{C_2}\quad(C_2\text{ absolute}), P := w ( μ ) + g + g 2 , B := 2 μ + 1 , τ := 2 1.5 μ n C 2 ( C 2 absolute ) , U = 2 ∑ a < b w a b + 2 ( g 3 ) ≤ 2 log 5 ⋅ m × + g 2 + g 3 3 ≤ 2 log 5 ⋅ ∣ E ∣ + g 3 , U=2\sum_{a<b}w_{ab}+2\binom{g}{3}\le2\log5\cdot m_\times+g^2+\frac{g^3}{3}\le2\log5\cdot|E|+g^3, U = 2 a < b ∑ w ab + 2 ( 3 g ) ≤ 2 log 5 ⋅ m × + g 2 + 3 g 3 ≤ 2 log 5 ⋅ ∣ E ∣ + g 3 , where τ \tau τ is counted after a polynomial-time preparation. In particular P ≤ log 5 ⋅ μ + 2 g 2 P\le\log5\cdot\mu+2g^2 P ≤ log 5 ⋅ μ + 2 g 2 and g P ≤ log 5 ⋅ g μ + 2 g 3 gP\le\log5\cdot g\mu+2g^3 g P ≤ log 5 ⋅ g μ + 2 g 3 .
Proof. Counting. Each crossing edge at a a a has exactly one end in V a V_a V a and each internal edge two, so 2 ∣ E i n t ( a ) ∣ + ∣ ∂ ( a ) ∣ = μ a 2|E_{\mathrm{int}}(a)|+|\partial(a)|=\mu_a 2∣ E int ( a ) ∣ + ∣ ∂ ( a ) ∣ = μ a . Also w ( t ) ≤ t log 5 + [ t > 0 ] w(t)\le t\log5+[t>0] w ( t ) ≤ t log 5 + [ t > 0 ] and w ( t ) ≥ t log 5 w(t)\ge t\log5 w ( t ) ≥ t log 5 , so ∑ b ≠ a w a b ≤ ∣ ∂ ( a ) ∣ log 5 + ( g − 1 ) ≤ w ( μ ) + g − 1 \sum_{b\ne a}w_{ab}\le|\partial(a)|\log5+(g-1)\le w(\mu)+g-1 ∑ b = a w ab ≤ ∣ ∂ ( a ) ∣ log 5 + ( g − 1 ) ≤ w ( μ ) + g − 1 .
P a ≤ P P_a\le P P a ≤ P . P a = ∑ b w a b + ( g − a 2 ) ≤ w ( μ ) + g − 1 + g 2 / 2 ≤ P P_a=\sum_b w_{ab}+\binom{g-a}{2}\le w(\mu)+g-1+g^2/2\le P P a = ∑ b w ab + ( 2 g − a ) ≤ w ( μ ) + g − 1 + g 2 /2 ≤ P .
Condition (i). The copy bits on pairs at a a a number ∑ b > a ( g − b ) + ∑ b < a ( g − a ) = ( g − a 2 ) + ( a − 1 ) ( g − a ) ≤ g 2 \sum_{b>a}(g-b)+\sum_{b<a}(g-a)=\binom{g-a}{2}+(a-1)(g-a)\le g^2 ∑ b > a ( g − b ) + ∑ b < a ( g − a ) = ( 2 g − a ) + ( a − 1 ) ( g − a ) ≤ g 2 , so ∑ b ≠ a c a , b ≤ w ( μ ) + g − 1 + g 2 ≤ P \sum_{b\ne a}c_{a,b}\le w(\mu)+g-1+g^2\le P ∑ b = a c a , b ≤ w ( μ ) + g − 1 + g 2 ≤ P .
The total. U = 2 ∑ a < b c a , b U=2\sum_{a<b}c_{a,b} U = 2 ∑ a < b c a , b . Use ∑ a < b ( g − b ) = ∑ b ( b − 1 ) ( g − b ) = ( g 3 ) \sum_{a<b}(g-b)=\sum_b(b-1)(g-b)=\binom{g}{3} ∑ a < b ( g − b ) = ∑ b ( b − 1 ) ( g − b ) = ( 3 g ) (choose the middle element of a triple), and # { a < b : m a b > 0 } ≤ g 2 / 2 \#\{a<b:m_{ab}>0\}\le g^2/2 # { a < b : m ab > 0 } ≤ g 2 /2 . Finally g 2 + g 3 / 3 ≤ g 3 g^2+g^3/3\le g^3 g 2 + g 3 /3 ≤ g 3 for g ≥ 2 g\ge2 g ≥ 2 .
Condition (ii). Ψ \Psi Ψ and f f f take values in { 0 , 1 } \{0,1\} { 0 , 1 } , and ∣ σ a χ a ∣ = 1 |\sigma_a\chi_a|=1 ∣ σ a χ a ∣ = 1 . In I a I_a I a , the product F a ( x ) R a ( η ) F_a(x)R_a(\eta) F a ( x ) R a ( η ) has at most ∣ E i n t ( a ) ∣ |E_{\mathrm{int}}(a)| ∣ E int ( a ) ∣ factors with at most five signed monomials each and ∣ ∂ ( a ) ∣ |\partial(a)| ∣ ∂ ( a ) ∣ factors with at most two each, and there are at most 2 ∣ E i n t ( a ) ∣ 2^{|E_{\mathrm{int}}(a)|} 2 ∣ E int ( a ) ∣ choices of x x x . So
∣ W a ∣ ≤ 10 ∣ E i n t ( a ) ∣ 2 ∣ ∂ ( a ) ∣ ≤ 2 log 10 2 ∣ E i n t ( a ) ∣ + ∣ ∂ ( a ) ∣ ≤ 2 1.67 μ a < 2 B . |W_a|\le10^{|E_{\mathrm{int}}(a)|}2^{|\partial(a)|}\le2^{\frac{\log10}{2}|E_{\mathrm{int}}(a)|+|\partial(a)|}\le2^{1.67\mu_a}<2^B. ∣ W a ∣ ≤ 1 0 ∣ E int ( a ) ∣ 2 ∣ ∂ ( a ) ∣ ≤ 2 2 l o g 10 ∣ E int ( a ) ∣ + ∣ ∂ ( a ) ∣ ≤ 2 1.67 μ a < 2 B . Condition (iii). The preparation stores the graph, ϕ \phi ϕ , the crossing order, the lists E ( a , b ) E(a,b) E ( a , b ) , the numbers w a b w_{ab} w ab and the sets Q a Q_a Q a . Then membership in S a S_a S a , encoding and decoding, h a b h_{ab} h ab , Ψ \Psi Ψ and f f f take poly ( n + g ) \operatorname{poly}(n+g) poly ( n + g ) operations (base-5 arithmetic on at most P P P -bit numbers, with P ≤ poly ( n ) P\le\operatorname{poly}(n) P ≤ poly ( n ) ); σ a \sigma_a σ a takes O ( ∣ ∂ ( a ) ∣ 2 ) O(|\partial(a)|^2) O ( ∣ ∂ ( a ) ∣ 2 ) operations and χ a \chi_a χ a takes O ( g 3 ) O(g^3) O ( g 3 ) . Finally, I a I_a I a loops over at most 2 ∣ E i n t ( a ) ∣ ≤ 2 μ / 2 2^{|E_{\mathrm{int}}(a)|}\le2^{\mu/2} 2 ∣ E int ( a ) ∣ ≤ 2 μ /2 vectors x x x ; for each it multiplies at most μ \mu μ factors (with at most five monomials each) in Λ a \Lambda_a Λ a , represented densely by 2 ∣ Γ a ∣ ≤ 4 ∣ V a ∣ ≤ 2 μ 2^{|\Gamma_a|}\le4^{|V_a|}\le2^\mu 2 ∣ Γ a ∣ ≤ 4 ∣ V a ∣ ≤ 2 μ integers of at most B = O ( n ) B=O(n) B = O ( n ) bits (here ∣ V a ∣ ≤ μ a / 2 |V_a|\le\mu_a/2 ∣ V a ∣ ≤ μ a /2 because the minimum degree is at least 2), and reads one coefficient. Altogether τ ≤ 2 μ / 2 ⋅ 2 μ ⋅ poly ( n ) \tau\le2^{\mu/2}\cdot2^\mu\cdot\operatorname{poly}(n) τ ≤ 2 μ /2 ⋅ 2 μ ⋅ poly ( n ) .
Remark 6.5. Theorem 2.2 bounds the largest node , through P P P , and not only the total. With unbounded maximum degree one blob may have to carry Θ ( n ) \Theta(n) Θ ( n ) crossing-edge bits, and then the factor 2 2 g P / K 2^{2gP/K} 2 2 g P / K of (2) is not small. § 7 removes high-degree vertices first; the rank-encoded network of § 8 avoids the problem instead. Note also that the interleaving sign costs O ( g 3 ) O(g^3) O ( g 3 ) bits in total and at most g 2 g^2 g 2 bits per node.
The algorithm and its running time
Preprocessing
Lemma 7.1 (Degree reduction). Let Θ ≥ 2 \Theta\ge2 Θ ≥ 2 and H : = { v : deg ( v ) > Θ } H:=\{v:\deg(v)>\Theta\} H := { v : deg ( v ) > Θ } . For each choice v = ( v ν ) v ∈ H v=(v_\nu)_{v\in H} v = ( v ν ) v ∈ H of a 2-element subset ν v \nu_v ν v of the edges at v v v , let G ν G_\nu G ν be G G G minus every edge e e e at a vertex v ∈ H v\in H v ∈ H with e ∉ ν v e\notin\nu_v e ∈ / ν v . Then
(a) # H C ( G ) = ∑ ν # H C ( G ν ) \#\mathrm{HC}(G)=\sum_\nu\#\mathrm{HC}(G_\nu) # HC ( G ) = ∑ ν # HC ( G ν ) ;
(b) there are at most ∏ v ∈ H ( deg ( v ) 2 ) ≤ n 2 ∣ H ∣ \prod_{v\in H}\binom{\deg(v)}{2}\le n^{2|H|} ∏ v ∈ H ( 2 d e g ( v ) ) ≤ n 2∣ H ∣ choices, and ∣ H ∣ < 2 m / Θ |H|<2m/\Theta ∣ H ∣ < 2 m /Θ ;
(c) every G ν G_\nu G ν has vertex set V V V , at most m m m edges, and maximum degree at most Θ \Theta Θ .
Proof. Map a Hamiltonian cycle C C C of G G G to ν ( C ) : = ( E ( C ) ∩ δ ( v ) ) v ∈ H \nu(C):=(E(C)\cap\delta(v))_{v\in H} ν ( C ) := ( E ( C ) ∩ δ ( v ) ) v ∈ H , where δ ( v ) \delta(v) δ ( v ) is the set of edges at v v v . Then C C C survives in G ν ( C ) G_{\nu(C)} G ν ( C ) , since every edge of C C C at v ∈ H v\in H v ∈ H lies in ν v ( C ) \nu_v(C) ν v ( C ) . Conversely, let C C C be a Hamiltonian cycle of G ν G_\nu G ν . For v ∈ H v\in H v ∈ H , the set E ( C ) ∩ δ ( v ) E(C)\cap\delta(v) E ( C ) ∩ δ ( v ) has two elements and is contained in δ G ν ( v ) ⊆ ν v \delta_{G_\nu}(v)\subseteq\nu_v δ G ν ( v ) ⊆ ν v , so ν = ν ( C ) \nu=\nu(C) ν = ν ( C ) . Thus the pairs ( ν , C ) (\nu,C) ( ν , C ) with C C C a Hamiltonian cycle of G ν G_\nu G ν correspond bijectively to the Hamiltonian cycles of G G G . The remaining claims hold because ∑ v deg v = 2 m \sum_v\deg v=2m ∑ v deg v = 2 m and the vertices of H H H keep degree at most 2. □
Lemma 7.2 (Degree-balanced partition). List V V V as v 1 , … , v n v_1,\ldots,v_n v 1 , … , v n in any order, let S t : = ∑ s < t deg ( v s ) S_t:=\sum_{s<t}\deg(v_s) S t := ∑ s < t deg ( v s ) , and put ϕ ( v t ) : = min ( g , ⌊ g S t / ( 2 m ) ⌋ + 1 ) \phi(v_t):=\min(g,\lfloor gS_t/(2m)\rfloor+1) ϕ ( v t ) := min ( g , ⌊ g S t / ( 2 m )⌋ + 1 ) . Then every blob has μ a ≤ 2 m / g + Δ \mu_a\le2m/g+\Delta μ a ≤ 2 m / g + Δ , where Δ \Delta Δ is the maximum degree.
Proof. ϕ \phi ϕ is nondecreasing in t t t , so each blob is a segment v t , … , v t ′ v_t,\ldots,v_{t'} v t , … , v t ′ . If a < g a<g a < g , then ( a − 1 ) ⋅ 2 m / g ≤ S t ≤ S t ′ < a ⋅ 2 m / g (a-1)\cdot2m/g\le S_t\le S_{t'}<a\cdot2m/g ( a − 1 ) ⋅ 2 m / g ≤ S t ≤ S t ′ < a ⋅ 2 m / g , so μ a = S t ′ − S t + deg ( v t ′ ) < 2 m / g + Δ \mu_a=S_{t'}-S_t+\deg(v_{t'})<2m/g+\Delta μ a = S t ′ − S t + deg ( v t ′ ) < 2 m / g + Δ . If a = g a=g a = g , then μ g = 2 m − S t ≤ 2 m / g \mu_g=2m-S_t\le2m/g μ g = 2 m − S t ≤ 2 m / g . □
The algorithm
On input G G G the algorithm does the following.
Step 0. If n ≤ 2 n\le2 n ≤ 2 , or some vertex has degree less than 2, output 0.
Step 1. Choose a level ℓ \ell ℓ (see § 7.3 and § 7.4 ). Put K : = K ℓ K:=K_\ell K := K ℓ and g : = 3 K 8 g:=3K^8 g := 3 K 8 .
Step 2. Apply Theorem 7.1 with Θ : = max ( 2 , ⌈ n / g ⌉ ) \Theta:=\max(2,\lceil n/g\rceil) Θ := max ( 2 , ⌈ n / g ⌉) . For each branch G ν G_\nu G ν do Steps 3–4; if G ν G_\nu G ν has a vertex of degree less than 2, its count is 0 and it is skipped.
Step 3. Take ϕ \phi ϕ from Theorem 7.2 , any root r r r and any crossing order, and build N ( G ν , r , ϕ , order ) \mathcal{N}(G_\nu,r,\phi,\text{order}) N ( G ν , r , ϕ , order ) implicitly: perform the preparation of Theorem 6.4, computing P P P , B B B , P a P_a P a and c a , b c_{a,b} c a , b exactly.
Step 4. Run the procedure of Theorem 2.4 on this network, with the algorithm of Theorem 2.5 (b) at level ℓ \ell ℓ as the clique algorithm; Theorem 2.4 calls it on a ( K , L ) (K,L) ( K , L ) -clique with B ′ B' B ′ in the role of B B B . Divide the result by n n n .
Step 5. Output the sum over the branches.
Correctness follows from Theorems 2.4, 2.5 , 6.3 and 7.1.
Checking the imported hypotheses
Theorem 2.4 needs a network on [ g ] [g] [ g ] with integer parameters P P P , B B B , τ ≥ 1 \tau\ge1 τ ≥ 1 , total U U U , and g = 3 K 8 g=3K^8 g = 3 K 8 ; Theorem 6.4 supplies these. It then needs an algorithm for every ( K , L ) (K,L) ( K , L ) -clique with ∣ W ∣ < 2 B ′ |W|<2^{B'} ∣ W ∣ < 2 B ′ : Theorem 2.5 (b) at level ℓ \ell ℓ , with λ = L \lambda=L λ = L and B = B ′ B=B' B = B ′ , gives T = 2 e ℓ K 2 L ( K ( L + B ′ ) ) C 0 K 2 T=2e_\ell K^2L(K(L+B'))^{C_0K^2} T = 2 e ℓ K 2 L ( K ( L + B ′ ) ) C 0 K 2 , and its hypotheses λ , B ≥ 1 \lambda,B\ge1 λ , B ≥ 1 hold because P ≥ 1 P\ge1 P ≥ 1 . Theorem 2.5 needs pieces, supplied by Theorem 2.6 . Nothing in the clique algorithm depends on the graph, which reaches it only through the tables that Theorem 2.4 builds from the W a W_a W a and f a , b f_{a,b} f a , b . Balancing is done by Theorem 2.4 itself: it searches the K g K^g K g groupings for one with at most 2 g / K 2g/K 2 g / K nodes per group and all pairwise group totals at most L L L , which exists by the proof of [A, Lemma 1].
Bounds for one branch
Write m : = ∣ E ( G ) ∣ m:=|E(G)| m := ∣ E ( G ) ∣ . Then ∣ E ( G ν ) ∣ ≤ m |E(G_\nu)|\le m ∣ E ( G ν ) ∣ ≤ m and G ν G_\nu G ν has minimum degree at least 2. By Theorem 7.2 , Δ ≤ Θ ≤ n / g + 2 \Delta\le\Theta\le n/g+2 Δ ≤ Θ ≤ n / g + 2 , so μ ≤ ( 2 m + n ) / g + 2 \mu\le(2m+n)/g+2 μ ≤ ( 2 m + n ) / g + 2 . Using log 5 ≤ 2.33 \log5\le2.33 log 5 ≤ 2.33 and g ≥ 3 g\ge3 g ≥ 3 , Theorem 6.4 gives
g P ≤ 2.33 ( 2 m + n ) + 3 g 3 , U ≤ 4.65 m + g 3 , B ≤ 2 ( 2 m + n ) / g + 5 , log τ ≤ 1.5 ( 2 m + n ) / g + 3 + C 2 log n , L ≤ g P + 1 , B ′ ≤ 2 g P + 1 + g 2 B . (5) \begin{aligned}
gP&\le2.33(2m+n)+3g^3, & U&\le4.65m+g^3, & B&\le2(2m+n)/g+5,\\
\log\tau&\le1.5(2m+n)/g+3+C_2\log n, & L&\le gP+1, & B'&\le2gP+1+g^2B. \tag*{(5)}
\end{aligned} g P log τ ≤ 2.33 ( 2 m + n ) + 3 g 3 , ≤ 1.5 ( 2 m + n ) / g + 3 + C 2 log n , U L ≤ 4.65 m + g 3 , ≤ g P + 1 , B B ′ ≤ 2 ( 2 m + n ) / g + 5 , ≤ 2 g P + 1 + g 2 B . (5)
By (2) and (3) , with e : = e ℓ ≤ 1 e:=e_\ell\le1 e := e ℓ ≤ 1 and K 2 L ≤ U + g P / K + K 2 K^2L\le U+gP/K+K^2 K 2 L ≤ U + g P / K + K 2 , the time of Steps 3–4 for one branch is 2 X 2^X 2 X with
X ≤ 1 + max { g log K , e ( U + g P K + K 2 ) + C 0 K 2 log ( K ( L + B ′ ) ) + 2 g P K + log τ } + C 1 log ( g ( P + B ) ) + O ( log n ) . (6) X\le1+\max\left\{g\log K,\ e\left(U+\frac{gP}{K}+K^2\right)+C_0K^2\log\left(K(L+B')\right)+\frac{2gP}{K}+\log\tau\right\}
+\ C_1\log\left(g(P+B)\right)+O(\log n). \tag*{(6)} X ≤ 1 + max { g log K , e ( U + K g P + K 2 ) + C 0 K 2 log ( K ( L + B ′ ) ) + K 2 g P + log τ } + C 1 log ( g ( P + B ) ) + O ( log n ) . (6)
There are at most n 2 ∣ H ∣ ≤ n 4 m g / n n^{2|H|}\le n^{4mg/n} n 2∣ H ∣ ≤ n 4 m g / n branches, because ∣ H ∣ < 2 m / Θ ≤ 2 m g / n |H|<2m/\Theta\le2mg/n ∣ H ∣ < 2 m /Θ ≤ 2 m g / n .
Proof of Theorem 1.1
Proof of Theorem 1.1. Let D ≥ 1 D \ge1 D ≥ 1 , δ ∈ ( 0 , 1 ] \delta\in(0,1] δ ∈ ( 0 , 1 ] and m ≤ D n m \le Dn m ≤ D n , so that 2 m + n ≤ 3 D n 2m+n \le3Dn 2 m + n ≤ 3 D n . By Theorem 2.5 (a), e ℓ → 0 e_\ell\to0 e ℓ → 0 and K ℓ → ∞ K_\ell\to\infty K ℓ → ∞ , so there is ℓ \ell ℓ , depending only on ( δ , D ) (\delta,D) ( δ , D ) , with e : = e ℓ ≤ δ / ( 40 D ) e := e_\ell\le\delta/(40D) e := e ℓ ≤ δ / ( 40 D ) and K : = K ℓ ≥ 60 D / δ K := K_\ell\ge60D/\delta K := K ℓ ≥ 60 D / δ . Fix it, and put g = 3 K 8 g=3K^8 g = 3 K 8 , a constant. By (5) , the terms of (6) satisfy
e U ≤ δ 40 D ( 4.65 D n + g 3 ) ≤ 0.12 δ n + g 3 , eU \le\frac{\delta}{40D}(4.65Dn+g^3) \le0.12\delta n+g^3, e U ≤ 40 D δ ( 4.65 D n + g 3 ) ≤ 0.12 δ n + g 3 ,
( e + 2 ) g P / K ≤ 3 ( 2.33 ⋅ 3 D n + 3 g 3 ) / K ≤ 21 D n / K + 9 g 3 ≤ 0.35 δ n + 9 g 3 , (e+2)gP/K \le3(2.33\cdot3Dn+3g^3)/K \le21Dn/K+9g^3 \le0.35\delta n+9g^3, ( e + 2 ) g P / K ≤ 3 ( 2.33 ⋅ 3 D n + 3 g 3 ) / K ≤ 21 D n / K + 9 g 3 ≤ 0.35 δ n + 9 g 3 ,
log τ ≤ 4.5 D n / g + O ( log n ) ≤ 0.075 δ n + O ( log n ) , \log\tau\le4.5Dn/g+O(\log n) \le0.075\delta n+O(\log n), log τ ≤ 4.5 D n / g + O ( log n ) ≤ 0.075 δ n + O ( log n ) ,
and the remaining terms are O δ , D ( log n ) O_{\delta,D}(\log n) O δ , D ( log n ) , since g g g and K K K are constants and L L L , B ′ B' B ′ , P P P , B B B are O δ , D ( n ) O_{\delta,D}(n) O δ , D ( n ) . So each branch costs 2 0.55 δ n + O δ , D ( log n ) 2^{0.55\delta n+O_{\delta,D}(\log n)} 2 0.55 δ n + O δ , D ( l o g n ) . There are at most n 4 D g = n O δ , D ( 1 ) n^{4Dg}=n^{O_{\delta,D}(1)} n 4 D g = n O δ , D ( 1 ) branches, and the preparation is polynomial. The total is 2 0.55 δ n + O δ , D ( log n ) = O ( 2 δ n ) 2^{0.55\delta n+O_{\delta,D}(\log n)}=O(2^{\delta n}) 2 0.55 δ n + O δ , D ( l o g n ) = O ( 2 δ n ) .
The alternative route of Theorem 2.7 gives the same bound: with ( K , e ) (K,e) ( K , e ) achievable, e ≤ δ / ( 40 D ) e\le\delta/(40D) e ≤ δ / ( 40 D ) and K ≥ 60 D / δ K\ge60D/\delta K ≥ 60 D / δ , the exponent of C 1 2 e ( U + g P / K ) + 2 g P / K ( P + B ) C 1 τ C_1 2^{e(U+gP/K)+2gP/K}(P+B)C_1\tau C 1 2 e ( U + g P / K ) + 2 g P / K ( P + B ) C 1 τ is bounded by the same three lines.
Proof of Theorem 1.2
Proof of Theorem 1.2. Use the pieces of Theorem 2.6 with ρ = 1 / 2 \rho=1/\sqrt{2} ρ = 1/ 2 , so α ′ = 1 / 2 \alpha'=1/2 α ′ = 1/2 , with c c c and x 0 x_0 x 0 absolute. For n < n 0 : = K 30 0 n<n_0:=K_{30}^0 n < n 0 := K 30 0 , an absolute constant, any exact method takes O ( 1 ) O(1) O ( 1 ) time. Step 0 disposes of n ≤ 2 n\le2 n ≤ 2 and of minimum degree below 2; otherwise m ≥ n m\ge n m ≥ n .
For n ≥ n 0 n\ge n_0 n ≥ n 0 , let ℓ \ell ℓ be the largest index with K ℓ 30 ≤ n K_\ell^{30}\le n K ℓ 30 ≤ n ; K ℓ K_\ell K ℓ is computable from the formula in Theorem 2.5 (a). Then K ℓ + 1 > n 1 / 30 K_{\ell+1}>n^{1/30} K ℓ + 1 > n 1/30 , and K ℓ + 1 ≤ K ℓ 10 K_{\ell+1}\le K_\ell^{10} K ℓ + 1 ≤ K ℓ 10 gives n 1 / 300 < K : = K ℓ ≤ n 1 / 30 n^{1/300}<K:=K_\ell\le n^{1/30} n 1/300 < K := K ℓ ≤ n 1/30 . So g = 3 K 8 ∈ [ 3 n 8 / 300 , 3 n 8 / 30 ] g=3K^8\in[3n^{8/300},3n^{8/30}] g = 3 K 8 ∈ [ 3 n 8/300 , 3 n 8/30 ] , and by Theorem 2.5 (a)
e = e ℓ ≤ 0.85 ( 3 x 0 + 6 log K ) 1 / 2 ≤ 0.85 ( 300 ( 3 x 0 + 6 ) ) 1 / 2 log n = : c e log n . e=e_\ell\le0.85\left(\frac{3x_0+6}{\log K}\right)^{1/2}
\le\frac{0.85(300(3x_0+6))^{1/2}}{\sqrt{\log n}}
=:\frac{c_e}{\sqrt{\log n}}. e = e ℓ ≤ 0.85 ( log K 3 x 0 + 6 ) 1/2 ≤ log n 0.85 ( 300 ( 3 x 0 + 6 ) ) 1/2 =: log n c e .
With 2 m + n ≤ 3 m 2m+n\le3m 2 m + n ≤ 3 m , the terms of (6) and the branching satisfy
e U ≤ c e ( 4.65 m + 27 n 0.8 ) / log n , eU\le c_e(4.65m+27n^{0.8})/\sqrt{\log n}, e U ≤ c e ( 4.65 m + 27 n 0.8 ) / log n ,
( e + 2 ) g P / K ≤ 3 ( 7 m + 81 n 0.8 ) / n 1 / 300 = O ( m n − 1 / 300 ) , (e+2)gP/K\le3(7m+81n^{0.8})/n^{1/300}=O(mn^{-1/300}), ( e + 2 ) g P / K ≤ 3 ( 7 m + 81 n 0.8 ) / n 1/300 = O ( m n − 1/300 ) ,
log τ ≤ 4.5 m / g + O ( log n ) = O ( m n − 8 / 300 ) , \log\tau\le4.5m/g+O(\log n)=O(mn^{-8/300}), log τ ≤ 4.5 m / g + O ( log n ) = O ( m n − 8/300 ) ,
e K 2 + C 0 K 2 log ( K ( L + B ′ ) ) = O ( n 1 / 15 log n ) ( L , B ′ ≤ poly ( n ) , as m ≤ n 2 ) , eK^2+C_0K^2\log(K(L+B'))=O(n^{1/15}\log n)
\qquad(L,B'\le\operatorname{poly}(n),\text{ as }m\le n^2), e K 2 + C 0 K 2 log ( K ( L + B ′ )) = O ( n 1/15 log n ) ( L , B ′ ≤ poly ( n ) , as m ≤ n 2 ) ,
g log K = O ( n 8 / 30 log n ) , C 1 log ( g ( P + B ) ) = O ( log n ) , g\log K=O(n^{8/30}\log n),\qquad C_1\log(g(P+B))=O(\log n), g log K = O ( n 8/30 log n ) , C 1 log ( g ( P + B )) = O ( log n ) ,
log ( # branches ) ≤ 4 ( m / n ) g log n = O ( m n 8 / 30 − 1 log n ) . \log(\#\text{branches})\le4(m/n)g\log n=O(mn^{8/30-1}\log n). log ( # branches ) ≤ 4 ( m / n ) g log n = O ( m n 8/30 − 1 log n ) .
Every term except the first is O ( m / log n ) O(m/\sqrt{\log n}) O ( m / log n ) uniformly, because m ≥ n m\ge n m ≥ n and n 0.8 n^{0.8} n 0.8 , n 1 / 15 log n n^{1/15}\log n n 1/15 log n and n 8 / 30 log n n^{8/30}\log n n 8/30 log n are all o ( n / log n ) o(n/\sqrt{\log n}) o ( n / log n ) . Hence the total time is 2 C ∗ m / log n 2^{C^*m/\sqrt{\log n}} 2 C ∗ m / l o g n for an absolute C ∗ C^* C ∗ .
Remark 7.3. We record four comments on these bounds.
(a) The requirement g = 3 K 8 ≤ n 8 / 30 g=3K^8\le n^{8/30} g = 3 K 8 ≤ n 8/30 keeps the g 3 g^3 g 3 copy bits and the n O ( D g ) n^{O(Dg)} n O ( D g ) branching at o ( n / log n ) o(n/\sqrt{\log n}) o ( n / log n ) ; it forces only K ≥ n 1 / 300 K\ge n^{1/300} K ≥ n 1/300 , which still gives e ℓ = O ( 1 / log n ) e_\ell=O(1/\sqrt{\log n}) e ℓ = O ( 1/ log n ) .
(b) With the pieces of [A, Lemma 2] only (ρ = 11 / 12 \rho=11/12 ρ = 11/12 ), the same argument gives 2 O ( m / ( log n ) 0.125 ) 2^{O(m/(\log n)^{0.125})} 2 O ( m / ( l o g n ) 0.125 ) .
(c) The leading term is e ℓ U ≈ e ℓ ⋅ 4.64 ∣ E ∣ e_\ell U\approx e_\ell\cdot4.64|E| e ℓ U ≈ e ℓ ⋅ 4.64∣ E ∣ ; every other term is of lower order. Hence any improvement of e ℓ e_\ell e ℓ in Theorem 2.5 , for example from better pieces, transfers verbatim.
(d) Like the bounds of [A], these are purely asymptotic. Theorem 1.2 beats 2 n 2^n 2 n only when e ℓ ⋅ 4.64 m < n e_\ell\cdot4.64m<n e ℓ ⋅ 4.64 m < n , which needs log n \log n log n in the thousands even for m = 2 n m=2n m = 2 n .
Counting with logarithmic cost in the degree
This section proves Theorem 1.3 . The proof is formalised in Lean (theorem3, theorem3_maxdeg; files Unrank, PairCode, VertexBalanced, RankNetwork, RankProcs, DegTableProc, RankWordProcs, Theorem3, DPackage). It reuses Theorem 5.7 verbatim and changes only the network of § 6 : the pair { a , b } \{a,b\} { a , b } no longer shares one base-5 digit for every crossing edge of E ( a , b ) E(a,b) E ( a , b ) , but only the set of crossing edges of E ( a , b ) E(a,b) E ( a , b ) that carry a label other than N, rank-encoded among the subsets of the right size, together with the labels of those edges. A 2-factor uses exactly two of the deg ( v ) \deg(v) deg ( v ) edges at each vertex v v v , so this costs about 2 log deg ( v ) 2\log\deg(v) 2 log deg ( v ) bits per vertex rather than log 2 5 \log_2 5 log 2 5 bits per edge. The rank-encoding device is that of [A, Appendix D, Step 3]; we prove what we need from scratch. Fix G G G with n ≥ 3 n\geq3 n ≥ 3 and minimum degree at least 2 (so m ≥ n m\geq n m ≥ n and d ˉ ≥ 2 \bar d\geq2 d ˉ ≥ 2 ), a root r r r , a partition ϕ \phi ϕ and a crossing order, with the conventions of § 5 . Put n a : = ∣ V a ∣ n_a:=|V_a| n a := ∣ V a ∣ , n ˉ : = max a n a \bar n:=\max_a n_a n ˉ := max a n a , λ Δ : = log ( 2 e Δ ) \lambda_\Delta:=\log(2e\Delta) λ Δ := log ( 2 e Δ ) and λ d ˉ : = log ( 2 e d ˉ ) \lambda_{\bar d}:=\log(2e\bar d) λ d ˉ := log ( 2 e d ˉ ) ; both are at least log ( 4 e ) > 3.4 \log(4e)>3.4 log ( 4 e ) > 3.4 .
Profiles and the rank-encoded network
A profile is an integer vector ξ = ( ξ a b ) a < b \xi=(\xi_{ab})_{a<b} ξ = ( ξ ab ) a < b with 0 ≤ ξ a b ≤ m a b 0\leq\xi_{ab}\leq m_{ab} 0 ≤ ξ ab ≤ m ab ; put ξ b a : = ξ a b \xi_{ba}:=\xi_{ab} ξ ba := ξ ab , ξ a : = ∑ b ≠ a ξ a b \xi_a:=\sum_{b\neq a}\xi_{ab} ξ a := ∑ b = a ξ ab and ∣ ξ ∣ : = ∑ a < b ξ a b |\xi|:=\sum_{a<b}\xi_{ab} ∣ ξ ∣ := ∑ a < b ξ ab . The profile of a labelling η ∈ L m × \eta\in\mathcal{L}^{m\times} η ∈ L m × is ξ ( η ) a b : = # { k ∈ E ( a , b ) : η k ≠ N } \xi(\eta)_{ab}:=\#\{k\in E(a,b):\eta_k\neq\mathrm{N}\} ξ ( η ) ab := # { k ∈ E ( a , b ) : η k = N } . A profile is admissible if ξ a ≤ 2 n a \xi_a\leq2n_a ξ a ≤ 2 n a for every a a a . For 0 ≤ s ≤ t 0\leq s\leq t 0 ≤ s ≤ t , the colex rank { u 1 < ⋯ < u s } ↦ ∑ i = 1 s ( u i i ) \{u_1<\cdots<u_s\}\mapsto\sum_{i=1}^s\binom{u_i}{i} { u 1 < ⋯ < u s } ↦ ∑ i = 1 s ( i u i ) is a bijection from the s s s -subsets of { 0 , … , t − 1 } \{0,\ldots,t-1\} { 0 , … , t − 1 } onto { 0 , … , ( t s ) − 1 } \{0,\ldots,\binom{t}{s}-1\} { 0 , … , ( s t ) − 1 } , inverted greedily with at most t t t binomial comparisons; write cw ( t , s ) : = ⌈ log ( t s ) ⌉ \operatorname{cw}(t,s):=\lceil\log\binom{t}{s}\rceil cw ( t , s ) := ⌈ log ( s t ) ⌉ .
Definition 8.1 (The network N ξ \mathcal{N}_\xi N ξ on [ g ] [g] [ g ] ). Fix a profile ξ \xi ξ . A setting of node a a a is a pair z a = ( η ( a ) , y ( a ) ) z_a=(\eta^{(a)},y^{(a)}) z a = ( η ( a ) , y ( a ) ) with η ( a ) ∈ L ∂ ( a ) \eta^{(a)}\in\mathcal{L}^{\partial(a)} η ( a ) ∈ L ∂ ( a ) such that # { k ∈ E ( a , b ) : η k ( a ) ≠ N } = ξ a b \#\{k\in E(a,b):\eta^{(a)}_k\neq\mathrm{N}\}=\xi_{ab} # { k ∈ E ( a , b ) : η k ( a ) = N } = ξ ab for every b ≠ a b\neq a b = a , and y ( a ) ∈ { 0 , 1 } Q a y^{(a)}\in\{0,1\}^{Q_a} y ( a ) ∈ { 0 , 1 } Q a . It is encoded as the concatenation of
for each b ≠ a b\neq a b = a , in increasing order, the block block b ( z a ) \operatorname{block}_b(z_a) block b ( z a ) of width c a b ′ : = cw ( m a b , ξ a b ) + 2 ξ a b c'_{ab}:=\operatorname{cw}(m_{ab},\xi_{ab})+2\xi_{ab} c ab ′ := cw ( m ab , ξ ab ) + 2 ξ ab : if k 1 < ⋯ < k m a b k_1<\cdots<k_{m_{ab}} k 1 < ⋯ < k m ab enumerate the bundle of { a , b } \{a,b\} { a , b } in crossing order and T a b : = { i : η k i ( a ) ≠ N } T_{ab}:=\{i:\eta^{(a)}_{k_i}\neq\mathrm{N}\} T ab := { i : η k i ( a ) = N } , the block is the colex rank of T a b T_{ab} T ab in cw ( m a b , ξ a b ) \operatorname{cw}(m_{ab},\xi_{ab}) cw ( m ab , ξ ab ) bits, followed by the 2-bit codes of the labels η k i ( a ) ∈ { 0 , 1 , 2 , 3 } \eta^{(a)}_{k_i}\in\{0,1,2,3\} η k i ( a ) ∈ { 0 , 1 , 2 , 3 } , i ∈ T a b i\in T_{ab} i ∈ T ab increasing;
the bits y c d ( a ) y^{(a)}_{cd} y c d ( a ) , ( c , d ) ∈ Q a (c,d)\in Q_a ( c , d ) ∈ Q a , in lexicographic order.
S a S_a S a is the set of strings of length P a : = ∑ b ≠ a c a b ′ + ∣ Q a ∣ P_a:=\sum_{b\neq a}c'_{ab}+|Q_a| P a := ∑ b = a c ab ′ + ∣ Q a ∣ whose rank field in every block is < ( m a b ξ a b ) <\binom{m_{ab}}{\xi_{ab}} < ( ξ ab m ab ) . The functions W a = σ a χ a I a W_a=\sigma_a\chi_a I_a W a = σ a χ a I a and Ψ a , b \Psi_{a,b} Ψ a , b are those of Theorem 6.1, and c a , b : = c a b ′ + ( g − max ( a , b ) ) c_{a,b}:=c'_{ab}+(g-\max(a,b)) c a , b := c ab ′ + ( g − max ( a , b )) , with h a b h_{ab} h ab , h b a h_{ba} h ba and f a , b f_{a,b} f a , b , f b , a f_{b,a} f b , a as there, built from the new blocks.
Lemma 8.2. The encoding is a bijection from the settings of a a a onto S a S_a S a , and block b ( z a ) = block a ( z b ) \operatorname{block}_b(z_a)=\operatorname{block}_a(z_b) block b ( z a ) = block a ( z b ) if and only if η ( a ) \eta^{(a)} η ( a ) and η ( b ) \eta^{(b)} η ( b ) agree on the bundle of { a , b } \{a,b\} { a , b } . Hence Ψ a , b = [ h a b ( z a ) = h b a ( z b ) ] \Psi_{a,b}=[h_{ab}(z_a)=h_{ba}(z_b)] Ψ a , b = [ h ab ( z a ) = h ba ( z b )] , and ( f a , b , f b , a ) (f_{a,b},f_{b,a}) ( f a , b , f b , a ) factors Ψ a , b \Psi_{a,b} Ψ a , b through c a , b c_{a,b} c a , b bits.
Proof. Both ends list the bundle in the same order and use the same ξ a b \xi_{ab} ξ ab . The block determines T a b T_{ab} T ab and the labels on it, hence the restriction of η ( a ) \eta^{(a)} η ( a ) to the bundle (the other labels are N); conversely a restriction with exactly ξ a b \xi_{ab} ξ ab labels other than N gives exactly one block, and every rank below ( m a b ξ a b ) \binom{m_{ab}}{\xi_{ab}} ( ξ ab m ab ) is the rank of exactly one subset. The rest is the proof of Theorem 6.2. □ \square □
Theorem 8.3. ∑ ξ a d m i s s i b l e value ( N ξ ) = n ⋅ # H C ( G ) \sum_{\xi\ \mathrm{admissible}}\operatorname{value}(\mathcal{N}_\xi)=n\cdot\#\mathrm{HC}(G) ∑ ξ admissible value ( N ξ ) = n ⋅ # HC ( G ) , and value ( N ξ ) = 0 \operatorname{value}(\mathcal{N}_\xi)=0 value ( N ξ ) = 0 for every profile that is not admissible.
Proof. As in the proof of Theorem 6.3 , a nonzero term of value ( N ξ ) \operatorname{value}(\mathcal{N}_\xi) value ( N ξ ) comes from a global η ∈ L m × \eta\in\mathcal{L}^{m\times} η ∈ L m × with correct copies, and by Theorem 8.1 that η \eta η has ξ ( η ) = ξ \xi(\eta)=\xi ξ ( η ) = ξ ; conversely each such η \eta η gives exactly one z z z . So value ( N ξ ) = ∑ η : ξ ( η ) = ξ ∏ a σ a χ a ( η , π ( η ) ) \operatorname{value}(\mathcal{N}_\xi)=\sum_{\eta:\xi(\eta)=\xi}\prod_a\sigma_a\chi_a(\eta,\pi(\eta)) value ( N ξ ) = ∑ η : ξ ( η ) = ξ ∏ a σ a χ a ( η , π ( η )) . The profiles partition L m × \mathcal{L}^{m\times} L m × , so the sum over all profiles is n ⋅ # H C ( G ) n\cdot\#\mathrm{HC}(G) n ⋅ # HC ( G ) by Theorem 5.7 . If ξ a > 2 n a \xi_a>2n_a ξ a > 2 n a , then every η \eta η with ξ ( η ) = ξ \xi(\eta)=\xi ξ ( η ) = ξ has ∑ v ∈ V a deg η ( v ) = ξ a > 2 n a \sum_{v\in V_a}\deg_\eta(v)=\xi_a>2n_a ∑ v ∈ V a deg η ( v ) = ξ a > 2 n a , since each crossing edge at a a a has exactly one end in V a V_a V a ; so some v ∈ V a v\in V_a v ∈ V a has deg η ( v ) ≥ 3 \deg_\eta(v)\geq3 deg η ( v ) ≥ 3 , every indicator in I a ( η ) I_a(\eta) I a ( η ) vanishes, and the value is 0. □ \square □
Proposition 8.4 (Parameters). Let ξ \xi ξ be admissible. Then N ξ \mathcal{N}_\xi N ξ is a network in the sense of Theorem 2.2 with
P : = ⌈ 2 n ˉ λ Δ ⌉ + g + g 2 , B : = ⌈ 2 n ˉ λ Δ ⌉ + 1 , τ : = 2 2 n ˉ λ Δ n C 2 ( C 2 absolute ) , P:=\lceil2\bar n\lambda_\Delta\rceil+g+g^2,\qquad B:=\lceil2\bar n\lambda_\Delta\rceil+1,\qquad\tau:=2^{2\bar n\lambda_\Delta}nC_2\quad(C_2\ \text{absolute}), P := ⌈ 2 n ˉ λ Δ ⌉ + g + g 2 , B := ⌈ 2 n ˉ λ Δ ⌉ + 1 , τ := 2 2 n ˉ λ Δ n C 2 ( C 2 absolute ) ,
τ \tau τ counted after a polynomial-time preparation, and
U = 2 ∑ a < b c a b ′ + 2 ( g 3 ) ≤ 2 n log ( 2 e d ˉ ) + g 3 . U = 2\sum_{a<b}c'_{ab}+2\binom{g}{3}\le2n\log(2e\bar d)+g^3. U = 2 a < b ∑ c ab ′ + 2 ( 3 g ) ≤ 2 n log ( 2 e d ˉ ) + g 3 .
P P P and B B B do not depend on ξ \xi ξ .
Proof. We use ( N M ) ≤ ( e N / M ) M \binom{N}{M}\le(eN/M)^M ( M N ) ≤ ( e N / M ) M , Vandermonde’s inequality ∏ i ( N i M i ) ≤ ( ∑ N i ∑ M i ) \prod_i\binom{N_i}{M_i}\le\binom{\sum N_i}{\sum M_i} ∏ i ( M i N i ) ≤ ( ∑ M i ∑ N i ) , ∑ i [ x i ] ≤ ∑ i x i + # { i : x i > 0 } \sum_i[x_i]\le\sum_i x_i+\#\{i:x_i>0\} ∑ i [ x i ] ≤ ∑ i x i + # { i : x i > 0 } , and the fact that F N ( M ) : = M log ( e N / M ) + 2 M F_N(M):=M\log(eN/M)+2M F N ( M ) := M log ( e N / M ) + 2 M is nondecreasing on [ 0 , N ] [0,N] [ 0 , N ] (its derivative is log ( N / M ) + 2 \log(N/M)+2 log ( N / M ) + 2 ).
Per node. Let N a : = ∣ ∂ ( a ) ∣ ≤ Δ n a N_a:=|\partial(a)|\le\Delta n_a N a := ∣ ∂ ( a ) ∣ ≤ Δ n a . Admissibility gives ξ a ≤ min ( 2 n a , N a ) \xi_a\le\min(2n_a,N_a) ξ a ≤ min ( 2 n a , N a ) , so ∑ b ≠ a c a b ′ ≤ log ( N a ξ a ) + 2 ξ a + g − 1 ≤ F N a ( ξ a ) + g − 1 \sum_{b\ne a}c'_{ab}\le\log\binom{N_a}{\xi_a}+2\xi_a+g-1\le F_{N_a}(\xi_a)+g-1 ∑ b = a c ab ′ ≤ log ( ξ a N a ) + 2 ξ a + g − 1 ≤ F N a ( ξ a ) + g − 1 . If 2 n a ≤ N a 2n_a\le N_a 2 n a ≤ N a , then F N a ( ξ a ) ≤ F N a ( 2 n a ) ≤ 2 n a log ( e Δ / 2 ) + 4 n a = 2 n a λ Δ F_{N_a}(\xi_a)\le F_{N_a}(2n_a)\le2n_a\log(e\Delta/2)+4n_a=2n_a\lambda_\Delta F N a ( ξ a ) ≤ F N a ( 2 n a ) ≤ 2 n a log ( e Δ/2 ) + 4 n a = 2 n a λ Δ ; otherwise F N a ( ξ a ) ≤ ( log e + 2 ) N a < 2 n a log ( 4 e ) ≤ 2 n a λ Δ F_{N_a}(\xi_a)\le(\log e+2)N_a<2n_a\log(4e)\le2n_a\lambda_\Delta F N a ( ξ a ) ≤ ( log e + 2 ) N a < 2 n a log ( 4 e ) ≤ 2 n a λ Δ . With the copy bits counted as in Theorem 6.4, P a ≤ P P_a\le P P a ≤ P and ∑ b ≠ a c a , b ≤ 2 n a λ Δ + g − 1 + g 2 / 2 ≤ P \sum_{b\ne a}c_{a,b}\le2n_a\lambda_\Delta+g-1+g^2/2\le P ∑ b = a c a , b ≤ 2 n a λ Δ + g − 1 + g 2 /2 ≤ P .
Total. U = 2 ∑ a < b c a b ′ + 2 ( g 3 ) U=2\sum_{a<b}c'_{ab}+2\binom{g}{3} U = 2 ∑ a < b c ab ′ + 2 ( 3 g ) as in Theorem 6.4, and ∑ a < b c a b ′ ≤ log ( m × ∣ ξ ∣ ) + 2 ∣ ξ ∣ + ( g 2 ) \sum_{a<b}c'_{ab}\le\log\binom{m_\times}{|\xi|}+2|\xi|+\binom{g}{2} ∑ a < b c ab ′ ≤ log ( ∣ ξ ∣ m × ) + 2∣ ξ ∣ + ( 2 g ) . Admissibility gives 2 ∣ ξ ∣ = ∑ a ξ a ≤ 2 n 2|\xi|=\sum_a\xi_a\le2n 2∣ ξ ∣ = ∑ a ξ a ≤ 2 n , and ∣ ξ ∣ ≤ m × ≤ m |\xi|\le m_\times\le m ∣ ξ ∣ ≤ m × ≤ m . If n ≤ m × n\le m_\times n ≤ m × , monotonicity gives log ( m × ∣ ξ ∣ ) + 2 ∣ ξ ∣ ≤ F m × ( n ) ≤ n log ( e m / n ) + 2 n \log\binom{m_\times}{|\xi|}+2|\xi|\le F_{m_\times}(n)\le n\log(em/n)+2n log ( ∣ ξ ∣ m × ) + 2∣ ξ ∣ ≤ F m × ( n ) ≤ n log ( e m / n ) + 2 n ; if m × < n m_\times<n m × < n , it is at most ( log e + 2 ) m × < n log ( 4 e ) ≤ n log ( 4 e m / n ) (\log e+2)m_\times<n\log(4e)\le n\log(4em/n) ( log e + 2 ) m × < n log ( 4 e ) ≤ n log ( 4 e m / n ) , as m ≥ n m\ge n m ≥ n . Since n log ( 4 e m / n ) = n log ( 2 e d ˉ ) n\log(4em/n)=n\log(2e\bar d) n log ( 4 e m / n ) = n log ( 2 e d ˉ ) , we get U ≤ 2 n log ( 2 e d ˉ ) + g 2 + 2 ( g 3 ) ≤ 2 n log ( 2 e d ˉ ) + g 3 U\le2n\log(2e\bar d)+g^2+2\binom{g}{3}\le2n\log(2e\bar d)+g^3 U ≤ 2 n log ( 2 e d ˉ ) + g 2 + 2 ( 3 g ) ≤ 2 n log ( 2 e d ˉ ) + g 3 .
Condition (ii). Ψ \Psi Ψ and f f f are 0 / 1 0/1 0/1 -valued and ∣ σ a χ a ∣ = 1 |\sigma_a\chi_a|=1 ∣ σ a χ a ∣ = 1 . In I a ( η ) I_a(\eta) I a ( η ) only those x x x contribute with deg x ( v ) = 2 − deg η ( v ) \deg_x(v)=2-\deg_\eta(v) deg x ( v ) = 2 − deg η ( v ) for all v ∈ V a v\in V_a v ∈ V a . The map x ↦ ( x ∩ δ ( v ) ) v ∈ V a x\mapsto(x\cap\delta(v))_{v\in V_a} x ↦ ( x ∩ δ ( v ) ) v ∈ V a is injective, so there are at most ∏ v ∈ V a ( 1 + deg v + ( deg v 2 ) ) ≤ Δ 2 n a \prod_{v\in V_a}(1+\deg v+\binom{\deg v}{2})\le\Delta^{2n_a} ∏ v ∈ V a ( 1 + deg v + ( 2 d e g v ) ) ≤ Δ 2 n a of them (as 1 + d + ( d 2 ) ≤ d 2 1+d+\binom d2\le d^2 1 + d + ( 2 d ) ≤ d 2 for d ≥ 2 d\ge2 d ≥ 2 ). For each, ∣ x ∣ ≤ n a |x|\le n_a ∣ x ∣ ≤ n a , and the top coefficient is at most the ℓ 1 \ell^1 ℓ 1 -norm of F a ( x ) R a ( η ) F_a(x)R_a(\eta) F a ( x ) R a ( η ) , which is at most 5 ∣ x ∣ 2 ξ a ≤ 20 n a 5^{|x|}2^{\xi_a}\le20^{n_a} 5 ∣ x ∣ 2 ξ a ≤ 2 0 n a : the ℓ 1 \ell^1 ℓ 1 -norm is submultiplicative (structure constants 0 , ± 1 0,\pm1 0 , ± 1 ), 1 + q e 1+q_e 1 + q e has norm at most 5 5 5 , and a piece has norm at most 2 2 2 . Hence log ∣ W a ∣ ≤ 2 n a ( log Δ + 2.17 ) < B \log|W_a|\le2n_a(\log\Delta+2.17)<B log ∣ W a ∣ ≤ 2 n a ( log Δ + 2.17 ) < B .
Condition (iii). The preparation stores the graph, ϕ \phi ϕ , the order, the bundles, the binomials ( m a b ) (m_{ab}) ( m ab ) and the layout. Membership, encoding, decoding (one unranking per block), h a b h_{ab} h ab , Ψ \Psi Ψ and f f f take poly ( n ) \operatorname{poly}(n) poly ( n ) operations, σ a \sigma_a σ a and χ a \chi_a χ a as in Theorem 6.4. For I a I_a I a the procedure enumerates the tuples ( x v ) v ∈ V a (x_v)_{v\in V_a} ( x v ) v ∈ V a , x v x_v x v a subset of size 2 − deg η ( v ) 2-\deg_\eta(v) 2 − deg η ( v ) of the internal edges at v v v , keeps the consistent ones (each chosen edge chosen at both ends), and for each computes the top coefficient by choosing one signed monomial from each factor, multiplying (sign by inversion count) and accumulating when the product is ± ω a \pm\omega_a ± ω a . This takes at most Δ 2 n a ⋅ 20 n a ⋅ poly ( n ) ≤ 2 2 n a λ Δ n C 2 \Delta^{2n_a}\cdot20^{n_a}\cdot\operatorname{poly}(n)\le2^{2n_a\lambda_\Delta}n^{C_2} Δ 2 n a ⋅ 2 0 n a ⋅ poly ( n ) ≤ 2 2 n a λ Δ n C 2 operations, with a state of poly ( n ) \operatorname{poly}(n) poly ( n ) bits. □
There are at most ∏ a < b ( min ( m a b , 2 n ˉ ) + 1 ) ≤ ( 2 n ˉ + 1 ) ( g 2 ) \prod_{a<b}(\min(m_{ab},2\bar n)+1)\le(2\bar n+1)^{\binom{g}{2}} ∏ a < b ( min ( m ab , 2 n ˉ ) + 1 ) ≤ ( 2 n ˉ + 1 ) ( 2 g ) admissible profiles, enumerated and tested in polynomial time each.
The algorithm and the proof of Theorem 1.3
Step 0. If n ≤ 2 n\le2 n ≤ 2 , or some vertex has degree less than 2 2 2 , output 0 0 0 .
Step 1. Choose the level ℓ \ell ℓ , K : = K ℓ K:=K_\ell K := K ℓ and q : = 3 K 8 q:=3K^8 q := 3 K 8 as in § 7.4 .
Step 2. List V V V as v 1 , … , v n v_1,\ldots,v_n v 1 , … , v n and put ϕ ( v t ) : = [ t q / n ] \phi(v_t):=[tq/n] ϕ ( v t ) := [ tq / n ] , so that n a ≤ ⌈ n / q ⌉ n_a\le\lceil n/q\rceil n a ≤ ⌈ n / q ⌉ (each blob is the set of integers in a half-open interval of length n / q n/q n / q ). Take any root and any crossing order, and do the preparation of Theorem 8.4 .
Step 3. For each admissible profile ξ \xi ξ , run the procedure of Theorem 2.4 on N ξ \mathcal{N}_\xi N ξ with the algorithm of Theorem 2.5 (b) at level ℓ \ell ℓ as the clique algorithm.
Step 4. Output the sum of the results divided by n n n .
There is no degree reduction and no degree-balanced partition. Correctness follows from Theorems 2.4, 2.5 and 8.3; the imported hypotheses are checked as in § 7 , with Theorem 8.4 in place of Theorem 6.4, and Theorem 2.4 is applied to each N ξ \mathcal{N}_\xi N ξ separately (only U U U depends on ξ \xi ξ ).
Proof of Theorem 1.3 . For n < n 0 n < n_0 n < n 0 use any exact method. For n ≥ n 0 n \ge n_0 n ≥ n 0 , as in § 7.4 , n 1 / 300 < K ≤ n 1 / 30 n^{1/300} < K \le n^{1/30} n 1/300 < K ≤ n 1/30 , g ∈ [ 3 n 8 / 300 , 3 n 8 / 30 ] g \in[3n^{8/300},3n^{8/30}] g ∈ [ 3 n 8/300 , 3 n 8/30 ] and e : = e ℓ ≤ c e / log n e := e_\ell\le c_e/\sqrt{\log n} e := e ℓ ≤ c e / log n . By Step 2, n ˉ ≤ n / g + 1 \bar{n} \le n/g + 1 n ˉ ≤ n / g + 1 , and λ Δ ≤ log ( 2 e n ) ≤ 2 log n \lambda_\Delta\le\log(2en) \le2\log n λ Δ ≤ log ( 2 e n ) ≤ 2 log n because Δ < n \Delta< n Δ < n . By Theorem 8.4 ,
U ≤ 2 n λ d ˉ + g 3 , g P ≤ 2 ( n + g ) λ Δ + 3 g 3 , log τ ≤ 2 n ˉ λ Δ + C 2 log n , U \le2n\lambda_{\bar{d}}+g^3,\qquad gP \le2(n+g)\lambda_\Delta+3g^3,\qquad\log\tau\le2\bar{n}\lambda_\Delta+C_2\log n, U ≤ 2 n λ d ˉ + g 3 , g P ≤ 2 ( n + g ) λ Δ + 3 g 3 , log τ ≤ 2 n ˉ λ Δ + C 2 log n ,
and L ≤ U + g P + 1 L \le U+gP+1 L ≤ U + g P + 1 , B ′ ≤ 2 g P + 1 + g 2 B B' \le2gP+1+g^2B B ′ ≤ 2 g P + 1 + g 2 B are poly ( n ) \operatorname{poly}(n) poly ( n ) . The time for one profile is 2 X 2^X 2 X with X X X bounded by (6) , whose terms satisfy
e U ≤ c e ( 2 n λ d ˉ + 27 n 0.8 ) / log n , eU \le c_e\left(2n\lambda_{\bar{d}}+27n^{0.8}\right)/\sqrt{\log n}, e U ≤ c e ( 2 n λ d ˉ + 27 n 0.8 ) / log n ,
( e + 2 ) g P / K ≤ 3 ( 4 ( n + g ) log n + 3 g 3 ) / n 1 / 300 = O ( n 1 − 1 / 300 log n ) , (e+2)gP/K \le3(4(n+g)\log n+3g^3)/n^{1/300}=O(n^{1-1/300}\log n), ( e + 2 ) g P / K ≤ 3 ( 4 ( n + g ) log n + 3 g 3 ) / n 1/300 = O ( n 1 − 1/300 log n ) ,
log τ ≤ 4 ( n / g + 1 ) log n + C 2 log n = O ( n 1 − 8 / 300 log n ) , \log\tau\le4(n/g+1)\log n+C_2\log n=O(n^{1-8/300}\log n), log τ ≤ 4 ( n / g + 1 ) log n + C 2 log n = O ( n 1 − 8/300 log n ) ,
e K 2 + C 0 K 2 log ( K ( L + B ′ ) ) = O ( n 1 / 15 log n ) , g log K = O ( n 8 / 30 log n ) , eK^2+C_0K^2\log(K(L+B'))=O(n^{1/15}\log n),\qquad g\log K=O(n^{8/30}\log n), e K 2 + C 0 K 2 log ( K ( L + B ′ )) = O ( n 1/15 log n ) , g log K = O ( n 8/30 log n ) ,
and C 1 log ( g ( P + B ) ) = O ( log n ) C_1\log(g(P+B))=O(\log n) C 1 log ( g ( P + B )) = O ( log n ) . The number of admissible profiles is at most ( 2 n / g + 3 ) g 2 / 2 = 2 O ( n 16 / 30 log n ) (2n/g+3)^{g^2/2}=2^{O(n^{16/30}\log n)} ( 2 n / g + 3 ) g 2 /2 = 2 O ( n 16/30 l o g n ) . Every term except the first is o ( n / log n ) o(n/\sqrt{\log n}) o ( n / log n ) for every Δ ≤ n \Delta\le n Δ ≤ n , and λ d ˉ > 3.4 \lambda_{\bar{d}}>3.4 λ d ˉ > 3.4 , so the total time is 2 C ♯ n λ d ˉ / log n 2^{C^\sharp n\lambda_{\bar{d}}/\sqrt{\log n}} 2 C ♯ n λ d ˉ / l o g n for an absolute C ♯ C^\sharp C ♯ . Finally d ˉ ≤ Δ \bar{d}\le\Delta d ˉ ≤ Δ .
Remark 8.5.
(a) The degree enters in two ways. The total U U U depends only on d ˉ \bar{d} d ˉ , for every partition. The per-node parameters depend on Δ \Delta Δ , but only logarithmically, so a blob of ⌈ n / g ⌉ \lceil n/g\rceil ⌈ n / g ⌉ vertices of degree n − 1 n-1 n − 1 still has only O ( ( n / g ) log n ) O((n/g)\log n) O (( n / g ) log n ) bits, and the term 2 g P / K 2gP/K 2 g P / K of (2) , which forced the degree reduction of § 7 (Theorem 6.5), is o ( n / log n ) o(n/\sqrt{\log n}) o ( n / log n ) for every Δ \Delta Δ .
(b) The leading term is e ℓ U ≈ 2 e ℓ n log ( 2 e d ˉ ) e_\ell U \approx2e_\ell n\log(2e\bar{d}) e ℓ U ≈ 2 e ℓ n log ( 2 e d ˉ ) , against e ℓ ⋅ 2 log 2 5 ⋅ m ≈ 2.32 e ℓ d ˉ n e_\ell\cdot2\log_2 5\cdot m\approx2.32e_\ell\bar{d}n e ℓ ⋅ 2 log 2 5 ⋅ m ≈ 2.32 e ℓ d ˉ n in Theorem 1.2 ; the new term is the smaller one for d ˉ ≥ 4 \bar{d}\ge4 d ˉ ≥ 4 . Better pieces in [A] transfer verbatim.
(c) The self-reductions of Theorem 1.4 delete edges, which does not increase d ˉ \bar{d} d ˉ ; for paths, the added vertex raises d ˉ \bar{d} d ˉ by at most 2. So decision, search and paths follow within the bound of Theorem 1.3 times n 2 + 1 n^2+1 n 2 + 1 ; this extension is not machine-checked and is not claimed.
(d) With a fixed level, as in § 7.3 , the same computation gives O ( 2 δ n ) O(2^{\delta n}) O ( 2 δ n ) on graphs of maximum degree at most Δ 0 \Delta_0 Δ 0 as soon as e ≤ δ / ( 8 log ( 2 e Δ 0 ) ) e\le\delta/(8\log(2e\Delta_0)) e ≤ δ / ( 8 log ( 2 e Δ 0 )) and K ≥ 24 log ( 2 e Δ 0 ) / δ K\ge24\log(2e\Delta_0)/\delta K ≥ 24 log ( 2 e Δ 0 ) / δ , which is weaker than the requirement e ≤ δ / ( 40 D ) e\le\delta/(40D) e ≤ δ / ( 40 D ) of Theorem 1.1 when D D D is large. The average-degree form does not follow this way, because g P / K ≈ 2 n λ Δ / K gP/K\approx2n\lambda_\Delta/K g P / K ≈ 2 n λ Δ / K is not O ( δ n ) O(\delta n) O ( δ n ) when Δ \Delta Δ is unbounded. We do not use this.
Decision, search and paths
Proof of Theorem 1.4 . Decision. G G G is Hamiltonian iff # HC ( G ) > 0 \#\operatorname{HC}(G)>0 # HC ( G ) > 0 ; one call of Theorem 1.1 or Theorem 1.2 suffices.
Search, by self-reduction. Let H : = G H:=G H := G . For each edge e e e of G G G in turn, if # HC ( H − e ) > 0 \#\operatorname{HC}(H-e)>0 # HC ( H − e ) > 0 , set H : = H − e H:=H-e H := H − e . The invariant is # HC ( H ) > 0 \#\operatorname{HC}(H)>0 # HC ( H ) > 0 . Let C C C be a Hamiltonian cycle of the final H H H . Every intermediate H H H contains the final one, hence C C C . Suppose some edge f f f of the final H H H were not in C C C . When f f f was examined, H − f H-f H − f contained C C C , so f f f would have been deleted. Hence the final H H H equals C C C . The machine runs over all n 2 n^2 n 2 vertex pairs (deleting a non-edge changes nothing), so there are n 2 + 1 n^2+1 n 2 + 1 calls, each on a graph with n n n vertices and at most m m m edges; the polynomial factor is absorbed into the constant.
Hamiltonian paths. Let G + G^+ G + be G G G plus a new vertex w w w adjacent to all of V V V . For n > 2 n>2 n > 2 , the Hamiltonian paths of G G G correspond bijectively to the Hamiltonian cycles of G + G^+ G + , so # HP ( G ) = # HC ( G + ) \#\operatorname{HP}(G)=\#\operatorname{HC}(G^+) # HP ( G ) = # HC ( G + ) . The graph G + G^+ G + has n + 1 n+1 n + 1 vertices and m + n ≤ ( D + 1 ) ( n + 1 ) m+n\le(D+1)(n+1) m + n ≤ ( D + 1 ) ( n + 1 ) edges; the apex w w w has degree n n n , which Theorem 1.2 handles directly; for the fixed-density form the Lean proof applies Theorem 1.1 to G + G^+ G + with D + 1 D+1 D + 1 in place of D D D . Search works as above. (For s s s -t t t paths one would join a new vertex to s s s and t t t only; that variant is not machine-checked and not claimed.)
Results that rest only on the top-level theorems
This section concerns Theorems 1.6 and 1.7 . Unlike Theorem 1.1 , they use the labs’ #SAT theorems only as black boxes, through CNF encodings.
The Cut&Count identity
Let r ∈ V r \in V r ∈ V . The CNF cut ( G , r ) \operatorname{cut}(G,r) cut ( G , r ) has variables x e x_e x e (e ∈ E e \in E e ∈ E ) and c v c_v c v (v ∈ V v \in V v ∈ V ) and imposes: at each vertex v v v , exactly two of the x e x_e x e with e ∋ v e \ni v e ∋ v are true; for each edge u w uw u w , x u w → ( c u ↔ c w ) x_{uw} \to(c_u \leftrightarrow c_w) x u w → ( c u ↔ c w ) ; and c r = f a l s e c_r = \mathrm{false} c r = false . Each local constraint becomes clauses by forbidding its violating local patterns.
Lemma 10.1 (Cut&Count [20 ] ). The number of models of cut ( G , r ) \operatorname{cut}(G,r) cut ( G , r ) is ∑ X 2 cc ( X ) − 1 \sum_X 2^{\operatorname{cc}(X)-1} ∑ X 2 cc ( X ) − 1 , the sum over the 2-factors X X X of G G G , where cc ( X ) \operatorname{cc}(X) cc ( X ) is the number of components of ( V , X ) (V,X) ( V , X ) . In particular it is congruent to # H C ( G ) \#\mathrm{HC}(G) # HC ( G ) modulo 2.
Proof. A model is a pair ( X , c ) (X,c) ( X , c ) where X X X is a 2-factor and c : V → { 0 , 1 } c \colon V \to\{0,1\} c : V → { 0 , 1 } is constant on the components of ( V , X ) (V,X) ( V , X ) with c ( r ) = 0 c(r)=0 c ( r ) = 0 . There are 2 cc ( X ) − 1 2^{\operatorname{cc}(X)-1} 2 cc ( X ) − 1 such c c c , which is odd iff X X X is connected, i.e. a Hamiltonian cycle. □
For unbounded degree, the vertex constraint is replaced by a sequential counter (two bits per prefix of the incident edges), giving a 5-CNF on 5 m + 3 n 5m+3n 5 m + 3 n variables with the same model count. The Lean development proves these identities (count_cutCNF, count_cutCNF_mod_two, count_bigCNF).
Proof of Theorem 1.6 . Feed the 5-CNF to the respective #SAT algorithm. With [A], the formula has N = 5 m + 3 n N=5m+3n N = 5 m + 3 n variables and at most 85 m + 11 n + 2 85m+11n+2 85 m + 11 n + 2 clauses (after padding so that every variable occurs), and the Main Theorem gives a count within 2 C ⋅ 5 m ′ / log m ′ 2^{C\cdot5m'/\sqrt{\log m'}} 2 C ⋅ 5 m ′ / l o g m ′ steps, where N ≤ m ′ ≤ 85 m + 11 n + 2 N \le m' \le85m+11n+2 N ≤ m ′ ≤ 85 m + 11 n + 2 is the number of clauses. This is the Lean theorem hamParity_allGraphs_anthropic, whose hypothesis MainResults.MainTheorem is discharged by [A]’s Lean proof (§ 12 ). With [35 ] , the Lean theorem hamParity_allGraphs gives one machine with time C ( L + 1 ) d 2 A ρ ( 5 m + 3 n ) C(L+1)^{d2^{A\rho(5m+3n)}} C ( L + 1 ) d 2 A ρ ( 5 m + 3 n ) and space polynomial in the encoding length L L L ; its hypothesis exact_count_and_sat is discharged by OpenAI’s Lean proof. The directed version uses one selected out-arc and in-arc per vertex (dirHamParity_subexponential). Building the CNF from G G G takes polynomial time; that step is not formalised as a machine. □
Why colourings do not give exact counts
Cut&Count extracts [ X c o n n e c t e d ] [X\ \mathrm{connected}] [ X connected ] from a sum over consistent colourings with local weights. The following barrier shows that such filters cannot be exact with few colours; this is what motivates the Grassmann construction.
Proposition 10.2 (machine-checked: colouring\_barrier\_graph). Work over a field of characteristic 0. Suppose that weights z 0 , … , z q − 1 z_0,\ldots,z_{q-1} z 0 , … , z q − 1 on q q q colours, with the root coloured 0 and every component C ∌ r C \not\ni r C ∋ r of a 2-factor contributing h ( C ) = ∑ j z j ∣ C ∣ h(C)=\sum_j z_j^{\lvert C\rvert} h ( C ) = ∑ j z j ∣ C ∣ , give a sum equal to # H C ( G ) \#\mathrm{HC}(G) # HC ( G ) up to a nonzero factor, for every graph G G G on n n n vertices. Then q ≥ n − 4 q \ge n-4 q ≥ n − 4 .
Proof. We have z 0 ≠ 0 z_0 \ne0 z 0 = 0 , since otherwise Hamiltonian cycles contribute 0; normalise z 0 = 1 z_0=1 z 0 = 1 . The root’s cycle has at least 3 vertices, so a non-root cycle has length k ∈ { 3 , … , n − 3 } k \in\{3,\ldots,n-3\} k ∈ { 3 , … , n − 3 } , and every such length occurs: in the disjoint union of C n − k − 3 ▹ r C_{n-k-3} \mathbin{\triangleright} r C n − k − 3 ▹ r and C k C_k C k , the only 2-factor is disconnected. So the filter needs ∑ j = 0 q − 1 z j k = 0 \sum_{j=0}^{q-1} z_j^k=0 ∑ j = 0 q − 1 z j k = 0 for k = 3 , … , n − 3 k=3,\ldots,n-3 k = 3 , … , n − 3 . Drop the z j z_j z j equal to 0, and group the rest into distinct nonzero values λ i \lambda_i λ i with positive integer multiplicities. This gives an exponential polynomial with at most q q q distinct nonzero bases and positive coefficients that vanishes at n − 5 n-5 n − 5 consecutive integers. If n − 5 ≥ q n-5 \ge q n − 5 ≥ q , the Vandermonde matrix on those integers forces every coefficient to 0, a contradiction because λ = 1 \lambda=1 λ = 1 has multiplicity at least 1. □
Conversely q = n − 2 q=n-2 q = n − 2 colours with z j = ζ j z_j=\zeta^j z j = ζ j , ζ \zeta ζ a primitive ( n − 2 ) (n-2) ( n − 2 ) -th root of unity, suffice. So exact counting by colourings needs about log n \log n log n bits per vertex, and the exponent becomes worse than brute force; the positive multiplicities vanish only in small characteristic, which is how the modulo-2 filter escapes. The proposition does not cover vertex-dependent weights.
Randomized decision
Proof of Theorem 1.7 (a). Add to cut ( G , r ) \operatorname{cut}(G,r) cut ( G , r ) an arbitrary CNF H \mathcal{H} H on the edge variables. Then the model count is congruent modulo 2 2 2 to # { X ∈ HC ( G ) : H ( 1 X ) } \#\{X \in\operatorname{HC}(G) : \mathcal{H}(\mathbf{1}_X)\} # { X ∈ HC ( G ) : H ( 1 X )} (count_cutCNFWith_mod_two); it is even if G G G has no Hamiltonian cycle and odd if exactly one Hamiltonian cycle satisfies H \mathcal{H} H . Take H \mathcal{H} H to be a random sparse hash in the sense of Calabro, Impagliazzo, Kabanets and Paturi [13 ] . Their isolation lemma [13 Lemma 3] is stated for solution sets of k k k -CNFs, but its proof uses only that the set is a set; the Lean development re-proves it for arbitrary finite S ⊆ { 0 , 1 } N S \subseteq\{0,1\}^{N} S ⊆ { 0 , 1 } N as a counting statement (isolation_count), together with the entropy estimate needed to make the isolating fraction at least exp ( − δ N ) \exp(-\delta N) exp ( − δ N ) for every δ > 0 \delta> 0 δ > 0 (isolation_fraction). With S = HC ( G ) S = \operatorname{HC}(G) S = HC ( G ) and N = ∣ E ∣ ≤ Δ n / 2 N = |E| \leq\Delta n/2 N = ∣ E ∣ ≤ Δ n /2 this gives soundness (decision_sound), the success fraction (hamDecision_fraction) and one machine for all hashes (hamDecision_subexponential). Repeating t exp ( δ ∣ E ∣ ) t\exp(\delta|E|) t exp ( δ ∣ E ∣ ) independent trials for each of polynomially many parameter choices gives error at most e − t e^{-t} e − t ; this outer loop is the only part not modelled in Lean. □
Remark 10.3 (The superseded part (b); not claimed). Let P G ( w ) = ∑ H ∈ HC ( G ) ∏ e ∈ H w e P_G(w) = \sum_{H\in\operatorname{HC}(G)} \prod_{e\in H} w_e P G ( w ) = ∑ H ∈ HC ( G ) ∏ e ∈ H w e . It is multilinear with 0 / 1 0/1 0/1 coefficients, so as a function on F p E \mathbb{F}_p^E F p E it is nonzero iff G G G is Hamiltonian. By the Alon–Füredi theorem [1 ] , a polynomial of degree d d d that does not vanish on A 1 × ⋯ × A N A_1 \times\cdots\times A_N A 1 × ⋯ × A N is nonzero on at least min { ∏ y i : 1 ≤ y i ≤ ∣ A i ∣ , ∑ y i ≥ ∑ ∣ A i ∣ − d } \min\{\prod y_i : 1 \leq y_i \leq|A_i|,\ \sum y_i \geq\sum|A_i| - d\} min { ∏ y i : 1 ≤ y i ≤ ∣ A i ∣ , ∑ y i ≥ ∑ ∣ A i ∣ − d } points; with A i = F p A_i = \mathbb{F}_p A i = F p and d = n d = n d = n , a uniform w w w gives P G ( w ) ≠ 0 P_G(w) \neq0 P G ( w ) = 0 with probability at least p − n / ( p − 1 ) − 1 p^{-n/(p-1)-1} p − n / ( p − 1 ) − 1 . The value P G ( w ) m o d p P_G(w) \bmod p P G ( w ) mod p is the model count, modulo p p p , of a CNF with p p p colours per vertex (⌈ log p ⌉ \lceil\log p\rceil ⌈ log p ⌉ bits with a comparator), the root coloured 0 0 0 , bitwise constraints x e → ( c u = c v ) x_e \to(c_u = c_v) x e → ( c u = c v ) , the vertex constraint “exactly two”, and weight bits z e z_e z e with x e = 0 ⇒ z e = 0 x_e = 0 \Rightarrow z_e = 0 x e = 0 ⇒ z e = 0 and x e = 1 ⇒ z e < w e x_e = 1 \Rightarrow z_e < w_e x e = 1 ⇒ z e < w e ; its count is ∑ X p cc ( X ) − 1 ∏ e ∈ X w e ≡ P G ( w ) ( m o d p ) \sum_X p^{\operatorname{cc}(X)-1}\prod_{e\in X} w_e \equiv P_G(w) \pmod p ∑ X p cc ( X ) − 1 ∏ e ∈ X w e ≡ P G ( w ) ( mod p ) . It has O ( ∣ E ∣ log p ) O(|E|\log p) O ( ∣ E ∣ log p ) clauses of width O ( log p ) O(\log p) O ( log p ) . [A]’s Main Theorem, which is uniform in k k k , gives time 2 O ( ∣ E ∣ log 2 p / log ∣ E ∣ ) 2^{O(|E|\log^2 p/\sqrt{\log|E|})} 2 O ( ∣ E ∣ l o g 2 p / l o g ∣ E ∣ ) per test. Taking a prime p ≈ log n p \approx\sqrt{\log n} p ≈ log n and p n / ( p − 1 ) + 1 ⋅ t p^{n/(p-1)+1}\cdot t p n / ( p − 1 ) + 1 ⋅ t independent tests gives one-sided error e − t e^{-t} e − t in total time 2 O D ( n ( log log n ) 2 / log n ) 2^{O_D(n(\log\log n)^2/\sqrt{\log n})} 2 O D ( n ( l o g l o g n ) 2 / l o g n ) . This argument is not machine-checked (the Alon–Füredi theorem is, as far as we know, not in Mathlib) and is recorded only for the history of the project.
Extensions (sketched)
This section is not at the level of rigour of the rest of the paper. The identities below were checked exactly by brute force on small instances, and the blob networks were evaluated on random partitions; the algorithmic consequences are sketched, and all of them are conditional on ( H A ) (\mathrm{H}_A) ( H A ) applied to general networks, exactly as for Theorem 1.1 .
The template
All problems below fit one template:
Z = ∑ s , ξ ∏ v C v ( s v , ξ ∣ δ ( v ) ) ⋅ [ Ω ] ( ∏ v M v ( s v ) ∏ e = u v F e ( s u , s v , ξ e ) ) (7) Z = \sum_{s,\xi} \prod_v C_v(s_v,\xi|_{\delta(v)}) \cdot[\Omega]\left(\prod_v M_v(s_v)\prod_{e=uv}F_e(s_u,s_v,\xi_e)\right) \tag*{(7)} Z = s , ξ ∑ v ∏ C v ( s v , ξ ∣ δ ( v ) ) ⋅ [ Ω ] ( v ∏ M v ( s v ) e = uv ∏ F e ( s u , s v , ξ e ) ) (7)
where s v s_v s v is a vertex state from a constant-size alphabet, ξ e \xi_e ξ e an edge state (δ ( v ) \delta(v) δ ( v ) is the set of edges at v v v ), C v C_v C v an arbitrary local integer table, M v M_v M v an even element in the generators of v v v (for example the mass term 1 + w ψ ˉ v ψ v 1+w\bar{\psi}_v\psi_v 1 + w ψ ˉ v ψ v , or ψ ˉ v ψ v \bar{\psi}_v\psi_v ψ ˉ v ψ v , which deletes v v v ), and F e F_e F e an even element in the generators of the ends of e e e , possibly involving pairwise scalars such as z w e z^{w_e} z w e . A root has no generators. On a blob partition, each crossing edge is split by an exact rank factorisation of its crossing matrix for each parity, a label being a term of this factorisation; the edge costs log 2 ( # labels ) \log_2(\#\text{labels}) log 2 ( # labels ) bits. Because each F e F_e F e is even, both pieces of a term have the same parity, and the sign rule of § 5 applies unchanged, at a cost of O ( g 3 ) O(g^3) O ( g 3 ) parity bits. Global counting constraints are handled by generating variables, folded into one integer by Kronecker substitution; this changes only B B B , which stays polynomial. Several connectivity predicates can be imposed at once by giving each its own independent Grassmann field; the top coefficient then factors over the fields (sharing one field would compute det ( L X 1 + L X 2 ) \det(LX_1+LX_2) det ( L X 1 + L X 2 ) instead).
Machine-checked rows. For directed Hamiltonian cycles and for ATSP the statement below is proved in Lean, without the degree hypothesis and also in rate form for #DHC, by splitting every vertex into an in-, a middle and an out-copy and applying Theorems 1.1 , 1.2 and 1.5 to the resulting undirected graph (theoremDHC, theoremDHC_rate, theoremATSP, theoremATSP_decode; standard axioms only). The directed identity of the table is formalised as well (card_dirHamCycles_eq_sum, dblob_factorisation_w). For all other rows the proposition is a sketch and is not claimed.
Proposition 11.1 (Sketch; not claimed except for the machine-checked rows). Assume (HA), and let P \mathcal{P} P be one of the problems of Table 3 , on graphs with ∣ E ∣ ≤ D n |E|\le Dn ∣ E ∣ ≤ D n and either bounded maximum degree or the hub-handling of Theorem 11.2. Then for every δ > 0 \delta>0 δ > 0 the quantity stated in the table (exact count, optimum, or κ \kappa κ -weighted count) can be computed deterministically in time 2 δ n 2^{\delta n} 2 δ n .
Table 3. Problems fitting the template (7) . All identities were checked exactly on small instances (brute force = determinant identity = blob network on random partitions with 2–4 blobs). “Labels” is the number of labels per crossing edge.
Proof sketch. The identity in the table is an instance of (7) ; the blob network is built as in § 6 , with U ≈ 2 log 2 ( # labels ) ⋅ ∣ E ∣ + O ( g 3 ) U\approx2\log_2(\#\text{labels})\cdot|E|+O(g^3) U ≈ 2 log 2 ( # labels ) ⋅ ∣ E ∣ + O ( g 3 ) and P ≈ U / g + g 2 P\approx U/g+g^2 P ≈ U / g + g 2 , and the bookkeeping of § 7 applies verbatim. The identities have been checked numerically; the uniform statements of the bit bounds, and the hub-handling, have not been written out in full. □
Remark 11.2 (Hubs). A vertex of degree Θ ( n ) \Theta(n) Θ ( n ) breaks the per-node bound P P P . For degree-2 problems (cycles, paths, cycle covers) one can branch as in Theorem 7.1, or compress the hub’s realisable labellings into O ( log d ) O(\log d) O ( log d ) bits per pair. For tree and forest problems one can split the hub into a path of copies joined by forced edges (factor q e q_e q e instead of 1 + q e 1+q_e 1 + q e ), which preserves the counts of subtrees and induced forests. A root vertex costs nothing, because it has no generators. These devices were checked on small instances only.
The Tutte polynomial on the line y = 1 y=1 y = 1
On the line y = 1 y=1 y = 1 , the Tutte polynomial is T G ( x , 1 ) = ∑ F ( x − 1 ) r ( E ) − ∣ F ∣ T_G(x,1)=\sum_{F}(x-1)^{r(E)-|F|} T G ( x , 1 ) = ∑ F ( x − 1 ) r ( E ) − ∣ F ∣ , the sum over the forests F ⊆ E F\subseteq E F ⊆ E , where r ( E ) = n − cc ( G ) r(E)=n-\operatorname{cc}(G) r ( E ) = n − cc ( G ) ; so counting forests by number of edges gives the whole polynomial T G ( x , 1 ) T_G(x,1) T G ( x , 1 ) . The key identity is exact and short.
Lemma 11.3 (Forest indicator; written proof, not machine-checked, not claimed). Let H H H be a graph on a vertex set S S S with edge set X X X , and let deg H \deg_H deg H denote degrees in H H H . Then
[ z ∣ S ∣ − ∣ X ∣ ] det ( L H + z diag ( 2 − deg H ) ) = { 2 ∣ S ∣ − ∣ X ∣ if H is a forest , 0 otherwise . [z^{|S|-|X|}]\det(L_H+z\operatorname{diag}(2-\deg_H))=
\begin{cases}
2^{|S|-|X|} & \text{if }H\text{ is a forest},\\
0 & \text{otherwise}.
\end{cases} [ z ∣ S ∣ − ∣ X ∣ ] det ( L H + z diag ( 2 − deg H )) = { 2 ∣ S ∣ − ∣ X ∣ 0 if H is a forest , otherwise . Proof. By the matrix-forest theorem, det ( L H + diag ( d ) ) = ∑ F ∏ T ∈ F ( ∑ v ∈ T d v ) \det(L_H+\operatorname{diag}(d))=\sum_F\prod_{T\in F}(\sum_{v\in T}d_v) det ( L H + diag ( d )) = ∑ F ∏ T ∈ F ( ∑ v ∈ T d v ) , the sum over the spanning forests F F F of H H H and the product over the trees T T T of F F F . With d v = z ( 2 − deg H v ) d_v=z(2-\deg_H v) d v = z ( 2 − deg H v ) , a forest with j j j trees contributes a multiple of z j z^j z j . Every spanning forest has at least cc ( H ) ≥ ∣ S ∣ − ∣ X ∣ \operatorname{cc}(H)\ge|S|-|X| cc ( H ) ≥ ∣ S ∣ − ∣ X ∣ trees, with equality throughout iff H H H is itself a forest and F = H F=H F = H . If H H H is not a forest, the coefficient of z ∣ S ∣ − ∣ X ∣ z^{|S|-|X|} z ∣ S ∣ − ∣ X ∣ is therefore 0 0 0 . If H H H is a forest, the coefficient comes from F = H F=H F = H alone and equals ∏ T ∑ v ∈ T ( 2 − deg T v ) = ∏ T ( 2 ∣ T ∣ − 2 ( ∣ T ∣ − 1 ) ) = 2 cc ( H ) = 2 ∣ S ∣ − ∣ X ∣ \prod_{T}\sum_{v\in T}(2-\deg_T v)=\prod_T(2|T|-2(|T|-1))=2^{\operatorname{cc}(H)}=2^{|S|-|X|} ∏ T ∑ v ∈ T ( 2 − deg T v ) = ∏ T ( 2∣ T ∣ − 2 ( ∣ T ∣ − 1 )) = 2 cc ( H ) = 2 ∣ S ∣ − ∣ X ∣ . □
In Grassmann form the mass − z deg H ( v ) ψ ˉ v ψ v -z\deg_H(v)\bar{\psi}_v\psi_v − z deg H ( v ) ψ ˉ v ψ v is spread over the edges, so all factors are local or pairwise and (7) applies with four labels per crossing edge. Brand, Dell and Roth [12 ] showed that, under #ETH, for every real x ≠ 1 x\ne1 x = 1 there is ε > 0 \varepsilon>0 ε > 0 such that T G ( x , 1 ) T_G(x,1) T G ( x , 1 ) has no exp ( ε n ) \exp(\varepsilon n) exp ( ε n ) -time algorithm on simple graphs with O ( n ) O(n) O ( n ) edges; this was the last open line of the #ETH dichotomy for the Tutte plane. Theorem 11.3 together with Theorem 11.1 would give, conditional on (HA) and with the caveats of this section, a deterministic 2 δ n 2^{\delta n} 2 δ n algorithm for the whole polynomial T G ( x , 1 ) T_G(x,1) T G ( x , 1 ) on such graphs. (The published implication of course remains true; it is vacuous once #ETH fails.) The best previous algorithm computes the Tutte polynomial in vertex-exponential time [7 ] .
Remark 11.4 (Further problems). A more general version of the template allows a constant number of global predicates (connected, tree, path, single cycle, forest, minimum number of components, and directed analogues such as branchings and strong connectivity), each certified by a determinant that is positive exactly when the predicate holds. It covers, among others, connected feedback vertex set, connected odd cycle transversal, minimum cycle cover, k k k -leaf out-branchings, maximum full-degree spanning trees and graph-metric TSP. Exact counting is obtained when each certificate is constant on solutions; for connected vertex covers, connected dominating sets and connected subgraphs, only κ \kappa κ -weighted counts are obtained. All of this is exploratory and numerically checked on instances with at most seven vertices.
Verification and formalisation status
We describe what has been checked, by what means, and what remains open. The aim is to make clear how much trust each statement deserves. All Lean sources, the axiom-audit files (lean/EthFollowup/Axioms.lean, lean/EthFollowup/AxiomsExtended.lean and lean-bridge-anthropic/bridge/EthFollowup/ExactHC/AuditAll.lean), build instructions and the numerical check scripts are in the public repository [38 ] , https://github.com/xennygrimmato/eth-hamiltonicity , Lean sources as of commit ca17a37.
Machine-checked in Lean
Parity and randomized decision (Theorems 1.6 and 1.7 (a)). The Cut&Count identities, the counter encoding for unbounded degree, the restriction by edge CNFs, the Calabro–Impagliazzo–Kabanets–Paturi isolation lemma for arbitrary finite sets, its entropy estimate, and the machine theorems are proved in Lean 4 [21 ] with Mathlib [37 ] , taking the labs’ top-level theorems as hypotheses.
Discharging the hypotheses. OpenAI’s development was built from source at a pinned commit (Lean v4.34.1; 11,492 build jobs, no sorry); #print axioms reports only propext, Classical.choice and Quot.sound for exact_count_and_sat. The instantiated theorems (hamParity_allGraphs_unconditional, hamDecision_unconditional, dirHamParity_unconditional, dirHamDecision_unconditional, and others) are closed statements with
the same three axioms, and a kernel replay with leanchecker of the full import closure succeeds. Anthropic’s development was likewise built from source (Lean v4.33.1; 9,768 jobs); MainResults.mainTheorem depends only on the three standard axioms, and so does hamParity_allGraphs_anthropic instantiated with it.
Exact-count formalisation. The mathematical content of Theorem 5.7 is machine-checked. The Lean theorem blob_factorisation states that, for every graph G G G , root r r r , partition ϕ \phi ϕ into blobs and crossing order, ∑ ℓ ∏ a σ a ( ℓ ) χ a ( ℓ , P ( ℓ ) ) I a ( ℓ ) = n ⋅ # H C ( G ) \sum_{\ell}\prod_{a}\sigma_a(\ell)\chi_a(\ell,P(\ell))I_a(\ell)=n\cdot\#\mathrm{HC}(G) ∑ ℓ ∏ a σ a ( ℓ ) χ a ( ℓ , P ( ℓ )) I a ( ℓ ) = n ⋅ # HC ( G ) . It rests only on propext, Classical.choice and Quot.sound. Its proof formalises:
Theorem 4.1;
the Grassmann algebra of § 3 (Koszul rule, block factorisation, linear forms);
Theorem 4.2 and Theorem 4.3, including det ( B F ) 2 = [ F is a spanning tree ] \det(B_F)^2=[F\text{ is a spanning tree}] det ( B F ) 2 = [ F is a spanning tree ] ;
Theorem 5.3;
the sign combinatorics (Theorem 5.4, Theorem 5.5, Theorem 5.6);
the locality of the blob tables.
The network of § 6 is also formalised in [A]'s own Net format, inside [A]'s Lean environment. Its value is proved to equal n ⋅ # H C ( G ) n\cdot\#\mathrm{HC}(G) n ⋅ # HC ( G ) (Theorem 6.3), and its parameters satisfy [A]'s conditions (Theorem 6.4, with 3 bits per label instead of log 2 5 \log_2 5 log 2 5 ). [A]'s procedure interface for networks is instantiated generically. The preprocessing lemmas (Theorems 7.1 and 7.2 ) are formalised. The streaming procedure for the blob tables is also formalised in [A]'s cost model. It is proved to compute σ a χ a I a \sigma_a\chi_a I_a σ a χ a I a within 2 ⋅ 8 μ a 2\cdot8^{\mu_a} 2 ⋅ 8 μ a steps using states of linear size. On top of it, the composition with [A]'s Lean theorems gives Theorem 1.1 at the level of Turing machines (theorem1_TM): for every δ > 0 \delta>0 δ > 0 and D D D , one machine outputs # H C ( G ) \#\mathrm{HC}(G) # HC ( G ) within C ⋅ 2 δ n C\cdot2^{\delta n} C ⋅ 2 δ n steps whenever ∣ E ∣ ≤ D n |E|\le Dn ∣ E ∣ ≤ D n . The hypothesis bundling the network, its procedures and their bounds is then constructed from the formalised network and procedures (a polynomial-time input reader, the layout, and the size bounds), so Theorem 1.1 is formally verified in Lean end to end (theorem1). On input the adjacency matrix of G G G , a Turing machine with finite alphabets outputs # H C ( G ) \#\mathrm{HC}(G) # HC ( G ) in binary within ⌊ C ⋅ 2 δ n ⌋ \lfloor C\cdot2^{\delta n}\rfloor ⌊ C ⋅ 2 δ n ⌋ steps whenever ∣ E ∣ ≤ D n |E|\le Dn ∣ E ∣ ≤ D n . The theorem rests only on the three standard axioms and on [A]'s Lean development. The sharper single-algorithm bound of Theorem 1.2 is formalised as well (theorem2): one machine, with the same axioms, outputs # H C ( G ) \#\mathrm{HC}(G) # HC ( G ) within ⌊ C ⋅ 2 C ( m + n ) / log 2 ( n + 2 ) ⌋ \lfloor C\cdot2^{C(m+n)/\sqrt{\log_2(n+2)}}\rfloor ⌊ C ⋅ 2 C ( m + n ) / l o g 2 ( n + 2 ) ⌋ steps for every graph G G G with m m m edges. A fresh kernel replay with leanchecker of the full import closure has passed for both theorem1 and theorem2.
Degree bound, corollaries, directed graphs. Theorem 1.3 is theorem3 and theorem3\_maxdeg; Theorem 1.4 is decision\_TM, search\_TM, hamPaths\_count\_TM and the related machines; directed Hamiltonian cycles and ATSP are theoremDHC, theoremDHC\_rate, theoremATSP; Theorem 10.2 is colouring\_barrier graph. All use the standard axioms only.
Weighted layer (TSP). Theorem 1.5 is formally verified end to end (theoremTSP, theoremTSP\_decode): for every δ > 0 \delta>0 δ > 0 and D D D there are a Turing machine M M M and a constant C C C such that, on the input word tspCodeGWw (the graph, W W W in unary and the n 2 n^2 n 2 weights in binary), M M M outputs the binary expansion of n ∑ H 2 b w ( H ) n\sum_H2^{b w(H)} n ∑ H 2 b w ( H ) within ⌊ C ⋅ 2 δ n ( W + 2 ) C ⌋ \lfloor C\cdot2^{\delta n}(W+2)^C\rfloor ⌊ C ⋅ 2 δ n ( W + 2 ) C ⌋ steps whenever ∣ E ∣ ≤ D n |E|\le Dn ∣ E ∣ ≤ D n and all weights are at most W W W ; the decoding statements (digit j j j equals n n n times the number of tours of weight j j j , the lowest non-zero digit is the optimum, its value over n n n is the number of optimal tours) are part of the formal theorem. The ingredients are the weighted blob factorisation blob_factorisation_w, the decoding lemma kronecker_decode, the weighted network hcNetW_kron in [A]'s Net format, and a weighted table procedure. Standard axioms only; a fresh leanchecker replay of its closure has passed.
Lean guarantees that the labs’ proofs establish their formal statements; it does not guarantee that those statements formalise the printed theorems faithfully, which is a matter for expert review. [A] itself notes that its Lean proof was compared with the printed one by AI models, not mechanically.
Numerical verification
The check scripts are attached to this record as ancillary files in anc/ (run python3 anc/run_all.py; reference outputs, where recorded, in the matching .log files) and are also in the project repository [38 ] , directory research/scripts: proof_checks.py and proof_params.py (the identities and parameter bounds of § 3 to § 6 ), review_exact_count*.py and review_hc_blobs.py (the independent referee’s checks, including an ablation of the sign term), hc_degree_network.py (Theorem 1.3 , with regression and mutation tests), tsp_check.py and tsp_atsp.py (TSP and ATSP), and ext_*.py (the extensions of § 11 ). All identities of § 3 to § 6 were implemented literally and independently of the code used during discovery, in exact integer arithmetic: an exterior algebra over Z \mathbb{Z} Z with a randomised generator order; the pieces, ε \varepsilon ε , σ a \sigma_a σ a , π a b \pi_{ab} π ab and χ a \chi_a χ a ; the network of Theorem 6.1 with fixed-length bit-string settings; and two evaluators that use W W W , Ψ \Psi Ψ and f f f only as black boxes, one by brute force over ∏ a S a \prod_a S_a ∏ a S a and one by [A]’s grouping into K = 2 K=2 K = 2 or 3 3 3 groups. Instances include random graphs with arbitrary maps ϕ \phi ϕ (empty blobs allowed), planted blob graphs, planted Hamiltonian cycles, and instances with g ∈ { 4 , 5 } g \in\{4,5\} g ∈ { 4 , 5 } whose planted Hamiltonian cycle, or whose planted disconnected 2-factor, visits the blobs in interleaving order. Every instance uses a random root, crossing order and generator order. Table 4 summarises one run (60 instances, n ≤ 12 n \le12 n ≤ 12 ); runs with several other seeds also pass.
A second script checks Theorem 7.1 (on 109 random graphs and several thresholds), Theorem 7.2 in the exact form g μ a ≤ 2 m + g Δ g\mu_a \le2m+g\Delta g μ a ≤ 2 m + g Δ (on 400 graphs, g ≤ 12 g \le12 g ≤ 12 ), the counting identities used in Theorem 6.4, and the self-reduction of Theorem 1.4 . These checks test the identities and the network algebra, sign included; they cannot test the asymptotic bookkeeping, which is checked by hand.
A third script checks the rank-encoded network of § 8 on top of the same library: the colex rank, Theorem 8.2 (exact count, injectivity, round trip, surjectivity on random strings), the factorisation of Ψ \Psi Ψ , the bounds of Theorem 8.4 per node and in total, the profile count, Theorem 8.3 (sum over admissible profiles equals n ⋅ # H C ( G ) n\cdot\#\mathrm{HC}(G) n ⋅ # HC ( G ) by brute force, evaluated through the shared bit strings only; inadmissible profiles give 0), and the degree-pruned computation of I a I_a I a with its iteration counts. Besides seeded random instances (n ≤ 9 n \le9 n ≤ 9 , g ≤ 4 g \le4 g ≤ 4 , including hubs of degree n − 1 n-1 n − 1 ), it runs four fixed instances with g = 4 g=4 g = 4 and n ∈ { 7 , 8 , 9 } n \in\{7,8,9\} n ∈ { 7 , 8 , 9 } on which the network without the interleaving sign is wrong, and a built-in mutation test: with χ a \chi_a χ a removed, or with the labels not shared, the rank-encoded network must give a wrong value on at least one of them (it does on all four). Runs with three seeds pass. An independent AI referee re-derived the construction and its parameter bounds and found it sound; it also found that the first version of the script did not exercise the interleaving sign, which led to the fixed instances and the mutation test.
12.3. Independent referee. An independent referee (an AI agent working from the one-paragraph claim) derived the sign rule on its own and wrote its own code before reading the write-up. It checked about 500 instances of “Berezin integral = determinant”, about 790 blob evaluations and 297 evaluations of a literal [A]-style network (with g ≤ 5 g \le5 g ≤ 5 , random, very unequal and empty blobs, random roots, and in half of the tests random integer edge weights), with no failures; removing the global sign gave wrong answers on 8 instances. Its verdict is that the construction and bookkeeping are sound, conditional on [A] (Theorem A(b), Lemma 8(i) and the existence of pieces), and that the unbounded-degree trap is handled correctly by Theorem 7.1. It raised one wording point, about the label alphabet, which Theorem 5.1 addresses. The referee did not build or check the Lean files.
12.4. What is pending.
Human expert review of this paper and, above all, of the labs’ manuscripts.
A human check that the formal statements of theorem1 and theorem2 say what Theorems 1.1 and 1.2 say (the definitions to read are listed in § 1.6 ); the proofs were written by AI agents and reviewed by an AI coordinator.
A full write-up of the extensions of § 11 other than TSP.
12.5. Dependence on [A]. If [A, Theorem A(b)] or [A, Lemma 8] failed, Theorems 1.1 to 1.4 would lose their proofs, while § 3 to § 6 would be unaffected. The uniformity in Theorem 1.2 uses the constant c c c of Theorem 2.6 through x 0 x_0 x 0 ; if c c c is not explicit, the statement asserts the existence of one algorithm, as in [A]. The cost model is that of [A]; our arithmetic on O ( n ) O(n) O ( n ) -bit integers costs poly ( n ) \operatorname{poly}(n) poly ( n ) operations and is absorbed in τ \tau τ and in the polynomial factors.
Open problems
13.1. Dense graphs. The network of § 6 has U ≈ 2 log 2 5 ⋅ ∣ E ∣ U \approx2\log_{2}5 \cdot|E| U ≈ 2 log 2 5 ⋅ ∣ E ∣ bits, and the rank-encoded network of § 8 has U ≈ 2 n log ( 2 e d ˉ ) U \approx2n\log(2e\bar{d}) U ≈ 2 n log ( 2 e d ˉ ) bits, so Theorem 1.3 beats 2 n 2^n 2 n only for d ˉ = 2 o ( log n ) \bar{d}=2^{o(\sqrt{\log n})} d ˉ = 2 o ( l o g n ) , roughly. Nothing is claimed for dense graphs beyond the classical O ∗ ( 2 n ) O^{*}(2^n) O ∗ ( 2 n ) [30 , 2 ] and its 2 n − Ω ( n / log n ) 2^{n-\Omega(\sqrt{n/\log n})} 2 n − Ω ( n / l o g n ) refinement [5 ] . For d ˉ = Θ ( n ) \bar{d}=\Theta(n) d ˉ = Θ ( n ) , about 2 n log n 2n\log n 2 n log n bits is the information content of a Hamiltonian cycle, so for any network of this kind that shares the cycle across the blobs the leading term ℓ e U \ell_e U ℓ e U is Ω ( e ℓ n log n ) \Omega(e_\ell n\log n) Ω ( e ℓ n log n ) , which is above n n n unless e ℓ = o ( 1 / log n ) e_\ell=o(1/\log n) e ℓ = o ( 1/ log n ) . Is there a subexponential algorithm for # H C \#\mathrm{HC} # HC on dense graphs, under the same hypotheses?
13.2. Connected subgraphs and T ( 1 , 2 ) T(1,2) T ( 1 , 2 ) . The determinant certificate is a weight, not a 0/1 test, for objects that are connected but not trees. Exact counts of connected spanning subgraphs (T G ( 1 , 2 ) T_G(1,2) T G ( 1 , 2 ) ), of connected vertex covers and of connected dominating sets, and the whole line x = 1 x=1 x = 1 of the Tutte plane, are not obtained. A κ \kappa κ -free connectivity indicator that is local in the sense of (11.1) would settle these.
13.3. Derandomization from the top-level theorems. Theorem 1.1 gives deterministic decision, but it uses [A]’s internal lemmas. Can deterministic decision be obtained from the top-level # S A T \#\mathrm{SAT} # SAT theorems alone, which are machine-checked? Any such algorithm must use the structure of the instance: if an algorithm accesses S = H C ( G ) ⊆ { 0 , 1 } N S=\mathrm{HC}(G)\subseteq\{0,1\}^{N} S = HC ( G ) ⊆ { 0 , 1 } N only through adaptive queries ∑ x ∈ S w i ( x ) m o d q i \sum_{x\in S}w_i(x)\bmod q_i ∑ x ∈ S w i ( x ) mod q i with q i ≤ Q q_i\le Q q i ≤ Q and arbitrary weights w i w_i w i , then a Davenport-constant argument shows that distinguishing S = ∅ S=\varnothing S = ∅ from all nonempty S S S requires 2 N ≤ lcm ( 1 , … , Q ) ( 1 + F ln Q ) 2^N\le\operatorname{lcm}(1,\ldots,Q)(1+F\ln Q) 2 N ≤ lcm ( 1 , … , Q ) ( 1 + F ln Q ) for F F F queries, so F ≥ 2 N − o ( N ) F\ge2^{N-o(N)} F ≥ 2 N − o ( N ) for Q = 2 ( log N ) 1 / 2 Q=2^{(\log N)^{1/2}} Q = 2 ( l o g N ) 1/2 . (This generalises the observation that parity queries alone need 2 N 2^N 2 N queries; it is related to the isolation bounds of [23 ] . On the other hand, a fixed list of 2 o ( n ) 2^{o(n)} 2 o ( n ) weight vectors works for all bounded-degree graphs on n n n vertices, and hardness assumptions for E against #P-oracle circuits would give deterministic 2 o ( n ) 2^{o(n)} 2 o ( n ) decision via [29 ] , in the relativised form of [31 ] . So the question is one of explicit hitting sets. These statements have written proofs but are not formalised.
The exponent
The leading term of the exponent is e ℓ U e_\ell U e ℓ U , and e ℓ = Θ ( ρ ℓ ) e_\ell= \Theta(\rho^\ell) e ℓ = Θ ( ρ ℓ ) is governed by the pieces of [A]. Pieces with ρ < 1 / 2 \rho< 1/\sqrt{2} ρ < 1/ 2 would improve the exponent beyond 1 / log n 1/\sqrt{\log n} 1/ log n , and ρ → 1 2 \rho\to\frac{1}{2} ρ → 2 1 would give 2 O ( m / log m ) 2^{O(m/\log m)} 2 O ( m / l o g m ) , and 2 O ( n log d / log ˉ n ) 2^{O(n\log d/\bar{\log} n)} 2 O ( n l o g d / l o g ˉ n ) in Theorem 1.3 . Can the log n \sqrt{\log n} log n be improved, for #HC specifically or in general?
Planar and minor-free graphs
A bound of 2 δ n 2^{\delta n} 2 δ n does not beat the known 2 O ( n ) 2^{O(\sqrt{n})} 2 O ( n ) on planar graphs. Does the blob network compose with balanced separators to give 2 o ( n ) 2^{o(\sqrt{n})} 2 o ( n ) ?
Practicality
As in [A], the bounds are astronomically far from practical. A less asymptotic analysis, or a different evaluation engine, would be needed for any concrete gain.
Acknowledgements
This work was done with AI assistance (Claude Code, Anthropic): the construction, the proofs, the numerical verification scripts, the independent referee pass and the Lean developments were produced in sessions with Claude Code. The Lean components described in § 12 are machine-checked; everything else has been checked numerically and by an independent AI referee, but awaits human expert review. Responsibility for any errors rests with the author.
References