---
title: Hamiltonian Cycle Polynomial Overview
url: https://www.emergentmind.com/topics/hamiltonian-cycle-polynomial
type: topic
---

# Hamiltonian Cycle Polynomial Overview

Searching arXiv for the cited Hamiltonian cycle polynomial papers to ground the article in current arXiv records.
{"query":"Hamiltonian cycle polynomial arXiv 2606.26653 2510.02473 1706.09267 0707.1176","max_results":10,"sort_by":"relevance"}
In current usage, the expression *Hamiltonian cycle polynomial* does not designate a single universally fixed object. In algebraic complexity, it usually denotes the family \(HC_n\), the sum of monomials indexed by directed Hamiltonian cycles in the complete digraph on \(n\) labeled vertices. In graph polynomial theory, it also denotes Yi Bo’s invariant \(H(G;x)=\sum_{k\ge1} h_k(G)x^k\), where \(h_k(G)\) counts \(k\)-component \(2\)-factors and \(h_1(G)\) is the number of ordinary Hamiltonian cycles. A further strand of work studies determinant–permanent identities for the Hamiltonian-cycle generating function, and another encodes the directed Hamiltonian Cycle Problem as the solvability of a polynomial equation over bounded reals [2606.26653] [1706.09267] [2510.02473] [0707.1176].

## 1. Terminology and basic forms

Two definitions dominate the literature, and they arise in different mathematical settings. One is a graph invariant attached to an arbitrary graph \(G\). The other is a polynomial family in formal edge variables attached to the complete directed graph on \(n\) labeled vertices. Sawczuk and Gnang use the notation \(P_{HC_n}(A)\) for the same generating function that algebraic complexity papers denote by \(HC_n\) [1706.09267] [2606.26653] [2510.02473].

| Object | Definition | Role |
|---|---|---|
| \(H(G;x)\) | \(\sum_{k\ge1} h_k(G)x^k\) | Graph invariant from \(k\)-component \(2\)-factors |
| \(HC_n(X_n)\) | \(\sum_{\sigma\in C_n}\prod_{i=1}^n x_{i,\sigma(i)}\) | Algebraic-complexity family of weighted Hamiltonian cycles |
| \(P_{HC_n}(A)\) | \(\sum_{\sigma\in HC_n}\prod_{i=1}^n a_{i,\sigma(i)}\) | Matrix-based notation for the same cycle-generating polynomial |
| \(P=0\) encoding of HCP | Single polynomial equation over bounded reals | Decision-problem encoding for directed HCP |

This terminological plurality matters because the associated questions differ. For \(H(G;x)\), the focus is deletion–contraction recursion, invariance, and distinguishing power. For \(HC_n\), the focus is VNP-completeness, symmetries, equivalence testing, and circuit identities. For determinant–permanent identities, the focus is exact symbolic expansions. For polynomial-equation encodings, the focus is NP-hard feasibility over the reals. This suggests that the phrase *Hamiltonian cycle polynomial* functions as an umbrella term spanning several adjacent research programs.

## 2. The graph-invariant polynomial \(H(G;x)\)

Yi Bo defines the Hamiltonian cycle polynomial of a graph \(G\) by first introducing \(h_k(G)\), the number of \(k\)-component \(2\)-factors of \(G\). A \(k\)-component \(2\)-factor is a spanning subgraph in which every vertex has degree \(2\) and which has exactly \(k\) connected components, each component being a cycle. The polynomial is then
\[
H(G;x)=\sum_{k\ge1} h_k(G)x^k.
\]
In particular, \(h_1(G)\) is the number of ordinary Hamiltonian cycles, so the coefficient of \(x\) recovers the usual Hamiltonian-cycle count [1706.09267].

