Manuscript Offprint
arXiv:2610.05412A Dichotomy for Planar Graph Homomorphisms with Nonnegative Weights
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
We prove a complete complexity dichotomy for planar graph homomorphism counting with any fixed symmetric nonnegative matrix of arbitrary finite order, giving an explicit criterion for tractability. We also characterize exactly which fixed positive vertex weights preserve tractability, with both classifications extending from algebraic weights to fixed real weights in a prescribed exact representation. Our proof hinges on an entropy-based continuation argument: maximal logarithmic support identifies distance kernels as maximum-entropy completions, extending their positive definiteness throughout the parameter interval. This enables distance geometry to recover hidden product coordinates even when planar gadgets cannot distinguish colors; counting-hardness arguments then force the factors to be zero-field Boolean Ising interactions. The classification also yields complete tractability criteria for clock models, coupled Ising systems, and planar contractions of stoquastic imaginary-time kernels. All results have been formally verified in Lean 4.
1 Introduction
Counting graph colorings and evaluating spin partition functions are two versions of the same problem: sum the weights of all assignments of states to vertices, with interactions along edges. In combinatorics, an interaction can prescribe which pairs of colors are allowed; in statistical physics, it assigns a Boltzmann weight to each pair of spins. The resulting partition function is both a counting invariant and the normalizing constant for a Gibbs distribution. Understanding when it can be computed efficiently is a common question across these subjects.
Planarity makes this question particularly interesting. The Fisher–Kasteleyn–Temperley (FKT) algorithm for the zero-field Ising model [Kas61, Kas63, TF61] is a striking exception to the hardness of exact counting on general graphs [BG05]. Independent Ising systems can be combined to give tractable models with arbitrarily many states. Does every tractable nonnegative interaction arise this way, apart from elementary local summations? And which single-site fields preserve this advantage of planarity? These questions ask for the extent of the Ising phenomenon, beyond a particular model or number of states.
We study them in the language of weighted graph homomorphisms. Each vertex receives one of states, also called colors, indexed by . A fixed symmetric nonnegative matrix specifies the edge weight when its endpoints receive states . The partition function is
The formalization is available at https://github.com/liuchliuch/planar-homomorphisms-lean.
When is a zero-one adjacency matrix, this counts homomorphisms to its target graph. In a spin system, encodes the pair energy at inverse temperature ; zero entries allow hard exclusions. Write Pl-GH() for exact evaluation on planar input graphs. The interaction and its number of states are fixed; the size and shape of the input graph vary.
To state the result, write
We allow , with . A color of is a bit string: each coordinate contributes an independent two-state interaction. The tensor is nondegenerate when every . Write for equality after a simultaneous row and column permutation. The support graph of has vertex set and an edge , including a possible loop, when . We call its connected components the support components of .
Theorem 1.1 (Nonnegative interactions). Let have fixed algebraic entries, and write for its support components. Then if each , after relabeling, has one of the forms
with
The parameters may differ between components. In every other case, Pl-GH(M) is #P-hard under polynomial-time Turing reductions.
The algorithm rests on a general tensor-product identity: for any interaction matrices A, B and any graph G,
A color of is a pair of colors, and the two coordinate colorings contribute independently to the sum. Thus each tensor factor in (1.2) can be evaluated separately. For the rank-one factor , each vertex contributes the independent sum . The bipartite rank-two factor gives zero on a nonbipartite input; on a connected bipartite input, each of the two assignments of its parts to the target sides gives such local sums, using and . These factors are tractable on arbitrary graphs [BG05]. Each factor is evaluated on planar graphs by the FKT algorithm, and the factor values are multiplied. Zero singletons contribute only on edgeless inputs. For each connected input component, sum over target support components; then multiply over input components. Large state spaces can therefore be tractable, but their nontrivial interactions must have an underlying binary product structure.
For the second question, give state i a fixed positive vertex weight , the same at every input vertex. Define
The corresponding planar evaluation problem is Pl-GH(M, w). Physically, represents a single-site potential. For a nondegenerate Ising tensor, the weighted problem is tractable exactly when every Ising bit string has the same vertex weight.
If rows i and j of M are identical, assigning i or j to a vertex gives the same weight on each incident edge. We can therefore replace these two states by one state with vertex weight , without changing the partition function. Theorem 5.4 gives the complete weighted classification for the forms in (1.2), accounting for these sums and the elementary local factors.
The algebraic formulation uses exact number-field encodings. Theorem 6.1 extends both classifications to arbitrary fixed real weights in the field representation of [CMY26, Appendix A], so they apply to Boltzmann parameters without an algebraicity restriction.
1.2 Applications
The structural criterion turns questions about individual models into short tests for independent Ising coordinates and compatible fields. Section 6 develops the following consequences for exact evaluation on planar graphs.
• Graph homomorphisms. For unweighted targets, planarity does not enlarge the tractable class of Dyer and Greenhill [DG00, DG04]: every other target remains #P-complete even on planar inputs. Thus the additional tractability supplied by planarity is a weighted phenomenon, arising from independent zero-field Ising factors.
• Planar bipartite graphs. We obtain a complete dichotomy also when inputs are required to be bipartite, allowing different fixed vertex weights on the two prescribed parts. This restriction strictly enlarges the tractable class: some interactions that are hard on general planar graphs become tractable (Section 6.2).
• Clock and spin-one models. In the clock model, spins occupy q equally spaced angles, and their pair weight is the exponential of a coupling times the cosine of their angular difference [Kim17]. For every nonzero real coupling, planar evaluation is tractable exactly for q = 2, 4; positive vertex weights must also be constant (Corollary 6.3). The four-state exception consists of two independent Ising bits. In contrast, the spin-one Blume–Capel model [BP18] is hard at every nonzero pair coupling, for all finite single-site potentials.
• Coupled Ising systems. A state can contain several Ising spins, with interactions coupling products of these spins. With unit vertex weights, tractability is equivalent to linear independence of the binary labels of the active interactions (Corollary 6.4): these products must be able to serve as independent coordinates. For Ashkin–Teller systems [GW81] with only four-spin couplings between layers, this says that the fixed graph describing which layers are coupled must be a forest. The weighted criterion specifies which single-site potentials preserve these decompositions.
• Quantum imaginary-time kernels. For a fixed real symmetric Hamiltonian with nonpositive off-diagonal entries and a connected transition graph, the imaginary-time kernel is positive for every . With unit vertex weights, its contraction on planar graphs is tractable exactly when, after relabeling states and adding a scalar, is a sum of independent negative bit-flip terms (Corollary 6.5). For the quantum clock hopping term [VKNV25], this again singles out .
The classifications persist on graphs of any fixed bounded orientable genus, where the extension of the FKT algorithm uses a bounded number of Pfaffians [Pha20]. The same structural boundary therefore describes the algorithmic benefit of bounded topology.
1.3 Related work
Complexity classifications organize this landscape by asking which local interactions make counting easy. For graph homomorphisms on general graphs, the theory progressed from unweighted targets [DG00, DG04] to nonnegative weights [BG05], then to real and complex algebraic weights [GGJT10, CCL13]. The counting constraint satisfaction framework allows relations of any arity, with corresponding arbitrary-domain classifications [Bul08, CCL16, CC17]. These results make tractability a structural property of the interactions, rather than a collection of isolated algorithms.
For planar inputs, Valiant’s holographic algorithms [Val08] use the FKT algorithm within a broader framework. The planar Boolean counting CSP classifications [CLX17, GW20, CF16] identify the additional tractable cases through matchgates, which encode weighted perfect matchings. General planar Holant problems, with local constraints on edge assignments, admit further tractable families [CFGW22]. The present classification identifies the full extent of this phenomenon for nonnegative graph homomorphisms with arbitrarily many colors.
Within this problem, Cai and Maran classified real three-state matrices and nonnegative full-rank four-state matrices [CM23, CM24]. Cai, Maran and Young [CMY26] obtained arbitrary-domain results by diagonal separation: planar edge gadgets distinguish colors through their diagonal entries. They related obstructions to separation to quantum automorphisms. Highly symmetric interactions require a different route. For example, has rank four and admits independent coordinate flips acting transitively on its colors. Every edge gadget consequently has constant diagonal, yet the partition function is the product of two Ising partition functions. Our proof recovers hidden coordinates while retaining this symmetry.
1.4 Proof overview
The central difficulty is to recover independent coordinates without assuming that gadgets can distinguish the colors. Our starting invariant is the off-diagonal support of the ordinary matrix logarithm. For a positive definite Ising tensor, this support is a Boolean cube (2.1).
We begin with a positive definite interaction available through planar reductions and choose one whose logarithmic support graph has as many edges as possible. This maximality turns the freedom to construct further gadgets into a restriction: no construction can preserve its edges and add a new one. Interpolation then supplies matrices whose entries are powers of a parameter, with exponent equal to distance in this graph. The interpolation uses finitely many exact oracle queries. Near zero, maximality forces the logarithm of each distance kernel to have no off-diagonal entries outside the chosen graph. Further planar gadgets restrict shortest paths and common neighbors. In particular, every distance-two pair has exactly two common neighbors, which are nonadjacent.
The bridge from these algebraic constraints to global structure is matrix entropy. The distance matrices are initially positive definite only near one endpoint of the parameter range. By viewing them as unique maximum-entropy completions of prescribed entries, we extend positive definiteness throughout the interval. The completion fixes the diagonal and the entries on graph edges, leaving the other entries free. Its stationarity equations set the corresponding entries of the logarithm to zero, precisely the condition supplied by maximality. Uniqueness and analytic dependence on the parameter then identify the completion with the distance kernel throughout the interval. This links the counting problem to Gibbs manifolds and logarithmic sparsity [Pav24, PST24]. After normalization, the same completion is quantum maximum-entropy inference: among density matrices with specified expectation values, it selects the state of largest von Neumann entropy [Wat18].
Positive definiteness now brings in the classical connection between distance kernels and Euclidean embeddings [Sch38]. Graph distances become squared Euclidean distances; local squares become parallelograms. Together with maximality, this forces a Cartesian product of complete graphs. The parallelogram rule lets us transport the cliques through one vertex consistently across the graph. Their spans are orthogonal, so they define separate coordinates; connectedness and this transport show that every combination of coordinates occurs. Known hardness results rule out coordinates with three or more states and unequal-diagonal two-state factors, leaving independent zero-field Ising coordinates. To apply these hardness results, interpolation recovers individual factors from the available partition functions. Once larger cliques are excluded, maximality forces the logarithms of the remaining positive definite interactions to separate into one-bit terms. Exponentiation gives tensor decompositions in common coordinates, which are also needed to compare auxiliary interactions later. Thus entropy supplies a global positivity principle, and geometry turns it into the product structure required by the counting algorithm.
We next remove the positive-definiteness assumption. First, we classify the possible zero patterns: unless hardness already follows, each support component is entrywise positive, has complete bipartite support, or is a zero singleton. After separating the elementary local factors, we treat the two nontrivial cases. For an entrywise positive component, positive definite auxiliary interactions recover its Ising structure, even when the original matrix is singular or indefinite. For a bipartite component, the interaction between the two sets of states is a rectangular matrix. The symmetric theory recovers Ising coordinates on each side separately; equality in a Fourier norm bound then forces these coordinates to pair across the interaction, yielding its tensor decomposition. The two Gram matrices initially determine independent bases on the two sides. Distance kernels distinguish Fourier degrees, while the norm equality removes the remaining freedom to mix coordinates within those degrees. Finally, finite moments recover the local factors separated off earlier and determine which vertex weights preserve tractability, completing the unweighted and weighted classifications. Concretely, these moments record the total vertex weight above each core state at each amplitude. A finite Vandermonde system recovers those totals, and tractability requires them to agree across the Ising coordinates.
Concurrent work. After we publicly released our initial draft [LM26], Cai and Tang informed us of their independently obtained results [CT26]. Cai and Tang prove the same classification for entrywise positive, positive definite matrices; their v1 states the nonnegative extension with its proof deferred to Part II. Their route recovers product structure through an algebra of centered entrywise logarithms and distance-regular graph classification.
2 Planar simulation tools
Our graphs may have parallel edges and loops. Inequalities and refer to entries; and mean positive semidefinite and positive definite, respectively. Write for the identity and all-ones matrices and for the all-ones vector, omitting the size when clear. Loops count twice towards the degree; is the number of connected components, including isolated vertices. Write for the entrywise product, for an entrywise power, and for an ordinary matrix power. For a symmetric matrix , where projects orthogonally onto the -eigenspace, we use [Hig08]. For , this defines and . Perron–Frobenius theory gives a positive matrix a positive leading eigenvector, unique up to scale [HJ13].
The logarithm of an Ising tensor. Let , with and , and let be the permutation matrix flipping bit . For some scalar ,
This follows by diagonalizing the two-state factors. The off-diagonal support of is exactly the Boolean cube.
Planar gadgets. During reductions we use mixed instances: each edge is labelled by a matrix from a fixed finite set , and a vertex may carry unary functions , each multiplying a coloring's weight by . The fixed background factor is counted once per vertex. The resulting evaluation problem is Pl-GH( ); omitting means .
A two-terminal planar gadget has ordered terminals on its outer face. Its signature entry is the sum over internal colors when the terminal colors are fixed to i, j. If their color sets are X, Y, respectively, the signature is an matrix, as when the terminals lie on opposite sides of a bipartite interaction. Swapping the terminals transposes the signature.
Background vertex weights are omitted at terminals, so substitution into an input edge counts them once; explicit terminal unaries are retained. With , series composition gives ADB and parallel composition gives . In particular, with unit background, an h-edge path gives , while h parallel edges give . These are the stretching and thickening gadgets of [CMY26]; a loop gives the unary . Substitutions preserve the cyclic order at input vertices.
Joint simulation. For fixed background weights w and endpoint color sets, a finite set B is available from a fixed language F if
A gadget realizes a signature by substitution; interpolation simulates it through finitely many oracle queries. Until Section 6.1, all constants in counting problems are algebraic and computations take place in fixed number fields. Uniformity for a rational parameter means polynomial cost in its binary encoding length, denoted by bit(x), as well as the instance size.
2.1 Interpolation and functional identities
Lemma 2.1 (Product and spectral interpolation). Let B, C be fixed algebraic matrices with the same row and column index sets, and suppose C is available. Assume
For every and two sequences of positions , , with repetitions allowed and for every , assume also that
Then B is available. The same statement holds for unary functions.
With unit background weights, an available symmetric matrix C also gives
Here is the spectral projector of C, so is the orthogonal projector onto im C.
Proof. For product interpolation, fix a mixed instance with marked occurrences of . Let be the number of distinct nonzero entries of ; if , both matrices are zero and the claim is immediate. Replacing each marked occurrence by parallel copies of gives
Here ranges over length-m products of nonzero C-entries, and sums the remaining weights of the corresponding colorings. The hypotheses assign a well-defined target product
Colorings using a zero entry of C also contribute zero for B. Vandermonde interpolation at consecutive positive integers h recovers the , and the desired value is
For unary functions, replace parallel edges by repeated unary factors.
For the spectral assertion, use unit background weights and replace marked edges by paths of length and expand . The same Vandermonde calculation now groups products of positive eigenvalues. For these groups the target products are
Zero eigenspaces contribute zero to the projector; the power case has . The fixed matrix size bounds all product counts, query sizes, and exact bit lengths polynomially.
In particular, from we obtain its zero-one support matrix and the zero-one indicators of its smallest positive and largest entries. Positive unaries admit fixed rational powers. Known nonzero scalar multiples are harmless, contributing one scalar for each marked occurrence.
The next lemma turns identities of matrix-valued functions into finite reductions. This lets us extract a distance or a tensor factor from a family of gadgets without evaluating the functions near a limit.
Lemma 2.2 (Transfer of product identities). Let be a polynomial matrix with fixed algebraic coefficients, or for a fixed algebraic . Let be a fixed algebraic matrix with the same row and column index sets as . Suppose there is an integer such that
and these integer samples are available by one algorithm of cost poly , where N is the instance size. For every and every two sequences of entry positions, assume
Here means equality as functions of t. Then B is available.
For a target with rational parameter , require the same implication for each . Let contain the fixed source data. Suppose is encoded in effective number fields with polynomial-time arithmetic and, for a fixed ,
Here bit and time count the encoding size and construction time, including the field presentation. Then is available uniformly in bit(x).
Proof. Fix an input with marked occurrences of ; for there is nothing to replace. We choose an integer sample that preserves the product relations needed for this input.
- Bound coincidences between distinct product functions. Let index the matrix entries, write and for , and put
Every nonzero difference has at most real zeros, where
The first bound is the polynomial degree bound. For the second, expand in the positive eigenvalues of : there are at most distinct exponential bases. A nonzero sum of real exponentials with distinct exponents has at most zeros, by induction using Rolle's theorem.
- Choose a sample and apply product interpolation. Among all pairs , there are at most exceptional real points where nonidentical product functions agree. Hence the integer interval
contains a nonexceptional sample. Evaluate the products and choose
Identical functions agree at every sample, while an extra coincidence reduces this count. Thus, for every ,
The last implication is the hypothesis of this lemma. Since , the length-m Vandermonde construction in the proof of Lemma 2.1, with , evaluates . The bounds ensure polynomially many exact comparisons and queries of polynomial size. Sample entries and products have polynomial bit length, so composing with the assumed simulation of proves availability of .
- Uniformity for . The sample , interpolation bases, and recovered coefficients depend only on F and . Only the target products change to
The stated field, construction-time, and encoding bounds therefore give total cost poly(|Ω| + bit(x)).
Parameter-dependent spectral calculations may use different bounded-degree extensions of a fixed number field . Whenever an inner answer belongs to , the field trace (the sum of its algebraic conjugates) returns it to that encoding before an outer interpolation: . Degree and coefficient-size bounds keep this operation polynomial-time in each sample field.
2.2 Roots, quotients, and background weights
Lemma 2.3 (One-root restriction). Fix an algebraic symmetric matrix on , algebraic weights , and a subset . There are fixed rooted planar graphs and coefficients such that every connected rooted planar graph satisfies
Here identifies with . In particular, for every support-component vertex set of ,
Proof. Let be the conditional value of a rooted planar graph with root color and root weight omitted. Let span these vectors, with inner product . Project the indicator onto , writing the projection as in a fixed rooted-signature basis. For the rooted input ,
Root identification preserves planarity. The basis and coefficients are fixed; the latter are obtained by a positive definite Gram system. Restricting a root to a target component restricts every nonzero coloring of a connected input to that component.
This is a reduction for one restricted root. It does not make available as a unary that can be imposed independently at arbitrarily many vertices: the projection need only agree with when paired with rooted signatures.
Lemma 2.4 (Tensor Gram matrices and weight removal). Let be nonzero and pairwise nonproportional. For , the tensors are linearly independent.
Let and have fixed algebraic entries. Suppose the rows of are nonzero and pairwise nonproportional, and put
For every fixed finite language containing and every fixed ,
Thus weight removal retains all constraints in F.
Proof. For independence is immediate. Otherwise choose linear forms vanishing at but not . Their products separate the tensor powers.
For weight removal, the matrix BDB is the Gram matrix of the weighted rows of B; entrywise power p gives the Gram matrix of their tensor powers. By the independence just proved, the gadget is positive definite. A chain of h copies has signature
Spectral interpolation extrapolates from positive integer to , supplying . A loop contributes , cancelling the background without changing any other constraint in . Finally, product interpolation supplies ; its loops realize the unary .
If are the identical-row classes of , retain one row and column per class to obtain , and put . Direct summation gives
Zero rows matter only on isolated input vertices. For a zero-one matrix, the remaining distinct rows are automatically nonproportional, so Lemma 2.4 transfers unweighted quotient hardness to every positive weighting. We call identical rows twins; merging them uses their numerical entries.
2.3 Hardness endpoints and the FKT algorithm
We use two known planar hardness results: a strictly positive, invertible symmetric matrix with unequal diagonal entries is hard [GW20, CMY26]; and is hard for , by the planar Tutte classification [Ver05]. The latter follows from , where is the Tutte polynomial. Equal-diagonal Boolean matrices are evaluated by the FKT algorithm, using the high-temperature expansion
Replacing each vertex by a planar matching gadget turns the even-degree constraint into a weighted perfect-matching sum, evaluated by the FKT algorithm. This remains valid for ; loops can equivalently be removed first, since their original diagonal contribution is 1.
3 Logarithmic support, entropy, and geometry
Fix a source language and a color set X, which may be a prescribed endpoint domain. Let A be the family generated by symmetric planar gadget compositions and the interpolations of Section 2, with unit background weights. Each finite subfamily is available: compose the finitely many reductions in its construction. Assume A contains a connected nonnegative positive definite matrix.
For let be the graph on with an edge when and . Choose a connected , , in maximizing , and write , . The maximum exists because there are finitely many possible supports on . The graph is connected, since otherwise , and hence , would be block diagonal.
3.1 From maximum support to distance kernels
We may arrange that every edge entry of is positive. Indeed, for an even integer and small positive rational , the matrix is nonnegative and, by the Schur product theorem, positive definite. Moreover,
All old edges persist positively, and maximality forbids new ones. Replace M by one such matrix.
Lemma 3.1 (Distance kernels). Let be a fixed algebraic matrix on X, with connected and
For every , the matrix
is available from H, uniformly in bit(x).
For the maximizing support chosen above, there is an such that, for every real , and
Proof. Put . We apply Lemma 2.2 to the source family and target . For ,
The leading coefficient sums positive products over shortest paths; diagonal entries have order zero. Orders add in products, so every product identity for entries of preserves the sum of their distances and hence the corresponding product of entries of . Also for : shift K by a scalar to make it nonnegative and use the exponential series. Lemma 2.2 applies, with integer samples realized by paths. The target powers of x have bounded exponents, giving uniformity.
For the second assertion, take , so . Since , it is positive definite near zero, and on an edge . For small rational it therefore retains every edge of . Maximality gives (3.1); analyticity extends the identity to real near zero.
Lemma 3.2 (Local rigidity). Let satisfy
For distinct , put and let be the set of shortest paths. Then
Every distance-two pair has exactly two common neighbors, which are nonadjacent. Every neighborhood is a disjoint union of cliques.


