Counting Homomorphisms and Partition Functions
Homomorphisms between relational structures are not only fundamental mathematical objects, but are also of great importance in an applied computational context. Indeed, constraint satisfaction problems (CSPs), a wide class of algorithmic problems that occur in many different areas of computer science such as artificial intelligence or database theory, may be viewed as asking for homomorphisms between two relational structures [FedVar98]. In a logical setting, homomorphisms may be viewed as witnesses for positive primitive formulas in a relational language. As we shall see, homomorphisms, or more precisely the numbers of homomorphisms between two structures, are also related to a fundamental computational problem of statistical physics. In this article, we are concerned with the complexity of counting homomorphisms from a given structure A to a fixed structure B. Actually, we are mainly interested in a generalization of this problem to weighted homomorphisms (or partition functions). We almost exclusively focus on graphs. The first part of the article is a short survey of what is known about the problem. In the second part, we give a proof of a theorem due to Bulatov and the first author of this paper [BulGro05], which classifies the complexity of partition functions described by matrices with non-negative entries. The proof we give here is essentially the same as the original one, with a few shortcuts due to [Thu09], but it is phrased in a different, more graph theoretical language that may make it more accessible to most readers.
💡 Research Summary
The paper investigates the computational complexity of counting homomorphisms from a variable relational structure A to a fixed structure B, and more generally of counting weighted homomorphisms, which are known in statistical physics as partition functions. The authors begin by recalling that a homomorphism between relational structures is exactly a solution to a constraint satisfaction problem (CSP); consequently, counting homomorphisms is the same as counting CSP solutions. They then introduce weighted homomorphisms: each mapping from A to B is assigned a product of weights taken from a matrix M that describes the interaction between the images of adjacent elements. For graphs, the partition function is defined as
Z_M(G) = Σ_{φ:G→H} ∏{(u,v)∈E(G)} M{φ(u),φ(v)} ,
where G is the input graph, H is the vertex set of the matrix M, and φ ranges over all graph homomorphisms. This formulation captures many models from statistical physics (e.g., the Ising model, Potts model) and from combinatorics (graph colourings, independent‑set counts).
The central technical contribution is a restatement and proof of the Bulatov‑Grohe dichotomy theorem (2005) for non‑negative matrices. The theorem asserts that for every fixed matrix M with non‑negative entries, the problem of computing Z_M(G) is either solvable in polynomial time or it is #P‑complete; there is no intermediate complexity. The tractable cases are precisely those where M has a very restricted algebraic form: (i) M is a permutation matrix (equivalently, the problem reduces to proper graph colourings with a constant number of colours), or (ii) M is of rank 1 or can be transformed into a block‑diagonal matrix with at most two distinct non‑zero values (the so‑called “bipartite” or “separable” case). In these situations the interaction structure is simple enough that dynamic programming, matrix‑tree theorems, or straightforward counting arguments give polynomial‑time algorithms.
When M does not fall into either of these families, the authors construct reductions from known #P‑complete counting problems (such as counting colourings or independent sets) to the evaluation of Z_M, thereby establishing #P‑hardness. The reductions exploit the ability to encode logical constraints into the weight matrix, effectively simulating any Boolean CSP within the partition‑function framework.
A distinctive feature of the paper is its second part, where the original algebraic proof is recast in purely graph‑theoretic language. The authors interpret the matrix M as defining a “switching” operation on graphs: by toggling edges according to the pattern of non‑zero entries, one can transform the input graph into a form where the tractable structure of M becomes evident. They also relate rank‑1 matrices to graph products that decompose the graph into two independent parts, and permutation matrices to ordinary graph colourings. This graph‑centric viewpoint makes the dichotomy more accessible to readers familiar with combinatorial graph theory rather than abstract algebra.
Throughout the paper, the authors emphasize the parallel between this dichotomy and the classic CSP dichotomy (P versus NP‑complete). In both settings, the structural properties of the fixed template (the matrix M for partition functions, the relational template for CSPs) dictate whether the counting problem is easy or intractable. This reinforces the broader principle that computational difficulty is often a reflection of underlying algebraic or combinatorial symmetry.
The paper concludes by outlining several avenues for future work. Extending the classification to matrices with negative or complex entries would bridge the gap to quantum statistical models and tensor‑network contractions. Investigating multivariate generating‑function versions of the counting problem could lead to approximation schemes and connections with parameterized complexity. Finally, studying special graph families (planar graphs, bounded‑treewidth graphs) may yield refined tractability results even for matrices that are hard in the general case. These directions promise to deepen the interplay between theoretical computer science, combinatorial graph theory, and statistical physics.
Comments & Academic Discussion
Loading comments...
Leave a Comment