The same polynomial is characterized recursively. For any edge \(e=uv\) with \(u\neq v\),
\[
H(G;x)=H(G-uv;x)+H(G/uv;x)-H(G-u;x)-H(G-v;x).
\]
It is multiplicative on disjoint unions,
\[
H(G;x)=H(G_1;x)\,H(G_2;x),
\]
when \(G_1\) and \(G_2\) have no vertex in common, and its base case on the one-vertex graph with \(n\) loops is
\[
H(K_1^n;x)=n\,x.
\]
The paper proves that this recursion is well-defined, independent of the order in which edges are processed, and that coefficient extraction recovers the numbers \(h_k(G)\) [1706.09267].

The polynomial fits a broader deletion–contraction framework. A general criterion is given for graph-functions satisfying
\[
F(G)=aF(G-uv)+bF(G/uv)+cF(G-u)+cF(G-v)+dF(G-u-v)
\]
together with multiplicativity and fixed base values. Such a function is well-defined if and only if
\[
bc+c^2+d-ad=0,
\]
or else \(F\) is the trivial “vertex-count” invariant. For \(H\), the parameters are \(a=b=1\), \(c=-1\), \(d=0\), which satisfy the criterion. Hence \(H\) is well-defined and invariant under graph isomorphism [1706.09267].

The paper also places \(H\) relative to Tutte-type constructions. A seven-variable generalization \(J(G;x,y,\lambda,r,s,t)\) specializes to
\[
J(G;0,1,1,0,s,1)=H(G;s),
\]
and also to
\[
J(G;x,y,0,0,0,1)=x^{k(G)}\,T(G;1+x,y),
\]
where \(T(G;X,Y)\) is the classical Tutte polynomial. In this sense, \(H(G;x)\) is a one-variable specialization of a two-variable Tutte-type invariant [1706.09267].

Several examples calibrate the invariant. A path \(P_n\) has no spanning \(2\)-factor, so \(H(P_n;x)=0\). For a cycle \(C_n\) with \(n\ge3\), the only \(2\)-factor is the cycle itself, hence \(H(C_n;x)=x\). For complete graphs, \(H(K_3;x)=x\) and \(H(K_4;x)=3x\). More generally,
\[
H(K_n;x)=\sum_{k=1}^n |s(n,k)|\,x^k,
\]
because \(h_k(K_n)\) equals the number of ways to partition \(\{1,\dots,n\}\) into \(k\) cycles, namely the unsigned Stirling numbers of the first kind [1706.09267].