Figure 1. Left: the Wheatstone gadget, with fixed terminal colors and summed internal colors . Its central edge contributes the factor , which detects adjacency of the two common neighbors in . Right: an induced square of after the embedding (3.4), with one vertex translated to the origin; the opposite vertex is forced to be .
Proof. Shortest-path counts and weights. For shortest paths , put . For even , put . Near zero its logarithm retains every edge of , with entry . For rational , maximality excludes all other off-diagonal entries; analyticity gives the same zeros near . The diagonal entries of are . In the expansion , a term reaching distance therefore needs at least edge factors. The coefficient of uses exactly such factors: a diagonal insertion or a longer walk has higher order. Comparing this shortest-path coefficient with that of gives
Taking sth roots as shows that the left-hand base is . Dividing by then shows that exactly paths attain the maximum. Their sum already equals , so positivity excludes every other path.
Common neighbors and neighborhoods. The path count with gives exactly two common neighbors. To prove they are nonadjacent, use the Wheatstone gadget in Figure 1, with all five edge matrices equal to :
Let be the two common neighbors of the distance-two pair , and set . Put and . The exponent contributed by is , where exactly on . The terms of degree at most five are
| Internal colors | Number | Degree |
|---|---|---|
| 4 | 4 | |
| One in , one in | 8 | 5 |
| with | 5 |
All other pairs have degree at least six: if one color lies outside , either or and . For an edge , ; diagonal entries are , and in general . Thus only the intermediate colors contribute through degree five to , giving
Since , terms of order at least three in the logarithm series contribute . On every edge the logarithmic entry is , while . Thus would add a logarithmic edge to a nonnegative positive definite available matrix, contradicting maximality. An induced three-vertex path in a neighborhood would give a distance-two pair with adjacent common neighbors. Hence every neighborhood is a disjoint union of cliques.
3.2 Entropy supplies global positive definiteness
Recovering Euclidean distance requires control as . Maximizing matrix entropy supplies a positive definite completion throughout the interval and identifies it with the distance kernel.
Lemma 3.3 (Entropy continuation). Let be a finite connected graph. Suppose there is an such that (3.1) holds for every . Then
Proof. We construct an analytic matrix on satisfying the nonedge equations, and then show .
For each the trace is fixed, so we minimize
using . The feasible set is compact and contains the positive definite matrix . A minimizer is positive definite: moving a singular point towards this matrix changes the zero-eigenvalue contribution by , , and all other contributions by , decreasing .
On real symmetric matrices use and the Frobenius norm . Write for the derivative of at in direction . The gradient of is , and its Hessian is positive:
There is therefore a unique minimizer , characterized by on the unconstrained off-diagonal positions.
We next show that is analytic and agrees with . Let be the symmetric matrices supported on the diagonal and edges of , and the orthogonal projection onto this space, obtained by zeroing the other entries. With the adjacency matrix, the stationarity equations are
For nonzero ,
The derivative is invertible, so the implicit-function theorem and uniqueness make analytic throughout . Near zero, is positive definite and satisfies the same stationarity equations, hence equals . The analytic identity theorem gives
which is the required conclusion.
Remark (Quantum maximum entropy). Under Lemma 3.3, put and , . A density matrix is a complex Hermitian positive semidefinite matrix of trace one. Among such matrices satisfying
uniquely maximizes the von Neumann entropy , with natural logarithms and . Indeed, the stationarity equations above give . Hence
Here is quantum relative entropy and is the sum of the singular values of ; the inequality is quantum Pinsker [Wat18, Theorem 5.38]. Thus an entropy deficit bounds the trace-norm error by under the same constraints. For a Boolean -cube, the recovered color coordinates give the product state .
3.3 Euclidean distance forces a Cartesian product
Write for the complete graph on vertices. In a Cartesian product , adjacent tuples differ along one factor edge.
Lemma 3.4 (Geometric rigidity). Let R be a finite connected graph satisfying:
(i) for every ;
(ii) every neighborhood is a disjoint union of cliques;
(iii) every distance-two pair has exactly two common neighbors, which are nonadjacent.
Then
For d = 0, the product is a single vertex.
Proof. To embed the graph distance, put , , and . Since , positivity gives for . Thus is a Gram matrix. Taking vectors with this Gram matrix and expanding their squared differences gives an injective map such that
An induced square becomes a parallelogram: the vectors and are orthogonal unit vectors, and the prescribed distances force .
We next use this parallelogram rule to transport cliques across an edge. Let denote the neighbors of . Every edge lies in a unique maximal clique , because is a disjoint union of cliques. For each , the unique other common neighbor of , completes such a square. This gives a reversible bijection from to , translating by . It transports entire maximal cliques; an extra vertex in an image clique would enlarge the original one under the inverse bijection.
To recover the Cartesian coordinates, choose a base vertex with , and let for the maximal cliques through . Each is a unit-side regular simplex containing zero, and their spans are orthogonal by (3.4). We maintain the following invariant along a walk:
It holds at . A step in the th clique replaces by another point of . That clique stays fixed, while the parallelogram rule translates every other clique by the step vector, preserving the invariant. Orthogonal projection onto span() recovers from , so different walks to give the same coordinates. Connectedness gives . Conversely, the invariant lets us change each coordinate to any point of , giving every tuple. Thus coordinates are unique and adjacency is exactly one coordinate change. Hence .
Theorem 3.5 (Maximum logarithmic support). The maximizing graph R has the form
Proof. Combine Lemmas 3.1, 3.2, 3.3, and 3.4.
3.4 Recovering matrices in common coordinates
Write for the Boolean cube. The geometry so far describes one logarithmic support. When it is , the next proposition places every available matrix in the same coordinates, as needed to compare Gram matrices later.
Proposition 3.6 (Common tensor coordinates). Suppose and fix an identification of its vertices with . For every with and , there is a factorization in these fixed coordinates
If the support of N is connected, then for every r. If N is algebraic, and all can be chosen algebraic.
Proof. We first determine the off-diagonal entries of . Index colors by ; let be the th unit bit vector, with bit additions taken modulo two. Put . For small rational , the available matrix
is positive definite. Its entrywise square is nonnegative and has logarithmic leading term off the diagonal. Choose small enough to retain every edge of . Maximality then forces outside the cube edges.
For sufficiently small positive , is entrywise positive: since are supported on the cube, the leading term of its entry has order , with positive coefficient for small by continuity from . Its logarithm also retains all cube edges positively. For rational parameters, availability and maximality therefore give ; continuity gives the same zeros throughout this parameter region. We can now apply (3.2) to both diagonals of a cube square: if its cyclic edge weights are , then and , so , . Comparing the coefficient of shows that has a constant weight in each direction. With , this gives
We next prove that is a sum of one-bit functions. Fix rational and put , with . The same maximality argument makes the nonedge entries of vanish in an open sector, hence as analytic identities near zero. Direct expansion to total degree three gives the following coefficient, where and denotes coefficient extraction:
For opposite square vertices ,
The nonedge coefficient vanishes, so this mixed second difference is zero. Thus each one-bit increment is independent of the other bits: .
Finally, the one-bit summands of B commute, so exponentiating gives a tensor product of positive definite factors. Normalizing their entries to one gives
These entries are nonnegative, and algebraic when N is algebraic. A zero off-diagonal entry in a factor disconnects the support.
4 The positive definite dichotomy
The geometry leaves two possible obstructions to tractability: clique coordinates of size at least three, and Boolean factors with unequal diagonals. In each case one must recover a hard factor from a product of partition functions. The following arguments perform that recovery.
Lemma 4.1 (Isolating a Potts factor). If a maximizing support has a factor with , the source problem is -hard.
Proof. We recover from the source, reducing the hard Potts problem to it. Write and , where . A two-edge path gives . In a size-k coordinate its diagonal and off-diagonal entries are
If size occurs times, a product of entries of has the form . The polynomials are distinct irreducible quadratics over , whereas every splits into real linear factors. Unique factorization therefore preserves each in a product identity. Lemma 2.2 supplies
by replacing a product by . The recovered value satisfies
The root is the unique positive one. Exact algebraic root recovery is polynomial-time, and the Potts endpoint is hard.
Lemma 4.2 (Isolating a Boolean field). Let
with fixed algebraic parameters. If for some , then is -hard.
Proof. We recover a Boolean interaction with unequal diagonal entries.
An available tensor family. After a scalar normalization and independent bit flips, write
The logarithm of has positive weights on cube edges, so Lemma 3.1 supplies . For any fixed positive odd , add source loops at each terminal of an -edge, then take a parallel product with this kernel. This supplies
This simulation is uniform for rational 0 < x < 1.
Group identical pairs into classes of size . Set and . Choose so that are distinct among classes with . Classes with equal already have distinct . For different values , the ratio is strictly monotone in , as follows from the strict increase of coth . Each pair excludes at most one value of , leaving an admissible positive odd integer.
Product identities that retain one factor. We show that spectral product identities preserve each unequal-diagonal class separately. The eigenvalue branches and their ratio are
Both eigenvalues are positive on . A product of eigenvalues of the full tensor has the form
The common factors cancel when comparing two such products, leaving with integer . For , the square root has a simple branch point at , where . Continuing once around that point changes the sign of this square root and leaves the others unchanged, since the are distinct. Thus it exchanges just the two branches of class . Applying this continuation to the product identity gives . Since , we obtain . Thus an identity between equal-length products of eigenvalues of preserves the number of smaller-branch choices in each unequal-diagonal class.
Fix one such class g. These identities permit the spectral replacement
in the tensor eigenbasis. This retains the chosen Boolean interaction and replaces every other factor by equality. To implement it, we select samples at which the functional product identities are the only numerical coincidences.
Implementing the replacement with finite queries. Let be a fixed number field containing all . For an input with edges, there are at most formal spectral products. They lie in the fixed-degree extension
If there are unequal-diagonal classes, multiply a nonzero difference by all its algebraic conjugates (its field norm). The result is a nonzero polynomial of degree at most : the spectral products are integral over , each conjugate grows at most as , and there are at most conjugates. Every zero of the difference is a zero of this polynomial. Hence there are at most exceptional real samples at which two nonidentical products coincide.
The reduction now has three finite steps.
-
Separate products. Choose distinct rational points in of polynomial bit length. Retain those with the maximum number of distinct numerical spectral products. These are exactly the nonexceptional samples, so at least remain.
-
Recover the chosen factor at each sample. For each retained x, replace input edges by paths of consecutive lengths and use Vandermonde interpolation to recover the coefficients grouped by spectral product. Assign each group its product for , as permitted by the branch argument. This gives ; return it to K by the trace operation in Section 2.
-
Fix the target. The value is a polynomial in of degree at most . Interpolate these values to evaluate it at .
The sample fields have bounded degree, and all sample counts, path lengths and bit lengths are polynomial. Each is simulated from N, so every oracle call evaluates the original fixed interaction on a planar graph.
Finally,
Recovering the positive root evaluates the invertible Boolean matrix , whose diagonal is unequal. The Boolean hardness endpoint completes the reduction.
Theorem 4.3 (Positive definite core). Let have fixed algebraic entries, connected support, and . Then if
and Pl-GH(M) is #P-hard otherwise.
Proof. Assume Pl-GH(M) is not #P-hard, and choose a maximum logarithmic support in the available family. Theorem 3.5 and Lemma 4.1 leave a cube. Proposition 3.6 factors M in its coordinates, and Lemma 4.2 forces each factor to have equal diagonals. Positive definiteness then gives . Conversely, the partition function factors into zero-field Ising partition functions, each evaluated by the FKT algorithm.
Corollary 4.4 (A whole family in the same coordinates). Suppose the source is not #P-hard and its available family A contains a matrix M with connected support and
Then the color set has size and admits one identification with such that every with has, in these same coordinates,
Proof. The preceding proof and Proposition 3.6 first give common coordinates for the positive definite members. For general , the available matrix tends to the positive diagonal as . For small rational it is therefore in these coordinates. Entrywise comparison gives .
5 Nonnegative interactions and vertex weights
We now remove the definiteness assumption. Support interpolation first limits the possible zero patterns. Normalization then separates amplitudes from a core with nonproportional rows. A symmetric core is controlled by the common-coordinate result; a rectangular core requires its two sets of coordinates to be aligned. Finally, moments restore the amplitudes and identify the admissible vertex weights.
5.1 The zero-one classification
Proposition 5.1 (Support rigidity). Let and let be fixed and algebraic. A support component of is basic if it is a fully looped clique, a loopless complete bipartite graph, or a loopless isolated vertex. If every support component is basic, then
Otherwise Pl-GH(A) is #P-complete and Pl-GH(A, w) is #P-hard.
Proof. We first prove hardness for nonbasic supports. Restrict to a connected component; a zero singleton is already basic. On every other component, merge equal rows. Lemmas 2.3 and 2.4 transfer hardness back to the original weighted problem. Let be the order of the resulting zero-one matrix . It has distinct nonzero rows, so for . Unless some connected block of is hard, Theorem 4.3 makes every block of an Ising tensor. Positive entrywise th roots act factor by factor, replacing each parameter by . Thus every block of has the form
In particular these blocks are positive definite with constant diagonal.
The components of are the even-walk classes of the connected support of : one class in the nonbipartite case, or the two parts in the bipartite case. In the former case the constant diagonal makes regular, say of degree . In the latter, write . Positive definiteness of both and makes the two parts equally large; their constant degrees then agree by counting edges. Again .
If every block of is a singleton, distinct rows of have disjoint supports, and symmetry forces each row to have at most one nonzero entry. Connectedness leaves the basic cases. Otherwise take a nonsingleton integer block of . Its diagonal is and row sum is , so (5.1) becomes , with and coprime integers . All numbers are integers. For a prime , take . Each selected numerator is coprime to , so integrality for gives
where is the exponent of . Thus . But the row sum gives
contradicting . Thus a nonbasic support yields a hard block.
Conversely, basic components are evaluated by independent color sums and the two bipartite orientations. The unweighted count belongs to #P, giving completeness.
Consequently a nonnegative matrix, with positive background weights, is hard unless every component is a positive symmetric block, a positive rectangular bipartite block, or a zero singleton.
5.2 Symmetric and rectangular cores
Lemma 5.2. Let have fixed algebraic entries, distinct rows, and for all . Either Pl-GH( ) is -hard, or
Proof. Two proportional rows would give and , hence . Thus is positive definite for some fixed . Corollary 4.4 applies to the family generated from , giving unless the source is hard. Unit diagonal sets , and distinct rows exclude .
Rectangular cores. For write , on disjoint color sets . Counting on a prescribed input bipartition , is Turing equivalent to the ordinary problem: one root restriction determines the orientation of a connected bipartite input, and summing the two orientations recovers the ordinary value. Nonbipartite inputs contribute zero; isolated vertices contribute the appropriate weight sums. To use a same-side Gram on an arbitrary planar graph, subdivide every input edge and sum the new vertex over , keeping the original vertices in . The subdivision supplies a bipartite instance with the required prescribed orientation.
Proposition 5.3 (Rectangular rigidity). Let have fixed algebraic entries, pairwise nonproportional rows, and pairwise nonproportional columns. Either Pl-GH( ) is -hard, or there are permutation matrices such that
Proof. Assume the source is not hard. Tensor Gram matrices on both sides give positive definite available matrices. Choose the common cube coordinates of Corollary 4.4 separately on X, Y. For a fixed h, and are positive definite Ising tensors. For either Gram matrix G, taking roots factor by factor gives
Hence is square of order . For the conclusion is immediate; assume . Their constant Perron vectors imply for some : the two Grams have the same largest eigenvalue, and carries one positive Perron vector to the other.
Let be the orthogonal Walsh matrices in the chosen coordinates, with entries , for . The Fourier degree of this basis vector is ; the empty set indexes the constant vector. Put
where is orthogonal. Indeed, is diagonal, and its tensor eigenvalues are ; dividing each row by leaves an orthogonal matrix. The empty-set row and column of have sole entry 1 at the empty set. The remaining freedom is ; we show that relabeling the bits makes it the identity.
Noise separates Fourier degrees. Distance kernels supply the noise matrix
The subscripts X, Y specify the coordinates on the corresponding side. Thus scales a degree-r character by . For rational z, the available matrix is an Ising tensor in the fixed X coordinates. Thus is diagonal. For fixed , different degrees have distinct eigenvalues; each row of O is an eigenvector of and is therefore supported on a single degree . The normalized Gram eigenvalues are
The tensor identities and give . The empty row occupies the unique degree-zero direction. Every other row is orthogonal to it, so . Since , all and . We have
with each an orthogonal matrix indexed by the r-element subsets of [d].
Parallel edges force equality in a norm bound. Apply noise on X and normalize:
Define the double Fourier coefficients by
Character multiplication, , where denotes symmetric difference, gives the convolution
Since , the coefficient of comes exactly from ordered disjoint decompositions . Two parallel edges on each side of an internal vertex supply the positive symmetric matrix . It is an Ising tensor in the same coordinates, even if singular, by Corollary 4.4. Its Fourier matrix is , so its eigenvalues are the squared row norms . Tensor eigenvalues therefore satisfy, for ,
These identities hold for rational , hence identically as polynomials in . Since and , comparing lowest-order terms gives
For any matrix , write for its row indexed by , and use Euclidean row norms. For , abbreviate singleton indices by their elements and define . The leading degree-two row of is ; its possible degree-zero entry is proportional to for . Equation (5.3) forces the squared norm of the parenthesis to be 4. For orthogonal unit rows of ,
For the corresponding rows, the triangle inequality gives
Equality forces for every . The rows of have disjoint supports, so is a signed permutation. Relabel the coordinates and flip bits to make ; equality then gives . For the same conclusion follows directly by a bit flip.
Inductively suppose for , with . By the convolution formula, the lowest-order terms in row , , come from ordered disjoint decompositions . Two use an empty set; the other use only lower-degree identity matrices. The coefficient of is therefore . Here is the unit row vector at in degree . Equation (5.3) makes its normalized norm . As both and are unit vectors, equality forces . Thus all , and
Absorb the scalar and set .
5.3 Amplitudes and vertex weights
Normalization merges proportional rows into an Ising core, whereas the theorem merges only identical rows. The information lost in normalization is the amplitude and total weight above each core color. Finite moments recover this information, proving the weighted and unweighted results together. For example, let , with , positive , and , . The two amplitude colors above each bit state have proportional but distinct rows. Diagonal normalization changes to , merging these colors into one core state. The moment argument keeps their weighted masses at amplitudes separate.
Theorem 5.4 (One fixed positive vertex-weight vector). Let and have fixed algebraic entries. For the identical-row classes of , define
For each support-component vertex set of , put and . Then if each , after relabeling its colors and weights together, has one of the forms
(5.4)
For each component, the parameters satisfy
with when present and . In every other case is -hard under polynomial-time Turing reductions.
Fields on the Ising core.
Lemma 5.5. Let have order , with and for every . For fixed algebraic , the respective tractable cases are
Each problem is in FP under its displayed condition and #P-hard otherwise.
Proof. The rows of B are nonproportional. For the symmetric problem, weight removal and square-root unaries (Lemma 2.4) supply, with unit background,
The positive matrix has a constant row sum , and . If , then at a maximum of the diagonal of is strictly greater than , and at a minimum it is strictly smaller. Theorem 4.3 makes hard.
For the bipartite problem, put , where and . The two positive definite Gram matrices and are available with unit background. Unless the source is hard, both have constant diagonal; their equal traces make the constants equal, say to . Thus
If is nonconstant and , positivity gives , hence for every . At a maximum of , the first equation is then impossible. Thus is constant, and the second equation makes constant. Constant weights give the algorithms by multiplying the Ising value by vertex factors, separately for the two orientations in the bipartite case.
Recovering amplitudes by moments
Necessity in Theorem 5.4. Support interpolation and Proposition 5.1 leave only positive symmetric components, positive rectangular bipartite components, and zero singletons. Root restriction handles each component separately.
For a positive component , set , , and . A source loop supplies the unary ; unary interpolation supplies its powers. Attaching at each endpoint of an M-edge realizes the normalization . Merge identical rows of , obtaining a unit-diagonal core
B indexed by classes . Its rows are nonproportional. With the additional unary , its background is
Weight removal and Lemma 5.2 make unless the source is hard. Lemma 5.5 requires to be independent of for every .
Only finitely many moments are needed. List the distinct values of the as and put . For , equation (5.5) gives
The Vandermonde matrix is invertible, so is independent of . Every occurs in some class, where its mass is positive because ; hence . In the original matrix, identical rows are exactly the colors with the same normalized class and the same amplitude . Consequently its actual quotient is with and .
For a bipartite component, write its positive cross block as V, with background weights . The two-edge return gadgets supply the positive unaries
Their inverse square roots, attached to the respective endpoints, normalize to . Merge its equal rows and columns into classes . Proportional rows of have proportional norms, so the resulting core has no proportional rows or columns. Independent unary powers on the prescribed input sides give
After weight removal, Proposition 5.3 makes unless the source is hard. Lemma 5.5 requires each vector in (5.6) to be constant. Apply the same Vandermonde argument separately to the distinct left and right amplitudes. Every core state has the same weighted mass at each left amplitude and at each right amplitude. Merging actual twins therefore gives the last form in (5.4); absorb into an amplitude vector.
For sufficiency, consider first a positive component and define . Its value on any graph is
For a connected bipartite input with parts L, R, the bipartite target form instead contributes
where ; it vanishes on a nonbipartite input. For an isolated vertex the answer is simply the total vertex weight. A zero singleton contributes only to edgeless inputs. Finally, sum over target components and multiply over input components. These formulas and the FKT algorithm prove sufficiency and polynomial bit complexity.
To finish Theorem 1.1, apply the necessity argument with original weights . The masses recovered by the moment equations are then integer multiplicities, equal above every core state. Repeat each amplitude that many times in or ; this recovers precisely the original matrix forms (1.2). Formula (5.7) with unit amplitude weights, and its bipartite counterpart, prove sufficiency.
Nonnegative vertex weights require no new argument: first delete zero-weight colors and then apply Theorem 5.4. If none remain, the value is zero on every nonempty input and one on the empty graph.
6 Real parameters and applications
The real-parameter extension in Theorem 6.1 lets us apply the classifications directly to Boltzmann weights.
6.1 Arbitrary fixed real weights
We retain the exact model of [CMY26, Appendix A]: the weights generate a fixed field
Here consists of algebraically independent real constants, and has degree over . An exact answer is encoded by the rational functions . The minimal polynomial of , the expressions for the source weights, and compatible presentations of auxiliary fields are fixed data. Equality is checked symbolically in these representations.
Theorem 6.1 (Fixed real parameters). Let
be fixed in the field representation above. The classifications and hardness alternatives of Theorems 1.1 and 5.4 hold for Pl-GH(M) and Pl-GH(M, w), respectively. For , the deletion rule for zero-weight colors applies.
Proof. Exact reductions. The fixed numbers of variables and basis elements make arithmetic and equality polynomial-time on rational-function encodings of polynomial degree and coefficient bit length. Products of polynomially many fixed weights have these bounds, as do polynomial-size interpolation systems by fraction-free elimination. Grouping colorings by their fixed-weight occurrence counts bounds the exact output size in the same way. Thus product interpolation, root restriction, and weight removal remain valid. Square roots and spectral gadgets use fixed finite algebraic extensions.
Suppose an answer computed in an auxiliary field lies in the original field . Choose algebraically independent elements over so that is finite algebraic. Normalized trace to gives . Since , coefficient comparison in returns
Here extracts the coefficient of the monomial . Fixed compatible presentations keep all these operations within polynomial degree and bit bounds.
Transfer of the unweighted dichotomy. We transfer hardness through nearby rational matrices that preserve all multiplicative relations. List the positive entries of as and consider their complete relation lattice
The vector lies in , a subspace defined by rational linear equations. Choose integer vectors forming a real basis of , and write . Replacing each by a nearby positive rational produces rational entries arbitrarily close to . They preserve every multiplicative relation, hence all equal-length product relations. Equal entries remain equal; zero positions are kept. Product interpolation gives exactly. Here is fixed. The lattice, basis, and one suitable rational replacement are constants of its reduction; the input is the graph, not a description of an arbitrary real matrix from which these choices must be computed uniformly.
The structural class (1.2) is closed among matrices with a fixed support. Indeed, there are only finitely many factor sizes and relabelings. For a positive block in fixed coordinates , where indexes amplitudes and is a bit string, recover
These are continuous on the fixed positive support. For a bipartite block, fix one left amplitude to 1 and recover the other amplitudes and ratios from a positive reference row and column. In both cases all remaining entries satisfy continuous tensor identities. Limits may have , already allowed in the unweighted theorem. If is outside the class, choose a sufficiently close rational outside it. The algebraic theorem makes hard and the preceding reduction makes hard. Inside the class, the same amplitude and Ising formulas work over the fixed field.
Positive vertex weights. The support and weight-removal reductions just established give the real versions of the normalized-core statements directly from the now-proved unweighted dichotomy. A positive unit-diagonal core with distinct rows must be a nondegenerate Ising tensor; a positive rectangular core with nonproportional rows and columns must be a square Ising tensor after independent relabelings. The same dichotomy excludes a positive definite tractable matrix with nonconstant diagonal. It therefore proves Lemma 5.5 over the real field. The normalization, finite Vandermonde equations, and algorithms above are unchanged, proving the full weighted statement.
For signed real symmetric , let ; write and for entrywise absolute values and signs, with . Equal entry products preserve their magnitudes and signs, so product interpolation gives, for every fixed ,
Only the signs of the finitely many fixed entries are needed. Consequently a nonbasic support component, or a magnitude problem outside the weighted tractable class, makes the signed problem hard. In particular outside (1.2) implies unweighted hardness. The zero-one criterion of Proposition 5.1 therefore holds with every fixed positive real vertex-weight vector.
6.2 Targets and input graph classes
For unweighted target graphs, Proposition 5.1 recovers exactly the unrestricted-input tractable list of Dyer and Greenhill [DG00, DG04]: fully looped cliques, loopless complete bipartite graphs, and loopless isolated vertices. Every other target remains #P-complete on planar inputs. Thus the additional planar tractability is a weighted phenomenon.
A complete dichotomy for planar bipartite input graphs follows by doubling the state set; its tractable class can be strictly larger. Define
On a bipartite graph , , where counts connected components, including isolated vertices; on a nonbipartite component the left side vanishes. Consequently the classification on planar bipartite inputs is obtained by applying Theorem 5.4 to . More generally, a rectangular interaction on prescribed sublattices, with respective weights , has the classification of , by the root restriction argument in Section 5.
For a concrete strict enlargement, let , put , and let swap its Boolean coordinates. Then is symmetric and positive. Relabeling one side of a bipartite input changes to , giving an algorithm. On general planar inputs it is hard: has full rank and . Indeed, full rank excludes an amplitude factor of dimension greater than one, so a positive tractable four-state matrix must be , with and . Its determinant is
Theorems 1.1 and 5.4 also hold for graphs of any fixed bounded orientable genus, supplied with an embedding. The amplitude and component decompositions work on every graph; the genus-h extension of the FKT algorithm uses at most Pfaffians [Pha20, Theorem 2.3]. This includes antiferromagnetic parameters: the even-subgraph polynomial and its signed Pfaffian expression agree as polynomials, so their identity also holds when . For fixed genus the computation has polynomial bit complexity, and the hard cases already contain the planar subclass.
6.3 Spin systems and imaginary-time kernels
Here we use the entrywise logarithm . For an Ising tensor, centering removes the scalar factor, and the resulting rank counts its nondegenerate coordinates.
Corollary 6.2. Let have distinct rows and for all , and let . In the tractable cases of Theorem 5.4,
where , , and , . Consequently, with ,
Proof. In , constant diagonal makes a constant; distinct rows then make it a singleton. The weighted criterion gives constant . For the column vectors ,
The are orthogonal and all coefficients are nonzero, giving rank d.
Corollary 6.3 (Clock models). Fix , , and . For , put
Then Pl-GH( if
and Pl-GH( ) is #P-hard otherwise.
Proof. For , the diagonal is constant and each row has its unique maximum there if , or unique minimum if ; thus the rows are distinct. For , set and . Then
has rank two and is already centered. Corollary 6.2 forces q = 4 and constant weights. The surviving cases factor as
using the cyclic Gray ordering 00, 01, 11, 10 for . The same corollary excludes nonconstant weights at . If , the answer is .
Corollary 6.4 (Coupled Ising interactions). Fix , set , and couplings for . For , define
where dot products are taken modulo two. For fixed , put
Then Pl-GH(M, w) ∈ FP if
and Pl-GH(M, w) is #P-hard otherwise. For , the fiber sums are automatically constant, so the criterion is simply linear independence of A.
Proof. Let and . Independence of distinct characters shows that two rows agree exactly when their -values agree. The quotient has distinct rows and constant diagonal. Its centered entrywise logarithm, indexed by , is , of rank , where . Corollary 6.2 therefore requires and constant . Conversely, if , the quotient is
so constant fiber sums give the algorithm. Unit weights have fiber sum . The empty set A gives a one-state quotient.
For an n-layer Ashkin–Teller system [GW81], ordinary layer couplings have labels , and four-spin couplings between layers have labels . If all ordinary couplings are nonzero, any nonzero four-spin coupling creates a dependence and gives hardness. With only four-spin couplings, tractability with unit weights is equivalent to the graph of coupled layers being a forest: a cycle sums to zero, while leaf removal proves independence for a forest. This fixed graph of layers is distinct from the variable planar input graph.
For real single-site potentials and inverse temperature , set . An identical-row class has effective potential
The weighted theorem requires this potential to be independent of the Ising coordinates within each amplitude and each bipartite side. Thus unequal microscopic potentials can preserve tractability when their aggregated weights agree.
As a short example, the spin-one Blume–Capel interaction
is hard for every fixed real and all finite real . Indeed, with , its determinant is . A positive full-rank tractable matrix has order a power of two, excluding order three regardless of the positive vertex weights. At the interaction is all ones.
For a fixed local Hamiltonian , imaginary-time evolution gives the ordinary matrix exponential . We classify contraction of this fixed kernel over planar graphs, namely with unit vertex weights.
Corollary 6.5 (Imaginary-time kernels). Let be a fixed real symmetric matrix of order with for (a stoquastic Hamiltonian), whose graph of pairs with is connected. For each fixed , Pl-GH() is in FP if, after a color relabeling,
where flips bit and is allowed. Otherwise it is -hard, with kernel entries represented as in Theorem 6.1.
Proof. Shifting -h by a scalar and using the exponential series gives ; its eigenvalues are positive, so . Theorems 4.3 and 6.1 require , , in the tractable case. Taking its unique real symmetric logarithm and using (2.1) gives the stated form of . Conversely,
so the FKT algorithm applies.
The criterion is independent of ; disconnected hopping graphs are handled componentwise.
For the quantum clock hopping term [VKNV25, Appendix A], let cyclically shift the basis states. The corollary gives tractability exactly at , for every fixed . For its hopping graph is the cycle , a cube only at : the Gray ordering above gives , while .
Acknowledgments
We thank Jin-Yi Cai and Zhuxiao Tang for informing us that they had independently obtained the main result and for explaining its significance.
The authors used OpenAI's ChatGPT in preparing this manuscript, including for language editing and LATEX preparation. ChatGPT also contributed to the exploratory development of the main technical arguments, in particular entropy continuation and the recovery of product structure from logarithmic support. All claims and proofs were independently checked and finalized by the authors, who take full responsibility for the content.
References
[Bul08] A. A. Bulatov. The complexity of the counting constraint satisfaction problem. In Automata, Languages and Programming (ICALP 2008), Part I, volume 5125 of Lecture Notes in Computer Science, pages 646–661. Springer, 2008. doi: 10.1007/978-3-540-70575-8_53.
[BG05] A. Bulatov and M. Grohe. The complexity of partition functions. Theoretical Computer Science, 348(2–3):148–186, 2005. doi: 10.1016/j.tcs.2005.09.011.
[BP18] P. Butera and M. Pernici. The Blume–Capel model for spins S = 1 and 3/2 in dimensions d = 2 and 3. Physica A, 507:22–66, 2018. doi: 10.1016/j.physa.2018.05.010.
[CC17] J.-Y. Cai and X. Chen. Complexity of counting CSP with complex weights. Journal of the ACM, 64(3), Article 19, 1–39, 2017. doi: 10.1145/2822891.
[CCL13] J.-Y. Cai, X. Chen, and P. Lu. Graph homomorphisms with complex values: A dichotomy theorem. SIAM Journal on Computing, 42(3):924–1029, 2013. doi: 10.1137/110840194.
[CCL16] J.-Y. Cai, X. Chen, and P. Lu. Nonnegative weighted #CSP: An effective complexity dichotomy. SIAM Journal on Computing, 45(6):2177–2198, 2016. doi: 10.1137/15M1032314.
[CF16] J.-Y. Cai and Z. Fu. Holographic algorithm with matchgates is universal for planar #CSP over Boolean domain, 2016. https://arxiv.org/abs/1603.07046.
[CLX17] J.-Y. Cai, P. Lu, and M. Xia. Holographic algorithms with matchgates capture precisely tractable planar #CSP. SIAM Journal on Computing, 46(3):853–889, 2017. doi:10.1137/16M1073984. Preliminary version in FOCS 2010, pages 427–436.
[CM23] J.-Y. Cai and A. Maran. The complexity of counting planar graph homomorphisms of domain size 3. In Proceedings of the 55th Annual ACM Symposium on Theory of Computing (STOC 2023), pages 1285–1297. ACM, 2023. doi: 10.1145/3564246.3585173. Full version: https://arxiv.org/abs/2302.08570v1. Theorem numbers refer to this arXiv version.
[CM24] J.-Y. Cai and A. Maran. Polynomial and analytic methods for classifying complexity of planar graph homomorphisms, 2024. https://arxiv.org/abs/2412.17122v1. Theorem numbers refer to this version.
[CFGW22] J.-Y. Cai, Z. Fu, H. Guo, and T. Williams. FKT is not universal—a planar Holant dichotomy for symmetric constraints. Theory of Computing Systems, 66:143–308, 2022. doi: 10.1007/s00224-021-10032-1.
[CMY26] J.-Y. Cai, A. Maran, and B. Young. Planar graph homomorphisms: A dichotomy and a barrier from quantum groups, 2026. URL https://arxiv.org/abs/2601.23198v1. Version 1, 30 January 2026.
[CT26] J.-Y. Cai and Z. Tang. Entrywise logarithmic matrix algebra and dichotomy of planar graph homomorphisms (Part I), 2026. https://arxiv.org/abs/2610.00828v1. Version 1, 30 September 2026.
[DG00] M. Dyer and C. Greenhill. The complexity of counting graph homomorphisms. Random Structures & Algorithms, 17(3–4):260–289, 2000. https://pages.cs.wisc.edu/~jyc/880/Dyer-Greenhill.pdf.
[DG04] M. Dyer and C. Greenhill. Corrigendum: The complexity of counting graph homomorphisms. Random Structures & Algorithms, 25:346–352, 2004. https://pages.cs.wisc.edu/~jyc/880/Dyer-Greenhill-corrigendum.pdf.
[GGJT10] L. A. Goldberg, M. Grohe, M. Jerrum, and M. Thurley. A complexity dichotomy for partition functions with mixed signs. SIAM Journal on Computing, 39(7):3336–3402, 2010. doi: 10.1137/090757496.
[GW81] G. S. Grest and M. Widom. N-color Ashkin–Teller model. Physical Review B, 24:6508–6515, 1981. doi: 10.1103/PhysRevB.24.6508.
[GW20] H. Guo and T. Williams. The complexity of planar Boolean #CSP with complex weights. Journal of Computer and System Sciences, 107:1–27, 2020. doi: 10.1016/j.jcss.2019.07.005.
[Hig08] N. J. Higham. Functions of Matrices: Theory and Computation. Society for Industrial and Applied Mathematics, 2008. Print ISBN 9780898716467; electronic ISBN 9780898717778. doi: 10.1137/1.9780898717778.
[HJ13] R. A. Horn and C. R. Johnson. Matrix Analysis. Cambridge University Press, 2nd edition, 2013 (electronic edition; print edition published in 2012). doi: 10.1017/CBO9781139020411.
[Kas61] P. W. Kasteleyn. The statistics of dimers on a lattice: I. The number of dimer arrangements on a quadratic lattice. Physica, 27(12):1209–1225, 1961. doi: 10.1016/0031-8914(61)90063-5.
[Kas63] P. W. Kasteleyn. Dimer statistics and phase transitions. Journal of Mathematical Physics, 4(2):287–293, 1963. doi: 10.1063/1.1703953.
[Kim17] D.-H. Kim. Partition function zeros of the p-state clock model in the complex temperature plane. Physical Review E, 96:052130, 2017. doi: 10.1103/PhysRevE.96.052130.
[LM26] C. Liu and B. Meng. A dichotomy for planar graph homomorphisms with nonnegative weights. Initial draft, 25 September 2026. https://liuchliuch.github.io/files/dichotomy-planar-graph-homomorphisms-nonnegative-weights.pdf.
[PST24] D. Pavlov, B. Sturmfels, and S. Telen. Gibbs manifolds. Information Geometry, 7(Suppl 2):691–717, 2024. doi: 10.1007/s41884-023-00111-2. First published online in 2023.
[Pav24] D. Pavlov. Logarithmically sparse symmetric matrices. Beiträge zur Algebra und Geometrie, 65:907–922, 2024. doi: 10.1007/s13366-024-00753-y.
[Pha20] A. M. Pham. A Pfaffian formula for the Ising partition function of surface graphs, 2020. https://arxiv.org/abs/2003.02967. doi: 10.1088/1742-5468/aba1e4.
[Sch38] I. J. Schoenberg. Metric spaces and positive definite functions. Transactions of the American Mathematical Society, 44(3):522–536, 1938. doi: 10.1090/S0002-9947-1938-1501980-0.
[TF61] H. N. V. Temperley and M. E. Fisher. Dimer problem in statistical mechanics—an exact result. Philosophical Magazine, 6(68):1061–1063, 1961. doi: 10.1080/14786436108243366.
[Val08] L. G. Valiant. Holographic algorithms. SIAM Journal on Computing, 37(5):1565–1594, 2008. doi: 10.1137/070682575.
[Ver05] D. Vertigan. The computational complexity of Tutte invariants for planar graphs. SIAM Journal on Computing, 35(3):690–712, 2005. doi: 10.1137/S0097539704446797.
[VKNV25] P. K. Vishnu, G. Khairnar, R. Narayanan, and T. Vojta. Phases and phase transitions of the disordered quantum clock model. Physical Review B, 111:094212, 2025. doi:10.1103/PhysRevB.111.094212. Full version: https://arxiv.org/abs/2410.07640v2.
[Wat18] J. Watrous. The Theory of Quantum Information. Cambridge University Press, 2018. Author's manuscript: https://cs.uwaterloo.ca/~watrous/TQI/.