Counting Homomorphisms and Partition Functions
CCounting Homomorphisms and Partition Functions
Martin GroheHumboldt Universit¨at zu BerlinBerlin, Germany Marc Thurley ∗ Centre de Recerca Matem`aticaBellaterra, SpainOctober 26, 2018
Homomorphisms between relational structures are not only fundamental mathematical objects, but arealso of great importance in an applied computational context. Indeed, constraint satisfaction problems ,a wide class of algorithmic problems that occur in many different areas of computer science such asartificial intelligence or database theory, may be viewed as asking for homomorphisms between two re-lational structures [FV98]. In a logical setting, homomorphisms may be viewed as witnesses for positiveprimitive formulas in a relational language. As we shall see below, homomorphisms, or more preciselythe numbers of homomorphisms between two structures, are also related to a fundamental computationalproblem of statistical physics. Homomorphisms of graphs are generalizations of colorings, and for thatreason a homomorphism from a graph G to a graph H is also called an H -coloring of G . Note thatif H is the complete graph on k -vertices, then an H -coloring of a graph G may be viewed as a proper k -coloring of G in the usual graph theoretic sense that adjacent vertices are not allowed to get the samecolor.It is thus no surprise that the computational complexity of various algorithmic problems related tohomomorphisms, in particular the decision problem of whether a homomorphism between two givenstructures exists and the counting problem of determining the number of such homomorphisms, havebeen intensely studied. (For the decision problem, see, for example, [BKN09, Bul06, BKJ05, Gro07,HN90]. References for the counting problem will be given in Section 3. Other related problems, such asoptimization or enumeration problems, have been studied, for example, in [Aus07, BDGM09, DJKK08,Rag08, SS07].)In this article, we are concerned with the complexity of counting homomorphisms from a givenstructure A to a fixed structure B . Actually, we are mainly interested in a generalization of this problemto be introduced in the next section. We almost exclusively focus on graphs. The first part of the article,consisting of the following two sections, is a short survey of what is known about the problem. In thesecond part, consisting of the remaining Sections 4-9, we give a proof of a theorem due to Bulatov andthe first author of this paper [BG05], which classifies the complexity of partition functions described bymatrices 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 thatmay make it more accessible to most readers. ∗ supported in part by Marie Curie Intra-European Fellowship 271959 at the Centre de Recerca Matem`atica, Bellaterra,Spain a r X i v : . [ c s . CC ] M a y I J K K Figure 1: The graphs I , J , K , K A ( I ) = (cid:18) (cid:19) A ( J ) = (cid:18) (cid:19) A ( K ) = (cid:18) (cid:19) A ( K ) = Figure 2: The adjacency matrices of the graphs
I, K , k For a fixed graph H we let Z H be the “homomorphism-counting function” that maps each graph G tothe number of homomorphisms from G to H . Several well-known combinatorial graph invariants canbe expressed as homomorphism counting functions, as the following examples illustrate: Example 2.1.
Let I be the first graph displayed in Figure 1, and let G be an arbitrary graph. Rememberthat an independent set (or stable set ) of G is set of pairwise nonadjacent vertices of G . For every set S ⊆ V ( G ) , we define a mapping h S : V ( G ) → V ( I ) by h S ( v ) = 2 if v ∈ S and h S ( v ) = 1 otherwise.Then h S is a homomorphism from G to I if and only if S is an independent set. Thus the number Z I ( G ) of homomorphisms from G to I is precisely the number of independent sets of G . Example 2.2.
For every positive integer k , let K k be the complete graph with vertex set [ k ] := { , . . . , k } (see Figure 1). Let G be a graph. Recall that a (proper) k -coloring of G is a mapping h : V ( G ) → [ k ] such that for all vw ∈ E ( G ) it holds that h ( v ) (cid:54) = h ( w ) . Observe that a mapping h : V ( G ) → [ k ] isa k -coloring of G if and only if it is a homomorphism from G to K k . Hence Z K k ( G ) is the number of k -colorings of G . Unless mentioned otherwise, graphs in this article are undirected, and they may have loops and paralleledges. Graphs without loops and parallel edges are called simple . We always assume the edge set andthe vertex set of a graph to be disjoint. The class of all graphs is denoted by G . A graph invariant isa function defined on G that is invariant under isomorphism. The adjacency matrix of a graph H is thesquare matrix A := A ( H ) with rows and columns indexed by vertices of H , where the entry A v,w atrow v and column w is the number of edges from v to w . Figure 2 shows the adjacency matrices of thegraphs in Figure 1. For all graphs G, H , we define a homomorphism from G → H to be a mapping h : V ( G ) ∪ E ( G ) → V ( H ) ∪ E ( H ) such that for all v ∈ V ( G ) it holds that h ( v ) ∈ V ( H ) andfor all edges e ∈ E ( G ) with endvertices v, w it holds that h ( e ) ∈ E ( H ) is an edge with endvertices h ( v ) , h ( w ) . The following observation expresses a homomorphism counting function Z H in terms ofthe adjacency matrix of H : Usually, homomorphisms from G to H are defined to be mappings g : V ( G ) → V ( H ) that preserve adjacency. Amapping g : V ( G ) → V ( H ) is a homomorphism in this sense if and only if it has an extension h : V ( G ) ∪ E ( G ) → V ( H ) ∪ E ( H ) that is a homomorphism as defined above. Thus the two notions are closely related. However, if H has paralleledges, then there a different numbers of homomorphisms for the two notions. Observation 2.3.
Let H be a graph and A := A ( H ) . Then for every graph G , Z H ( G ) = (cid:88) σ : V ( G ) → V ( H ) (cid:89) e ∈ E ( G ) withendvertices v,w A σ ( v ) ,σ ( w ) . (2.1)To simplify the notation, we write (cid:89) vw ∈ E ( G ) instead of (cid:89) e ∈ E ( G ) withendvertices v,w in similar expressions in the following.By convention, the empty sum evaluates to and the empty product evaluates to . Thus for the emptygraph ∅ we have Z H ( ∅ ) = 1 for all H and Z ∅ ( G ) = 0 for all G (cid:54) = ∅ . Example 2.4.
Consider the second graph J displayed in Figure 1, and let G be an arbitrary graph. Z J ( G ) is a weighted sum over all independent sets of G : For all sets S, T ⊆ V ( G ) we let e ( S, T ) bethe number of edges between S and T . Then Z J ( G ) = (cid:88) S ⊆ V ( G ) independent set e ( S,V ( G ) \ S ) . Equation (2.1) immediately suggests the following generalization of the homomorphism countingfunctions Z H : For every symmetric n × n matrix A with entries from some ring S we let Z A : G → S be the function that associates the following element of S with each graph G = ( V, E ) : Z A ( G ) := (cid:88) σ : V → [ n ] (cid:89) vw ∈ E A σ ( v ) ,σ ( w ) . (2.2)We call functions Z A , where A is a symmetric matrix over S , partition functions over S . (All rings inthis paper are commutative with a unit. S always denotes a ring.)With each n × n matrix A we associate a simple graph H ( A ) with vertex set [ n ] and edge set { ij | A i,j (cid:54) = 0 } . We may view A as assigning nonzero weights to the edges of G ( A ) , and we mayview Z A ( G ) as a weighted sum of homomorphisms from G to H ( A ) , where the weight of a mapping σ : V → [ n ] is ω A ( G, σ ) := (cid:89) vw ∈ E A σ ( v ) ,σ ( w ) . Homomorphisms are precisely the mappings with nonzero weight. Inspired by applications in statisticalphysics (see Section 2.1), we often call the elements of the index set of a matrix, usually [ n ] , spins , andwe call mappings σ : V → [ n ] assigning a spin to each vertex of a graph configurations . Example 2.5.
Recall that a graph G is Eulerian if there is a closed walk in G that traverses each edgeexactly once. It is a well-known theorem, which goes back to Euler, that a graph is Eulerian if and onlyif it is connected and every vertex has even degree. Consider the matrix U = (cid:18) − − (cid:19) . It is not hard to show that for every N -vertex graph G we have Z U ( G ) = 2 N if every vertex of G haseven degree and Z U ( G ) = 0 otherwise. Hence on connected graphs, (1 / N ) · Z U is the characteristicfunction of Eulerianicity. Example 2.6.
Consider the matrix B = (cid:18) − (cid:19) . Let G be a graph. Then for every σ : V ( G ) → [2] it holds that ω B ( G, σ ) = (cid:40) if the induced subgraph G (cid:2) σ − (2) (cid:3) has an even number of edges , − otherwise . It follows that for every N -vertex graph G , Z B ( G ) + 2 N − is the number of induced subgraphs of G with an even number of edges. Example 2.7.
Recall that a cut of a graph is a partition of its vertex set into two parts, and the weight of a cut is the number of edges from one part to the other. A maximum cut is a cut of maximum weight.Consider the matrix C := (cid:18) XX (cid:19) over the polynomial ring Z [ X ] . It is not hard to see that for every graph G , the degree of the polynomial Z C ( G ) is the weight of a maximum cut of G and the leading coefficient the number of maximum cuts. Graph polynomials present another important way to uniformly describe families of graph invariants.Examples of graph polynomials are the chromatic polynomial and the flow polynomial . Both of theseare subsumed by the bivariate
Tutte polynomial , arguably the most important graph polynomial. Thefollowing example exhibits a relation between the Tutte polynomial and partition functions.
Example 2.8.
Let G = ( V, E ) be a graph with N vertices, M edges, and Q connected components.For a subset F ⊆ E , by q ( F ) we denote the number of connected components of the graph ( V, F ) . The Tutte polynomial of G is the bivariate polynomial T ( G ; X, Y ) defined by T ( G ; X, Y ) = (cid:88) F ⊆ E ( X − q ( F ) − Q · ( Y − | F |− N + q ( F ) . It is characterized by the following contraction-deletion equalities . For an edge e ∈ E , we let G \ e bethe graph obtained from G by deleting e , and we let G/e be the graph obtained from G by contracting e . A bridge of G is an edge e ∈ E such that G \ e has more connected components than G . A loop is anedge that is only incident to one vertex. T ( G ; X, Y ) = if E ( G ) = ∅ ,X · T ( G \ e ; X, Y ) if e ∈ E ( G ) is a bridge ,Y · T ( G/e ; X, Y ) if e ∈ E ( G ) is a loop ,T ( G \ e ; X, Y ) + T ( G/e ; X, Y ) if e ∈ E ( G ) is neither a loop nor a bridge . Let r, s ∈ C . It can be shown that the partition function of the n × n matrix A ( n, r, s ) with diagonalentries r and off-diagonal entries s satisfies similar contraction-deletion equalities, and this implies thatit can be expressed in terms of the Tutte polynomial as follows: Z A ( n,r,s ) ( G ) = s M − N + Q · ( r − s ) N − Q · n Q · T (cid:18) G ; r + s · ( n − r − s ) , rs (cid:19) . (2.3) .1 Partition functions in statistical physics This implies that for all x, y ∈ C such that n := ( x − · ( y − is a positive integer, it holds that T ( G ; x, y ) = ( y − Q − N · n − Q · Z A ( n,y, ( G ) . Example 2.9.
For simplicity, in this example we assume that G = ( V, E ) is a simple graph, that is, agraph without loops and without multiple edges. For every positive integer k , a k -flow in G is a mapping f : V → Z k (the group of integers modulo k ) such that the following three conditions are satisfied:(i) f ( v, w ) = 0 for all v, w ∈ V with vw (cid:54)∈ E ;(ii) f ( v, w ) = − f ( w, v ) for all v, w ∈ V ;(iii) (cid:88) w ∈ V with vw ∈ E f ( v, w ) = 0 for all v ∈ V .The k -flow f is nowhere zero if f ( v, w ) (cid:54) = 0 for all vw ∈ E . Let F ( G, k ) be the number of nowherezero k -flows of G . It can be shown that F ( G, k ) = ( − M − N + Q · T ( G ; 0 , − k ) = k − N · Z A ( k,k − , − ( G ) , where T denotes the Tutte polynomial and A ( k, k − , the k × k matrix with diagonal entries ( k − and off-diagonal entries − . The term “partition function” indicates the fact that the functions we consider here do also have anorigin in statistical physics. A major aim of this branch of physics is the prediction of phase transitionsin dynamical systems from knowing only the interactions of their microscopic components. In thiscontext, partition functions are the central quantities allowing for such a prediction. As a matter of factmany of these partition functions can be described in the framework we defined above.Let us see an example for this connection — the partition function of the
Ising model . Originallyintroduced by Ising in 1925 [Isi25] this model was developed to describe the phase transitions in fer-romagnets. For some given graph G , the model associates with each vertex v a spin σ v which may beeither +1 or − . Then the energy of a state σ is given by the Hamiltonian defined by H ( σ ) = − J (cid:88) uv ∈ E σ u σ v (2.4)where − J σ u σ v is the contribution of the energy of each pair of nearest neighbor particles. Let T denotethe temperature of the system and k be Boltzmann’s constant, define β = ( kT ) − . Then, for a graph G = ( V, E ) with N vertices, M edges, and Q connected components, we have Z ( G, T ) = (cid:88) σ : V →{ +1 , − } e − βH ( σ ) We straightforwardly get Z ( G, T ) = e βJM Z A ( G ) for the matrix A = A ( T ) = (cid:18) e βJ e βJ (cid:19) . (2.5) An extension of this model to systems with more than two spins is the n -state Potts model , whosepartition function satisfies Z Potts ( G ; n, v ) = (cid:88) σ : V → [ n ] (cid:89) uv ∈ E (1 + v · δ σ ( u ) ,σ ( v ) ) . In fact, for n = 2 and v = e βJ − we see that Z ( G, T ) = e βJM Z Potts ( G ; n, v ) . Moreover, this modelcan be seen as a specialization of the Tutte Polynomial. Expanding the above sum over connectedcomponents of G , we obtain Z Potts ( G ; n, v ) = (cid:88) A ⊆ E n q ( A ) v | A | whence it is not difficult to see that, if ( X − Y − ∈ N , T ( G ; X, Y ) = ( X − − q ( E ) ( Y − − N Z Potts ( G ; ( X − Y − , Y − . Since Z Potts ( G ; n, v ) = Z A ( n,v +1 , ( G ) this relation is actually a special case of equation (2.3). In this section, we shall state (and partially prove) precise algebraic characterizations of partition func-tions over the real and complex numbers.A graph invariant f : G → S is multiplicative if f ( ∅ ) = 1 and f ( G · H ) = f ( G ) · f ( H ) . Here ∅ denotes the empty graph and G · H denotes the disjoint union of the graphs G and H . An easy calculationshows: Observation 2.10.
All partition functions are multiplicative.
To characterize the class of partition functions over the reals, let f : G → R be a graph invariant.Consider the(infinite) real matrix M = ( M G,H ) G,H ∈G with entries M G,H := f ( G · H ) . It follows fromthe multiplicativity that if f is a partition function then M has rank and is positive semidefinite. (Herean infinite matrix is positive semidefinite if each finite principal submatrix is positive semidefinite.) Thecriterion for a graph invariant being a partition function is a generalization of this simple criterion. Let k ≥ . A k -labeled graph is a graph with k distinguished vertices. Formally, a k -labeled graph is a pair ( G, φ ) , where G ∈ G and φ : [ k ] → V ( G ) is injective. The class of all k -labeled graphs is denotedby G k . For two k -labeled graphs ( G, φ ) , ( H, ψ ) ∈ G k , we let ( G, φ ) · ( H, ψ ) be the k -labeled graphobtained from the disjoint union of G and H by identifying the labeled vertices φ ( i ) and ψ ( i ) for all i ∈ [ k ] and keeping the labels where they are. We extend f to G k by letting f ( G, φ ) := f ( G ) and definea matrix M ( f, k ) = (cid:0) M ( f, k ) ( G,φ ) , ( H,ψ ) (cid:1) ( G,φ ) , ( H,ψ ) ∈G k by letting M ( f, k ) ( G,φ ) , ( H,ψ ) = f (cid:0) ( G, φ ) · ( H, ψ ) (cid:1) . Note that if we identify -labeled graphs with plaingraphs, then M ( f, is just the matrix M defined above. The matrices M ( f, k ) for k ≥ are calledthe connection matrices of f . Connection matrices were first introduced by Freedman, Lov´asz, andSchrijver [FLS07] to prove a theorem similar to the following one (Theorem 2.14 below). Theorem 2.11 (Schrijver [Sch09]).
Let f : G → R be a graph invariant. Then f is a partition functionif and only if it is multiplicative and all its connection matrices are positive semidefinite. .2 Which functions are partition functions? f = Z A for a symmetric matrix A ∈ R n × n . For allmappings χ := [ k ] → [ n ] and k -labeled graphs ( G, φ ) ∈ G k we let Z A,χ ( G, φ ) := (cid:88) σ : V ( G ) → [ n ] σ ( φ ( i ))= χ ( i ) for all i ∈ [ k ] (cid:89) vw ∈ E ( G ) A σ ( v ) ,σ ( w ) . Note that for ( H, ψ ) ∈ G k we have Z A,χ (cid:0) ( G, φ ) · ( H, ψ ) (cid:1) = Z A,χ ( G, φ ) · Z A,χ ( H, ψ ) . Hence the matrix M ( Z A,χ , k ) with entries M ( Z A,χ , k ) ( G,φ ) , ( H,ψ ) = Z A,χ (cid:0) ( G, φ ) · ( H, ψ ) (cid:1) is positivesemidefinite. Furthermore, f ( G, φ ) = Z A ( G ) = (cid:88) χ :[ k ] → [ n ] Z A,χ ( G, φ ) , and thus M f,k is the sum of n k positive semidefinite matrices, which implies that it is positive semidef-inite. Incidentally, the same argument shows that the row rank of the k th connection matrix M ( Z A , k ) of a partition function of a matrix A ∈ R n × n is at most n k .Schrijver also obtained a characterization of the class of partition functions over the complex num-bers, which looks surprisingly different from the one for the real numbers. In the following, let S = C or C [ X ] for some tuple X of variables. For a symmetric n × n matrix A ∈ S n × n we define the “injective”partition function Y A : G → S by Y A ( G ) := (cid:88) τ : V ( G ) → [ n ] injective (cid:89) vw ∈ E ( G ) A τ ( v ) ,τ ( w ) . Note that Y A ( G ) = 0 for all G with | V ( G ) | > n . For a graph G and a partition P of V ( G ) , we let G/P be the graph whose vertex set consists of the classes of P and whose edge set contains an edge betweenthe class of v and the class of w for every edge vw ∈ E ( G ) . Note that in general G/P will have manyloops and multiple edges. For example, if P has just one class, then G/P will consist of a single vertexwith | E ( G ) | many loops. We denote the set of all partitions of a set V by Π( V ) , and for a graph G welet Π( G ) := Π (cid:0) V ( G ) (cid:1) . For P, Q ∈ Π( V ) , we write P ≤ Q if P refines Q . Then we have Z A ( G ) = (cid:88) P ∈ Π( G ) Y A ( G/P ) . (2.6)We can also express Y A in terms of Z A . For every finite set V there is a unique function µ : Π( V ) → Z satisfying the following equation for all P ∈ Π( V ) : (cid:88) Q ∈ Π( V ) Q ≤ P µ ( Q ) = (cid:40) if P = T V , otherwise . (2.7)Here T V denotes the trivial partition {{ v } | v ∈ V } . The function µ is a restricted version of the M¨obiusfunction of the partially ordered set Π( V ) (for background, see for example [Aig07]). Now it is easy tosee that Y A ( G ) = (cid:88) P ∈ Π( G ) µ ( P ) · Z A ( G/P ) . (2.8) We close our short digression on M¨obius inversion by noting that for all sets V with | V | =: k we havethe following polynomial identity: (cid:88) P ∈ Π( V ) µ ( P ) · X | P | = X ( X − · · · ( X − k + 1) . (2.9)To see this, note that it suffices to prove it for all X ∈ N . So let X ∈ N , and let A be the ( X × X ) -identity matrix. Furthermore, let G be the graph with vertex set V an no edges. Then Y A = X ( X − · · · ( X − k + 1) and Z A ( G/P ) = X | P | for every partition P ∈ Π( V ) , and (2.9) follows from (2.8).Now we are ready to state Schrijver’s characterization of the partition functions over the complexnumbers. Theorem 2.12 (Schrijver [Sch09]).
Let f : G → C be a graph invariant. Then f is a partition functionif and only if it is multiplicative and (cid:88) P ∈ Π( G ) µ ( P ) · f ( G/P ) = 0 (2.10) for all G ∈ G with | V ( G ) | > | f ( K ) | . To understand the condition | V ( G ) | > | f ( K ) | , remember that K denotes the graph with one vertexand no edges and note that for every n × n matrix A it holds that Z A ( K ) = n . Proof of Theorem 2.12 (sketch).
The forward direction is almost trivial: Suppose that f = Z A for asymmetric matrix A ∈ C n × n . Then f is multiplicative by Observation 2.10, and we have (cid:88) P ∈ Π( G ) µ ( P ) · f ( G/P ) = Y A ( G ) = 0 for all G with | V ( G ) | > n = f ( K ) , where the first equality holds by (2.8) and the second because for G with | V ( G ) | > n there are no injective functions σ : V ( G ) → [ n ] .It is quite surprising that these trivial conditions are sufficient to guarantee that f is a partitionfunction. To see that they are, let f : G → C be a multiplicative graph invariant such that (2.10) holdsfor all G ∈ G with | V ( G ) | > f ( K ) .We first show that n := f ( K ) is a non-negative integer. Let k := (cid:100)| f ( K ) |(cid:101) , and let I k be the graphwith vertex set [ k ] and no edges. (Hence I k = ∅ if k = 0 .) Suppose that n is not a non-negative integer.Then k > | n | , and by (2.10), the multiplicativity of f , and (2.9) we have (cid:88) P ∈ Π( I k ) µ ( P ) · f ( I k /P ) = (cid:88) P ∈ Π([ k ]) µ ( P ) · n | P | = n · (cid:0) n − (cid:1) · · · (cid:0) n − k + 1 (cid:1) (cid:54) = 0 . This is a contradiction.A quantum graph is a formal linear combination of graphs with coefficients from C , that is, anexpression (cid:80) (cid:96)i =1 a i G i , where (cid:96) ≥ and a i ∈ C and G i ∈ G for all i ∈ [ (cid:96) ] . The class of all quantumgraphs is denoted by QG . The quantum graphs obviously form a vector space over C , and by extendingthe product “disjoint union” linearly from G to QG , we turn this vector space into an algebra. We alsoextend the function f linearly from G to QG . Observe that f is an algebra homomorphism from QG to C , because it is multiplicative.For all i, j ∈ [ n ] we let X { i,j } be a variable, and we let X be the tuple of all these variables orderedlexicographically. Furthermore, we let X be the n × n matrix with X i,j := X j,i := X { i,j } . We view X .2 Which functions are partition functions? C [ X ] . We extend the function Z X : G → C [ X ] linearly from G to QG . Then Z X is an algebra homomorphism. It is not too hard to show that the image Z X ( QG ) consistsprecisely of all polynomials in C [ X ] that are invariant under all permutations X { i,j } (cid:55)→ X { π ( i ) ,π ( j ) } ofthe variables for permutations π of [ n ] . Using (2.8) and other properties of the M¨obius inversion, it canbe shown that the kernel of Z X is contained in the kernel of f . This implies that there is an algebrahomomorphism ˆ f from the image Z X ( QG ) to C such that f = ˆ f ◦ Z X .Then I := (cid:8) p ∈ Z X ( QG ) | ˆ f ( p ) = 0 (cid:9) is an ideal in the subalgebra Z X ( QG ) ⊆ C [ X ] . We claim that the polynomials in I have a common zero.Suppose not. Let I (cid:48) be the ideal generated by I in C [ X ] . Then by Hilbert’s Nullstellensatz it holds that ∈ I (cid:48) . Using the fact that the the subalgebra Z X ( QG ) consists precisely of all polynomials in C [ X ] that are invariant under all permutations X { i,j } (cid:55)→ X { π ( i ) ,π ( j ) } for π ∈ S n , one can show that actually ∈ I . But then f (1) = ˆ f ( Z X ( K )) = f ( K ) = 1 , which is a contradiction.Thus the polynomials in I have a common zero. Let A = ( A { i,j } | i, j ∈ [ n ]) be such a zero,and let A ∈ C n × n be the corresponding symmetric matrix. Observe that for each graph G it holds that Z X ( G ) − f ( G ) ∈ I , because ˆ f ( Z X ( G )) − ˆ f ( f ( G )) = f ( G ) − f ( G ) = 0 . Hence Z A ( G ) − f ( G ) = 0 and thus f ( G ) = Z A ( G ) . This completes our proof sketch. (cid:3) Even though Theorems 2.11 and 2.12 look quite different, it is not hard to derive Theorem 2.11 fromTheorem 2.12. In the remainder of this subsection, we sketch how this is done.
Proof of Theorem 2.11 (sketch).
We have already proved the forward direction. For the backwarddirection, let f : G → R be a multiplicative graph invariant such that all connection matrices of f arepositive semidefinite. We first prove that f satisfies condition (2.10): Let n := f ( K ) (we do not knowyet that n is an integer, but it will turn out to be), and let k > n be a non-negative integer. Let I k be thegraph with vertex set [ k ] and no edges, and for every partition P of [ k ] , define φ P : [ k ] → V ( I k /P ) tobe the canonical projection, that is, φ P ( i ) is the class of i in the partition P . Then ( I k /P, φ P ) ∈ G k . Asthe k th connection matrix M ( f, k ) is positive semidefinite, we have (cid:88) P,Q ∈ Π([ k ]) µ ( P ) · µ ( Q ) · f (cid:0) ( I k /P, φ P ) · ( I k /Q, φ Q ) (cid:1) ≥ . For partitions
P, Q ∈ Π([ k ]) , let P ∨ Q be the least upper bound of P and Q in the partially ordered set Π([ k ]) , and note that ( I k /P, φ P ) · ( I k /Q, φ Q ) = ( I k /P ∨ Q, φ P ∨ Q ) . Hence by the multiplicativity of f we have f (cid:0) ( I k /P, φ P ) · ( I k /Q, φ Q ) (cid:1) = n | P ∨ Q | . A calculation similar to the one that leads to (2.9)shows that (cid:80) P,Q ∈ Π[ k ] µ ( P ) · µ ( Q ) · X | P ∨ Q | = X · ( X − · · · ( X − k + 1) . Hence for all non-negativeintegers k > n we have ≤ (cid:88) P,Q ∈ Π([ k ]) µ ( P ) · µ ( Q ) · f (cid:0) ( I k /P, φ P ) · ( I k /Q, φ Q ) (cid:1) = n · ( n − · · · ( n − k + 1) . (2.11)This is only possible if n is a non-negative integer, in which case equality holds.Now let G be an arbitrary graph with k := | V ( G ) | > n . Without loss of generality we may assumethat V ( G ) = [ k ] . Let ψ be the identity on [ k ] . Consider the ( | Π([ k ]) | + 1) × ( | Π([ k ]) | + 1) -principalsubmatrix M of M ( f, k ) with rows and columns indexed by the k -labeled graphs ( I k /P, φ P ) for all0 P ∈ Π([ k ]) and ( G, ψ ) . For every x ∈ R , let v x be the column vector with entries µ ( P ) for all P ∈ Π([ k ]) followed by x . By the positive semi-definiteness of M ( f, k ) , we have ≤ v (cid:62) x M v x = (cid:88) P,Q ∈ Π([ k ]) µ ( P ) · µ ( Q ) · f (cid:0) ( I k /P, φ P ) · ( I k /Q, φ Q ) (cid:1) + 2 x · (cid:88) P ∈ Π([ k ]) µ ( P ) · f (cid:0) ( I k /P, φ P ) · ( G, ψ ) (cid:1) + x · f (cid:0) ( G, ψ ) · ( G, ψ ) (cid:1) = 2 x · (cid:88) P ∈ Π([ k ]) µ ( P ) · f (cid:0) ( I k /P, φ P ) · ( G, ψ ) (cid:1) + x · f (cid:0) ( G, ψ ) · ( G, ψ ) (cid:1) This is only possible for all x ∈ R if (cid:80) P ∈ Π([ k ]) µ ( P ) · f (cid:0) ( I k /P, φ P ) · ( G, ψ ) (cid:1) = 0 . Note that for every P ∈ Π([ k ]) it holds that ( I k /P, φ P ) · ( G, ψ ) = (
G/P, φ P ) . Thus (cid:88) P ∈ Π( G ) µ ( P ) · f ( G/P ) = 0 . If follows from Theorem 2.12 that f = Z A for some matrix A ∈ C n × n .For every (cid:96) ≥ , let F (cid:96) be the graph with two vertices and (cid:96) parallel edges between these vertices.Exploiting the positive semi definiteness of the principal submatrix of M ( f, with rows and columnsindexed by the graphs F (cid:96) for ≤ (cid:96) ≤ n ( n + 1) / , it is not hard to show that the matrix A is real. (cid:3) Vertex weights
We have mentioned that a partition function Z A can be viewed as mapping a graph G to a weighted sumof homomorphisms to the edge-weighted graph represented by the matrix A . We may also put weightson the vertices of a graph. It will be most convenient to represent vertex weights on a graph H by adiagonal matrix D = ( D v,w ) v,w ∈ V ( H ) , where D v,v is the weight of vertex v and D v,w = 0 if v (cid:54) = w .Then we define the weight of a mapping σ from G to H to be the product of the weights of the imagesof the edges and the images of the vertices. More abstractly, for every symmetric matrix A ∈ S n × n anddiagonal matrix D ∈ S n × n we define a function Z A,D : G → S by Z A,D ( G ) := (cid:88) σ : V ( G ) → [ k ] (cid:89) vw ∈ E ( G ) A σ ( v ) ,σ ( w ) · (cid:89) v ∈ V ( G ) D σ ( v ) ,σ ( v ) . We call Z A,D a partition functions with vertex weights over S . ([Freedman, Lov´asz, and Schrijver [FLS07]use the term homomorphism functions .) The vertex weights enable us to get rid of the constant factorsin some of the earlier examples and give smoother formulations. For example: Example 2.13.
Recall that by Example 2.9, the number F ( G, k ) of nowhere-zero k -flows of an N -vertexgraph G is k − N · Z A ( G ) for the k × k matrix A with diagonal entries ( k − and off-diagonal entries − .Let D be the ( k × k ) -diagonal matrix with entries D ii := 1 /k for all i ∈ [ k ] . Then F ( G, k ) = Z A,D ( G ) . Freedman, Lov´asz, and Schrijver gave an algebraic characterization of the class of partition functionswith non-negative vertex weights over the reals, again using connection matrices. However, they only .3 Generalizations G (cid:48) of graphs without loops (but with parallel edges). Fora graph invariant f : G (cid:48) → R , we define the k th connection matrix M ( f, k ) as for graph invariantsdefined on G , except that we omit all rows and columns indexed by graphs with loops. We call a matrix A ∈ R n × n non-negative if all its entries are non-negative. Theorem 2.14 (Freedman, Lov´asz, and Schrijver [FLS07]).
Let f : G (cid:48) → R be a graph invariant.Then the following two statements are equivalent:1. There are a symmetric matrix A ∈ R n × n and a non-negative diagonal matrix D ∈ R n × n suchthat f ( G ) = Z A,D ( G ) for all G ∈ G (cid:48) .2. There is a q ≥ such that for all k ≥ the matrix M ( f, k ) is positive semidefinite and has rowrank at most q k . Despite the obvious similarity of this theorem with Theorem 2.11, the known proofs of the two theoremsare quite different.
Asymmetric matrices and directed graphs
Of course we can also count homomorphism between directed graphs. We denote the class of all directedgraphs by D ; as undirected graphs we allow directed graphs to have loops and parallel edges. For everydirected graph H , we define the homomorphism counting function Z H : D → Z by letting Z H ( D ) bethe number of homomorphisms from D to H . For every square matrix A ∈ S n × n we define the function Z A : D → S by Z A ( D ) := (cid:88) σ : V ( D ) → [ n ] (cid:89) ( v,w ) ∈ E ( D ) A σ ( v ) ,σ ( w ) . Note that if A is a symmetric matrix, then Z A ( D ) = Z A ( G ) , where G is the underlying undirectedgraph of G . Hypergraphs and relational structures
Recall that a hypergraph is a pair H = ( V, E ) where V is a finite set and E ⊆ V . Elements of V are called vertices , elements of E hyperedges . A hypergraph is r -uniform, for some r ≥ , if all itshyperedges have cardinality r . Thus a 2-uniform hypergraph is just a simple graph. A homomorphism from a hypergraph G to a hypergraph H is a mapping h : V ( G ) → V ( H ) such that h ( e ) ∈ E ( H ) for all e ∈ E ( H ) . Of course, for e = { v , . . . , v r } we let h ( e ) = { h ( v ) , . . . , h ( v r ) } . Hypergraph homomor-phism counting functions and partition functions have only been considered for uniform hypergraphs.The class of all r -uniform hypergraphs is denoted by H r . For all H ∈ H r , we define the homomorphismcounting function Z H : H r → Z in the obvious way. The natural generalization of partition functionsto r -uniform hypergraphs is defined by symmetric functions A : [ n ] r → S . We define Z A : H r → S by Z A ( G ) := (cid:88) σ : V ( G ) → [ n ] (cid:89) e ∈ E ( G ) A ( σ ( e )) , where for e = { v , . . . , v r } we let A ( σ ( e )) := A ( σ ( v ) , . . . , σ ( v r )) . This is well-defined because A issymmetric. There is no need to define hypergraph homomorphisms as mappings from V ( G ) ∪ E ( G ) to V ( H ) ∪ E ( H ) because wedo not allow parallel hyperedges. Let us finally consider homomorphisms between relational structures. A (relational) vocabulary σ is a set of relation symbols; each relation symbol comes with a prescribed finite arity. A σ -structure B consist of a set V ( B ) , which we call the universe or vertex set of B , and for each r -ary relation symbol S ∈ σ an r -ary relation S ( B ) ⊆ V ( B ) r . Here we assume all structures to be finite, that is, to havea finite universe and vocabulary. For example, a simple graph may be viewed as an { E } -structure G ,where E is a binary relation symbol and E ( G ) is irreflexive and symmetric. An r -uniform hypergraph H may be viewed as an { E r } -structure, where E r is an r -ary relation symbol and E r ( H ) is symmetricand contains only tuples of pairwise distinct elements. For each vocabulary σ , we denote the classof all σ -structures by S σ . For each σ -structure B we define the homomorphism counting functions Z B : S σ → Z in the usual way.To generalize partition functions, we consider weighted structures . For a ring S and a vocabulary σ , an S -weighted σ -structure B consists of a finite set V ( B ) and for each r -ary R ∈ σ a mapping R ( S ) : V ( B ) r → S . Then we define Z B : S σ → S by Z B ( A ) := (cid:88) σ : V ( G ) → [ n ] (cid:89) R ∈ σ (cid:89) ( a ,...,a r ) ∈ V ( A ) r , where r is the arity of R R ( S )( σ ( a ) , . . . , σ ( a r )) . Note that this does not only generalize plain partition functions on graphs, but also partition functionswith vertex weights, because we may view a graph with weights on the vertices and edges as a weighted { E, P } -structure, where E is a binary and P a unary relation symbol.It is a well-known observation due to Feder and Vardi [FV98] that constraint satisfaction problems may be viewed as homomorphism problems between relational structures and vice versa. Thus countinghomomorphisms between relational structures correspond to counting solutions to constraint satisfactionproblems. Edge Models
Partition functions and all their generalizations considered so far are weighted sums over mappingsdefined on the vertex set of the graph or structure. In the context of statistical physics, they are sometimescalled vertex models . There is also a notion of edge model . An edge model is given by a function F : N n → S . Let G = ( V, E ) be a graph. Given a “configuration” τ : E → [ n ] , for every vertex v welet t ( τ, v ) := ( t , . . . , t n ) , where t i is the number of edges e incident with v such that τ ( e ) = i . Wedefine a function ˜ Z F : G → S by ˜ Z F ( G ) := (cid:88) τ : E → [ n ] (cid:89) v ∈ V F (cid:0) t ( τ, v ) (cid:1) . Szegedy [Sze07] gave a characterization of the graph invariants over the reals expressible by edge mod-els that is similar to the characterizations of partition functions (vertex models) given in Theorems 2.11and 2.14.
Example 2.15.
Let F : N → Z be defined by F ( i, j ) := 1 if j = 1 and F ( i, j ) = 0 otherwise.Let G = ( V, E ) be a graph. Observe that for every τ : E ( G ) → { , } and every v ∈ V it holdsthat F (cid:0) t ( τ, v ) (cid:1) = 1 if and only if there is exactly one edge in τ − (2) that is incident with v . Hence (cid:81) v ∈ V F (cid:0) t ( τ, v ) (cid:1) = 1 if τ − (2) is a perfect matching of G and (cid:81) v ∈ V F (cid:0) t ( τ, v ) (cid:1) = 0 otherwise. Itfollows that ˜ Z F ( G ) is the number of perfect matchings of G .It can be proved that the function f = ˜ Z F counting perfect matchings is not a partition function,because the connection matrix M ( f, is not positive semi-definite [FLS07]. holant functions which have been introduced by Cai, Lu, and Xia [CLX09]. A holant functionis given by a signature grid Ω = ( G, F , π ) where G = ( V, E ) is a graph and, for some n ∈ N , the set F contains functions f : [ n ] a f → S , each of some arity a f . Further π maps vertices v ∈ V to functions f v ∈ F such that d ( v ) = a f v . Let, for some vertex v , denote E ( v ) the set of edges incident to v . Theholant function over this signature grid is then defined asHolant Ω = (cid:88) τ : E → [ n ] (cid:89) v ∈ V f v ( τ | E ( v ) ) . Note that we assume here implicitly that E has some ordering, therefore f v ( τ | E ( v ) ) is well-defined.Edge models are a special case of this framework, since ˜ Z F ( G ) = Holant Ω for the signature grid whichsatisfies f v ( τ | E ( v ) ) = F ( t ( τ, v )) for all v ∈ V . More generally it can be shown that partition functionson relational structures can be captured by holant functions. Partition functions tend to be hard to compute. More precisely, they tend to be hard for the complexityclass
P introduced by Valiant in [Val79], which may be viewed as the “counting analogue” of NP. Acounting problem C (that is, a function with values in the non-negative integers) belongs to P if andonly if there is a nondeterministic polynomial time algorithm A such that for every instance x of C itholds that C ( x ) is the number of accepting computation paths of A on input x . There is a theory ofreducibility and P-completeness much like the theory of NP-completeness. (The preferred reductionsin the complexity theory of counting problems are
Turing reductions . We exclusively work with Turingreductions in this article .) Most NP-complete decision problems have natural
P-complete countingproblems associated with them. For example, the problem of counting the number of independent sets ofa graph and the problem of counting the number of 3-colorings of a graph are both
P-complete. Thereis a counting analogue of a well-known Theorem due to Ladner [Lad75] stating that there are countingproblems in
P that are neither
P-complete nor in FP (the class of all counting, or more generallyfunctional problems solvable in polynomial time); indeed the counting complexity classes between FPand
P form a dense partial order.Even though the class of partition functions is very rich, it turns out that partition functions and alsotheir various generalizations discussed in Section 2.3 exhibit a complexity theoretic dichotomy : Somepartition functions can be computed in polynomial time, most are
P-hard, but there are no partitionfunctions of intermediate complexity. A first dichotomy theorem for homomorphism counting functionsof graphs was obtained by Dyer and Greenhill:
Theorem 3.1 (Dyer and Greenhill [DG00]).
Let H be a graph without parallel edges. Then Z H iscomputable in polynomial time if each connected component of H is either a complete graph with aloop at every vertex or a complete bipartite graph. Otherwise, Z H is P -complete. When thinking about the complexity of partition functions over the real or complex numbers, we facethe problem of which model of computation to use. There are different models which lead to differentcomplexity classes. To avoid such issues, we restrict our attention to algebraic numbers, which can We count the empty graph and the graph K with one vertex and no edges as bipartite graphs. be represented in the standard bit model. We will discuss the representation of and computation withalgebraic numbers in Section 7.3. The fields of real and complex algebraic numbers are denoted by R A and C A , respectively. In general, partition functions are no counting functions (in the sense that theirvalues are no integers) and hence they do not belong to the complexity class P. For that reason, in thefollowing results we only state
P-hardness and not completeness. As an easy upper bound, we notethat partition functions over R A and C A belong to the complexity class FP P of all functional problemsthat can be solved by a polynomial time algorithm with an oracle to a problem in P.Let us turn to partition functions over the reals. We first observe that if A ∈ R n × n A is a symmetricmatrix of row rank , then Z A is easily computable in polynomial time. Indeed, write A = a T a for a(row) vector a = ( a , . . . , a n ) ∈ R n A . Then for every graph G = ( V, E ) , Z A ( G ) = (cid:88) σ : V → [ n ] (cid:89) vw ∈ E a σ ( v ) a σ ( w ) = (cid:88) σ : V → [ n ] (cid:89) v ∈ V a deg( v ) σ ( v ) = (cid:89) v ∈ V n (cid:88) i =1 a deg( v ) i . (3.1)Here deg( v ) denotes the degree of a vertex v . The last term in (3.1), which only involves a polynomialnumber of arithmetic operations, can easily be evaluated in polynomial time. Thus partition functionsof rank- matrices are easy to compute. It turns out that all easy partition functions of non-negative realmatrices are based on a “rank- ” condition.Let us call a matrix A bipartite if its underlying graph G ( A ) is bipartite. After suitable permutingrows and columns, a bipartite matrix has the form A = (cid:18) BB T (cid:19) , where we call B and B T the blocks of A . A similar argument as the one above shows that if B hasrow rank then Z A is computable in polynomial time. Note that we only need to compute Z A ( G ) forbipartite G , because Z A ( G ) = 0 for non-bipartite G .The connected components of a matrix A are the principal submatrices corresponding to the con-nected components of the underlying graph G ( A ) . Note that if A is a matrix with connected components A , . . . , A m , then for every connected graph G it holds that Z A ( G ) = (cid:80) mj =1 Z A j ( G ) . By the multi-plicativity of partition functions, for a graph G with connected components G , . . . , G (cid:96) , we thus have Z A ( G ) = (cid:81) (cid:96)i =1 (cid:80) mj =1 Z A j ( G i ) . This reduces the computation of Z A to the computation of the Z A j . Theorem 3.2 (Bulatov and Grohe [BG05]).
Let A ∈ R n × n A be a symmetric non-negative matrix. Then Z A is computable in polynomial time if all components of A are either of row rank or bipartite andwith blocks of row rank . Otherwise, Z A is P -hard. Note that the theorem is consistent with Theorem 3.1, the special case for 0-1-matrices. We have alreadyproved that Z A is computable in polynomial time if all components of A are either of row rank orbipartite and with blocks of row rank . The much harder proof that all other cases are P-hard will begiven in Sections 4–9 of this paper. As a by-product, we also obtain a proof of Theorem 3.1.The rest of this section is a survey of further dichotomy results. We will not prove them. Thefollowing two examples show that if we admit negative entries in our matrices, then the rank-1 conditionis no longer sufficient to explain tractability. In [BG05], the complexity classification of partition functions for non-negative real matrices (Theorem 3.2 of this article)was stated for arbitrary real matrices in one of the standard models of real number computation. However, the proof is faultyand can only be made to work for real algebraic numbers (cf. Section 7.3 of this article). Example 3.3.
Consider the matrix B = (cid:18) − (cid:19) first introduced in Example 2.6. The row rank ofthis matrix is , yet we shall prove that Z B is computable in polynomial time. Let G = ( V, E ) . Then Z B ( G ) = (cid:88) σ : V → [2] (cid:89) vw ∈ E B v,w = (cid:88) σ : V → [2] (cid:89) vw ∈ E ( − ( σ ( v ) − · ( σ ( w ) − = (cid:88) σ : V → [2] ( − (cid:80) vw ∈ E σ ( v ) · σ ( w ) . Hence Z B ( G ) is N minus twice the number of mappings σ : V → { , } such that (cid:80) vw ∈ E σ ( v ) · σ ( w ) is odd. Here N is the number of vertices of G . Thus to compute Z B , we need to determine the numberof solutions of the quadratic equation (cid:88) vw ∈ E x v x w = 1 over the -element field F . The number of solutions of a quadratic equation over F or any other finitefield can be computed in polynomial time. This follows easily from standard normal forms for quadraticequations (see, for example, [LN97], Section 6.2). Example 3.4.
The tensor product of two matrices A ∈ S m × n and B ∈ S k × (cid:96) is the m · k × n · (cid:96) matrix A ⊗ B := A , · B · · · A ,n · B ... ... A m, · B · · · A m,n · B . It is easy to see that for all square matrices
A, B and all graphs G it holds that Z A ⊗ B ( G ) = Z A ( G ) · Z B ( G ) . We can thus use the tensor product to construct new matrices with polynomial time computable partitionfunctions. For example, the following three × -matrices have polynomial time computable partitionfunctions: − −
11 1 − − − − − − − −
11 1 − − − − − −
22 4 − − . Very roughly, all symmetric real matrices with a polynomial time computable partition functioncan be formed from matrices of rank and matrices associated with quadratic equations over F (in away similar to the matrix B of Example 3.3) by tensor products and similar constructions. The precisecharacterization of such matrices is very complicated, and it makes little sense to state it explicitly. Inthe following, we say that a class F of functions exhibits an FP – P -dichotomy if all functions in F are either in FP or P-hard. We say that F exhibits an effective FP – P -dichotomy if in addition it isdecidable if a given function in F , represented for example by a matrix, is in FP or P-hard.
Theorem 3.5 (Goldberg, Grohe, Jerrum, Thurley [GGJT10]).
The class of partition functions of sym-metric matrices over the reals exhibits an effective FP – P -dichotomy. There are two natural ways to generalize this result to complex matrices. Symmetric complex matriceswhere studied by Cai, Chen, Lu [CCL10a], and Hermitian matrices by Thurley [Thu09].6 ??Theorem 3.6 (Cai, Chen, Lu [CCL10a], Thurley [Thu09]).
1. The class of partition functions ofsymmetric matrices over the complex numbers exhibits an effective FP – P -dichotomy.2. The class of partition functions of Hermitian matrices exhibits an effective FP – P -dichotomy. Beyond Hermitian matrices, partition functions of arbitrary, not necessarily symmetric matrices aremuch more difficult to handle. An FP –
P-dichotomy follows from Bulatov’s Theorem 3.8 below, butit is difficult to understand how this dichotomy classifies directed graphs. Dyer, Goldberg and Paterson[DGP07] proved an effective FP –
P-dichotomy for the class of homomorphism counting functions Z H for directed acyclic graphs H ; it is based on a complicated “rank-1” condition. A very recent result byCai and Chen [CC10] establishes an effective dichotomy for partition functions Z A on non-negative real-valued (i.e. not necessarily symmetric) matrices A . The complexity of hypergraph partition functionswas studied by Dyer, Goldberg, and Jerrum [DGJ08], who proved the following theorem: Theorem 3.7 (Dyer, Goldberg, and Jerrum [DGJ08]).
For every r , the class of functions Z A from theclass H r of r -uniform hypergraphs defined by non-negative symmetric functions A : [ n ] r → R A exhibitsan effective FP – P -dichotomy. Let us finally turn to homomorphism counting functions for arbitrary relational structures, or equiva-lently solution counting functions for constraint satisfaction problems. Creignou and Hermann [CH96]proved a dichotomy for the Boolean case, that is, for homomorphism counting functions of relationalstructures with just two elements. Dichotomies for the weighted Boolean case were proved in [DGJ09]for non-negative real weights, in [BDG +
09] for arbitrary real weights, and in [CLX09] for complexweights. Briquel and Koiran [BK09] study the problem in an algebraic computation model. The general(unweighted) case was settled by Bulatov:
Theorem 3.8 (Bulatov [Bul08]).
The class of homomorphism counting functions for relational struc-tures exhibits an FP – P -dichotomy. Bulatov’s proof uses deep results from universal algebra, and for some time it was unclear whether hisdichotomy is effective. Dyer and Richerby [DR10b] gave an alternative proof which avoids much ofthe universal algebra machinery, and they could show that the dichotomy is decidable in NP [DRar,DR10a]. Extensions to the weighted case for nonnegative weights in Q have been given by Bulatov etal. [BDG + Ω = ( G, F , π ) , given that F is a set of symmetric functions satisfying certain additional conditions.A first a dichotomy [CLX08] is given for any of boolean symmetric functions F on planar bipartite , -regular graphs. In [CLX09] dichotomies are presented, assuming that the class F contains certainunary functions. From now on, we will work exclusively with partition functions defined on matrices with entries in oneof the rings R A , Q [ X ] , Q , Z [ X ] , Z , and we always let S denote one of these rings. For technical reasons,we will always assume that numbers in R A are given in standard representation in some algebraicextension field Q ( θ ) . That is, we consider numbers in Q ( θ ) as vectors in a d -dimensional Q -vectorspace,where d is the degree of Q ( θ ) over Q . It is well-known that for any finite set of numbers from R A we7can compute a θ which constitutes the corresponding extension field (cf. [Coh93] p. 181). For furtherdetails see also the treatment of this issue in [DGJ08, Thu09].By deg( f ) we denote the degree of a polynomial f . For two problems P and Q we use P ≤ Q todenote that P is polynomial time Turing reducible to Q . Further, we write P ≡ Q to denote that P ≤ Q and Q ≤ P holds.An m × n matrix A is decomposable , if there are non-empty index sets I ⊆ [ m ] , J ⊆ [ n ] with ( I, J ) (cid:54) = [ m ] × [ n ] such that A ij = 0 for all ( i, j ) ∈ ¯ I × J and all ( i, j ) ∈ I × ¯ J , where ¯ I := [ m ] \ I and ¯ J := [ n ] \ J . A matrix is indecomposable if it is not decomposable. A block of A is a maximalindecomposable submatrix. Let A be an m × m matrix and G := G ( A ) its underlying graph. Note thatevery connected component of G that is not bipartite corresponds to a block of A , and every connectedcomponent that is bipartite corresponds to two blocks B, B T arranged as in (cid:18) BB T (cid:19) . The proof of Theorem 3.2 falls into two parts, corresponding to the following two lemmas.
Lemma 4.1 (Polynomial Time Solvable Cases).
Let A ∈ S m × m be symmetric. If each block of A hasrow rank at most then EVAL ( A ) is polynomial time computable. We leave the proof of this lemma as an exercise for the reader. The essential ideas of its proof wereexplained in Section 3 before the statement of Theorem 3.2.
Lemma 4.2 (
Let A ∈ S m × m be symmetric and non-negative. If A contains a block ofrow rank at least then EVAL ( A ) is P -hard. Theorem 3.2 directly follows from Lemmas 4.1 and 4.2. The remainder of this paper is devoted to aproof of Lemma 4.2.For technical reasons, we need to introduce an extended version of partition functions with vertexweights. Several different restricted flavors of these will be used in the proof to come. Let A ∈ R m × m A be a symmetric matrix and D ∈ R m × m A a diagonal matrix. Let G = ( V, E ) be some given graph. Recallthat a configuration is a mapping σ : V → [ m ] which assigns a spin to every vertex of G . By contrast,a pinning of (vertices of) G with respect to A is a mapping φ : W → [ m ] for some subset W ⊆ V .Whenever the context is clear, we simply speak of pinnings and configurations without mentioning thematrices A , D and the graph G explicitly. We define the partition function on G and φ by Z A,D ( φ, G ) = (cid:88) φ ⊆ σ : V → [ m ] (cid:89) uv ∈ E A σ ( u ) ,σ ( v ) (cid:89) v ∈ V \ dom ( φ ) D σ ( v ) ,σ ( v ) where dom ( φ ) denotes the domain of φ . Note that the sum is over all configurations σ : V → [ m ] which extend the fixed given pinning φ . In the presence of a pinning φ we denote the weight of theconfiguration σ by the following term (cid:89) uv ∈ E A σ ( u ) ,σ ( v ) (cid:89) v ∈ V \ dom ( φ ) D σ ( v ) ,σ ( v ) . Note that, for technical reasons, the terms D σ ( v ) ,σ ( v ) for v ∈ dom ( φ ) are excluded from this weight.Whenever φ is empty in the sense that dom ( φ ) = ∅ then we say that it is trivial . In this case, itsappearance in the above expression is vacuous. This is analogously true for D if it is the identitymatrix. In either of these cases we omit the terms D ( φ , respectively) in the expression. For example ifdom ( φ ) = ∅ and D = I m , then Z A ( G ) = (cid:88) σ : V → [ m ] (cid:89) uv ∈ E A σ ( u ) ,σ ( v ) . ?? The definitions of Z A,D ( G ) and Z A ( φ, G ) are analogous. We define EVAL pin ( A, D ) as the computa-tional problem of computing Z A,D ( φ, G ) on input φ, G . Similarly EVAL ( A, D ) restricts the inputs toempty pinnings and EVAL pin ( A ) denotes the problem where D is the identity matrix.We will now explain the overall structure of the proof of Lemma 4.2. In a first step we will see howwe can augment our capabilities so as to fix some vertices of the input graphs, without changing thecomplexity of the problems under consideration (cf. Lemma 4.3). Then in the General ConditioningLemma 4.4 we will show, that we can reduce the abundance of non-negative matrices to certain well-structured cases. From these we will show in two steps (Lemmas 4.5 and 4.6) how to obtain Lemma 4.3 (Pinning Lemma).
Let A ∈ R m × m A be a symmetric non-negative matrix. Then EVAL pin ( A ) ≡ EVAL ( A ) . A -cell in a matrix A ∈ S m × m is a submatrix A IJ such that A ij = 1 for all ( i, j ) ∈ I × J and A ij (cid:54) = 1 for all ( i, j ) ∈ ( ¯ I × J ) ∪ ( I × ¯ J ) . For a number or an indeterminate X an X -matrix is a matrix whoseentries are powers of X . General Conditions.
For a matrix A ∈ S m × m we define conditions (A) A is symmetric positive and has rank A ≥ . (B) A is an X -matrix for an indeterminate X . (C) There is a k ≥ , numbers m < . . . < m k = m + 1 and I i = [ m i − , m i − for all i ∈ [ k ] such that A I i I i is a -cell for every i ∈ [ k − . The matrix A I k I k may or may not be a -cell.Furthermore, all -entries are contained in one of these -cells. Lemma 4.4 (General Conditioning Lemma).
Let A ∈ S m × m be a non-negative symmetric matrixwhich contains a block of rank at least . Then there is a Z [ X ] -matrix A (cid:48) satisfying conditions (A) – (C) such that EVAL pin ( A (cid:48) ) ≤ EVAL pin ( A ) . If a matrix A satisfies the General Conditions two different cases can occur which we will treat separatelyin the following. The first case is the existence of at least two -cells. Lemma 4.5 (Two -Cell Lemma). Let A ∈ Z [ X ] m × m be a positive symmetric matrix containing atleast two -cells. Then EVAL pin ( A ) is P -hard. The second case is then the existence of only one -cell. The proof of this case is much more involvedthan the first one. Lemma 4.6 (Single -Cell Lemma). Let A ∈ Z [ X ] m × m be a matrix which satisfies conditions (A) – (C) and has exactly one -cell. Then EVAL pin ( A ) is P -hard. Once these results have been derived, it will be easy to prove the main result.
Proof (of Lemma 4.2).
Let A ∈ R m × m A be a non-negative symmetric matrix which contains a block ofrank at least . By the General Conditioning Lemma 4.4 there is a matrix A (cid:48) satisfying conditions (A) – (C) such that EVAL pin ( A (cid:48) ) ≤ EVAL pin ( A ) . If A (cid:48) contains a single -cell then EVAL pin ( A (cid:48) ) is P-hardby Lemma 4.6. Otherwise, it is
P-hard by Lemma 4.5. In both cases this proves
P-hardness ofEVAL ( A ) by means of Lemma 4.3. (cid:3) Let A be an m × m matrix. Then, for every q ∈ Q we define the matrix A ( q ) by A ( q ) ij = (cid:26) ( A ij ) q , if A ij (cid:54) = 00 , otherwise.The following lemma provides two basic reductions which form basic building blocks of many hardnessproofs. Lemma 5.1.
Let A ∈ S m × m the following is true for every p ∈ N ( p -thickening) EVAL pin ( A ( p ) ) ≤ EVAL pin ( A ) . ( p -stretching) EVAL pin ( A p ) ≤ EVAL pin ( A ) . Proof.
Let G = ( V, E ) be a graph and φ a pinning. Let the p -thickening G ( p ) of G be the graph obtainedfrom G by replacing each edge by p many parallel edges. The p -stretching G p of G is obtained from G by replacing each edge by a path of length p . The reductions follow from the (easily verifiable) identities Z A ( p ) ( φ, G ) = Z A ( φ, G ( p ) ) and Z A p ( φ, G ) = Z A ( φ, G p ) . (cid:3) Lemma 5.2.
Let A ∈ S m × n be non-negative. If A contains a block of rank ≥ then so does AA T .Proof. Let A IJ be a block of rank at least in A and define A (cid:48) = AA T . We claim that A (cid:48) II contains ablock of rank at least , which clearly implies the statement of the lemma.For i, i (cid:48) ∈ I let A i, ∗ and A i (cid:48) , ∗ be two linearly independent rows. Since A IJ is a block, there areindices i = i , . . . , i k = i (cid:48) in I and j , . . . j k − ∈ J such that A i ν j ν (cid:54) = 0 and A i ν +1 j ν (cid:54) = 0 for all ν ∈ [ k − . Linear independence of A i, ∗ and A i (cid:48) , ∗ implies that there is a µ ∈ [ k − such that also A i µ , ∗ and A i µ +1 , ∗ are linearly independent. We claim that the submatrix (cid:32) A (cid:48) i µ ,i µ A (cid:48) i µ ,i µ +1 A (cid:48) i µ +1 ,i µ A (cid:48) i µ +1 ,i µ +1 (cid:33) = (cid:18) (cid:104) A i µ , ∗ , A i µ , ∗ (cid:105) (cid:104) A i µ , ∗ , A i µ +1 , ∗ (cid:105)(cid:104) A i µ +1 , ∗ , A i µ , ∗ (cid:105) (cid:104) A i µ +1 , ∗ , A i µ +1 , ∗ (cid:105) (cid:19) is a witness for the existence of a block of rank at least two in A (cid:48) . To see this note first that, by definition,all entries of this submatrix are positive, it thus remains to show that this submatrix has rank . Assume,for contradiction, that it has zero determinant, that is (cid:104) A i µ , ∗ , A i µ , ∗ (cid:105)(cid:104) A i µ +1 , ∗ , A i µ +1 , ∗ (cid:105) = (cid:104) A i µ +1 , ∗ , A i µ , ∗ (cid:105) . The Cauchy Schwarz inequality therefore implies linear dependence of A i µ , ∗ and A i µ +1 , ∗ . Contradic-tion. (cid:3) For A an m × m matrix and π : [ m ] → [ m ] a permutation, define A ππ by ( A ππ ) ij = A π ( i ) π ( j ) for all i, j ∈ [ m ] . The
Permutability Principle states that for any evaluation problem on some matrix A , we may assumeany simultaneous permutation of the rows and columns of this matrix. Its proof is straightforward. Lemma 5.3 (Permutability Principle).
Let
A, D ∈ S m × m and π : [ m ] → [ m ] a permutation. Then EVAL pin ( A, D ) ≡ EVAL pin ( A ππ , D ππ ) . We will make extensive use of interpolation; the following simple lemma is one instance.
Lemma 5.4.
For some fixed θ ∈ R A let x , . . . , x n ∈ Q ( θ ) be pairwise different and non-negativereals. Let b , . . . , b n ∈ Q ( θ ) be arbitrary such that b j = n (cid:88) i =1 c i x ji for all j ∈ [ n ] . Then the coefficients c , . . . , c n are uniquely determined and can be computed in polynomial time. pin ( A ) and COUNT pin ( A ) Let A ∈ S m × m be a matrix, G = ( V, E ) a graph and φ a pinning. We define a set of potential weights W A ( G ) := (cid:89) i,j ∈ [ m ] A m ij ij | (cid:88) i,j ∈ [ m ] m ij = | E | , and m ij ≥ , for all i, j ∈ [ m ] . (5.1)For every w ∈ S define the value N A ( G, φ, w ) := (cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:40) σ : V → [ m ] (cid:12)(cid:12)(cid:12)(cid:12)(cid:12) | φ ⊆ σ, w = (cid:89) uv ∈ E A σ ( u ) σ ( v ) (cid:41)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12) . By COUNT pin ( A ) we denote the problem of computing N A ( G, φ, w ) for given G, φ and w ∈ S . Inanalogy to the evaluation problems we write COUNT ( A ) for the subproblem restricted to instanceswith trivial pinnings. It turns out that these problems are computationally equivalent to the evaluationproblems of partition functions. Lemma 5.5.
For every matrix A ∈ S m × m we have EVAL pin ( A ) ≡ COUNT pin ( A ) and EVAL ( A ) ≡ COUNT ( A ) . Proof.
Let G = ( V, E ) be a graph and φ a pinning. We have Z A ( φ, G ) = (cid:88) φ ⊆ σ : V → [ m ] (cid:89) uv ∈ E A σ ( u ) σ ( v ) = (cid:88) w ∈W A ( G ) w · N A ( G, φ, w ) . As the cardinality of W A ( G ) is polynomial in the size of G this proves the reducibilitiesEVAL pin ( A ) ≤ COUNT pin ( A ) and EVAL ( A ) ≤ COUNT ( A ) . For the backward direction let G ( t ) denote the graph obtained from G by replacing each edge by t parallel edges. We have Z A ( φ, G ( t ) ) = (cid:88) φ ⊆ σ : V → [ m ] (cid:32) (cid:89) uv ∈ E A σ ( u ) σ ( v ) (cid:33) t = (cid:88) w ∈W A ( G ) w t · N A ( G, φ, w ) . Using an EVAL pin ( A ) oracle, we can evaluate this for t = 1 , . . . , |W A ( G ) | . Therefore, if S is one of R A , Q , Z , the values N A ( G, φ, w ) can be recovered in polynomial time by Lemma 5.4. .2 Dealing with Vertex Weights S is one of Z [ X ] or Q [ X ] , then let f t ( X ) denote Z A ( φ, G ( t ) ) . We obtain the following system ofequations, for t = 1 , . . . , |W A ( G ) | , f t ( X ) = (cid:88) w ∈W A ( G ) w t ( X ) · N A ( G, φ, w ) . (5.2)Let det( X ) denote the determinant of this system of equations. W.l.o.g., all the w ( X ) ∈ W A ( G ) arenon-zero polynomials, det( X ) , as it is a Vandermonde determinant in these w ( X ) , is itself a non-zeropolynomial of the form det( X ) = (cid:89) w ∈W A ( G ) w ( X ) · (cid:89) w (cid:54) = w (cid:48) ∈W A ( G ) ( w ( X ) − w (cid:48) ( X )) . Let δ = 1 + max { deg w ( X ) | w ∈ W A ( G ) } and observe that each w ∈ W A ( G ) has at most δ − roots.Further, each of the terms w ( X ) − w (cid:48) ( X ) of det( X ) has degree at most δ − and thus the degree of det( X ) is strictly smaller than δ (cid:48) := (cid:0) |W A ( G ) | +12 (cid:1) · δ . Hence there is an integer a ≤ δ (cid:48) such that det( a ) is non-zero. By equation (5.2) we obtain an invertible system of equations f t ( a ) = (cid:88) w ∈W A ( G ) w t ( a ) · N A ( G, φ, w ) . (5.3)The coefficients N A ( G, φ, w ) can be now obtained in polynomial time by Lemma 5.4. This finishes theproof of COUNT pin ( A ) ≡ EVAL pin ( A ) . The proof for COUNT ( A ) ≡ EVAL ( A ) also follows by theargument just presented, as the given pinnings remain unaffected. (cid:3) Lemma 5.6 (Theorem 3.2 in [DG00]).
Let A ∈ R m × m A be a symmetric matrix with non-negative en-tries such that every pair of rows in A is linearly independent. Let D ∈ R m × m A be a diagonal matrix ofpositive vertex weights. Then EVAL pin ( A ) ≤ EVAL pin ( A, D ) and EVAL ( A ) ≤ EVAL ( A, D ) . After some preparation, we will prove this lemma in Section 5.2.2.
The following is a lemma from [DG00] (Lemma 3.4).
Lemma 5.7.
Let A ∈ R m × m A be symmetric and non-singular, G = ( V, E ) a graph, φ a pinning, and F ⊆ E . If we know the values f r ( G ) = (cid:88) φ ⊆ σ : V → [ m ] c A ( σ ) (cid:89) uv ∈ F A rσ ( u ) σ ( v ) (5.4) for all r ∈ [( | F | + 1) m ] , where c A is a function depending on A but not on r . Then we can evaluate (cid:88) φ ⊆ σ : V → [ m ] c A ( σ ) (cid:89) uv ∈ F ( I m ) σ ( u ) σ ( v ) in polynomial time. Proof. As A is symmetric and non-singular, there is an orthogonal matrix P such that P T AP =: D isa diagonal matrix with non-zero diagonal. From A = P DP T we have A r = P D r P T and thus everyentry of A r satisfies A rij = ( P D r P T ) ij = (cid:80) mµ =1 P σ ( u ) µ P σ ( v ) µ ( D µµ ) r . Hence equation (5.4) can berewritten as f r ( G ) = (cid:88) φ ⊆ σ : V → [ m ] c A ( σ ) (cid:89) uv ∈ F m (cid:88) µ =1 P σ ( u ) µ P σ ( v ) µ ( D µµ ) r Define the set W = (cid:40) m (cid:89) i =1 ( D ii ) α i | ≤ α i for all i ∈ [ m ] , m (cid:88) i =1 α i = | F | (cid:41) which can be constructed in polynomial time. We rewrite f r ( G ) = (cid:88) w ∈W c w w r . for unknown coefficients c w . By interpolation (cf. Lemma 5.4), we can recover these coefficients inpolynomial time and can thus calculate f ( G ) = (cid:80) w ∈W c w . We have f ( G ) = (cid:88) φ ⊆ σ : V → [ m ] c A ( σ ) (cid:89) uv ∈ F m (cid:88) µ =1 P σ ( u ) µ P σ ( v ) µ ( D µµ ) = (cid:88) φ ⊆ σ : V → [ m ] c A ( σ ) (cid:89) uv ∈ F I σ ( u ) σ ( v ) which finishes the proof. (cid:3) The following two lemmas are restatements of those in [DG00] (see Lemma 3.6, 3.7 and Theorem 3.1).
Lemma 5.8.
Let A ∈ R m × m be a symmetric matrix in which every pair of distinct rows is linearlyindependent. Let D ∈ R m × m be a diagonal matrix of positive vertex weights. Then every pair of rowsin ADA is linearly independent. Furthermore there is an < (cid:15) < such that for all i (cid:54) = j | ( ADA ) ij | ≤ (cid:15) (cid:113) ( ADA ) ii ( ADA ) jj Proof.
Define Q = AD (1 / . We have ADA = AD (1 / D (1 / A T = QQ T . That is ( ADA ) ij = (cid:104) Q i, ∗ , Q j, ∗ (cid:105) every pair of rows in Q is linearly independent as it is linearly independent in A . Hence, bythe Cauchy-Schwarz inequality (cid:104) Q i, ∗ , Q j, ∗ (cid:105) < (cid:113) (cid:104) Q i, ∗ , Q i, ∗ (cid:105)(cid:104) Q j, ∗ , Q j, ∗ (cid:105) which implies that the corresponding × submatrix of ADA defined by i and j has non-zero determi-nant. The existence of (cid:15) follows. (cid:3) Lemma 5.9.
Let A ∈ R m × m be a symmetric non-negative matrix in which every pair of distinct rowsis linearly independent. Let D ∈ R m × m be a diagonal matrix of positive vertex weights. Then there isa p ∈ N such that the matrix ( ADA ) ( p ) is non-singular. .2 Dealing with Vertex Weights Proof.
Let A (cid:48) = ADA and consider the determinant det( A (cid:48) ) = (cid:88) π ∈ S m sgn ( π ) m (cid:89) i =1 A (cid:48) iπ ( i ) where S m is the set of permutations of [ m ] . For some π ∈ S m define t ( π ) = |{ i | π ( i ) (cid:54) = i }| . Let (cid:15) beas in Lemma 5.8. Then m (cid:89) i =1 | A (cid:48) iπ ( i ) | ≤ (cid:15) t ( π ) m (cid:89) i =1 (cid:113) A (cid:48) ii m (cid:89) i =1 (cid:113) A (cid:48) π ( i ) π ( i ) = (cid:15) t ( π ) m (cid:89) i =1 A (cid:48) ii . (5.5)Let id denote the trivial permutation. Then det(( A (cid:48) ) ( p ) ) ≥ (cid:32) m (cid:89) i =1 A (cid:48) ii (cid:33) p − (cid:88) π ∈ S m \{ id } (cid:32) m (cid:89) i =1 A (cid:48) iπ ( i ) (cid:33) p . By equation (5.5), we have m ! (cid:15) p (cid:32) m (cid:89) i =1 A (cid:48) ii (cid:33) p ≥ (cid:88) π ∈ S m \{ id } (cid:32) m (cid:89) i =1 A (cid:48) iπ ( i ) (cid:33) p and hence, as < (cid:15) < , the matrix ( ADA ) ( p ) is non-singular for large enough p . (cid:3) By Lemma 5.9 there is a p ∈ N such that ( ADA ) ( p ) is non-singular. We will fix such a p for the rest ofthe proof.Let G, φ be an instance of EVAL pin ( A ) with G = ( V, E ) a graph. Construct from G a graph G (cid:48) asfollows. Define V (cid:48) = { v , . . . , v d − | v ∈ V, d = d G ( v ) } that is, for each vertex v ∈ V we introduce d ( v ) new vertices. Let φ (cid:48) be the pinning which for every v ∈ dom ( φ ) satisfies φ (cid:48) ( v ) = φ ( v ) . Let E (cid:48)(cid:48)(cid:48) be the set which contains, for each v ∈ V the cycle on { v , . . . , v d G ( v ) − } , i.e. { v v , . . . , v d G ( v ) − v } ⊆ E (cid:48)(cid:48)(cid:48) . Let E (cid:48)(cid:48) be the set of edges, such that each edgefrom E incident with v is connected to exactly one of the v i . Define E (cid:48) = E (cid:48)(cid:48) ∪ E (cid:48)(cid:48)(cid:48) and denote by G (cid:48) p,r the graph obtained from G (cid:48) by replacing each edge in E (cid:48)(cid:48)(cid:48) with a distinct copy of the graph T p,r to bedefined next.To conveniently define the graph T p,r we will first describe another graph T p . This graph consistsof two distinguished vertices a and b connected by p many length paths from a to b . Then T p,r isthe series composition of r many copies of T p . The construction is illustrated in Figure 3. We call a and b the ”start” and ”end” vertex of T p and T p,r has start and end vertices induced by the start and endvertices of the series composition of T p .For a graph H with designated “start” and “end” vertex we denote by Z A,D ( i, j ; H ) the partitionfunction Z A,D ( φ, H ) for φ such that it pins the start vertex of H to i and the end vertex to j . Note that,by definition, the vertex weights of the pinned vertices do not occur in this term. Claim 1.
Let C = ( ADA ) ( p ) , then with X = D (1 / , we have for all i, j ∈ [ m ] and r ∈ N , Z A,D ( i, j ; T p,r ) = ( X ii X jj ) − (( XCX ) r ) ij . (5.6)4 a b T , T Figure 3: The graphs T and T , . Proof.
Straightforwardly, Z A,D ( i, j ; T p ) = (cid:32) m (cid:88) k =1 A ik A kj D kk (cid:33) p = ( ADA ) ( p ) ij = C ij and therefore Z A,D ( i, j ; T p,r ) = (cid:88) σ :[ r +1] → [ m ] σ (1)= i, σ ( r +1)= j r (cid:89) k =1 Z A,D ( σ ( k ) , σ ( k + 1); T p ) r (cid:89) k =2 D σ ( k ) ,σ ( k ) = (cid:88) σ :[ r +1] → [ m ] σ (1)= i, σ ( r +1)= j r (cid:89) k =1 C σ ( k ) ,σ ( k +1) r (cid:89) k =2 ( X σ ( k ) ,σ ( k ) ) = ( X ii X jj ) − (cid:88) σ :[ r +1] → [ m ] σ (1)= i, σ ( r +1)= j r (cid:89) k =1 X σ ( k ) ,σ ( k ) C σ ( k ) ,σ ( k +1) X σ ( k +1) ,σ ( k +1) By inspection, the last line equals the right hand side of equation (5.6) — as claimed. (cid:97)
Using the expression just obtained for Z A,D ( i, j ; T p,r ) , we will now rewrite Z A,D ( φ (cid:48) , G (cid:48) p,r ) . To do so,we will, for all v ∈ V , count the indices of the vertices v , . . . , v d G ( v ) − modulo d G ( v ) . In particular v d G ( v ) = v . Define γ = (cid:81) v ∈ dom ( φ (cid:48) ) D φ (cid:48) ( v ) ,φ (cid:48) ( v ) . We have for all r ∈ N , Z A,D ( φ (cid:48) , G (cid:48) p,r ) = γ − (cid:88) φ (cid:48) ⊆ σ : V (cid:48) → [ m ] (cid:89) uv ∈ E (cid:48)(cid:48) A σ ( u ) σ ( v ) (cid:89) v ∈ V (cid:48) D σ ( v ) ,σ ( v ) (cid:89) v ∈ V d G ( v ) − (cid:89) i =0 Z A,D ( σ ( v i ) , σ ( v i +1 ); T p,r ) . As the vertices in V (cid:48) are grouped according to the vertices in V we have (cid:89) v ∈ V (cid:48) D σ ( v ) ,σ ( v ) = (cid:89) v ∈ V d G ( v ) − (cid:89) i =0 D σ ( v i ) ,σ ( v i ) . Using equation (5.6), we further see that for each σ : V → [ m ] , the expression (cid:89) v ∈ V (cid:48) D σ ( v ) ,σ ( v ) (cid:89) v ∈ V d G ( v ) − (cid:89) i =0 Z A,D ( σ ( v i ) , σ ( v i +1 ); T p,r ) (cid:89) v ∈ V d G ( v ) − (cid:89) i =0 D σ ( v i ) ,σ ( v i ) (( XCX ) r ) σ ( v i ) ,σ ( v i +1 ) X σ ( v i ) ,σ ( v i ) X σ ( v i +1 ) ,σ ( v i +1 ) = (cid:89) v ∈ V d G ( v ) − (cid:89) i =0 (( XCX ) r ) σ ( v i ) ,σ ( v i +1 ) Thus Z A,D ( φ (cid:48) , G (cid:48) p,r ) = γ − (cid:88) φ (cid:48) ⊆ σ : V (cid:48) → [ m ] (cid:89) uv ∈ E (cid:48)(cid:48) A σ ( u ) σ ( v ) (cid:89) v ∈ V d G ( v ) − (cid:89) i =0 (( XCX ) r ) σ ( v i ) σ ( v i +1 ) = γ − (cid:88) φ (cid:48) ⊆ σ : V (cid:48) → [ m ] (cid:89) uv ∈ E (cid:48)(cid:48) A σ ( u ) σ ( v ) (cid:89) uv ∈ E (cid:48)(cid:48)(cid:48) (( XCX ) r ) σ ( u ) σ ( v ) Given the EVAL ( A, D ) oracle, we can, in polynomial time, evaluate this expression for every r whichis polynomial in the size of G . Therefore Lemma 5.7 implies that we can compute the value Z = γ − (cid:88) φ (cid:48) ⊆ σ : V (cid:48) → [ m ] (cid:89) uv ∈ E (cid:48)(cid:48) A σ ( u ) σ ( v ) (cid:89) uv ∈ E (cid:48)(cid:48)(cid:48) I σ ( u ) σ ( v ) in polynomial time. The proof follows, if we can show that γ · Z = Z A ( φ, G ) . To see this, note that, forevery configuration σ : V (cid:48) → [ m ] the corresponding weight (cid:81) uv ∈ E (cid:48)(cid:48) A σ ( u ) σ ( v ) (cid:81) uv ∈ E (cid:48)(cid:48)(cid:48) I σ ( u ) σ ( v ) in theabove expression is zero unless the following holds: For all v ∈ V we have σ ( v ) = . . . = σ ( v d − ) for d = d G ( v ) . for such a configuration, define a configuration σ (cid:48) : V → [ m ] such that σ ( v ) = σ ( v ) forevery v ∈ V . It follows from the construction of G (cid:48) that then (cid:89) uv ∈ E (cid:48)(cid:48) A σ ( u ) ,σ ( v ) = (cid:89) uv ∈ E A σ (cid:48) ( u ) ,σ (cid:48) ( v ) . Since every configuration σ (cid:48) : V → [ m ] arises this way, we have γ · Z = Z A ( φ, G ) . This finishes theproof of EVAL pin ( A ) ≤ EVAL pin ( A, D ) . Since the proof is correct also for empty input pinnings φ ,this also proves EVAL ( A ) ≤ EVAL ( A, D ) . In this section we shall give the proof of the Pinning Lemma 4.3. Before we do this, however, we willintroduce a technical reduction which will also be used later.
For a symmetric m × m matrix A , we say that two rows A i, ∗ and A j, ∗ are twins , if A i, ∗ = A j, ∗ . A matrix A is twin-free if A i, ∗ (cid:54) = A j, ∗ for all row indices i (cid:54) = j . The concept of twins induces an equivalencerelation on the rows of A . Let I , . . . , I k be the equivalence classes of this relation. The twin resolvent of A is the k × k matrix [ A ] , defined by [ A ] i,j = A µ,ν for some µ ∈ I i and ν ∈ I j . We say that [ A ] is obtained from A by twin reduction . Further, we define the twin resolution mapping τ : [ m ] → [ k ] of A in such a way that for all µ ∈ [ m ] we have µ ∈ I τ ( µ ) . That is, τ maps every µ ∈ [ m ] to the class I j it is contained in. Hence [ A ] τ ( i ) ,τ ( j ) = A i,j for all i, j ∈ [ m ] . (6.1)6 To use twin reductions in the context of partition functions we need to clarify the effect which twinreduction on a matrix A induces on the corresponding diagonal matrix of vertex weights D . We will seethat the diagonal k × k matrix D [ A ] defined in the following captures this effect D [ A ] i,i = (cid:88) ν ∈ I i D ν,ν for all i ∈ [ k ] . (6.2) Lemma 6.1 (Twin Reduction Lemma).
Let A ∈ R m × m A be non-negative and symmetric and D ∈ R m × m A a diagonal matrix of positive vertex weights. Let [ A ] be the twin resolvent of A . Then EVAL ([ A ] , D [ A ] ) ≡ EVAL ( A, D ) and EVAL pin ([ A ] , D [ A ] ) ≡ EVAL pin ( A, D ) . Proof.
Let τ be the twin-resolution mapping of A . Let G = ( V, E ) be a graph and φ a pinning. Define V (cid:48) = V \ dom ( φ ) . By the definition of τ we have Z A,D ( φ, G ) = (cid:88) φ ⊆ σ : V → [ m ] (cid:89) uv ∈ E A σ ( u ) ,σ ( v ) (cid:89) v ∈ V (cid:48) D σ ( v ) ,σ ( v ) = (cid:88) φ ⊆ σ : V → [ m ] (cid:89) uv ∈ E [ A ] τ ◦ σ ( u ) ,τ ◦ σ ( v ) (cid:89) v ∈ V (cid:48) D σ ( v ) ,σ ( v ) . For all configurations σ : V → [ m ] we have τ ◦ σ : V → [ k ] . Hence, we can partition the configurations σ into classes according to their images under concatenation with τ and obtain Z A,D ( φ, G ) = (cid:88) σ (cid:48) : V → [ k ] (cid:88) φ ⊆ σ : V → [ m ] τ ◦ σ = σ (cid:48) (cid:89) uv ∈ E [ A ] σ (cid:48) ( u ) ,σ (cid:48) ( v ) (cid:89) v ∈ V (cid:48) D σ ( v ) ,σ ( v ) = (cid:88) τ ◦ φ ⊆ σ (cid:48) : V → [ k ] (cid:89) uv ∈ E [ A ] σ (cid:48) ( u ) ,σ (cid:48) ( v ) · ∆( σ (cid:48) ) . Here, ∆( σ (cid:48) ) is defined by ∆( σ (cid:48) ) = (cid:88) φ ⊆ σ : V → [ m ] τ ◦ σ = σ (cid:48) (cid:89) v ∈ V (cid:48) D σ ( v ) ,σ ( v ) . Fix some σ (cid:48) : V → [ k ] , we will argue that ∆( σ (cid:48) ) = (cid:89) v ∈ V (cid:48) D [ A ] σ (cid:48) ( v ) ,σ (cid:48) ( v ) (6.3)For every configuration σ : V → [ m ] we have τ ◦ σ = σ (cid:48) if, and only if, σ (cid:48)− ( { i } ) = σ − ( I i ) for all i ∈ [ k ] . Define, for each i ∈ [ k ] , the set V i := σ (cid:48)− ( { i } ) and the mapping φ i := φ (cid:22) dom ( φ ) ∩ V i . Then ∆( σ (cid:48) ) = (cid:88) φ ⊆ σ : V → [ m ] ∀ i ∈ [ k ]: σ ( V i ) ⊆ I i (cid:89) v ∈ V (cid:48) D σ ( v ) ,σ ( v ) .2 Proof of the Pinning Lemma V (cid:48) i := V i \ dom ( φ i ) , then ∆( σ (cid:48) ) = k (cid:89) i =1 (cid:88) φ i ⊆ σ i : V i → I i (cid:89) v ∈ V (cid:48) i D σ i ( v ) ,σ i ( v ) = k (cid:89) i =1 (cid:89) v ∈ V (cid:48) i (cid:88) ν ∈ I i D ν,ν = (cid:89) v ∈ V (cid:48) D [ A ] σ (cid:48) ( v ) ,σ (cid:48) ( v ) This proves equation (6.3). Therefore, Z A,D ( φ, G ) = (cid:88) τ ◦ φ ⊆ σ (cid:48) : V → [ k ] (cid:89) uv ∈ E [ A ] σ (cid:48) ( u ) ,σ (cid:48) ( v ) (cid:89) v ∈ V (cid:48) D [ A ] σ (cid:48) ( v ) ,σ (cid:48) ( v ) = Z [ A ] ,D [ A ] ( τ ◦ φ, G ) . This witnesses the claimed reducibilities. (cid:3)
We shall prove the Pinning Lemma 4.3 now. The proof of this Lemma relies on a result of Lov´asz[Lov06]. To state this result we need some further preparation. Let
A, D be m × m matrices and A (cid:48) , D (cid:48) be n × n matrices such that D and D (cid:48) are diagonal. The pairs ( A, D ) and ( A (cid:48) , D (cid:48) ) are isomorphic , ifthere is a bijection α : [ m ] → [ n ] such that A ij = A (cid:48) α ( i ) α ( j ) for all i, j ∈ [ m ] and D ii = D (cid:48) α ( i ) ,α ( i ) forall i ∈ [ m ] . An automorphism is an isomorphism of ( A, D ) with itself.We will moreover need to consider pinnings a bit differently than before. Rather than defining apinning φ for some given graph G , it will be convenient in the following to fix pinnings and considergraphs which are compatible with these. To define this more formally, we fix φ : [ k ] → [ m ] to denoteour pinning. A k -labeled graph G = ( V, E ) is then a graph whose vertex set satisfies V ⊇ [ k ] . In thisway φ is compatible with every k -labeled graph. Lemma 6.2 (Lemma 2.4 in [Lov06]).
Let A ∈ R m × m be a non-negative symmetric and twin-free ma-trix and D ∈ R m × m a diagonal matrix of positive vertex weights. Let φ, ψ be pinnings. If Z A,D ( φ, G ) = Z A,D ( ψ, G ) for all k -labeled graphs G , then there is an automorphism α of ( A, D ) such that φ = α ( ψ ) . Utilizing this result, we can now prove the pinning result first for twin-free matrices.
Lemma 6.3.
Let A ∈ R m × m A be non-negative, symmetric, and twin-free and D ∈ R m × m A a diagonalmatrix of positive vertex weights. Then EVAL pin ( A, D ) ≡ EVAL ( A, D ) . Proof.
As EVAL ( A, D ) ≤ EVAL pin ( A, D ) holds trivially we only need to prove EVAL pin ( A, D ) ≤ EVAL ( A, D ) .Let G = ( V, E ) and a pinning φ be an instance of EVAL pin ( A, D ) . By appropriate permutationof the rows/columns of A and D (cf. Lemma 5.3) we may assume that [ k ] = img φ ⊆ [ m ] for some k ≤ m . Let ˆ G = ( ˆ V , ˆ E ) be the graph obtained from G by collapsing the the sets φ − ( i ) for all i ∈ [ k ] .Formally, define a map γ ( v ) = (cid:26) i , v ∈ φ − ( i ) for some i ∈ [ k ] v , otherwise8 Then ˆ G is a k -labeled multigraph (with possibly some self-loops) defined by ˆ V = [ k ] ˙ ∪ ( V \ dom ( φ ))ˆ E = { γ ( u ) γ ( v ) | uv ∈ E } . Recall that in partition functions of the form Z A,D ( φ, G ) vertices pinned by φ do not contribute anyvertex weights. Hence, Z A,D ( φ, G ) = Z A,D ( id [ k ] , ˆ G ) where id [ k ] denotes the identity map on [ k ] . Calltwo mappings χ, ψ : [ k ] → [ m ] equivalent if there is an automorphism α of ( A, D ) such that χ = α ◦ ψ .Partition the mappings ψ : [ k ] → [ m ] into equivalence classes I , . . . , I c according to this definition andfor all i ∈ [ c ] fix some ψ i ∈ I i . Assume furthermore, that ψ = id [ k ] . Clearly for any two χ, ψ from thesame equivalence class, we have Z A,D ( χ, F ) = Z A,D ( ψ, F ) for every graph F . Therefore, for everygraph G (cid:48) , Z A,D ( G (cid:48) ) = c (cid:88) i =1 Z A,D ( ψ i , G (cid:48) ) · (cid:88) ψ ∈ I i (cid:89) v ∈ dom ( ψ ) D ψ ( v ) ψ ( v ) (6.4)Define, for each i ∈ [ c ] the value c i = (cid:16)(cid:80) ψ ∈ I i (cid:81) v ∈ dom ( ψ ) D ψ ( v ) ψ ( v ) (cid:17) . We claim the following Claim 1.
Let I ⊆ [ c ] be a set of cardinality at least such that ∈ I . Assume that we can, for every k -labeled graph G (cid:48) , compute the value (cid:88) i ∈ I c i · Z A,D ( ψ i , G (cid:48) ) . (6.5)Then there is a proper subset I (cid:48) ⊂ I which contains such that we can compute, for every k -labeledgraph G (cid:48)(cid:48) , the value (cid:88) i ∈ I (cid:48) c i · Z A,D ( ψ i , G (cid:48)(cid:48) ) . (6.6)This claim will allow us to finish the proof. To see this, note first that by equation (6.4) we can computethe value (6.5) for I = [ c ] and G (cid:48) = ˆ G . Thus after at most c iterations of Claim 1 we arrive at c · Z A,D ( ψ , ˆ G ) . Further, c is effectively computable in time depending only on D and therefore we cancompute Z A,D ( id [ k ] , ˆ G ) = Z A,D ( φ, G ) . This proves the reducibility EVAL pin ( A, D ) ≤ EVAL ( A, D ) . Proof Of Claim 1.
Assume that we can compute the value given in (6.5). Lemma 6.2 implies that forevery pair i (cid:54) = j ∈ I there is a k -labeled graph Γ such that Z A,D ( ψ i , Γ) (cid:54) = Z A,D ( ψ j , Γ) . (6.7)Fix such a pair i (cid:54) = j ∈ I and a graph Γ satisfying this equation. Note that this graph can be computedeffectively in time depending only on A, D and ψ i , ψ j . Let G s denote the graph obtained from G byiterating s times the k -labeled product of G with itself. We can thus compute (cid:88) i ∈ I c i · Z A,D ( ψ i , G (cid:48) Γ s ) = c (cid:88) i ∈ I c i Z A,D ( ψ i , G (cid:48) ) · Z A,D ( ψ i , Γ) s . (6.8)Partition I into classes J , . . . , J z such that for every ν ∈ [0 , z ] we have i (cid:48) , j (cid:48) ∈ J ν if, and only if, Z A,D ( ψ i (cid:48) , Γ) = Z A,D ( ψ j (cid:48) , Γ) . Since one of these sets J ν contains and all of these are proper subsetsof I , it remains to show that we can compute, for each ν ∈ [0 , z ] , the value (cid:88) i (cid:48) ∈ J ν c i Z A,D ( ψ i (cid:48) , G (cid:48) ) . x ν := Z A,D ( ψ i (cid:48) , Γ) for each ν ∈ [ z ] and an i (cid:48) ∈ J ν . Equation (6.8) implies thatwe can compute z (cid:88) ν =0 x sν (cid:88) i (cid:48) ∈ J ν c i (cid:48) Z A,D ( ψ i (cid:48) , G (cid:48) ) . One of the values x ν might be zero. Assume therefore w.l.o.g. that x = 0 , then evaluating the abovefor s = 1 , . . . , z yields a system of linear equations, which by Lemma 5.4 can be solved in polynomialtime such that we can recover the values (cid:80) i (cid:48) ∈ J ν c i (cid:48) Z A,D ( ψ i (cid:48) , G (cid:48) ) for each ν ≥ . Using equation (6.5)we can thus also compute the value (cid:32)(cid:88) i ∈ I c i · Z A,D ( ψ i , G (cid:48) ) (cid:33) − z (cid:88) ν =1 (cid:88) i (cid:48) ∈ J ν c i (cid:48) Z A,D ( ψ i (cid:48) , G (cid:48) ) = (cid:88) i (cid:48) ∈ J c i (cid:48) Z A,D ( ψ i (cid:48) , G (cid:48) ) . (cid:3) The proof of the Pinning Lemma now follows easily from Lemmas 6.1 and 6.3.
Proof (of the Pinning Lemma 4.3).
Fix the twin resolvent A (cid:48) = [ A ] of A and let D (cid:48) = D [ A ] . It sufficesto show EVAL pin ( A (cid:48) , D (cid:48) ) ≡ EVAL ( A (cid:48) , D (cid:48) ) . (6.9)To see this note that by the Twin Reduction Lemma 6.1 we then have the chain of reductionsEVAL pin ( A, D ) ≡ EVAL pin ( A (cid:48) , D (cid:48) ) ≡ EVAL ( A (cid:48) , D (cid:48) ) ≡ EVAL ( A, D ) . The proof of equation (6.9) follows from Lemma 6.3. (cid:3) { , } Matrices
As a technical prerequisite, we need a part of the result of [DG00] (Theorem 1.1 in there). We call ablock non-trivial if it contains a non-zero entry.
Lemma 7.1 (
Let A be a symmetric connected and bipartite { , } -matrix withunderlying non-trivial block B . If B contains a zero entry then the problem EVAL pin ( A ) is P -hard.Proof. We will start with the following claim which captures the main reduction. Call a matrix A powerful if it is a symmetric connected and bipartite { , } -matrix whose underlying block B containsa zero entry. Claim 1.
Let A be a powerful matrix with underlying m × n block B . If either n > or m > thenthere is a powerful matrix A (cid:48) with underlying m (cid:48) × n (cid:48) block B (cid:48) such that ≤ m (cid:48) ≤ m and ≤ n (cid:48) ≤ n ,at least one of these inequalities is strict andEVAL pin ( A (cid:48) ) ≤ EVAL pin ( A ) . Before we prove the claim, let us see how it helps in proving the lemma. Let A be as in the statementof the lemma. Iterating Claim 1 for a finite number of steps we arrive at EVAL pin ( A (cid:48) ) ≤ EVAL pin ( A ) such that the block B (cid:48) underlying A (cid:48) is a × matrix of the form (up to permutation of rows/columns) (cid:18) (cid:19) . For every empty pinning φ and bipartite graph G with c connected components Z A (cid:48) ( φ, G ) equals c times the number of independent sets of G . This straightforwardly gives rise to a reduction fromthe problem of counting independent sets in bipartite graphs which is well-known to be P-hard (see[PB83]).
Proof of Claim 1. As B is a block with a zero entry, there are indices i, j, k, l such that B ik = B il = B jk = 1 and B jl = 0 . Fix these indices and let I = { ν | B iν = 1 } and J = { µ | B µk = 1 } be the setsof indices of -entries in row i and column k . Let A ∗ be the connected bipartite matrix with underlyingblock B IJ . We will show that EVAL pin ( A ∗ ) ≤ EVAL pin ( A ) . (7.1)To see this, let G, φ be an instance of EVAL pin ( A ∗ ) . We shall consider only the case here that G =( U ∪ W, E ) is connected and bipartite with bipartition U, W and that φ pins a vertex a ∈ U to a row of B IJ . All other cases follow similarly.Define G (cid:48) as the graph obtained from G by adding two new vertices u (cid:48) and w (cid:48) and connect everyvertex of U by an edge to w (cid:48) and every vertex of W by a edge to u (cid:48) . Let φ (cid:48) be the pinning obtained from φ by adding u (cid:48) (cid:55)→ i and w (cid:48) (cid:55)→ k . We have Z A ∗ ( φ, G ) = Z A ( φ (cid:48) , G (cid:48) ) which yields a reduction witnessingequation (7.1).Before we proceed, we need another Claim 2.
Let A + be a powerful matrix with underlying m + × n + block B + . There is a twin-freepowerful matrix A (cid:48)(cid:48) with underlying m (cid:48)(cid:48) × n (cid:48)(cid:48) block B (cid:48)(cid:48) such that ≤ m (cid:48)(cid:48) ≤ m + and ≤ n (cid:48)(cid:48) ≤ n + andEVAL pin ( A (cid:48)(cid:48) ) ≤ EVAL pin ( A + ) . Proof.
This is a straightforward combination of the Twin Reduction Lemma 6.1 and Lemma 5.6. (cid:97)
Combining equation (7.1) and Claim 2 we arrive at EVAL pin ( A (cid:48)(cid:48) ) ≤ EVAL pin ( A ) for a powerfultwin-free matrix A (cid:48)(cid:48) . The block B (cid:48)(cid:48) underlying A (cid:48)(cid:48) has some dimension m (cid:48)(cid:48) × n (cid:48)(cid:48) such that ≤ m (cid:48)(cid:48) ≤ m and ≤ n (cid:48)(cid:48) ≤ n . Further, up to permutation of rows/columns, this block has the following form B (cid:48)(cid:48) = . . .
11 0 . . . ∗ ... . . . ∗ . . . To prove Claim 1 it suffices to devise a reduction witnessingEVAL pin ( A (cid:48) ) ≤ EVAL pin ( A (cid:48)(cid:48) ) (7.2)for a powerful matrix A (cid:48) such that the block B (cid:48) underlying A (cid:48) has either fewer rows or columns than B (cid:48)(cid:48) .To devise such a reduction, assume that B (cid:48)(cid:48) has at least three rows (the case that B (cid:48)(cid:48) has at leastthree columns is symmetric). As B (cid:48)(cid:48) is twin-free, there must be entries B (cid:48)(cid:48) a (cid:54) = B (cid:48)(cid:48) a . Assume w.l.o.g.that B (cid:48)(cid:48) a = 0 and B (cid:48)(cid:48) a = 1 . As B (cid:48)(cid:48) is twin-free we further have that B (cid:48)(cid:48) b = 0 for some b . Let K = { κ | B (cid:48)(cid:48) κ = 1 } be the indices of non-zero entries of B (cid:48)(cid:48) , ∗ . Define B (cid:48) = B (cid:48)(cid:48)∗ ,K and let A (cid:48) be theconnected bipartite matrix with underlying block B (cid:48) . It remains to devise the desired reduction.Let G, φ be an instance of EVAL pin ( A (cid:48) ) . As before, we shall consider only the case that G =( U ∪ W, E ) is connected and bipartite with bipartition U, W and that φ pins a vertex a ∈ U to a row of B (cid:48) . All other cases follow similarly. .2 From General Matrices to Positive Matrices G (cid:48) as the graph obtained from G by adding one new vertex u (cid:48) and connect every vertex of W by a edge to u (cid:48) . Let φ (cid:48) be the pinning obtained from φ by adding u (cid:48) (cid:55)→ . This yields a reductionwitnessing equation (7.2) and hence finishes the proof of Claim 1. (cid:3) In the first step of the proof of the General Conditioning Lemma 4.4 we will see how to restrict attentionto matrices with positive entries.
Lemma 7.2 (The Lemma of the Positive Witness).
Let A ∈ S m × m be a symmetric non-negative ma-trix containing a block of row rank at least . Then there is an S -matrix A (cid:48) satisfying condition (A) , thatis A (cid:48) is positive symmetric of row rank at least , such that EVAL pin ( A (cid:48) ) ≤ EVAL pin ( A ) . The proof of this lemma relies on the elimination of zero entries. We do this in two steps, first (in thenext Lemma) we pin to components. Afterwards, we will see how to eliminate zero entries within acomponent.
Lemma 7.3 (Component Pinning).
Let A ∈ S m × m be a symmetric matrix. Then for each component C of A we have EVAL pin ( C ) ≤ EVAL pin ( A ) . Proof.
Let
G, φ be the input to EVAL pin ( C ) for some component C of some order m (cid:48) × m (cid:48) . Let G , . . . , G (cid:96) be the components of G and φ , . . . , φ (cid:96) the corresponding restrictions of φ . Since Z C ( φ, G ) = (cid:96) (cid:89) i =1 Z C ( φ i , G i ) we may assume w.l.o.g that G is connected which we shall do in the following. Let v be a vertex in G which is not pinned by φ . Define, for each i ∈ [ m ] , φ i as the pinning obtained from φ by adding v (cid:55)→ i .We have Z C ( φ, G ) = m (cid:88) i =1 Z C ( φ i , G ) . Thus it suffices to compute Z C ( φ i , G ) which can be obtained straightforwardly as these values equal Z A ( φ i , G ) . (cid:3) Lemma 7.4 (Zero-Free Block Lemma).
Let A ∈ S m × m be a symmetric matrix. Then either EVAL pin ( A ) is P -hard or no block of A contains zero entries.Proof. Let A (cid:48)(cid:48) be the matrix obtained from A by replacing each non-zero entry by . Let C be acomponent of A (cid:48)(cid:48) whose underlying block B contains a zero entry. For every given graph G and pinning φ each configuration σ which contributes a non-zero weight to Z A ( φ, G ) contributes a weight to Z A (cid:48)(cid:48) ( φ, G ) . Thus by EVAL pin ( A ) ≡ COUNT pin ( A ) (cf. Lemma 5.5) and component pinning (cf.Lemma 7.3) it is easy to see thatEVAL pin ( C ) ≤ EVAL pin ( A (cid:48)(cid:48) ) ≤ EVAL pin ( A ) . If C is bipartite, the result follows from the If C is not bipartite, we need a bit of additional work. Note that in this case C = B . Let A (cid:48) be theconnected bipartite r × r matrix with underlying block B . If we can show thatEVAL pin ( A (cid:48) ) ≤ EVAL pin ( B ) then the result follows from the G, φ be an instance of EVAL pin ( A (cid:48) ) . For simplicity, assume that G = ( U ∪ W, E ) is connectedand bipartite. If φ is empty, then we have Z A (cid:48) ( G ) = 2 · Z B ( G ) . Otherwise, Z A (cid:48) ( φ, G ) = 0 unless φ maps all elements of dom ( φ ) ∩ U to [ r ] and all entries of dom ( φ ) ∩ W to [ r + 1 , r ] or vice versa. Sinceboth cases are symmetric, we consider only the first one. Let φ (cid:48) : dom ( φ ) → [2 r ] be the pinning whichagrees with φ on dom ( φ ) ∩ U and for all w ∈ dom ( φ ) ∩ W satisfies φ (cid:48) ( w ) = φ ( w ) − r . By inspectionwe have Z A (cid:48) ( φ, G ) = Z B ( φ (cid:48) , G (cid:48) ) . (cid:3) Proof (of Lemma 7.2).
Let A ∈ S m × m contain a block B of rank at least . By -stretching (cf.Lemma 5.1) we have EVAL pin ( A ) ≤ EVAL pin ( A ) and Lemma 5.2 guarantees that A contains a com-ponent BB T which has rank at least . By component pinning (Lemma 7.3) we have EVAL pin ( BB T ) ≤ EVAL pin ( A ) . If BB T contains no zero entries, we let A (cid:48) = BB T .Otherwise let A (cid:48) ∈ N × be a matrix satisfying the conditions of the lemma. As BB T contains a zeroentry, Lemma 7.4 implies that EVAL pin ( BB T ) is P-hard and thus EVAL pin ( A (cid:48) ) ≤ EVAL pin ( BB T ) finishing the proof. (cid:3) Let A be a matrix which satisfies condition (A) . We will now see, how to obtain a matrix A (cid:48) whichadditionally satisfies (B) . That is, we will prove the following lemma. Lemma 7.5 ( X -Lemma). Let A ∈ S m × m be a matrix satisfying condition (A) . Then there is an S -matrix A (cid:48) satisfying conditions (A) and (B) such that EVAL pin ( A (cid:48) ) ≤ EVAL pin ( A ) . To prepare the proof, we present some smaller lemmas which will also be useful in later sections.
Lemma 7.6 (Prime Elimination Lemma).
Let A ∈ Z m × m ( A ∈ Z [ X ] m × m ) and p be a prime number(an irreducible polynomial). Let A (cid:48) be the matrix obtained from A by replacing all entries divisible by p with . Then EVAL pin ( A (cid:48) ) ≤ EVAL pin ( A ) . Proof.
By Lemma 5.5 it suffices to give a reduction witnessing EVAL pin ( A (cid:48) ) ≤ COUNT pin ( A ) , whichwe will construct in the following. Let G = ( V, E ) be a given graph φ a pinning. As W A (cid:48) ( G ) = W A ( G ) \ { w | w divisible by p } , we have W A (cid:48) ( G ) ⊆ W A ( G ) . Moreover N A (cid:48) ( G, φ, w ) = N A ( G, φ, w ) for all w ∈ W A (cid:48) ( G ) which implies Z A (cid:48) ( φ, G ) = (cid:88) w ∈W A (cid:48) ( G ) w · N A ( G, φ, w ) . The values N A ( G, φ, w ) can be obtained directly using the COUNT pin ( A ) oracle. (cid:3) .3 From Positive Matrices to X-matrices p be a prime number (an irreducible polynomial, respectively) and a ∈ Z ( a ∈ Z [ X ] , resp.). Define a | p = (cid:26) p max { k ≥ | p k divides a } , if a (cid:54) = 00 , otherwise.For a matrix A the matrix A | p is then defined by replacing each entry A ij with A ij | p . Lemma 7.7 (Prime Filter Lemma).
Let A ∈ Z m × m ( A ∈ Z [ X ] m × m ) and p be a prime number (anirreducible polynomial). Then EVAL pin ( A | p ) ≤ EVAL pin ( A ) . Proof.
By Lemma 5.5 it suffices to give a reduction witnessing EVAL pin ( A | p ) ≤ COUNT pin ( A ) , whichwe will construct in the following. For a given graph G = ( V, E ) and a pinning φ we have Z A | p ( φ, G ) = (cid:88) w ∈W A ( G ) w | p · N A ( G, φ, w ) . The values N A ( G, φ, w ) can be obtained directly using a COUNT pin ( A ) oracle. (cid:3) Lemma 7.8 (Renaming Lemma).
Let p ∈ Z [ X ] \ {− , , } and A ∈ Z [ X ] m × m a p -matrix. Let q ∈ Z [ X ] and define A (cid:48) ∈ Z [ X ] m × m by A (cid:48) ij = (cid:26) q l , there is an l ≥ s.t. A ij = p l , otherwiseThat is, A (cid:48) is the matrix obtained from A by substituting powers of p with the corresponding powers of q . Then EVAL pin ( A (cid:48) ) ≤ EVAL pin ( A ) . Proof.
Consider A (cid:48) as a function A (cid:48) ( Y ) in some indeterminate Y . We have A = A (cid:48) ( p ) . Let (cid:96) max bethe maximum power of Y occurring in A (cid:48) ( Y ) . For every graph G and pinning φ , the value f ( Y ) := Z A (cid:48) ( Y ) ( φ, G ) is a polynomial in Y of maximum degree | E | · (cid:96) max . By t -thickening (cf. Lemma 5.1),using an EVAL pin ( A ) oracle, we can compute the values f ( p t ) for t = 1 , . . . , | E | · (cid:96) max . Thus, byinterpolation (cf. Lemma 5.4) we can compute the value f ( q ) for a q as given in the statement of thelemma. By f ( q ) = Z A (cid:48) ( q ) ( φ, G ) this proves the claimed reducibility. (cid:3) Lemma 7.9 (Prime Rank Lemma).
Let A ∈ Z m × m ( A ∈ Z [ X ] m × m ) contain a block of row rank atleast . There is a prime number (an irreducible polynomial) p such that A | p contains a block of rowrank at least .Proof. Let A i, ∗ and A i (cid:48) , ∗ be linearly independent rows from a block of A . Assume, for contradiction,that for all primes (irreducible polynomials, resp.) p every block in A | p has rank at most . We have, forall j ∈ [ m ] , A ij = (cid:89) p A ij | p and A i (cid:48) j = (cid:89) p A i (cid:48) j | p where the products are over all primes (irreducible polynomials, resp.) dividing an entry of A . Byassumption, there are α p , β p ∈ Z (in Z [ X ] , resp.) such that α p · A i, ∗ | p = β p · A i (cid:48) , ∗ | p for all primes(irreducible polynomials). Therefore, A ij (cid:89) p α p = (cid:89) p α p A ij | p = (cid:89) p β p A i (cid:48) j | p = A i (cid:48) j · (cid:89) p β p for all j ∈ [ m ] . And hence, A i (cid:48) , ∗ and A i, ∗ are linearly dependent — a contradiction. (cid:3) Dealing with algebraic numbers.
The following lemma tells us that the structure of the numbersinvolved in computations of partition functions on matrices with algebraic entries is already captured bymatrices with natural numbers as entries.
Lemma 7.10 (The Arithmetical Structure Lemma).
Let A ∈ R m × m A be symmetric and non-negative.There is a matrix A (cid:48) whose entries are natural numbers such that EVAL pin ( A (cid:48) ) ≡ EVAL pin ( A ) . If further A contains a block of rank at least then this is also true for A (cid:48) . We have to introduce some terminology. Let B = { b , . . . , b n } ⊆ R A be a set of positive numbers. Theset B is called multiplicatively independent , if for all λ , . . . , λ n ∈ Z the following holds: if b λ · · · b λ n n is a root of unity then λ = . . . = λ n = 0 . In all other cases we say that B is multiplicatively dependent .We say that a set S of positive numbers is effectively representable in terms of B , if for given x ∈ S wecan compute λ , . . . , λ n ∈ Z such that x · b λ · · · b λ n n = 1 . A set B is an effective representation system for a set S , if S is effectively representable in terms of B and B is multiplicatively independent.We need a result from [Ric01] which we rephrase a bit for our purposes. Lemma 7.11 (Theorem 2 in [Ric01]).
Let a , . . . , a n ∈ Q ( θ ) be positive real numbers given in stan-dard representation, each of description length at most s . There is a matrix A ∈ Z n × n such that, forvectors λ ∈ Z n we have n (cid:89) i =1 a λ i i = 1 if, and only if, A · λ = 0 . (7.3) The description length of A is bounded by a computable function in n and s . This result straightforwardly extends to an algorithm solving the multiplicative independence problemfor algebraic numbers.
Corollary 7.12.
Let a , . . . , a n ∈ Q ( θ ) be positive reals given in standard representation. There is analgorithm which decides if there is a non-zero vector λ = ( λ , . . . , λ n ) ∈ Z n such that n (cid:89) i =1 a λ i i = 1 . (7.4) Furthermore, if it exists, the algorithm computes such a vector λ . Lemma 7.13.
Let S ⊆ R A be a set of positive numbers. There is an effective representation system B ⊆ R A of positive numbers for S which can be computed effectively from S .Proof. We shall start with the following
Claim 1. If S is multiplicatively dependent then there is a set B (cid:48) ⊆ R A of non-negative numbers suchthat | B (cid:48) | < | S | and S is effectively representable by B (cid:48) . Proof.
Let S = { b , . . . , b n } then Corollary 7.12 implies that we can compute a non-zero vector λ ∈ Z n such that b λ · · · b λ n n = 1 . We can easily make sure that at least one of the λ i is larger than zero. Assumetherefore w.l.o.g. that λ > . Fix a set B (cid:48) = { b (cid:48) , . . . , b (cid:48) n } where each b (cid:48) i is the positive real λ -th rootof b i , that is ( b (cid:48) i ) λ = b i . Then b λ · (cid:32) n (cid:89) i =2 ( b (cid:48) i ) λ i (cid:33) λ = 1 and hence b · n (cid:89) i =2 ( b (cid:48) i ) λ i = 1 . All operations are computable and effective representation of S by B (cid:48) follows. (cid:97) .3 From Positive Matrices to X-matrices S . Since the empty set is multiplicatively independent, after at mostfinitely many steps, we find an effective representation system B for S . (cid:3) Proof (of Lemma 7.10).
Let S be the set of non-zero entries of A . By Lemma 7.13 we can computean effective representation system B for S . However, with respect to our model of computation weneed to be a bit careful, here: assume that S ⊆ Q ( θ ) for some primitive element θ . The applicationof Lemma 7.13 does not allow us to stipulate that B ⊆ Q ( θ ) . But in another step of pre-computation,we can compute another primitive element θ (cid:48) for the elements of B such that B ⊆ Q ( θ (cid:48) ) (c.f [Coh93]).Then we may consider all computations as taking place in Q ( θ (cid:48) ) .Assume that B = { b , . . . , b n } , then every non-zero entry of A has a unique computable represen-tation A ij = n (cid:89) ν =1 b λ ijν ν . Let p , . . . , p β be β = | B | distinct prime numbers and define A (cid:48) as the matrix obtained from A byreplacing in each non-zero entry A ij the powers of b ∈ B by the corresponding powers of primes, thatis, A (cid:48) ij = n (cid:89) ν =1 p λ ijν ν . Recall the definition of W A ( G ) in equation (5.1). For each w ∈ W A ( G ) we can, in polynomial timecompute a representation w = (cid:81) i,j A m ij ij as powers of elements in S . The effective representation of S in terms of B extends to W A ( G ) being effectively representable by B . Moreover, as S depends only on A , the representation of each w ∈ W A ( G ) is even polynomial time computable. We have Z A ( φ, G ) = (cid:88) w ∈W A ( G ) w · N A ( G, φ, w ) In particular, for each w ∈ W A ( G ) , we can compute unique λ w, , . . . , λ w,n ∈ Z such that w · b λ w, · · · b λ w,n n =1 . Define functions f and g such that for every w ∈ W A ( G ) we have f ( w ) = n (cid:89) ν =1 p λ w,ν ν and g ( w ) = n (cid:89) ν =1 b λ w,ν ν . Thus we obtain Z A (cid:48) ( φ, G ) = (cid:88) w ∈W A ( G ) w · f ( w ) g ( w ) · N A ( G, φ, w ) . This yields a reduction for EVAL pin ( A (cid:48) ) ≤ EVAL pin ( A ) . The other direction follows by Z A ( φ, G ) = (cid:88) w (cid:48) ∈W A (cid:48) ( G ) w (cid:48) · g ( w ) f ( w ) · N A (cid:48) ( G, φ, w (cid:48) ) . This also proves the reducibilities EVAL ( A (cid:48) ) ≡ EVAL ( A ) since the input pinnings remain unaffected.To finish the proof it remains to consider the case that A contains a block of rank at least . We haveto show that A (cid:48) has this property as well. Let us now argue that A (cid:48) contains a block of rank at least6 . Let A i, ∗ and A i (cid:48) , ∗ be linearly independent rows from a block of A . Assume, for contradiction, that A (cid:48) i (cid:48) , ∗ = α · A (cid:48) i, ∗ for some α . Let J be the set of indices j such that A (cid:48) ij (cid:54) = 0 . For each j ∈ J we have α = A (cid:48) i (cid:48) j · ( A (cid:48) ij ) − = n (cid:89) ν =1 p λ i (cid:48) jν − λ ijν ν . Hence, for β = b λ i (cid:48) j − λ ij · · · b λ i (cid:48) jn − λ ijn n we obtain A i (cid:48) , ∗ = β · A i, ∗ — a contradiction. (cid:3) X -Lemma 7.5. Let A ∈ S m × m be a matrix satisfying condition (A) . Recall that S is one of R A , Q , Z , Z [ X ] or Q [ X ] .If S = R A then the entries of A are all positive real values. Thus Lemma 7.10 implies that there is apositive matrix A (cid:48) ∈ Z m × m of rank at least such that EVAL pin ( A (cid:48) ) ≡ EVAL pin ( A ) .If A is a matrix of entries in Q ( Q [ X ] , respectively) then let λ be the lowest common denominatorof (coefficients of) entries in A . For a given graph G = ( V, E ) and pinning φ we have Z λA ( φ, G ) = λ | E | Z A ( φ, G ) . The matrix λ · A is a matrix with entries in Z ( Z [ X ] , respectively).It remains to prove the Lemma for the case that S is either Z or Z [ X ] . By the Prime Rank Lemma 7.9there is a prime (irreducible polynomial) p such that A | p contains a block of rank at least . Fix such a p and define A (cid:48) = A | p . By the Prime Filter Lemma 7.7 we haveEVAL pin ( A (cid:48) ) ≤ EVAL pin ( A ) . Furthermore, by the Renaming Lemma 7.8 we may assume that A (cid:48) is an X -matrix. This completes theproof. X -matrices to the General Conditioning Lemma Lemma 7.14.
Let A ∈ Z [ X ] m × m be symmetric and positive such that not all -entries of A are con-tained in -cells. Then EVAL pin ( A ) is P -hard.Proof. If not all -entries are contained in -cells, then there are i, j, k, l such that A ik = A il = A jk = 1 and A jl (cid:54) = 1 . Let A (cid:48) be obtained from A by replacing each entry not equal to by . We haveEVAL pin ( A (cid:48) ) ≤ EVAL pin ( A ) by the Prime Elimination Lemma 7.6.By construction A ik = A il = A jk = 1 and A jl = 0 . Thus A (cid:48) contains a block with zero entries andEVAL pin ( A (cid:48) ) is P-hard by Lemma 7.4. (cid:3)
Proof (Of the General Conditioning Lemma 4.4).
By Lemma 7.2, there is a matrix C (cid:48) which satisfies (A) such that EVAL pin ( C (cid:48) ) ≤ EVAL pin ( A ) . Then by the X-Lemma 7.5, there is a matrix C whichsatisfies (A) and (B) such that EVAL pin ( C ) ≤ EVAL pin ( C (cid:48) ) . Lemma 7.14 implies that EVAL pin ( C ) is P-hard if not all -entries are contained in -cells. In this case we let A (cid:48) be some × matrix satisfyingconditions (A) – (C) .Assume therefore that all -entries of C are contained in -cells. If C contains exactly one -cellthen the proof follows by the symmetry of C (cid:48) . We only have to make sure that we can permute theentries of C such that condition (C) is satisfied. This is guaranteed by the Permutability Principle 5.3.Assume therefore that C contains more than one -cell. Define an X -matrix C ∗ = C | X .7 Claim 1.
For every -cell C KL of C the principal submatrix C ∗ KK is a -cell of C ∗ . Proof.
Note that C ∗ ij = 1 only if there is an (cid:96) such that C i(cid:96) = C j(cid:96) = 1 . This proves the claim. (cid:97) Now C ∗ has all -entries in principal -cells and is of rank at least by the fact that there are at least two -cells in C . A reduction witnessing EVAL pin ( C ∗ ) ≤ EVAL pin ( C ) is given by applying -stretching(cf. Lemma 5.1) and the Prime Filter Lemma 7.7 in this order. (cid:3) -Cell Lemma The (T1C) – Conditions for Matrices with two -cells. We define two additional conditions. (T1C – A) A has at least two -cells. (T1C – B) All diagonal entries of A are .A -row ( -column ) in a matrix A is a row (column) which contains a at least one entry. We call allother rows (columns) non- -rows ( non- -columns ). Lemma 8.1 ( -Row-Column Lemma). Let A ∈ Z [ X ] m × m be a positive and symmetric X -matrix. Let A (cid:48) be obtained from A by removing all non- -rows and non- -columns. Then EVAL pin ( A (cid:48) ) ≤ EVAL pin ( A ) . Proof.
For every i ∈ [ m ] let c i denote the number of -entries in row A i, ∗ . And let A (cid:48)(cid:48) be the matrixdefined by A (cid:48)(cid:48) ij = c i c j A (cid:48) ij for all i, j ∈ [ m ] .We start with a reduction witnessing EVAL pin ( A (cid:48)(cid:48) ) ≤ EVAL pin ( A ) . Let G = ( V, E ) , φ be aninstance of EVAL pin ( A (cid:48)(cid:48) ) . Let ∆ be the maximum degree of X in A , let k = ∆ · | E | + 1 and define agraph G (cid:48) = ( V (cid:48) , E (cid:48) ) by V (cid:48) = { v, v | v ∈ V } E (cid:48) = E ∪ { e v , . . . , e kv | v ∈ V, e iv = vv , ∀ i ∈ [ k ] } . We have Z A ( φ, G (cid:48) ) = (cid:88) φ ⊆ σ : V (cid:48) → [ m ] (cid:89) uv ∈ E (cid:48) A σ ( u ) ,σ ( v ) = (cid:88) φ ⊆ σ : V (cid:48) → [ m ] (cid:89) uv ∈ E A σ ( u ) ,σ ( v ) (cid:89) v ∈ V ( A σ ( v ) ,σ ( v ) ) k That is, for every σ the degree (as a polynomial in X ) of the weight expression (cid:89) uv ∈ E A σ ( u ) ,σ ( v ) (cid:89) v ∈ V ( A σ ( v ) ,σ ( v ) ) k is smaller than k if, and only if, A σ ( v ) σ ( v ) = 1 holds for every v ∈ V . That is, if a configuration σ mapsa vertex of V to a non-1-row, then the degree of the weight expression of σ will always be at least k . Onthe other hand, for each configuration σ mapping G to A there are exactly c | σ − (1) | · . . . c | σ − ( m ) | m many8 -CELL LEMMA configurations σ (cid:48) : V (cid:48) → [ m ] of G (cid:48) extending σ in such a way that their weight is of degree smaller than k . By the polynomial time equivalence of COUNT pin ( A ) and EVAL pin ( A ) it suffices to reduce EVAL pin ( A (cid:48)(cid:48) ) ≤ COUNT pin ( A ) . We can do this by computing the values w · N A ( G (cid:48) , φ, w ) for all weights w of degreesmaller than k . Then, with A (cid:48) = A (cid:48)(cid:48) | X , the remaining step EVAL pin ( A (cid:48) ) ≤ EVAL pin ( A (cid:48)(cid:48) ) is given bythe Prime Filter Lemma 7.7. (cid:3) Lemma 8.2.
Let A ∈ Z [ X ] m × m be a matrix which satisfies (A) and contains at least two -cells. Thenthere is a matrix A (cid:48) satisfying conditions (A) – (C) and both (T1C) conditions such that EVAL pin ( A (cid:48) ) ≤ EVAL pin ( A ) . Proof.
Let i, j, i (cid:48) , j (cid:48) ∈ [ m ] be witnesses for the existence of two -cells in A in the sense that A ij = A i (cid:48) j (cid:48) = 1 but A i (cid:48) j (cid:54) = 1 and let p be an irreducible polynomial which divides A i (cid:48) j . Let B be thematrix obtained from A | p by replacing all powers of p with the corresponding powers of X . Then byPrime Filter Lemma 7.7 and Renaming Lemma 7.8, we have EVAL pin ( B ) ≤ EVAL pin ( A ) . Note that B satisfies condition (B) and it satisfies (A) as A does. We may assume that all -entries of B are containedin -cells, because otherwise EVAL pin ( B ) would be P-hard by Lemma 7.14.As it could possibly be the case that not all -cells of B are on the diagonal, we form B (cid:48) = B | X . Claim 1.
For every -cell B KL of B the principal submatrix B (cid:48) KK is a -cell of B (cid:48) . Proof.
Note that B (cid:48) ij = 1 only if there is an (cid:96) such that B i(cid:96) = B j(cid:96) = 1 . This proves the claim. (cid:97) By this claim, since B contains at least two -cells, the matrix B (cid:48) does so as well and therefore it satisfies (A) . Condition (B) is satisfied by definition. We have EVAL pin ( B (cid:48) ) ≤ EVAL pin ( B ) by application of -stretching (cf. Lemma 5.1) and the Prime Filter Lemma 7.7 in this order. Applying the -Row-ColumnLemma 8.1 on B (cid:48) then yields EVAL pin ( A (cid:48) ) ≤ EVAL pin ( B (cid:48) ) for a matrix A (cid:48) which (up to permutingrows and columns) has the desired properties. (cid:3) The cells of a matrix A satisfying conditions (A) – (C) are the submatrices A I i I j for I i , I j as defined incondition (C) . We call such a matrix A a cell matrix , if in each of its cells A I i I j all entries are equal. Lemma 8.3.
Let A ∈ Z [ X ] m × m satisfy conditions (A) – (C) and both (T1C) conditions. Then there isa cell matrix C ∈ Z [ X ] m × m which also satisfies (A) – (C) and both (T1C) conditions such that EVAL pin ( C ) ≤ EVAL pin ( A ) . Proof.
We define a sequence of matrices with A = A and for all ν ∈ N we let A ν +1 = A ν | X . As A satisfies conditions (A) – (C) and both (T1C) conditions, this is true for all matrices in the sequence.Further we have EVAL pin ( A ν +1 ) ≤ EVAL pin ( A ν ) for all ν , by applying -stretching (cf. Lemma 5.1)and the Prime Filter Lemma 7.7 in this order.By definition, deg(( A ν +1 ) ij ) = min { deg(( A ν ) ik ) + deg(( A ν ) jk ) | k ∈ [ m ] } for all i, j ∈ [ m ] . Ascondition (T1C – B) implies deg( A jj ) = 0 for all j ∈ [ m ] , we obtain deg(( A ν +1 ) ij ) ≤ deg(( A ν ) ij ) for all ν. That is, the degrees of the entries of A ν are non-increasing with ν and thus there is a µ such that A µ +1 = A µ . To finish the proof we will show that C = A µ is a cell matrix. Let C IJ be a cell of C .1 P -hardness -cell. Let i ∈ I and j ∈ J be such that deg( C ij ) is minimal. By definition we have C = C | X and therefore, for all j (cid:48) ∈ J , deg( C ij (cid:48) ) = deg(( C | X ) ij (cid:48) ) = min { deg( C ik ) + deg( C jk ) | k ∈ [ m ] } ≤ deg( C ij ) . The inequality follows from the fact that C jj = 1 . Then by the minimality of deg( C ij ) we have deg( C ij (cid:48) ) = deg( C ij ) . Analogous reasoning on i (cid:48) ∈ I yields deg( C ij ) = deg( C i (cid:48) j (cid:48) ) for all i (cid:48) ∈ I, j (cid:48) ∈ J . Thus C is a cell matrix. (cid:3) Lemma 8.4.
Let δ ∈ N and A (cid:48) be a matrix of the form A (cid:48) = · · · δ · · · δ ... ... ... ... · · · δ · · · δ δ · · · δ · · · ... ... ... ... δ · · · δ · · · Then
EVAL pin ( A ) is P -hard.Proof. Let [ A (cid:48) ] be the twin resolvent of A (cid:48) . By the Twin Reduction Lemma 6.1 we obtain EVAL ([ A (cid:48) ] , D ) ≡ EVAL ( A (cid:48) ) where, for a, b, δ ≥ , the matrices [ A (cid:48) ] and D satisfy [ A (cid:48) ] = (cid:18) δ δ (cid:19) and D = (cid:18) a b (cid:19) We have EVAL ([ A (cid:48) ]) ≤ EVAL ([ A (cid:48) ] , D ) by Lemma 5.6. Therefore it remains to show that EVAL ([ A (cid:48) ]) is P-hard. To see this, let G = ( V, E ) be a graph and for two sets of vertices U, W ⊆ V let e ( U, W ) denote the number of edges in G between U and W . We have Z A ( G ) = (cid:88) σ : V → [ m ] (cid:89) uv ∈ E A σ ( u ) ,σ ( v ) = (cid:88) σ : V → [ m ] δ · e ( σ − (1) ,σ − (2)) Let c i be the number of σ : V → [ m ] with weight δi then we have. Z A ( G ) = | E | (cid:88) i =0 c i δi By EVAL ( A ) ≡ COUNT ( A ) we can determine the coefficients c i . Let ν be maximum such that c ν (cid:54) = 0 .Then c ν is the number of maximum cardinality cuts in G . Therefore, this yields a reduction from theproblem P-hard(this follows, for example, from the work of Simon [Sim77]). (cid:3)
Lemma 8.5.
Let A ∈ Z [ X ] m × m be a cell matrix satisfying conditions (A) – (C) and both (T1C) condi-tions. Then EVAL pin ( A ) is P -hard. -CELL LEMMA Proof.
Let δ = min { deg( A ij ) | A ij (cid:54) = 1 , i, j ∈ [ m ] } and ∆ = max { deg( A ij ) | A ij (cid:54) = 1 , i, j ∈ [ m ] } .Let A IJ be a cell of A with entries X δ and define A (cid:48) = A ( I ∪ J )( I ∪ J ) which, by symmetry, the definitionof the cells and (C) has the form A (cid:48) = A ( I ∪ J )( I ∪ J ) = · · · X δ · · · X δ ... ... ... ... · · · X δ · · · X δ X δ · · · X δ · · · ... ... ... ... X δ · · · X δ · · · We will show first that EVAL pin ( A (cid:48) ) ≤ EVAL pin ( A ) . For a graph G = ( V, E ) and a pinning φ ofEVAL pin ( A (cid:48) ) , define a graph G (cid:48) = ( V (cid:48) , E (cid:48) ) as follows. Let k = | E | · ∆ + 1 , we obtain G (cid:48) from G byadding two apices which are connected to each vertex of V by edges with multiplicity k , that is, V (cid:48) = V ˙ ∪{ x, y } E (cid:48) = E ∪ { ( xv ) k , ( yv ) k | v ∈ V } . Let furthermore φ (cid:48) be the extension of φ to G (cid:48) by adding x (cid:55)→ i , y (cid:55)→ j for some i ∈ I and j ∈ J .Consider a configuration σ : V (cid:48) → [ m ] with φ (cid:48) ⊆ σ . For some appropriate K ( σ ) we have (cid:89) uv ∈ E (cid:48) A σ ( u ) ,σ ( v ) = X K ( σ ) (cid:89) uv ∈ E A σ ( u ) ,σ ( v ) . Further, if σ ( V ) ⊆ I ∪ J then K ( σ ) = k | V | δ and otherwise, by the definition of δ and the cell structureof A , we have K ( σ ) ≥ k | V | δ + kδ . In particular, as deg (cid:0)(cid:81) uv ∈ E A σ ( u ) ,σ ( v ) (cid:1) ≤ ∆ · | E | < k we haveThe degree of σ is strictly less than k | V | δ + k iff σ ( V ) ⊆ I ∪ J. We can thus compute Z A (cid:48) ( φ, G ) using a COUNT pin ( A ) oracle, by determining the values w · N A ( G (cid:48) , φ (cid:48) , w ) for all w of degree at most k | V | δ + k − . This yields a reduction EVAL pin ( A (cid:48) ) ≤ EVAL pin ( A ) by thepolynomial time equivalence of COUNT pin ( A ) and EVAL pin ( A ) .Let A (cid:48)(cid:48) be the matrix obtained from A (cid:48) by substituting X with . Trivially EVAL ( A (cid:48)(cid:48) ) ≤ EVAL pin ( A (cid:48) ) and EVAL ( A (cid:48)(cid:48) ) is P-hard by Lemma 8.4. (cid:3)
Proof (of the Two- -Cell Lemma). Let A ∈ Z [ X ] m × m be a positive symmetric matrix containing atleast two -cells. That is, A satisfies condition (A) . Application of Lemmas 8.2, 8.3 and 8.5 in this orderyields the result. (cid:3) -Cell Lemma Lemma 9.1 (Symmetrized -Row Filter Lemma). Let A ∈ Z [ X ] m × m be a matrix satisfying condi-tions (A) – (C) and containing exactly one -cell. Let C be obtained from A by removing all non- -rows.Then EVAL pin ( CC T ) ≤ EVAL pin ( A ) . Proof. As A satisfies conditions (A) – (C) and contains a single -cell we see that there is an r < m such that with I = [ r ] the principal submatrix A II forms this single -cell. Recall that EVAL pin ( A ) ≤ EVAL pin ( A ) by -stretching (cf. Lemma 5.1), and we have ( A ) ij = m (cid:88) k =1 A ik A jk = r (cid:88) k =1 A ik A jk + m (cid:88) k = r +1 A ik A jk . Therefore, for i, j ∈ [ r ] we have ( A ) ij = r + (cid:80) mk = r +1 A ik A jk , i.e. a polynomial with a constant term.On the other hand, if either i / ∈ I or j / ∈ I then A ij is divisible by X . Further we have C = A [ r ][ m ] andthus CC T = ( A ) [ r ][ r ] . Hence CC T is the submatrix of A which consists of exactly those entries notdivisible by X . Recall that for any graph G and pinning φ , we have Z A ( φ, G ) = (cid:88) w ∈W A ( G ) w · N A ( G, φ, w ) and by the above Z CC T ( φ, G ) = (cid:88) w ∈W A ( G ) X does not divide w w · N A ( G, φ, w ) Filtering the weights w appropriately by means of the EVAL pin ( A ) ≡ COUNT pin ( A ) correspondence,we can devise a reduction witnessing EVAL pin ( CC T ) ≤ EVAL pin ( A ) . (cid:3) Single -Cell Conditions (S1C). We define some further conditions for matrices A ∈ Z [ X ] m × m satisfying conditions (A) – (C) . Define δ ij = deg( A ij ) for all i, j ∈ [ m ] and let r := min { i ∈ [ m ] | A i > } . That is, r is the smallest index such that δ r = δ r is greater than zero and it exists because A has rank at least . (S1C–A) A has exactly one -cell. (S1C–B) A , ∗ = . . . = A r − , ∗ , i.e. the first r − rows of A are identical. (S1C–C) For i ∈ [ r, m ] we have δ k ≤ δ ik for all k ∈ [ m ] . Lemma 9.2.
Let A ∈ Z [ X ] m × m be a matrix satisfying conditions (A) – (C) and (S1C–A) . Then there isa matrix A (cid:48) satisfying (A) – (C) and all (S1C) conditions such that EVAL pin ( A (cid:48) ) ≤ EVAL pin ( A ) . Proof.
The matrix A already satisfies (A) – (C) and (S1C–A) . Observe first that if A satisfies (S1C–B) aswell, a matrix A (cid:48) whose existence we want to prove, can be defined as follows. For t ∈ N , let A (cid:48) = A (cid:48) ( t ) be given by A (cid:48) ij = A ij ( A ii A jj ) t for all i, j ∈ [ m ] . Clearly, for all t ∈ N the matrix A (cid:48) ( t ) satisfies conditions (A) – (C) , (S1C–A) and (S1C–B) .We claim that there is a t ∈ N such that A (cid:48) ( t ) also satisfies condition (S1C–C) . To see this, note firstthat the degrees of A satisfy min { δ rr , . . . , δ mm } > as all -entries of A are contained in the single -cell A [ r − r − . Therefore, there is a t such that δ j ≤ t · min { δ rr , . . . , δ mm } for all j ∈ [ m ] . Fixsuch a t and note that deg( A (cid:48) ij ) = δ ij + t · δ ii + t · δ jj . -CELL LEMMA Thus, with δ = 0 we see that for all j ∈ [ m ] and i ∈ [ r, m ]deg( A (cid:48) j ) = δ j + t · δ jj ≤ t · δ ii + t · δ jj ≤ deg( A (cid:48) ij ) . This proves that A (cid:48) satisfies condition (S1C–C) . Reducibility is given as follows Claim 1.
For all t ∈ N we have EVAL pin ( A (cid:48) ( t )) ≤ EVAL pin ( A ) . Proof.
Let G = ( V, E ) , φ be an instance of EVAL pin ( A (cid:48) ) , Let G (cid:48) = ( V, E (cid:48) ) be the graph obtained from G by adding t many self-loops to each vertex. Then Z A (cid:48) ( φ, G ) = Z A ( φ, G (cid:48) ) , witnessing the claimedreducibility. (cid:97) It remains to show how to obtain condition (S1C–B) . We give the proof by induction on m . For m = 2 this is trivial. If m ≥ r > assume that A does not satisfy (S1C–B) . Define C = A [ r − m ] , i.e. thematrix consisting of the first r − rows of A . By the Symmetrized -Row Filter Lemma 9.1 we haveEVAL pin ( CC T ) ≤ EVAL pin ( A ) . Further, C has rank at least as C i = 1 for all i ∈ [ r − but therows of C are not identical and therefore CC T has rank at least , as well (see Lemma 5.2).Application of the General Conditioning Lemma 4.4 yields EVAL pin ( C (cid:48) ) ≤ EVAL pin ( CC T ) for a k × k matrix satisfying (A) – (C) such that k ≤ r − . If C (cid:48) has at least two -cells we apply the Two -Cell Lemma 4.5 to obtain P-hardness of EVAL pin ( C (cid:48) ) . Therefore we can chose some A (cid:48) satisfyingthe conditions of the Lemma such that EVAL pin ( A (cid:48) ) ≤ EVAL pin ( C (cid:48) ) . If C (cid:48) has only one -cell then theproof follows by the induction hypothesis, as C (cid:48) has order k ≤ r − . (cid:3) Definition of A [ k ] and C [ k ] . For the remainder of this section we fix A ∈ Z [ X ] m × m satisfying condi-tions (A) – (C) and all (S1C) conditions. Furthermore, δ ij for all i, j ∈ [ m ] and r are defined for A as inthe Single -Cell Conditions. For k ∈ N define the matrix A [ k ] by A [ k ] ij = A ij ( A j ) k − for all i, j ∈ [ m ] . (9.1)Let further, C [ k ] be defined by C [ k ] = A [ k ] ( A [ k ] ) T . (9.2) Lemma 9.3.
Let A and C [ k ] be defined as above. Then EVAL pin ( C [ k ] ) ≤ EVAL pin ( A ) . Proof.
Let G = ( V, E ) and a pinning φ be an instance of EVAL pin ( C [ k ] ) . Define a graph G (cid:48) = ( V (cid:48) , E (cid:48) ) as follows: V (cid:48) := V ˙ ∪ { z } ˙ ∪ { v e | e ∈ E } E (cid:48) := { uv e , v e v | e = uv ∈ E } ˙ ∪ { ( v e z ) k − | e ∈ E } . The edges v e z have multiplicity k − . Let φ (cid:48) be the extension of φ defined by φ ∪ { z (cid:55)→ } . Let σ ⊇ φ (cid:48) be a configuration on G (cid:48) and A . Then its weight equals (cid:89) uv ∈ E (cid:48) A σ ( u ) ,σ ( v ) = (cid:89) uv ∈ E m (cid:88) ν =1 A σ ( u ) ,ν A σ ( v ) ,ν ( A ,ν ) k − = (cid:89) uv ∈ E C [ k ] σ ( u ) ,σ ( v ) . The last equality follows directly from the definition of C [ k ] . This yields EVAL pin ( C [ k ] ) ≤ EVAL pin ( A ) as required. (cid:3) f ∈ Q [ X ] and λ ∈ C let mult ( λ, f ) denote the multiplicity of λ in f if λ is a root of f , and mult ( λ, f ) = 0 , otherwise. The k -th root of λ ∈ C is the k -element set λ /k = { µ ∈ C | µ k = λ } . Slightly abusing notation, λ /k will denote anyelement from this set. For every root λ of C [1]11 , every r ≤ j ≤ m and k ∈ N we define m ( λ, j ) = min { mult ( λ /k , C [ k ]1 j ) | k ≥ } . (9.3)The following Lemma is the technical core of this section. Lemma 9.4 (Single- -Cell Technical Core). Let C [ k ] be defined as above. The following is true for all j ∈ [ r, m ] .(1) For any root λ of C [1]11 and all k ∈ N we have(1a) mult ( λ /k , C [ k ]11 ) = mult ( λ, C [1]11 ) ≥ m ( λ, j ) .(1b) mult ( λ /k , C [ k ] jj ) ≥ m ( λ, j ) .(2) If row A , ∗ and A j, ∗ are linearly dependent then for any root λ of C [1]11 and all k ∈ N we have mult ( λ /k , C [ k ]11 ) = mult ( λ /k , C [ k ]1 j ) = mult ( λ /k , C [ k ] jj ) . (3) If row A , ∗ and A j, ∗ are linearly independent there is a root λ of C [1]11 such that mult ( λ, C [1]11 ) > m ( λ, j ) . The proof of this lemma is technically involved and quite long. We therefore show first, how to provethe Single- -Cell Lemma, provided that the above holds.The following basic facts about polynomials will be used frequently in the following. Lemma 9.5.
Let f ∈ Q [ X ] and λ ∈ C .(1) There exists a unique (up to a scalar factor) irreducible polynomial p λ ∈ Q [ X ] such that λ is aroot of p λ . If f ( λ ) = 0 then p λ divides f .(2) If mult ( λ, f ) = s then f = p sλ ¯ f for some ¯ f ∈ Q [ X ] which satisfies ¯ f ( λ ) (cid:54) = 0 .(3) If f ( λ ) = 0 then λ /k is a root of f ( X k ) and mult ( λ /k , f ( X k )) = mult ( λ, f ( X )) .Proof (of the Single -Cell Lemma 4.6). Let A ∈ Z [ X ] m × m satisfy conditions (A) – (C) and (S1C–A) .By Lemma 9.2 we may assume w.l.o.g. that A indeed satisfies all (S1C) conditions. By the Two– –CellLemma 4.5, it suffices to prove the existence of a positive symmetric matrix C which contains at leasttwo -cells such that EVAL pin ( C ) ≤ EVAL pin ( A ) . Recall the definition of C [ k ] in equation (9.2) and the definition of r in the (S1C) conditions. We provea technical tool. Claim 1.
There is a root λ of C [1]11 , an index j ∈ [ r, m ] and k ∈ N such that cf., for example, Chapter IV in [Lan02] -CELL LEMMA (1) mult ( λ /k , C [ k ]1 j ) < mult ( λ /k , C [ k ]11 ) .(2) For all i ∈ [ r, m ] we have mult ( λ /k , C [ k ]1 j ) ≤ mult ( λ /k , C [ k ] ii ) . Proof.
Choose λ and j ∈ [ r, m ] such that m ( λ, j ) is minimal for all choices of λ and j which satisfy A , ∗ and A j, ∗ are linearly independent and mult ( λ, C [1]11 ) > m ( λ, j ) . (9.4)Note that these λ and j exist by Lemma 9.4(3). Choose k ∈ N such that, by equation (9.3), m ( λ, j ) = mult ( λ /k , C [ k ]1 j ) . This proves (1) by Lemma 9.4(1a).To prove (2) fix i ∈ [ r, m ] . If A , ∗ and A i, ∗ are linearly independent our choice of λ and j impliesthat m ( λ, i ) ≥ m ( λ, j ) and therefore mult ( λ /k , C [ k ] ii ) ≥ m ( λ, i ) ≥ m ( λ, j ) = mult ( λ /k , C [ k ]1 j ) where the first inequality holds by Lemma 9.4(1b).If otherwise A , ∗ and A i, ∗ are linearly dependent then mult ( λ /k , C [ k ] ii ) = mult ( λ /k , C [ k ]11 ) ≥ m ( λ, j ) = mult ( λ /k , C [ k ]1 j ) . The first equality holds by Lemma 9.4(2) and the inequality is true by Lemma 9.4(1a). (cid:97)
Choose j, λ, k as in Claim 1. Define t = mult ( λ /k , C [ k ]1 j ) . Let p λ be an irreducible polynomial suchthat p λ ( λ ) = 0 . Let s := min { mult ( λ /k , C [ k ] ab ) | a, b ∈ [ m ] } and define the positive symmetric matrix C := 1 p sλ C [ k ] | p λ . Note that s ≤ t by definition. We consider two cases. If s = t then C j = C j = 1 but by Claim 1(1)we have C (cid:54) = 1 . Therefore, C contains at least two -cells.If otherwise s < t , fix witnesses a, b ∈ [ m ] with mult ( λ /k , C [ k ] ab ) = s . Claim 2.
Either a ≥ r or b ≥ r . Proof.
Recall that by condition (S1C–B) the first r − rows of A — and hence those of A [ k ] — areidentical. By the definition C [ k ] = A [ k ] ( A [ k ] ) T (cf. equation (9.2)) we have C [ k ] ij = m (cid:88) ν =1 A [ k ] iν A [ k ] jν = m (cid:88) ν =1 A iν A jν ( A ν ) k − In particular, for all a (cid:48) , b (cid:48) ∈ [ r − we have C [ k ] a (cid:48) b (cid:48) = C [ k ]11 and hence mult ( λ /k , C [ k ] a (cid:48) b (cid:48) ) = mult ( λ /k , C [ k ]11 ) > mult ( λ /k , C [ k ] ab ) which proves the claim. (cid:97) Combining this claim with Claim 1(2) and the fact that < t = mult ( λ /k , C [ k ]1 j ) , we have either C aa (cid:54) =1 or C bb (cid:54) = 1 . As C ab = C ba = 1 by the definition of a, b we see that C contains at least two -cells.We have EVAL pin ( C [ k ] ) ≤ EVAL pin ( A ) by Lemma 9.3. Further EVAL pin ( C [ k ] | p λ ) ≤ EVAL pin ( C [ k ] ) by the Prime Filter Lemma 7.7. Then EVAL pin ( C ) ≤ EVAL pin ( A ) follows from the fact that Z C [ k ] | pλ ( φ, G ) = p s ·| E | λ Z C ( φ, G ) for all graphs G = ( V, E ) and pinnings φ. (cid:3) .1 Proof of the Single- -Cell Technical Core Lemma 9.4 -Cell Technical Core Lemma 9.4 Proof of the Single- -Cell Technical Core Lemma 9.4 Fix j ∈ [ r, m ] and define the value b =min { δ ji − δ i | i ∈ [ m ] } . By condition (S1C–C) we have b ≥ . Further, if rows A , ∗ and A j, ∗ arelinearly dependent, then A j, ∗ = X b A , ∗ .For simplicity of notation, define a i := δ i , b i := δ ji − b and c i := b i − a i = δ ji − δ i − b for all i ∈ [ m ] . Observe that all c i are non-negative and moreover c i = 0 for all i ∈ [ m ] iff rows A , ∗ and A j, ∗ are linearly dependent. If these rows are linearly independent then not all c i are equal. We have A , ∗ = ( X a . . . X a m ) A j, ∗ = ( X b + b . . . X b + b m ) . . By the definition of A [ k ] in equation (9.1), we have A [ k ] iν = A iν ( A ν ) k − = A iν X ( k − a ν and by b + b ν + ( k − a ν = b + c ν + ka ν we have A [ k ]1 , ∗ = ( X ka . . . X ka m ) A [ k ] j, ∗ = ( X b + c + ka . . . X b + c m + ka m ) . Therefore, by C [ k ] = A [ k ] ( A [ k ] ) T , C [ k ]11 = X ka + . . . + X ka m C [ k ]1 j = X b ( X c +2 ka + . . . + X c m +2 ka m ) C [ k ] jj = X b ( X c +2 ka + . . . + X c m +2 ka m ) . (9.5)Let λ be a root of C [1]11 and recall that a = . . . = a r − = 0 as r was defined to be minimal such that δ r = a r > . Therefore λ (cid:54) = 0 and by equation (9.5) and Lemma 9.5(3) we see that λ /k is a root of C [ k ]11 with mult ( λ /k , C [ k ]11 ) = mult ( λ, C [1]11 ) . (9.6)Assume first that A , ∗ and A j, ∗ are linearly dependent. Then c = . . . = c m = 0 which, by (9.5) implies C [ k ]1 j = X b · C [ k ]11 and C [ k ] jj = X b · C [ k ]11 . As λ (cid:54) = 0 we have mult ( λ /k , C [ k ]11 ) = mult ( λ /k , C [ k ]1 j ) = mult ( λ /k , C [ k ] jj ) . This proves statement (2) of Lemma 9.4 and the case of Lemma 9.4(1) where A , ∗ and A j, ∗ are linearlydependent.It remains to prove statement (1) for linearly independent A , ∗ and A j, ∗ and statement (3). Assumein the following that A , ∗ and A j, ∗ are linearly independent. If furthermore there is a k such that λ /k isnot a root of C [ k ]1 j then m ( λ, j ) = 0 and the result follows. Assume therefore that λ /k is a root of C [ k ]1 j for all k ∈ N . Then, for all k ≥ we have C [ k ]1 j ( λ /k ) = λ b/k ( λ a + c /k + . . . + λ a m + c m /k ) Defining f λ ( z ) = λ a + c z + . . . + λ a m + c m z we get C [ k ]1 j ( λ /k ) = λ b/k f λ (1 /k ) for all k ≥ . (9.7)6 -CELL LEMMA Let f ( l ) λ denote the l -th derivative of f λ and let α ∈ C be such that λ = e α . Then we have f λ ( z ) = e α (2 a + c z ) + . . . + e α (2 a m + c m z ) and thus f ( l ) λ (0) = ( αc ) l e αa + . . . + ( αc m ) l e αa m = ( αc ) l λ a + . . . + ( αc m ) l λ a m . (9.8)We will prove the following property of the derivatives of f λ .For all l ≥ we have f ( l ) λ (0) = 0 . (9.9)The proof relies on the following claim. Claim 1.
Suppose that g ( z ) = u ( z ) + iv ( z ) is a function that is analytic in the real segment [0 , and { r n } n ∈ N , { s n } n ∈ N are sequences from the real segment [0 , such that lim n →∞ r n = lim n →∞ s n = 0 and u ( r n ) = v ( s n ) = 0 for all n ∈ N . Then(a) g (0) = 0 .(b) There are sequences { r (cid:48) n } n ∈ N and { s (cid:48) n } n ∈ N in the real segment [0 , such that lim n →∞ r (cid:48) n = lim n →∞ s (cid:48) n = 0 and u (cid:48) ( r (cid:48) n ) = v (cid:48) ( s (cid:48) n ) = 0 for all n ∈ N with u (cid:48) , v (cid:48) being the derivatives of u and v . Proof.
W.l.o.g. we may assume that { r n } n ∈ N and { s n } n ∈ N are monotone. Then, since g is continuous, g (0) = lim z → g ( z ) = lim z → u ( z ) + i lim z → v ( z ) = lim n →∞ u ( r n ) + i lim n →∞ v ( s n ) . Denote by u , v the restrictions of u and v to the real segment [0 , . Then u , v are continuous anddifferentiable, and as u ( r n ) = v ( s n ) = 0 for all n ∈ N we see that there are r (cid:48) n ∈ [ r n +1 , r n ] and s (cid:48) n ∈ [ s n +1 , s n ] such that u (cid:48) ( r (cid:48) n ) = v (cid:48) ( s (cid:48) n ) = 0 for all n ∈ N . (cid:97) To prove (9.9), recall that by equation (9.7) and the assumption that λ (cid:54) = 0 we have f λ (1 /k ) = 0 for all k ∈ N . The definition of f λ implies f λ (1 /k ) = u (1 /k ) + iv (1 /k ) so that the conditions of Claim 1are satisfied. Applying Claim 1 inductively on the derivatives of f λ then yields (9.9).In the following, it will be convenient to partition [ m ] into equivalence classes N , . . . , N t such that i, j ∈ N ν for some ν ∈ [0 , t ] iff c i = c j . For each ν let ˆ c ν be a representative of the c i values pertainingto N ν . Since not all values c i are equal, we have t ≥ . Further, condition (S1C–B) implies that c = . . . = c r − and we assume w.l.o.g. that N ⊇ [ r − . By definition, there is a c i = 0 and weassume that N is its corresponding equivalence class. Define, for each ν ∈ [0 , t ] , a polynomial g ν ( X ) = (cid:88) i ∈ N ν X a i . (9.10)By equations (9.8) and (9.9) we obtain the following system of linear equations, for l = 1 , . . . , t f ( l ) λ (0) = ( α ˆ c ) l g ( λ ) + . . . + ( α ˆ c t ) l g t ( λ )= ( α ˆ c ) l g ( λ ) + . . . + ( α ˆ c t ) l g t ( λ ) Recall that this is the Mean Value Theorem .1 Proof of the Single- -Cell Technical Core Lemma 9.4 ˆ c = 0 . The values ˆ c , . . . , ˆ c t are pairwise different and non-zero bydefinition. Therefore f ( l ) λ (0) for l = 1 , . . . , t forms a homogeneous system of linear equations witha Vandermonde determinant. Hence this system is non-singular, implying g ( λ ) = . . . = g t ( λ ) = 0 . As λ is a root of C [1]11 and C [1]11 ( X ) = g ( X ) + . . . + g t ( X ) we further infer g ( λ ) = 0 .Note that our considerations so far are independent of the specific root λ of C [1]11 . Therefore, we seethat every irreducible polynomial g which divides C [1]11 divides all the g i as well (cf. Lemma 9.5(1)). Let h , . . . , h z be the different irreducible divisors of C [1]11 such that w.l.o.g. the leading coefficients of these h i are positive. For each i ∈ [ z ] let m i be maximal such that h m i i ( X ) divides g ν ( X ) for all ν ∈ [0 , t ] .Defining h ( X ) = h m ( X ) · · · h m z z ( X ) we see that h ( X ) divides each g ν ( X ) . Thus, for every ν ∈ [0 , t ] ,there are polynomials f ν ( X ) = h ( X ) − · g ν ( X ) . Hence C [1]11 = h ( X )( f ( X ) + . . . + f t ( X )) and g ν ( X ) = h ( X ) · f ν ( X ) for all ν ∈ [0 , t ] . (9.11)Observe that the degree of at least one polynomial f ν is positive. To see this, recall that by N ⊇ [ r − and a = . . . = a r − = 0 the polynomial g has a non-zero constant term. Furthermore, by the factthat all -entries of A are contained in -cells and A contains exactly one such -cell (by condition (S1C–A) ), for all ν (cid:54) = 1 the polynomial g ν does not have a constant term. Therefore g and g ν differ bymore than a constant factor, for all ν (cid:54) = 1 . With h ( X ) being the greatest common divisor of the g ν theexistence of such an f ν now follows. The leading coefficients of all f ν are positive, since that of h ( X ) is and all coefficients of the g ν are positive. Therefore, deg( f ( X ) + . . . + f t ( X )) > . (9.12) Claim 2. m ( λ, j ) = mult ( λ, h ) . Proof.
It follows from the definition of m ( λ, j ) in equation (9.3) that we have to prove that mult ( λ /k , C [ k ]1 j ) ≥ mult ( λ, h ) for all k and that there is a k such that equality holds. Clearly, mult ( λ /k , C [ k ]1 j ) ≥ mult ( λ, h ) holds for all k ≥ because, by equation (9.5) and the definition of the g ν in (9.10), we have C [ k ]1 j = X b (cid:16) X ˆ c g ( X k ) + . . . + X ˆ c t g t ( X k ) (cid:17) = X b h ( X k ) (cid:16) X ˆ c f ( X k ) + . . . + X ˆ c t f t ( X k ) (cid:17) . It remains to find a k such that mult ( λ /k , C [ k ]1 j ) = mult ( λ, h ) . Define a polynomial ¯ f ( X, z ) = X ˆ c z f ( X ) + . . . + X ˆ c t z f t ( X ) , then C [ k ]1 j = X b h ( X k ) · ¯ f ( X k , k − ) (9.13)Note that there is an l ≤ t such that ¯ f ( λ, lt ! ) (cid:54) = 0 . To see this, assume the contrary and note that ¯ f (cid:18) λ, lt ! (cid:19) = ( λ ˆ c /t ! ) l f ( λ ) + . . . + ( λ ˆ c t /t ! ) l f t ( λ ) Since the values ˆ c , . . . , ˆ c t are pairwise different, this gives rise to an invertible system of linear equationswith a Vandermonde determinant: λ ˆ c /t ! ) f ( λ ) + . . . + ( λ ˆ c t /t ! ) f t ( λ )0 = ( λ ˆ c /t ! ) f ( λ ) + . . . + ( λ ˆ c t /t ! ) f t ( λ ) ... λ ˆ c /t ! ) t f ( λ ) + . . . + ( λ ˆ c t /t ! ) t f t ( λ ) REFERENCES
Therefore, f ( λ ) = . . . = f t ( λ ) = 0 which implies that all f ν have a common root. By Lemma 9.5(1)they thus have a common non-trivial factor, in contradiction to the definition of h .Hence we may fix an l ≤ t such that ¯ f ( λ, lt ! ) (cid:54) = 0 . Define k = t ! /l , then (cid:54) = ¯ f ( λ, lt ! ) = ¯ f ( λ, k − ) = ¯ f (( λ /k ) k , k − ) . That is, λ /k is not a root of ¯ f ( X k , k − ) which implies mult ( λ /k , C [ k ]1 j ) = mult ( λ, h ) by equation(9.13). (cid:97) Let us now prove statement 9.4(1b). By equation (9.5), we have C [ k ] jj = X b (cid:16) X c g ( X k ) + . . . + X c t g t ( X k ) (cid:17) = X b h ( X k ) (cid:16) X c f ( X k ) + . . . + X c t f t ( X k ) (cid:17) . Therefore, mult ( λ /k , C [ k ] jj ) ≥ mult ( λ /k , h ( X k )) = mult ( λ, h ( X )) , which, by Claim 2 implies mult ( λ /k , C [ k ] jj ) ≥ m ( λ, j ) — just as claimed in (1b).To prove (1a) and (3) recall that, by equation (9.11), C [1]11 = h m ( X ) · · · h m z z ( X ) ( f ( X ) + . . . + f t ( X )) which implies that every root λ of f ( X ) + . . . + f t ( X ) is a root of C [1]11 . And since the h i are theirreducible divisors of C [1]11 such a λ is therefore a root of one of the h i as well. By equation (9.12) andthe fact that all roots of C [1]11 are non-zero, the polynomial f ( X ) + . . . + f t ( X ) has at least one non-zeroroot, and hence mult ( λ, C [1]11 ) > mult ( λ, h ) . By equation (9.6) thus mult ( λ /k , C [ k ]11 ) = mult ( λ, C [1]11 ) > mult ( λ, h ) and (3) then follows byClaim 2. This also proves (1a) for the case that this root λ of C [1]11 is a root of f ( X ) + . . . + f t ( X ) .Otherwise mult ( λ, C [1]11 ) = mult ( λ, h ) which proves (1a) by Claim 2. This finishes the proof of thelemma. References [Aig07] M. Aigner,
A course in enumeration , Springer-Verlag, 2007.[Aus07] P. Austrin,
Towards sharp inapproximability for any 2-CSP , Proceedings of the 48th AnnualIEEE Symposium on Foundations of Computer Science, 2007, pp. 307–317.[BDG +
09] A. Bulatov, M. E. Dyer, L. A. Goldberg, M. Jalsenius, and D. Richerby,
The complexityof weighted boolean , Theoretical Computer Science (2009),3949–3961.[BDG +
10] A. Bulatov, M. E. Dyer, L. A. Goldberg, M. Jalsenius, M. Jerrum, and D. Richerby,
Thecomplexity of weighted and unweighted , CoRR abs/1005.2678 (2010).
EFERENCES
Enumerating homomorphisms , Proceed-ings of the 26th Annual Symposium on Theoretical Aspects of Computer Science (S. Albersand J.-Y. Marion, eds.), 2009, pp. 231–242.[BG05] A. Bulatov and M. Grohe,
The complexity of partition functions , Theoretical ComputerScience (2005), 148–186.[BK09] I. Briquel and P. Koiran,
A dichotomy theorem for polynomial evaluation , Proceedingsof the 34th International Symposium on Mathematical Foundations of Computer Sci-ence (R. Kr´alovic and D. Niwinski, eds.), Lecture Notes in Computer Science, vol. 5734,Springer Verlag, 2009, pp. 187–198.[BKJ05] A. Bulatov, A. Krokhin, and P. Jeavons,
Classifying the complexity of constraints usingfinite algebras , SIAM Journal on Computing (2005), 720–742.[BKN09] L. Barto, M. Kozik, and T. Niven, The CSP dichotomy holds for digraphs with no sourcesand no sinks (a positive answer to a conjecture of bang-jensen and hell) , SIAM Journal onComputing (2009), 1782–1802.[Bul06] A. Bulatov, A dichotomy theorem for constraint satisfaction problems on a 3-element set. ,Journal of the ACM (2006), 66–120.[Bul08] , The complexity of the counting constraint satisfaction problem , Proceedings of the35th International Colloquium on Automata, Languages and Programming, Part I (LucaAceto, Ivan Damg˚ard, Leslie Ann Goldberg, Magn´us M. Halld´orsson, Anna Ing´olfsd´ottir,and Igor Walukiewicz, eds.), Lecture Notes in Computer Science, vol. 5125, Springer-Verlag, 2008, pp. 646–661.[CC10] J. Cai and X. Chen,
A decidable dichotomy theorem on directed graph homomorphismswith non-negative weights , To appear in Proceedings of the 51st Annual IEEE Symposiumon Foundations of Computer Science (FOCS 2010), 2010.[CCL10a] J. Cai, X. Chen, and P. Lu,
Graph homomorphisms with complex values: A dichotomytheorem , ICALP (1), 2010, pp. 275–286.[CCL10b] ,
Non-negative weighted , CoRR abs/1012.5659 (2010).[CH96] N. Creignou and M. Hermann,
Complexity of generalized satisfiability counting problems ,Information and Computation (1996), no. 1, 1–12.[CLX08] J. Cai, P. Lu, and M. Xia,
Holographic algorithms by fibonacci gates and holographicreductions for hardness , FOCS, IEEE Computer Society, 2008, pp. 644–653.[CLX09] ,
Holant problems and counting CSP , Proceedings of the 41st ACM Symposium onTheory of Computing, 2009, pp. 715–724.[Coh93] H. Cohen,
A course in computational algebraic number theory , Graduate Texts in Mathe-matics, vol. 138, Springer-Verlag, Berlin, 1993. MR MR1228206 (94i:11105)[DG00] M. Dyer and C. Greenhill,
The complexity of counting graph homomorphisms , RandomStructures and Algorithms (2000), no. 3–4, 260–289.0 REFERENCES [DGJ08] M. E. Dyer, L. A. Goldberg, and M. Jerrum,
A complexity dichotomy for hypergraph parti-tion functions , CoRR abs/0811.0037 (2008).[DGJ09] ,
The complexity of weighted boolean csp , SIAM J. Comput. (2009), no. 5,1970–1986.[DGP07] M. E. Dyer, L. A. Goldberg, and M. Paterson, On counting homomorphisms to directedacyclic graphs , Journal of the ACM (2007), no. 6.[DJKK08] V. Deineko, P. Jonsson, M. Klasson, and A. Krokhin, The approximability of max csp withfixed-value constraints , Journal of the ACM (2008), no. 4, 1–37.[DR10a] M. E. Dyer and D. Richerby, The complexity of , CoRR abs/1003.3879 (2010).[DR10b] ,
On the complexity of , STOC (L. J. Schulman, ed.), ACM, 2010, pp. 725–734.[DRar] ,
The , STACS, 2011, to appear.[FLS07] M. Freedman, L. Lov´asz, and A. Schrijver,
Reflection positivity, rank connectivity, andhomomorphism of graphs , Journal of the American Mathematical Society (2007), 37–51.[FV98] T. Feder and M.Y. Vardi, The computational structure of monotone monadic SNP and con-straint satisfaction: A study through datalog and group theory , SIAM Journal on Comput-ing (1998), 57–104.[GGJT10] L. A. Goldberg, M. Grohe, M. Jerrum, and M. Thurley, A complexity dichotomy for parti-tion functions with mixed signs , SIAM J. Comput. (2010), no. 7, 3336–3402.[Gro07] M. Grohe, The complexity of homomorphism and constraint satisfaction problems seenfrom the other side , Journal of the ACM (2007), 1–24.[HN90] P. Hell and J. Neˇsetˇril, On the complexity of H -coloring , Journal of Combinatorial Theory,Series B (1990), 92–110.[Isi25] E. Ising, Beitrag zur Theorie des Ferromagnetismus , Zeitschrift fur Physik (1925), 253–258.[Lad75] R. E. Ladner, On the structure of polynomial time reducibility , J. ACM (1975), no. 1,155–171.[Lan02] S. Lang, Algebra , third ed., Graduate Texts in Mathematics, vol. 211, Springer-Verlag, NewYork, 2002. MR MR1878556 (2003e:00003)[LN97] R. Lidl and H. Niederreiter,
Finite fields , 2nd ed., Encyclopedia of Mathematics and itsApplications, vol. 20, Cambridge University Press, Cambridge, 1997.[Lov06] L. Lov´asz,
The rank of connection matrices and the dimension of graph algebras , EuropeanJournal of Combinatorics (2006), 962–970.[PB83] J. S. Provan and M. O. Ball, The complexity of counting cuts and of computing the proba-bility that a graph is connected , SIAM J. Comput. (1983), no. 4, 777–788. EFERENCES
Optimal algorithms and inapproximability results for every CSP? , Pro-ceedings of the 40th ACM Symposium on Theory of Computing, 2008, pp. 245–254.[Ric01] D. Richardson,
Multiplicative independence of algebraic numbers and expressions , J. PureAppl. Algebra (2001), no. 1-2, 231–245, Effective methods in algebraic geometry(Bath, 2000). MR MR1854340 (2002j:11079)[Sch09] A. Schrijver,
Graph invariants in the spin model , Journal of Combinatorial Theory, SeriesB (2009), 502–511.[Sim77] J. Simon, On the difference between one and many (preliminary version) , ICALP (ArtoSalomaa and Magnus Steinby, eds.), Lecture Notes in Computer Science, vol. 52, Springer,1977, pp. 480–491.[SS07] H. Schnoor and I. Schnoor,
Enumerating all solutions for constraint satisfaction problems ,Proceedings of the 24th Annual Symposium on Theoretical Aspects of Computer Science(W. Thomas and P. Weil, eds.), Lecture Notes in Computer Science, vol. 4393, Springer-Verlag, 2007, pp. 694–705.[Sze07] B. Szegedy,
Edge coloring models and reflection positivity , Journal of the American math-ematical Society (2007), 969–988.[Thu09] M. Thurley, The complexity of partition functions , Ph.D. thesis, Humboldt Universit¨at zuBerlin, 2009.[Val79] L. G. Valiant,
The complexity of computing the permanent , Theor. Comput. Sci. (1979),189–201.[Val08] , Holographic algorithms , SIAM J. Comput.37