Despite encoding the full \(2\)-factor spectrum, \(H(G;x)\) is not a complete invariant. The paper notes that there exist non-isomorphic graphs \(G_1,G_2\) with
\[
H(G_1;x)=H(G_2;x),
\]
and that even more refined variants such as the two-variable cycle polynomial \(C(G;s,t)\) may still coincide. On the algorithmic side, the defining recursion is analogous to that of the Tutte polynomial. Since even counting ordinary Hamiltonian cycles is \(\#P\)-complete, there is no known polynomial-time algorithm for computing \(H\) on general graphs; the worst-case behavior is exponential-time branching, although certain graph classes admit better methods such as dynamic programming or transfer matrices [1706.09267].

## 3. The algebraic-complexity family \(HC_n\)

In algebraic complexity, the Hamiltonian Cycle polynomial is the family
\[
HC_n(X_n):=\sum_{\sigma\in C_n}\prod_{i=1}^n x_{i,\sigma(i)},
\]
where \(X_n=(x_{i,j})_{1\le i,j\le n}\) is the \(n\times n\) matrix of formal variables and \(C_n\subset S_n\) is the set of all \(n\)-cycles on \(\{1,\dots,n\}\). Equivalently, \(X_n\) may be viewed as the weighted adjacency matrix of the complete directed graph on \(n\) vertices, and \(HC_n\) is the formal sum of the weights of all directed Hamiltonian cycles [2606.26653].

Sawczuk and Gnang use the notation
\[
P_{HC_n}(A)=\sum_{\sigma\in HC_n}\prod_{i=1}^n a_{i,\sigma(i)}
\]
for an \(n\times n\) matrix \(A=(a_{i,j})\), emphasizing the interpretation as a generating function whose monomials enumerate all directed spanning cycles on \([n]\). When \(A\) is the adjacency matrix of a directed graph \(G\), \(P_{HC_n}(A(G))\) is exactly the number of Hamiltonian cycles in \(G\) [2510.02473].

The complexity-theoretic status of the family is classical. Valiant showed that the permanent family is VNP-complete over every field of characteristic other than \(2\), and that \(HC_n\) is VNP-complete over every field, and even every commutative ring. The 2026 paper therefore describes \(HC_n\) as the “universal” VNP-complete graph-polynomial, in contrast to the permanent family, whose completeness fails in characteristic \(2\) [2606.26653].

Subsequent work cited there situates \(HC_n\) within several major lines of algebraic complexity. Jerrum–Snir gave exact monotone-circuit lower bounds for \(HC_n\). Hüttenhain–Ikenmeyer gave exact binary-determinantal-complexity bounds. Goulden–Jackson and Grochow related \(HC_n\) to immanants. Malod, Grochow–Mulmuley–Qiao, and Hrubes used the VNP-completeness of \(HC_n\) to obtain results uniformly across fields and, in the case of Hrubes, to exhibit new VNP-complete families in characteristic \(2\) [2606.26653].

For \(n\ge3\), the symmetry analysis treats \(HC_n\) as a homogeneous degree-\(n\) polynomial in the \(M=n^2-n\) variables \(x_{i,j}\) with \(i\neq j\). This presentation removes diagonal variables from the ambient coordinate space while preserving the Hamiltonian-cycle monomial structure [2606.26653].

## 4. Symmetries, equivalence testing, and circuit identities

A central structural question is how much of \(HC_n\) is captured by its symmetry group. For a polynomial \(f\in F[x_1,\dots,x_M]\), the symmetry group is
\[
G_f=\{A\in GL_M(F):f(A\cdot x)=f(x)\},
\]
and the Lie algebra is
\[
\mathfrak g_f=\Bigl\{A\in F^{M\times M}:\sum_{i,j=1}^M A_{i,j}x_j\frac{\partial f}{\partial x_i}=0\Bigr\}.
\]
For \(HC_n\), a matrix \(A\) lies in \(\mathfrak g_{HC_n}\) if and only if it is diagonal and its diagonal entries satisfy the cycle-sum constraints
\[
\sum_{i=1}^n A_{(i,\sigma(i)),(i,\sigma(i))}=0
\]
for every \(n\)-cycle \(\sigma\in C_n\). The dimension of \(\mathfrak g_{HC_n}\) is \(2n-2\) for \(n\neq4\); for \(n=4\), the dimension is \(6\) if \(\mathrm{char}(F)\neq2\) and \(7\) if \(\mathrm{char}(F)=2\) [2606.26653].

The symmetry group itself has a concrete description over sufficiently large fields. If
\[
|F|>\binom{n^2-n}{2},
\]
then every symmetry \(A\in G_{HC_n}\) factors uniquely as
\[
A=P\cdot S,
\]
where \(P\) is a permutation-matrix symmetry, acting by relabeling \(x_{i,j}\mapsto x_{\pi(i),\pi(j)}\) or by transpose, and \(S\) is a diagonal scaling matrix satisfying the same cycle-sum constraints. This parallels the permanent in one respect, but not in all respects: for \(n\ge5\) and sufficiently large fields, \(HC_n\) is not determined up to scale by its symmetry group. The paper states that there exists \(f\neq c\cdot HC_n\) with
\[
G_{HC_n}\subseteq G_f.
\]
That non-characterization distinguishes \(HC_n\) from the permanent polynomial in the sense used there [2606.26653].

The same paper studies equivalence testing. Given black-box access to a polynomial \(f\), the problem is to decide whether \(f\) is equivalent to \(HC_n\) under an invertible linear change of variables. Its main theorem states that if
\[
|F|>3n^5\quad\text{and}\quad \mathrm{char}(F)=0\ \text{or}\ >n,
\]
then there is a randomized poly\((n)\)-time algorithm that decides with high probability whether there exists \(A\in GL_M(F)\) such that
\[
f=HC_n(A\cdot x),
\]
and outputs \(A\) when such an equivalence holds. The algorithm proceeds by a Lie-algebraic reduction to permutation-and-scaling form, recovery of the permutation from the zero-pattern of mixed second derivatives, recovery of the scaling by solving a linear system over cyclic monomials, and a final verification stage [2606.26653].

The verification stage uses downward self-reducibility rather than symmetry characterization. For every \(m>n\ge2\), there is an explicit \(m\times m\) matrix \(Y^{(m,n)}\), constructible in \(O(m^2)\) time, such that
\[
HC_m(Y^{(m,n)})=HC_n(x).
\]
Moreover, \(HC_n\) is characterized by the \(n-1\) identities
\[
f(Y^{(n,k)})=\sum_{i=2}^k x_{1,i}\,f(Y^{(n,k-1)}_i)\qquad (k=3,\dots,n),
\]
together with
\[
f(Y^{(n,2)})=x_{1,2}x_{2,1}.
\]
From this the paper derives a circuit-identity characterization, a randomized poly\((n,s)\)-time algorithm for testing whether a circuit \(C\) computes \(HC_n\), and a Flip theorem for \(HC_n\): assuming \(HC_n\) has no poly\((n)\)-size circuits over fields with \(|F|>n^{O(1)}\), there is a randomized poly\((n)\) algorithm outputting matrices \(A_1,\dots,A_{n-1}\) such that every size-\(n^{O(1)}\) circuit fails on at least one of them [2606.26653].

## 5. Determinant–permanent identities

A separate line of work studies exact symbolic identities for the Hamiltonian-cycle generating polynomial. For an \(n\times n\) matrix \(A\), Sawczuk and Gnang prove the Hamiltonian-cycle identity
\[
P_{HC_n}(A)
=
\sum_{S\subseteq [n-1]}
\det(-A_S)\cdot
\per(A_{[n]\setminus S}),
\]
with the conventions \(\det(A_\emptyset)=1\) and \(\per(A_\emptyset)=1\). Here \(A_S\) is the principal submatrix of \(A\) indexed by \(S\subseteq[n]\), and \(P_{HC_n}(A)\) is the sum of monomials corresponding to single \(n\)-cycles [2510.02473].

The first proof is combinatorial. Expanding
\[
P_S:=\det(-A_S)\,\per(A_{[n]\setminus S})
\]
produces monomials corresponding to cycle covers of \([n]\). Fixing a permutation \(\sigma\in S_n\) with cycle decomposition
\[
\sigma=C_1\cup\cdots\cup C_k,
\]
the monomial \(M_\sigma=\prod_{i=1}^n a_{i,\sigma(i)}\) appears in \(P_S\) exactly when each cycle of \(\sigma\) lies entirely in \(S\) or entirely in \([n]\setminus S\). Summing the resulting coefficients over all \(S\subseteq[n-1]\) yields
\[
\sum_{t=0}^{k-1}\binom{k-1}{t}(-1)^t
=
\begin{cases}
1,&k=1,\\
0,&k\ge2,
\end{cases}
\]
so only the single-cycle permutations survive [2510.02473].

The second proof is symbolic and uses Tutte’s Directed Matrix-Tree Theorem, a determinant-sum lemma, and a multivariable product rule. The construction starts from a polynomial listing of rooted directed spanning trees, passes to unicyclic functional graphs by replacing \(A\) with \(A\operatorname{diag}(x_1,\dots,x_n)\), and then applies the full partial-derivative operator
\[
\partial_{[n]}=
\frac{\partial}{\partial x_1}\cdots \frac{\partial}{\partial x_n}
\]
to isolate exactly those unicycles in which every vertex has in-degree \(1\), namely Hamiltonian cycles. After expanding the determinant via subsets and applying the product rule, the surviving terms are precisely the determinant–permanent summands above [2510.02473].

The same paper derives an analogous Hamiltonian-path identity. Defining a Hamiltonian-path polynomial \(P_{HP_n}(A)\) as the sum over directed spanning paths of length \(n-1\), it proves
\[
P_{HP_n}(A)
=
\sum_{\{i,j\}\subseteq T\subseteq[n]}
a_{j,j}\;
\det(-A)_{[n]\setminus T}\;
\per(A)_{T\setminus\{j\},\,T\setminus\{i\}}.
\]
The cycle and path identities express \(\#HC\)-type generating functions in terms of the permanent and determinant. The paper explicitly notes that these identities do not yield an efficient algorithm in general, since the permanent remains a \(\#P\)-complete object [2510.02473].

## 6. Polynomial-equation encodings of the Hamiltonian cycle problem

Another nearby use of polynomial language is not a graph polynomial invariant but an exact encoding of the decision version of the directed Hamiltonian Cycle Problem. Chermakani demonstrates a polynomial approach that expresses directed HCP as the solvability of a single polynomial equation within a bounded real space. The construction begins with four new theorems about periodic functions with irrational periods, including uniqueness results for tuples of next-high gaps and infinitely many simultaneous overlaps for collections of such functions [0707.1176].

The encoding then uses a trigonometric substitution for the \(N(N-1)\) directed edges:
\[
X_{i,j}:=(1+\cos[a+k_{i,j}B])\cdot C_{i,j},
\qquad
k_{i,j}:=(i-1)N+j,
\]
where \(C_{i,j}\in\{0,1\}\) records whether the directed edge \(i\to j\) is present. By expanding \(\cos(a+kB)\) through
\[
\cos(a+kB)=\cos(a)\cos(kB)-\sin(a)\sin(kB),
\]
and then recursively expressing \(\cos(kB)\) and \(\sin(kB)\) in terms of \(\cos(B)\) and \(\sin(B)\), each \(X_{i,j}\) becomes a polynomial in the four master variables
\[
u_1=\cos(a),\quad u_2=\sin(a),\quad u_3=\cos(B),\quad u_4=\sin(B),
\]
times the known constant \(C_{i,j}\) [0707.1176].

Five sets of constraints are imposed. They force the \(X_{i,j}\) to behave like binary edge-selection variables, require exactly one outgoing chosen edge at each vertex,
\[
\sum_{j\neq i}X_{i,j}=2,
\]
enforce that the chosen edges form a single cycle of length \(N\), impose the trigonometric identities
\[
u_1^2+u_2^2=1,\qquad u_3^2+u_4^2=1,
\]
and bound approximation errors by \(\delta=2^{-N^2}\). Auxiliary signal variables \(Y_{i,t}\) propagate a unit signal through the selected edges so that the final-time conditions exclude smaller disjoint cycles. After converting inequalities to equations with slack variables, all constraints are merged into one polynomial
\[
P=F_1^2+F_2^2+F_3^2+F_4^2+B_2^2+B_3^2+\cdots .
\]
By construction, \(P=0\) has a real solution if and only if the graph has a directed Hamiltonian cycle [0707.1176].

All variables lie in fixed bounded intervals: the trigonometric variables lie in \([-1,1]\), the error variables lie in \([-\delta,\delta]\), and the signal and slack variables are bounded as well. The paper states that any directed HCP instance can be translated in polynomial time into such a single polynomial-equation feasibility problem, and concludes that feasibility of a single polynomial equation over bounded real intervals is NP-hard. It further points to a prospective consequence: if one could decide in polynomial time whether a constant-variable polynomial equation has a real solution in a bounded box, then one would solve NP-complete problems by that subroutine, implying \(P=NP\) [0707.1176].

This construction is distinct from both \(H(G;x)\) and \(HC_n\), but it belongs to the same broader landscape in which Hamiltonian-cycle structure is recast into polynomial form. A plausible implication is that the Hamiltonian cycle polynomial serves not only as an invariant or generating function, but also as a bridge between combinatorial graph structure, algebraic identities, and decision-problem encodings.

Source: https://www.emergentmind.com/topics/hamiltonian-cycle-polynomial