A dichotomy for bounded degree graph homomorphisms with nonnegative weights
AA dichotomy for bounded degree graphhomomorphisms with nonnegative weights
Artem Govorov ∗† [email protected] Jin-Yi Cai ‡ [email protected] Martin Dyer § [email protected]
Abstract
We consider the complexity of counting weighted graph homomorphisms defined by a sym-metric matrix A . Each symmetric matrix A defines a graph homomorphism function Z A ( · ), alsoknown as the partition function. Dyer and Greenhill [10] established a complexity dichotomyof Z A ( · ) for symmetric { , } -matrices A , and they further proved that its A . However, their hardness proof requires graphs ofarbitrarily large degree, and whether the bounded degree part of the Dyer-Greenhill dichotomycan be extended has been an open problem for 15 years. We resolve this open problem andprove that for nonnegative symmetric A , either Z A ( G ) is in polynomial time for all graphs G ,or it is G . We further extend the complexitydichotomy to include nonnegative vertex weights. Additionally, we prove that the Z A ( · ) also holds for simple graphs, where A isany real symmetric matrix. ∗ Department of Computer Sciences, University of Wisconsin-Madison. Supported by NSF CCF-1714275. † Artem Govorov is the author’s preferred spelling of his name, rather than the official spelling Artsiom Hovarau. ‡ Department of Computer Sciences, University of Wisconsin-Madison. Supported by NSF CCF-1714275. § School of Computing, University of Leeds. Supported by EPSRC grant EP/S016562/1. a r X i v : . [ c s . CC ] F e b Introduction
The modern study of graph homomorphisms originates from the work by Lov´asz and others severaldecades ago and has been a very active area [18, 14]. If G and H are two graphs, a graph homomor-phism (GH) is a mapping f : V ( G ) → V ( H ) that preserves vertex adjacency, i.e., whenever ( u, v )is an edge in G , ( f ( u ) , f ( v )) is also an edge in H . Many combinatorial problems on graphs can beexpressed as graph homomorphism problems. Well-known examples include the problems of findinga proper vertex coloring, vertex cover, independent set and clique. For example, if V ( H ) = { , } with an edge between 0 and 1 and a loop at 0, then f : V ( G ) → { , } is a graph homomorphism iff f − (1) is an independent set in G ; similarly, proper vertex colorings on G using at most m colorscorrespond to homomorphisms from G to H = K m (with no loops).More generally, one can consider weighted graphs H and aggregate all homomorphisms from G to H into a weighted sum. This is a powerful graph invariant which can express many graphproperties. Formally, for a symmetric m × m matrix A , the graph homomorphism function on agraph G = ( V, E ) is defined as follows: Z A ( G ) = (cid:88) ξ : V → [ m ] (cid:89) ( u,v ) ∈ E A ξ ( u ) ,ξ ( v ) . Note that if H is unweighted, and A is its { , } -adjacency matrix, then each product (cid:81) ( u,v ) ∈ E A ξ ( u ) ,ξ ( v ) is 0 or 1, and is 1 iff ξ is a graph homomorphism. Thus in this case Z A ( G ) counts the number ofhomomorphisms from G to H . One can further allow H to have vertex weights. In this case, wecan similarly define the function Z A,D ( · ) (see Definition 2.4).These sum-of-product functions Z A ( · ) and Z A,D ( · ) are referred to as the partition functions in statistical physics [3]. Various special cases of GH have been studied there extensively, whichinclude the Ising, Potts, hardcore gas, Beach, Widom-Rowlinsom models, etc. [3].The computational complexity of Z A ( · ) has been studied systematically. Dyer and Greenhill [10,11] proved that, for a symmetric { , } -matrix A , Z A ( · ) is either in polynomial time or A satisfies the condition then Z A ( · ) is computable in polynomial time (we also call it tractable ), otherwise it is Z A ( · ) fornonnegative symmetric matrices A . It was further extended by Goldberg et al. [12] to arbitraryreal symmetric matrices, and finally by Cai, Chen and Lu [7] to arbitrary complex symmetricmatrices. In the last two dichotomies, the tractability criteria are not trivial to state. Nevertheless,both tractability criteria are decidable in polynomial time (in the size of A ).The definition of the partition function Z A ( · ) can be easily extended to directed graphs G andarbitrary (not necessarily symmetric) matrices A corresponding to directed edge weighted graphs H .Concerning the complexity of counting directed GH, we currently have the decidable dichotomies byDyer, Goldberg and Paterson [9] for { , } -matrices corresponding to (unweighted) simple acyclicgraphs H , and by Cai and Chen [6] for all nonnegative matrices A .Dyer and Greenhill in the same paper [10] proved a stronger statement that if a { , } -matrix A fails the tractability condition then Z A ( G ) is G . We note that the complexity of GH for bounded degree graphs is particularlyinteresting as much work has been done on the approximate complexity of GH focused on boundeddegree graphs and approximate algorithms are achieved for them [8, 25, 21, 20, 17, 1, 2, 19, 15, 19].However, for fifteen years the worst case complexity for bounded degree graphs in the Bulatov-1rohe dichotomy was open. Since this dichotomy is used essentially in almost all subsequent work,e.g., [12, 7], this has been a stumbling block.Our main contribution in this paper is to resolve this 15-year-old open problem. We provethat the bounded degree graphs .It can be further strengthened to apply to bounded degree simple graphs. We actually prove abroader dichotomy for Z A,D ( · ), where in addition to the nonnegative symmetric edge weight matrix A there is also a nonnegative diagonal vertex weight matrix D . We will give an explicit tractabilitycondition such that, if ( A, D ) satisfies the condition then Z A,D ( G ) is computable in polynomial timefor all G , and if it fails the condition then Z A,D ( G ) is bounded degreesimple graphs G . Z A ( G ) is the special case of Z A,D ( G ) when D is the identity matrix. Additionally,we prove that the A still holds for simple graphs . (Although in this case, whether under thesame condition on A the Z A,D . To carry out the proof there is an initial condensation step where we combine vertices thathave proportionately the same neighboring edge wrights (technically defined by pairwise lineardependence) into a super vertex with a combined vertex weight. Note that this creates vertexweights even when initially all vertex weights are 1. When vertex weights are present, an approach ininterpolation proof is to arrange things well so that in the end one can redistribute vertex weights toedge weights. However, when edge weights are not 0-1, any gadget design must deal with a quantityat each vertex that cannot be redistributed . This dependence has the form (cid:80) m ζ ( w ) j =1 α ζ ( w ) j µ deg( w ) ζ ( w ) j ,resulting from combining pairwise linearly dependent rows and columns, that depends on vertexdegree deg( w ) in a complicated way. (We note that in the 0-1 case all µ ζ ( w ) j ∈ { , } , making it infact degree independent .)We overcome this difficulty by essentially introducing a virtual level of interpolation—an inter-polation to realize some “virtual gadget” that cannot be physically realized, and yet its “virtual”vertex weights are suitable for redistribution. Technically we have to define an auxiliary graph G (cid:48) ,and express the partition function in an extended framework, called Z A , D on G (cid:48) (see Definition 2.6).In a typical interpolation proof, there is a polynomial with coefficients that have a clear combi-natorial meaning defined in terms of G , usually consisting of certain sums of exponentially manyterms in some target partition function. Here, we will define a target polynomial with certain coef-ficients; however these coefficients do not have a direct combinatorial meaning in terms of Z A,D ( G ),but rather they only have a direct combinatorial meaning in terms of Z A , D on G (cid:48) . In a suitable“limiting” sense, a certain aggregate of these coefficients forms some useful quantity in the finalresult. This introduces a concomitant “virtual” vertex weight which depends on the vertex degreethat is “just-right” so that it can be redistributed to become part of the incident edge weight, thuseffectively killing the vertex weight. This leads to a reduction from Z C ( · ) (without vertex weight)to Z A,D ( · ), for some C that inherits the hardness condition of A , thus proving the Z A ( · ) with Hermitian edge weightmatrices A , where this degree dependence was also at the root of the difficulty. ∗ In order to state all our complexity results in the strict notion of Turing computability, we adoptthe standard model [16] of computation for partition functions, and require that all numbers befrom an arbitrary but fixed algebraic extension of Q . We use R and C to denote the sets of realand complex algebraic numbers. Many statements remain true in other fields or rings if arithmeticoperations can be carried out efficiently in a model of computation (see [5] for more discussions onthis issue).For a positive integer n , we use [ n ] to denote the set { , . . . , n } . When n = 0, [0] = ∅ . We use[ m : n ], where m ≤ n , to denote { m, m + 1 , . . . , n } .In this paper, we consider undirected graphs unless stated otherwise. Following standard def-initions, the graph G is allowed to have multiple edges but no loops. (However, we will touch onthis issue a few times when G is allowed to have loops.) The graph H can have multiple edges andloops, or more generally, edge weights. For the graph H , we treat its loops as edges.An edge-weighted graph H on m vertices can be identified with a symmetric m × m matrix A in the obvious way. We write this correspondence by H = H A and A = A H . Definition 2.1.
Let A ∈ C m × m be a symmetric matrix. The problem EVAL( A ) is defined asfollows: Given an undirected graph G = ( V, E ) , compute Z A ( G ) = (cid:88) ξ : V → [ m ] (cid:89) ( u,v ) ∈ E A ξ ( u ) ,ξ ( v ) . The function Z A ( · ) is called a graph homomorphism function or a partition function . When A is a symmetric { , } -matrix, i.e., when the graph H = H A is unweighted, Z A ( G ) counts thenumber of homomorphisms from G to H . In this case, we denote EVAL( H ) = EVAL( A H ), andthis problem is also known as the H -coloring problem. Theorem 2.2 (Dyer and Greenhill [10]) . Let H be a fixed undirected graph. Then EVAL( H ) is in polynomial time if every connected component of H is either (1) an isolated vertex, or (2)a complete graph with all loops present, or (3) a complete bipartite graph with no loops present.Otherwise, the problem EVAL( H ) is Bulatov and Grohe [4] extended Theorem 2.2 to EVAL( A ) where A is a symmetric matrix withnonnegative entries. In order to state their result, we need to define a few notions first.We say a nonnegative symmetric m × m matrix A is rectangular if there are pairwise disjointnonempty subsets of [ m ]: T , . . . , T r , P , . . . , P s , Q , . . . , Q s , for some r, s ≥
0, such that A i,j > i, j ) ∈ (cid:91) k ∈ [ r ] ( T k × T k ) ∪ (cid:91) l ∈ [ s ] [( P l × Q l ) ∪ ( Q l × P l )] . ∗ In [23], the proof of Lemma 4.22 uses Lemma 4.24. In Lemma 4.24, A is assumed to have pairwise linearlyindependent rows while Lemma 4.22 does not assume this, and the author appeals to a twin reduction step in [10].However, unlike in the 0-1 case [10], such a step incurs degree dependent vertex weights. This gap is fixed by ourTheorem 3.2.
3e refer to T k × T k , P l × Q l and Q l × P l as blocks of A . Further, we say a nonnegative symmetricmatrix A is block-rank- A is rectangular and every block of A has rank one. Theorem 2.3 (Bulatov and Grohe [4]) . Let A be a symmetric matrix with nonnegative entries.Then EVAL( A ) is in polynomial time if A is block-rank- , and is There is a natural extension of EVAL( A ) involving the use of vertex weights. Both papers [10, 4]use them in their proofs. A graph H on m vertices with vertex and edge weights is identifiedwith a symmetric m × m edge weight matrix A and a diagonal m × m vertex weight matrix D = diag( D , . . . , D m ) in a natural way. Then the problem EVAL( A ) can be generalized toEVAL( A, D ) for vertex-edge-weighted graphs.
Definition 2.4.
Let A ∈ C m × m be a symmetric matrix and D ∈ C m × m a diagonal matrix. Theproblem EVAL(
A, D ) is defined as follows: Given an undirected graph G = ( V, E ) , compute Z A,D ( G ) = (cid:88) ξ : V → [ m ] (cid:89) w ∈ V D ξ ( w ) (cid:89) ( u,v ) ∈ E A ξ ( u ) ,ξ ( v ) . Note that EVAL( A ) is the special case EVAL( A, I m ). We also need to define another EVALproblem where the vertex weights are specified by the degree. Definition 2.5.
Let A ∈ C m × m be a symmetric matrix and D = { D [[ i ]] } ∞ i =0 a sequence of diagonalmatrices in C m × m . The problem EVAL( A, D ) is defined as follows: Given an undirected graph G = ( V, E ) , compute Z A, D ( G ) = (cid:88) ξ : V → [ m ] (cid:89) w ∈ V D [[deg( w )]] ξ ( w ) (cid:89) ( u,v ) ∈ E A ξ ( u ) ,ξ ( v ) . Finally, we need to define a general EVAL problem, where the vertices and edges can individuallytake specific weights. Let A be a set of (edge weight) m × m matrices and D a set of diagonal (vertexweight) m × m matrices. A GH-grid Ω = ( G, ρ ) consists of a graph G = ( V, E ) with possibly bothdirected and undirected edges, and loops, and ρ assigns to each edge e ∈ E or loop an A ( e ) ∈ A and to each vertex v ∈ V a D ( v ) ∈ D . (A loop is just an edge of the form ( v, v ).) If e ∈ E is adirected edge then the tail and head correspond to rows and columns of A ( e ) , respectively; if e ∈ E is an undirected edge then A ( e ) must be symmetric. Definition 2.6.
The problem
EVAL( A , D ) is defined as follows: Given a GH-grid Ω = Ω( G ) ,compute Z A , D (Ω) = (cid:88) ξ : V → [ m ] (cid:89) w ∈ V D ( w ) ξ ( w ) (cid:89) e =( u,v ) ∈ E A ( e ) ξ ( u ) ,ξ ( v ) We remark that Z A , D is introduced only as a tool to express a certain quantity in a “virtual”interpolation; the dichotomy theorems do not apply to this. Defintions 2.5 and 2.6 are carefullycrafted in order to carry out the A , D ) generalizes both problems EVAL( A ) and EVAL( A, D ), by taking A to be asingle symmetric matrix, and by taking D to be a single diagonal matrix. But EVAL( A, D ) is notnaturally expressible as EVAL( A , D ) because the latter does not force the vertex-weight matrixon a vertex according to its degree. 4 v p − p u vr − r. . . Figure 1: The thickening T p e and the stretching S r e of an edge e = ( u, v ). u v u v Figure 2: The graphs T S e (on the left) and S T e (on the right) where e = ( u, v ).We refer to [ m ] as the domain of the corresponding EVAL problem. If A = { A } or D = { D } ,then we simply write Z A, D ( · ) or Z A ,D ( · ), respectively.We use a superscript (∆) and/or a subscript simp to denote the restriction of a correspondingEVAL problem to degree-∆ bounded graphs and/or simple graphs. E.g., EVAL (∆) ( A ) denotes theproblem EVAL( A ) restricted to degree-∆ bounded graphs, EVAL simp ( A, D ) denotes the problemEVAL( A, D ) restricted to simple graphs, and both restrictions apply in EVAL (∆)simp ( A, D ).Working within the framework of EVAL( A, D ), we define an edge gadget to be a graph withtwo distinguished vertices, called u ∗ and v ∗ . An edge gadget G = ( V, E ) has a signature (edgeweight matrix) expressed by an m × m matrix F , where F ij = (cid:88) ξ : V → [ m ] ξ ( u ∗ )= i, ξ ( v ∗ )= j (cid:89) z ∈ V \{ u ∗ ,v ∗ } D ξ ( z ) (cid:89) ( x,y ) ∈ E A ξ ( x ) ,ξ ( y ) for 1 ≤ i, j ≤ m . When this gadget is placed in a graph identifying u ∗ and v ∗ with two vertices u and v in that graph, then F is the signature matrix for the pair ( u, v ). Note that the vertex weightscorresponding to u and v are excluded from the product in the definition of F . Similar definitionscan be introduced for EVAL( A ), EVAL( A, D ) and EVAL( A , D ).We use ≤ PT (and ≡ PT ) to denote polynomial-time Turing reductions (and equivalences, respec-tively).Two simple operations are known as thickening and stretching . Let p, r ≥ p - thickening of an edge replaces it by p parallel edges, and a r - stretching replaces it by a path oflength r . In both cases we retain the endpoints u, v . The p - thickening or r - stretching of G withrespect to F ⊆ E ( G ), denoted respectively by T ( F ) p ( G ) and S ( F ) r ( G ), are obtained by p - thickening or r - stretching each edge from F , respectively. Other edges, if any, are unchanged in both cases.When F = E ( G ), we call them the p - thickening and r - stretching of G and denote them by T p ( G )and S r ( G ), respectively. T p e and S r e are the special cases when the graph consists of a single edge e . See Figure 1 for an illustration. Thickenings and stretchings can be combined in any order.Examples are shown in Figure 2.For a matrix A , we denote by A (cid:12) p the matrix obtained by replacing each entry of A withits p th power. Clearly, Z A ( T p G ) = Z A (cid:12) p ( G ) and Z A ( S r G ) = Z A r ( G ). More generally, for the5ertex-weighted case, we have Z A,D ( T p G ) = Z A (cid:12) p ,D ( G ) and Z A,D ( S r G ) = Z A ( DA ) r − ,D ( G ). Here( DA ) = I m if A and D are m × m . In addition to the Dyer-Greenhill dichotomy (Theorem 2.2), in the same paper [10] they also provedthat the
Theorem 3.1.
Let A be a symmetric nonnegative matrix. If A is not block-rank- , then for some ∆ > , the problem EVAL (∆) ( A ) is The degree bound ∆ proved in Theorem 3.1 depends on A , as is the case in Theorem 2.2.The authors of [10] conjectured that a universal bound ∆ = 3 works for Theorem 2.2; whethera universal bound exists for both Theorems 2.2 and 3.1 is open. For general symmetric real orcomplex A , it is open whether bounded degree versions of the dichotomies in [12] and [7] hold.Xia [26] proved that a universal bound does not exist for complex symmetric matrices A , assuming Theorem 3.2.
Let A and D be m × m nonnegative matrices, where A is symmetric, and D isdiagonal. Let A (cid:48) be the matrix obtained from A by striking out rows and columns that correspond to entries of D on the diagonal. If A (cid:48) is block-rank- , then the problem EVAL(
A, D ) is in polynomialtime. Otherwise, for some ∆ > , the problem EVAL (∆)simp ( A, D ) is Every 0 entry of D on the diagonal effectively nullifies the corresponding domain element in [ m ],so the problem becomes an equivalent problem on the reduced domain. Thus, for a nonnegativediagonal D , without loss of generality, we may assume the domain has already been reduced sothat D is positive diagonal. In what follows, we will make this assumption.In Appendix A, we will prove the tractability part of Theorem 3.2. This follows easily fromknown results. In Appendix B, we will present two technical lemmas, Lemma B.1 and Lemma B.2to be used in Section 4. Finally, in Appendix C we prove Theorem C.1, showing that the We proceed to prove the A and D be m × m matrices,where A is nonnegative symmetric but not block-rank-1, and D is positive diagonal. The first stepis to eliminate pairwise linearly dependent rows and columns of A . (We will see that this step willnaturally create nontrivial vertex weights even if we initially start with the vertex unweighted case D = I m .) 6f A has a zero row or column i , then for any connected input graph G other than a singleisolated vertex, no map ξ : V ( G ) → [ m ] having a nonzero contribution to Z A,D ( G ) can map anyvertex of G to i . So, by crossing out all zero rows and columns (they have the same index set since A is symmetric) we may assume that A has no zero rows or columns. We then delete the sameset of rows and columns from D , thereby expressing the problem EVAL (∆)simp ( A, D ) for ∆ ≥ A and D simultaneously by thesame permutation does not change the value of Z A,D ( · ), and so it does not change the complexityof EVAL (∆)simp ( A, D ) for ∆ ≥ A are contiguously arranged. Then, after renaming the indices, the entries of A are of the following form: A ( i,j ) , ( i (cid:48) ,j (cid:48) ) = µ ij µ i (cid:48) j (cid:48) A (cid:48) i,i (cid:48) , where A (cid:48) is a nonnegative symmetric s × s matrix with all columns nonzero and pairwise linearly independent, 1 ≤ i, i (cid:48) ≤ s , 1 ≤ j ≤ m i ,1 ≤ j (cid:48) ≤ m i (cid:48) , (cid:80) si =1 m i = m , and all µ ij >
0. We also rename the indices of the matrix D sothat the diagonal entries of D are of the following form: D ( i,j ) , ( i,j ) = α ij > ≤ i ≤ s and1 ≤ j ≤ m i . As m ≥ s ≥ Z A,D ( · ) can be written in a compressed form Z A,D ( G ) = (cid:88) ζ : V ( G ) → [ s ] (cid:89) w ∈ V ( G ) m ζ ( w ) (cid:88) j =1 α ζ ( w ) j µ deg( w ) ζ ( w ) j (cid:89) ( u,v ) ∈ E ( G ) A (cid:48) ζ ( u ) ,ζ ( v ) = Z A (cid:48) , D ( G )where D = { D [[ k ]] } ∞ k =0 with D [[ k ]] i = (cid:80) m i j =1 α ij µ kij > k ≥ ≤ i ≤ s . Then all matrices in D are positive diagonal. Note the dependence on the vertex degree deg( w ) for w ∈ V ( G ). Since theunderlying graph G remains unchanged, this way we obtain the equivalence EVAL (∆)simp ( A, D ) ≡ PT EVAL (∆)simp ( A (cid:48) , D ) for any ∆ ≥
0. Here the subscript simp can be included or excluded, and thesame is true for the superscript (∆), the statement remains true in all cases. We also point outthat the entries of the matrices D [[ k ]] ∈ D are computable in polynomial time in the input size of( A, D ) as well as in k . P n,p and R d,n,p We first introduce the edge gadget P n,p , for all p, n ≥
1. It is obtained by replacing each edge ofa path of length n by the gadget in Figure 5 from Lemma B.2. More succinctly P n,p is S T p S n e ,where e is an edge.To define the gadget R d,n,p , for all d, p, n ≥
1, we start with a cycle on d vertices F , . . . , F d (call it a d -cycle), replace every edge of the d -cycle by a copy of P n,p , and append a dangling edgeat each vertex F i of the d -cycle. To be specific, a 2-cycle has two vertices with 2 parallel edgesbetween them, and a 1-cycle is a loop on one vertex. The gadget R d,n,p always has d danglingedges. Note that all R d,n,p are loopless simple graphs (i.e., without parallel edges or loops), for d, n, p ≥
1. An example of a gadget R d,n,p is shown in Figure 3. For the special cases d = 1 , R d,n,p can be seen in Figure 4.We note that vertices in P n,p have degrees at most 2 p , and vertices in R d,n,p have degreesat most 2 p + 1, taking into account the dangling edges. Clearly | V ( R d,n,p ) | = dn ( p + 1) and | E ( R d,n,p ) | = (2 np + 1) d , including the dangling edges.By Lemma B.2, we can fix some p ≥ B = ( A (cid:48) D [[2]] A (cid:48) ) (cid:12) p is nondegenerate, wherethe superscript [[2]] is from the stretching operator S which creates those degree 2 vertices, and7 F F F F Figure 3: The gadget R , , .the superscript (cid:12) p is from the thickening operator T p , followed by S , which creates those parallelpaths of length 2. The edge gadget P n,p has the edge weight matrix L ( n ) = BD [[2 p ]] B . . . BD [[2 p ]] B (cid:124) (cid:123)(cid:122) (cid:125) D [[2 p ]] appears n − ≥ = B ( D [[2 p ]] B ) n − (4.1)= ( D [[2 p ]] ) − / (( D [[2 p ]] ) / B ( D [[2 p ]] ) / ) n ( D [[2 p ]] ) − / , (4.2)where in the notation L ( n ) we suppress the index p . The n − D [[2 p ]] in (4.1) are dueto those n − p . Here ( D [[2 p ]] ) / is a diagonal matrix with the positive squareroots of the corresponding entries of D [[2 p ]] on the main diagonal, and ( D [[2 p ]] ) − / is its inverse. Thevertices F i are of degree 2 p + 1 each, but the contributions by its vertex weights are not includedin L ( n ) .The constraint function induced by R d,n,p is more complicated to write down. When it is placedas a part of a graph, for any given assignment to the d vertices F i , we can express the contributionof the gadget R d,n,p in terms of d copies of L ( n ) , together with the vertex weights incurred at the d vertices F i which will depend on their degrees. R d,n,p Assume for now that G does not contain isolated vertices. We will replace every vertex u ∈ V ( G ) ofdegree d = d u = deg( u ) ≥ R d,n,p , for all n, p ≥
1. The replacement operation can bedescribed in two steps: In step one, each u ∈ V ( G ) is replaced by a d -cycle on vertices F , . . . , F d ,each having a dangling edge attached. The d dangling edges will be identified one-to-one with the d incident edges at u . If u and v are adjacent vertices in G , then the edge ( u, v ) in G will be replacedby merging a pair of dangling edges, one from the d u -cycle and one from the d v -cycle. Thus in8 (a) R , , F F (b) R , , Figure 4: Examples of gadgets R d,n,p for d = 1 , G (cid:48) , which basically replaces every vertex u ∈ V ( G ) by a cycle of deg( u )vertices. Then in step two, for every cycle in G (cid:48) that corresponds to some u ∈ V ( G ) we replaceeach edge on the cycle by a copy of the edge gadget P n,p .Let G n,p denote the graph obtained from G by the replacement procedure above. Since allgadgets R d,n,p are loopless simple graphs, so are G n,p for all n, p ≥
1, even if G has multiple edges(or had multiloops, if we view a loop as adding degree 2 to the incident vertex). As a technicalremark, if G contains vertices of degree 1, then the intermediate graph G (cid:48) has loops but all graphs G n,p ( n, p ≥
1) do not. Also note that all vertices in G n,p have degree at most 2 p + 1, which isindependent of n .Next, it is not hard to see that | V ( G n,p ) | = (cid:88) u ∈ V ( G ) d u n ( p + 1) = 2 n ( p + 1) | E ( G ) | , | E ( G n,p ) | = | E ( G ) | + (cid:88) u ∈ V ( G ) npd u = (4 np + 1) | E ( G ) | . Hence the size of the graphs G n,p is polynomially bounded in the size of G , n and p .Since we chose a fixed p , and will choose n to be bounded by a polynomial in the size of G ,whenever something is computable in polynomial time in n , it is also computable in polynomialtime in the size of G (we will simply say in polynomial time).We consider Z A (cid:48) , D ( G ), and substitute G by G n,p . We will make use of the edge weight matrix L ( n ) of P n,p in (4.2). The vertices F i are of degree 2 p + 1 each in G n,p , so will each contribute avertex weight according to the diagonal matrix D [[2 p +1]] to the partition function, which are notincluded in L ( n ) , but now must be accounted for in Z A (cid:48) , D ( G n,p ).Since B is real symmetric and D [[2 p ]] is positive diagonal, the matrix (cid:101) B = ( D [[2 p ]] ) / B ( D [[2 p ]] ) / is real symmetric. Then (cid:101) B is orthogonally diagonalizable over R , i.e., there exist a real orthogonalmatrix S and a real diagonal matrix J = diag( λ i ) si =1 such that (cid:101) B = S T J S . Then (cid:101) B n = S T J n S sothe edge weight matrix for P n,p becomes L ( n ) = ( D [[2 p ]] ) − / (cid:101) B n ( D [[2 p ]] ) − / = ( D [[2 p ]] ) − / S T J n S ( D [[2 p ]] ) − / . L ( n ) as a matrix is defined for any n ≥
0, and L (0) = ( D [[2 p ]] ) − , even though there is nophysical gadget P ,p that corresponds to it. However, it is precisely this “virtual” gadget we wishto “realize” by interpolation.Clearly, (cid:101) B is nondegenerate as B and ( D [[2 p ]] ) / both are, and so is J . Then all λ i (cid:54) = 0. Wecan also write L ( n ) ij = (cid:80) s(cid:96) =1 a ij(cid:96) λ n(cid:96) for every n ≥ a ij(cid:96) ’s which depend on S , D [[2 p ]] ,but not on J and n , for all 1 ≤ i, j, (cid:96) ≤ s . By the formal expansion of the symmetric matrix L ( n ) above, we have a ij(cid:96) = a ji(cid:96) . Note that for all n, p ≥
1, the gadget R d v ,n,p for v ∈ V ( G ) employsexactly d v copies of P n,p . Let t = (cid:80) v ∈ V ( G ) d v = 2 | E | ; this is precisely the number of edge gadgets P n,p in G n,p .In the evaluation of the partition function Z A (cid:48) , D ( G n,p ), we stratify the vertex assignments in G n,p as follows. Denote by κ = ( k ij ) ≤ i ≤ j ≤ s a tuple of nonnegative integers, where the indexing isover all s ( s + 1) / i, j ). There are a total of (cid:0) t + s ( s +1) / − s ( s +1) / − (cid:1) such tuples that satisfy (cid:80) ≤ i ≤ j ≤ s k ij = t . For a fixed s , this is a polynomial in t , and thus a polynomial in the size of G .Denote by K the set of all such tuples κ . We will stratify all vertex assignments in G n,p by κ ∈ K ,namely all assignments such that there are exactly k ij many constituent edge gadgets P n,p withthe two end points (in either order of the end points) assigned i and j respectively.For each κ ∈ K , the edge gadgets P n,p in total contribute (cid:81) ≤ i ≤ j ≤ s ( L ( n ) ij ) k ij to the partitionfunction Z A (cid:48) , D ( G n,p ). If we factor this product out for each κ ∈ K , we can express Z A (cid:48) , D ( G n,p ) asa linear combination of these products over all κ ∈ K , with polynomially many coefficient values c κ that are independent of all edge gadgets P n,p . Another way to define these coefficients c κ is tothink in terms of G (cid:48) : For any κ = ( k ij ) ≤ i ≤ j ≤ s ∈ K , we say a vertex assignment on G (cid:48) is consistentwith κ if it assigns exactly k ij many cycle edges of G (cid:48) (i.e., those that belong to the cycles thatreplaced vertices in G ) as ordered pairs of vertices to the values ( i, j ) or ( j, i ). (For any loop in G (cid:48) ,as a cycle of length 1 that came from a degree 1 vertex of G , it can only be assigned ( i, i ) for some1 ≤ i ≤ s .) Let L (cid:48) be any symmetric edge signature to be assigned on each of these cycle edges in G (cid:48) , and keep the edge signature A (cid:48) on the merged dangling edges between any two such cycles, andthe suitable vertex weights specified by D , namely each vertex receives its vertex weight accordingto D [[2 p +1]] . Then c κ is the sum, over all assignments consistent with κ , of the products of all edgeweights and vertex weights other than the contributions by L (cid:48) , in the evaluation of the partitionfunction on G (cid:48) . In other words, for each κ ∈ K , c κ = (cid:88) ζ : V ( G (cid:48) ) → [ s ] ζ is consistent with κ (cid:89) w ∈ V ( G (cid:48) ) D [[2 p +1]] ζ ( w ) (cid:89) ( u,v ) ∈ (cid:101) E A (cid:48) ζ ( u ) ,ζ ( v ) , where (cid:101) E ⊆ E ( G (cid:48) ) are the non-cycle edges of G (cid:48) that are in 1-1 correspondence with E ( G ).In particular, the values c κ are independent of n . Thus for some polynomially many values c κ ,where κ ∈ K , we have Z A (cid:48) , D ( G n,p ) = (cid:88) κ ∈K c κ (cid:89) ≤ i ≤ j ≤ s ( L ( n ) ij ) k ij = (cid:88) κ ∈K c κ (cid:89) ≤ i ≤ j ≤ s ( s (cid:88) (cid:96) =1 a ij(cid:96) λ n(cid:96) ) k ij . (4.3)Expanding out the last sum and rearranging the terms, for some values b i ,...,i s independent of n ,we get Z A (cid:48) , D ( G n,p ) = (cid:88) i + ... + i s = ti ,...,i s ≥ b i ,...,i s ( s (cid:89) j =1 λ i j j ) n n ≥ b i ,...,i s with the rows indexed by n . Thenumber of unknowns is clearly (cid:0) t + s − s − (cid:1) which is polynomial in the size of the input graph G since s is a constant. The values (cid:81) sj =1 λ i j j can be clearly computed in polynomial time.We show how to compute the value (cid:88) i + ... + i s = ti ,...,i s ≥ b i ,...,i s from the values Z A (cid:48) , D ( G n,p ) , n ≥ (cid:81) sj =1 λ i j j do not have to be pairwise distinct. However, when they areequal, say, (cid:81) sj =1 λ i j j = (cid:81) sj =1 λ i (cid:48) j j , we replace the corresponding unknowns b i ,...,i s and b i (cid:48) ,...,i (cid:48) s withtheir sum as a new variable. Since all λ i (cid:54) = 0, we have a Vandermonde system of full rank afterall such combinations. Therefore we can solve this linear system in polynomial time and find thedesired value (cid:88) i + ... + i s = ti ,...,i s ≥ b i ,...,i s .Now we will consider a problem in the framework of Z A , D according to Definition 2.6. Let G ,p be the (undirected) GH-grid, with the underlying graph G (cid:48) , and every edge of the cycle in G (cid:48) corresponding to a vertex in V ( G ) is assigned the edge weight matrix ( D [[2 p ]] ) − , and we keepthe vertex-weight matrices D [[2 p +1]] at all vertices F i . The other edges, i.e., the original edges of G ,each keep the assignment of the edge weight matrix A (cid:48) . (So in the specification of Z A , D , we have A = { ( D [[2 p ]] ) − , A (cid:48) } , and D = { D [[2 p +1]] } . We note that G (cid:48) may have loops, and Definition 2.6specifically allows this.) Then Z { ( D [[2 p ]] ) − ,A (cid:48) } ,D [[2 p +1]] ( G ,p ) = (cid:88) i + ... + i s = ti ,...,i s ≥ b i ,...,i s ( s (cid:89) j =1 λ i j j ) = (cid:88) i + ... + i s = ti ,...,i s ≥ b i ,...,i s and we have just computed this value in polynomial time in the size of G from the values Z A (cid:48) , D ( G n,p ),for n ≥
1. In other words, we have achieved it by querying the oracle EVAL( A (cid:48) , D ) on the instances G n,p , for n ≥
1, in polynomial time.Equivalently, we have shown that we can simulate a virtual “gadget” R d, ,p replacing everyoccurrence of R d,n,p in G n,p in polynomial time. The virtual gadget R d, ,p has the edge signature( D [[2 p ]] ) − in place of ( D [[2 p ]] ) − / (cid:101) B n ( D [[2 p ]] ) − / in each P n,p , since( D [[2 p ]] ) − / (cid:101) B ( D [[2 p ]] ) − / = ( D [[2 p ]] ) − / I s ( D [[2 p ]] ) − / = ( D [[2 p ]] ) − . Additionally, each F i retains the vertex-weight contribution with the matrix D [[2 p +1]] in R d, ,p . Weview it as having “virtual” degree 2 p + 1. This precisely results in the GH-grid G ,p .However, even though G ,p still retains the cycles, since ( D [[2 p ]] ) − is a diagonal matrix, eachvertex F i in a cycle is forced to receive the same vertex assignment value in the domain set [ s ];all other vertex assignments contribute zero in the evaluation of Z { ( D [[2 p ]] ) − ,A (cid:48) } ,D [[2 p +1]] ( G ,p ). Thiscan be easily seen by traversing the vertices F , . . . , F d in a cycle. Hence we can view each cycleemploying the virtual gadget R d, ,p as a single vertex that contributes only a diagonal matrix ofpositive vertex weights P [[ d ]] = ( D [[2 p +1]] ( D [[2 p ]] ) − ) d , where d is the vertex degree in G . Contracting11ll the cycles to a single vertex each, we arrive at the original graph G . Let P = { P [[ i ]] } ∞ i =0 , wherewe let P [[0]] = I s , and for i >
0, we have P [[ i ]] j = w ij where w j = (cid:80) m j k =1 α jk µ p +1 jk / (cid:80) m j k =1 α jk µ pjk > ≤ j ≤ s . This shows that we now can interpolate the value Z A (cid:48) , P ( G ) using the values Z A (cid:48) , D ( G n,p )in polynomial time in the size of G . The graph G is arbitrary but without isolated vertices here.We show next how to deal with the case when G has isolated vertices.Given an arbitrary graph G , assume it has h ≥ G ∗ denote the graphobtained from G by their removal. Then G ∗ is of size not larger than G and h ≤ | V ( G ) | . Obviously, Z A (cid:48) , P ( G ) = ( (cid:80) mi =1 P [[0]] i ) h Z A (cid:48) , P ( G ∗ ) = s h Z A (cid:48) , P ( G ∗ ). Here the integer s is a constant, so the factor s h > Z A (cid:48) , P ( G ∗ ) we cancompute the value Z A (cid:48) , P ( G ) in polynomial time. Further, since we only use the graphs G n,p , n ≥ p + 1, combining it with the possibleisolated vertex removal step, we conclude EVAL( A (cid:48) , P ) ≤ PT EVAL (2 p +1)simp ( A (cid:48) , D ).Next, it is easy to see that for an arbitrary graph GZ A (cid:48) , P ( G ) = (cid:88) ζ : V ( G ) → [ s ] (cid:89) z ∈ V ( G ) P [[deg( z )]] ζ ( z ) (cid:89) ( u,v ) ∈ E ( G ) A (cid:48) ζ ( u ) ,ζ ( v ) = (cid:88) ζ : V ( G ) → [ s ] (cid:89) z ∈ V ( G ) w deg( z ) ζ ( z ) (cid:89) ( u,v ) ∈ E ( G ) A (cid:48) ζ ( u ) ,ζ ( v ) = (cid:88) ζ : V ( G ) → [ s ] (cid:89) ( u,v ) ∈ E ( G ) w ζ ( u ) w ζ ( v ) A (cid:48) ζ ( u ) ,ζ ( v ) = (cid:88) ζ : V ( G ) → [ s ] (cid:89) ( u,v ) ∈ E ( G ) C ζ ( u ) ,ζ ( v ) = Z C ( G ) . Here C is an s × s matrix with the entries C ij = A (cid:48) ij w i w j where 1 ≤ i, j ≤ s . Clearly, C is anonnegative symmetric matrix. In the above chain of equalities, we were able to redistribute theweights w i and w j into the edge weights A (cid:48) ij which resulted in the edge weights C ij , so that preciselyeach edge { u, v } in G gets two factors w ζ ( u ) and w ζ ( v ) since the vertex weights at u and v were w deg( u ) ζ ( u ) and w deg( v ) ζ ( v ) respectively. (This is a crucial step in our proof.) Because the underlyinggraph G is arbitrary, it follows that EVAL( A (cid:48) , P ) ≡ PT EVAL( C ). Combining this with the previousEVAL-reductions and equivalences, we obtainEVAL( C ) ≡ PT EVAL( A (cid:48) , P ) ≤ PT EVAL (2 p +1)simp ( A (cid:48) , D ) ≡ PT EVAL (2 p +1)simp ( A, D ) , so that EVAL( C ) ≤ PT EVAL (∆)simp ( A, D ), by taking ∆ = 2 p + 1.Remembering that our goal is to prove the A, D not satisfyingthe tractability conditions of Theorem 3.2, we finally use the assumption that A is not block-rank-1. Next, noticing that all µ ij >
0, by construction A (cid:48) is not block-rank-1 either. Finally,because all w i > C block-rank-1 implying that EVAL( C ) is (2 p +1)simp ( A, D ) is also G (cid:48) and the coefficients c κ . Usually in an interpolation proof there are some coefficients that12ave a clear combinatorial meaning in terms of the original problem instance. Here these values c κ do not have a clear combinatorial meaning in terms of Z A (cid:48) , D ( G ), rather they are defined in termsof an intermediate problem instance G (cid:48) , which is neither G nor the actual constructed graphs G n,p .It is only in a “limiting” sense that a certain combination of these values c κ allows us to compute Z A (cid:48) , D ( G ). A Tractability part
The tractability part of Theorem 3.2 follows easily from known results. For completeness we outlinea proof here. Let A and D be m × m matrices, where A is nonnegative symmetric block-rank-1and D is positive diagonal.First, Z A,D ( G ) can be reduced to the connected components G , . . . , G t of G , Z A,D ( G ) = t (cid:89) i =1 Z A,D ( G i ) , so we may as well assume G is connected. We permute the rows and columns of A, D by the samepermutation and then cross out zero rows and columns of A . This does not change Z A,D . We mayassume that A = diag( A i ) ki =1 is block diagonal with nonzero blocks A , . . . , A k , where each block A i is either a symmetric matrix of rank 1 with no zero entries, or a symmetric bipartite matrix of theform (cid:0) BB T (cid:1) where B has rank 1 and no zero entries. Then we can write D = diag( D i ) ki =1 whereeach D i is positive diagonal of the corresponding size. As A is block diagonal and G is connected, Z A,D ( G ) = k (cid:88) i =1 Z A i ,D i ( G ) . So we may as well assume that A is one of these blocks. Also let D = diag( α i ) mi =1 .1) A is a symmetric matrix of rank 1 with no zero entries. We can write A = x T x for somepositive row vector x = ( x i ) mi =1 . Then Z A,D ( G ) = (cid:89) u ∈ V ( G ) m (cid:88) i =1 α i x deg( u ) i . A = (cid:0) BB T (cid:1) , where B is (cid:96) × ( m − (cid:96) ) (for some 1 ≤ (cid:96) < m ) has rank 1 and no zero entries.We can write B = x T y for some positive row vectors x = ( x i ) (cid:96)i =1 and y = ( y j ) mj = (cid:96) +1 . Since G is connected, Z A,D ( G ) = 0 unless G is bipartite. If G is bipartite with a vertex bipartization V ∪ V , then we only need to consider maps ξ : G → [ m ] such that either ξ ( V ) ⊆ [ (cid:96) ] , ξ ( V ) ⊆ [ (cid:96) + 1 , m ] or ξ ( V ) ⊆ [ (cid:96) + 1 , m ] , ξ ( V ) ⊆ [ (cid:96) ], with all other maps contribute zero to Z A,D ( G ).Then Z A,D ( G ) = (cid:89) u ∈ V (cid:96) (cid:88) i =1 α i x deg( u ) i (cid:89) v ∈ V m (cid:88) j = (cid:96) +1 α j y deg( v ) j + (cid:89) u ∈ V m (cid:88) j = (cid:96) +1 α j y deg( u ) j (cid:89) v ∈ V (cid:96) (cid:88) i =1 α i x deg( v ) i . Two technical lemmas
We need two technical lemmas. The following lemma is from [10] (Lemma 3.6); for the convenienceof readers we give a proof here.
Lemma B.1.
Let A and D be m × m matrices, where A is real symmetric with all columnsnonzero and pairwise linearly independent, and D is positive diagonal. Then all columns of ADA are nonzero and pairwise linearly independent.Proof.
The case m = 1 is trivial. Assume m ≥
2. Let D = diag( α i ) mi =1 , and Π = diag( √ α i ) mi =1 .Then Π = D . We have ADA = Q T Q , where Q = Π A . Let q i denote the i th column of Q . Then Q has pairwise linearly independent columns. By the Cauchy-Schwartz inequality, q Ti q j < (cid:0) ( q Ti q i )( q Tj q j ) (cid:1) / , whenever i (cid:54) = j . Then for any 1 ≤ i < j ≤ m , the i th and j th columns of ADA contain a submatrix (cid:20) q Ti q i q Ti q j q Ti q j q Tj q j (cid:21) , so they are linearly independent.The following is also adapted from [10] (Theorem 3.1). Lemma B.2.
Let A and D be m × m matrices, where A is real symmetric with all columns nonzeroand pairwise linearly independent, and D is positive diagonal. Then for all sufficiently large positiveintegers p , the matrix B = ( ADA ) (cid:12) p corresponding to the edge gadget in Figure 5 is nondegenerate.Proof. If m = 1, then any p ≥ m ≥
2. Following the proof of Lemma B.1, we have q Ti q j < (cid:113) ( q Ti q i )( q Tj q j ), for all 1 ≤ i < j ≤ m . Let γ = max ≤ i 1. Each term of det (( A (cid:48) ) (cid:12) p ) has the form ± (cid:81) mi =1 A (cid:48) piσ ( i ) forsome permutation σ of [ m ]. Now |{ σ | t ( σ ) = j }| ≤ (cid:18) mj (cid:19) j ! ≤ m j , v p − p Figure 5: The edge gadget S T p e, e = ( u, v ) with the edge weight matrix ( ADA ) (cid:12) p .for 0 ≤ j ≤ m . By separating out the identity permutation and all other terms, for p ≥(cid:98) ln(2 m ) / ln(1 /γ ) (cid:99) + 1, we have 2 mγ p < 1, anddet (cid:0) ( A (cid:48) ) (cid:12) p (cid:1) ≥ (cid:32) m (cid:89) i =1 A (cid:48) ii (cid:33) p − (cid:32) m (cid:89) i =1 A (cid:48) ii (cid:33) p m (cid:88) j =1 m j γ pj ≥ (cid:32) m (cid:89) i =1 A (cid:48) ii (cid:33) p (cid:18) − mγ p − mγ p (cid:19) = (cid:32) m (cid:89) i =1 A (cid:48) ii (cid:33) p (cid:18) − mγ p − mγ p (cid:19) > . C Hardness for Z A ( · ) on simple graphs for real symmetric A There is a more direct approach to prove the A, D ) when the matrix A is real symmetricand D is positive diagonal.In particular, we will prove the A ) without vertex weights, where A is areal symmetric matrix) for simple graphs.We first prove the following theorem. Theorem C.1. Let A and D be m × m matrices, where A is real symmetric and D is positivediagonal. Then EVAL( A, D ) ≤ PT EVAL simp ( A, D ) .Proof. We may assume A is not identically 0, for otherwise the problem is trivial. Let G = ( V, E )be an input graph to the problem EVAL( A, D ). For any n ≥ 1, let G n = S ( F ) n ( G ) where F ⊆ E is the subset consisting of the edges of G each of which is parallel to at least one other edge. Inother words, we obtain G n by replacing every parallel edge e by its n -stretching S n e . We will referto these as paths of length n in G n . Note that G = G . Moreover, for every n ≥ 2, the graph G n is simple and loopless, and has polynomial size in the size of G and n .A path of length n ≥ M ( n ) = ADA . . . ADA (cid:124) (cid:123)(cid:122) (cid:125) D appears n − ≥ = A ( DA ) n − = D − / ( D / AD / ) n D − / . Here D / is a diagonal matrix with the positive square roots of the corresponding entries of D onthe main diagonal, and D − / is its inverse. 15ince A is real symmetric and D is positive diagonal, the matrix (cid:101) A = D / AD / is realsymmetric. Then (cid:101) A is orthogonally diagonalizable over R , i.e., there exist a real orthogonal matrix S and a real diagonal matrix J = ( λ i ) mi =1 such that (cid:101) A = S T J S . If A has rank r , then 1 ≤ r ≤ m ,and we may assume that λ i (cid:54) = 0 for 1 ≤ i ≤ r and λ i = 0 for i > r .We have (cid:101) A n = S T J n S , so the edge weight matrix for a path of length n ≥ M ( n ) = D − / (cid:101) A n D − / = D − / S T J n SD − / . We can write M ( n ) ij = (cid:80) r(cid:96) =1 a ij(cid:96) λ n(cid:96) by a formal expansion, for every n ≥ a ij(cid:96) ’sthat are dependent on D and S , but independent of n and λ (cid:96) , where 1 ≤ i, j ≤ m and 1 ≤ (cid:96) ≤ r .By the formal expansion of the symmetric matrix M ( n ) above, we have a ij(cid:96) = a ji(cid:96) . Let t = | F | ,which is the number of edges in G subject to the stretching operator S n to form G n .In the evaluation of the partition function Z A,D ( G n ), we stratify the vertex assignments in G n as follows. Denote by κ = ( k ij ) ≤ i ≤ j ≤ m a nonnegative tuple with entries indexed by ordered pairsof nonnegative numbers that satisfy (cid:80) ≤ i ≤ j ≤ m k ij = t . Let K denote the set of all such possibletuples κ . In particular, |K| = (cid:0) t + m ( m +1) / − m ( m +1) / − (cid:1) . For a fixed m , this is a polynomial in t , and thus apolynomial in the size of G . Let c κ be the sum over all assignments of all vertex and edge weightproducts in Z A,D ( G n ), except the contributions by the paths of length n formed by stretchingparallel edges in G , such that the endpoints of precisely k ij constituent paths of length n receivethe assignments ( i, j ) (in either order of the end points) for every 1 ≤ i ≤ j ≤ m . Technicallywe can call a vertex assignment on G consistent with κ (where κ ∈ K ), if it satisfies the statedproperty. Note that the contribution by each such path does not include the vertex weights of thetwo end points (but does include all vertex weights of the internal n − c κ = (cid:88) ξ : V ( G ) → [ m ] ξ is consistent with κ (cid:89) w ∈ V D ξ ( w ) (cid:89) ( u,v ) ∈ E \ F A ξ ( u ) ,ξ ( v ) for κ ∈ K .In particular, the values c κ are independent of n . Thus for some polynomially many values c κ ,where κ ∈ K , we have Z A,D ( G n ) = (cid:88) κ ∈K c κ (cid:89) ≤ i ≤ j ≤ m ( M ( n ) ij ) k ij = (cid:88) κ ∈K c κ (cid:89) ≤ i ≤ j ≤ m ( r (cid:88) (cid:96) =1 a ij(cid:96) λ n(cid:96) ) k ij . Expanding out the last sum and rearranging the terms, for some values b i ,...,i r independent of n ,we get Z A,D ( G n ) = (cid:88) i + ... + i r = ti ,...,i r ≥ b i ,...,i r ( r (cid:89) (cid:96) =1 λ i (cid:96) (cid:96) ) n (C.1)for all n ≥ b i ,...,i r with the rows indexed by n .The number of unknowns is (cid:0) t + r − r − (cid:1) which is polynomial in the size of the input graph G , since r ≤ m is a constant. The values (cid:81) r(cid:96) =1 λ i (cid:96) (cid:96) can all be computed in polynomial time.We show how to compute the value Z A,D ( G ) = (cid:88) i + ... + i r = ti ,...,i r ≥ b i ,...,i r r (cid:89) (cid:96) =1 λ i (cid:96) (cid:96) , from the values Z A,D ( G n )where n ≥ G n is simple and loopless for n ≥ (cid:81) r(cid:96) =1 λ i (cid:96) (cid:96) do not have to be pairwise distinct, and therefore it can have re-peating columns. Nevertheless, when there are two repeating columns we replace the correspondingunknowns b i ,...,i r and b i (cid:48) ,...,i (cid:48) r with their sum as a new variable; we repeat this replacement proce-dure until there are no repeating columns. Since all λ (cid:96) (cid:54) = 0, for 1 ≤ (cid:96) ≤ r , after the replacement,we have a Vandermonde system of full rank. Therefore we can solve this modified linear system inpolynomial time. This allows us to obtain the value Z A,D ( G ) = (cid:88) i + ... + i r = ti ,...,i r ≥ b i ,...,i r r (cid:89) (cid:96) =1 λ i (cid:96) (cid:96) , which alsohas exactly the same pattern of repeating multipliers (cid:81) r(cid:96) =1 λ i (cid:96) (cid:96) .We have shown how to compute the value Z A,D ( G ) in polynomial time by querying the oracleEVAL( A, D ) on polynomially many instances G n , for n ≥ 2. It follows that EVAL( A, D ) ≤ PT EVAL simp ( A, D ).We are ready to prove the A be a real symmetric m × m matrix. Assuming that A doesnot satisfy the tractability conditions of the dichotomy theorem of Goldberg et al., the problemEVAL( A ) is D = I m ), EVAL( A ) ≤ PT EVAL simp ( A ). It followsthat EVAL simp ( A ) is Theorem C.2. Let A be a real symmetric matrix. Then either EVAL( A ) is in polynomial time or EVAL simp ( A ) is EVAL( A ) is A , decides which case ofthe dichotomy it is. Remark: The interpolation argument in Theorem C.1 works even if G is a multigraph possiblywith multiple loops at any vertex in the following sense. In Definition 2.4, we treat the loops of G as edges. We think of them as mapped to the entries A ii in the evaluation of the partitionfunction Z A,D . However, we need to slightly change the way we define the graphs G n . In additionto n -stretching the parallel edges of G , we also need to n -stretch each loop of G (i.e., replacing aloop by a closed path of length n ). Now F is the set of parallel edges and loops in G . This wayeach G n = S ( F ) n ( G ) for n ≥ A, D ) problem thatallows input G to have multiloops, to the standard problem EVAL simp ( A, D ) not allowing loops. References [1] A. I. Barvinok. Combinatorics and Complexity of Partition Functions , volume 30 of Algorithmsand combinatorics . Springer, 2017.[2] A. I. Barvinok and P. Sober´on. Computing the partition function for graph homomorphisms. Combinatorica , 37(4):633–650, 2017.[3] R. J. Baxter. The six and eight-vertex models revisited. Journal of Statistical Physics ,116(1):43–66, 2004. 174] A. Bulatov and M. Grohe. The complexity of partition functions. Theor. Comput. Sci. , 348(2-3):148–186, 2005. A preliminary version appeared in ICALP 2004: 294–306.[5] J.-Y. Cai and X. Chen. Complexity Dichotomies for Counting Problems , volume 1: BooleanDomain. Cambridge University Press, 2017. doi:10.1017/9781107477063 .[6] J.-Y. Cai and X. Chen. A decidable dichotomy theorem on directed graph homomorphismswith non-negative weights. Computational Complexity , 28(3):345–408, 2019.[7] J.-Y. Cai, X. Chen, and P. Lu. Graph homomorphisms with complex values: A dichotomytheorem. SIAM J. Comput. , 42(3):924–1029, 2013.[8] M. E. Dyer, A. M. Frieze, and M. Jerrum. On counting independent sets in sparse graphs. SIAM J. Comput. , 31(5):1527–1541, 2002.[9] M. E. Dyer, L. A. Goldberg, and M. Paterson. On counting homomorphisms to directed acyclicgraphs. J. ACM , 54(6):27, 2007.[10] M. E. Dyer and C. S. Greenhill. The complexity of counting graph homomorphisms. RandomStruct. Algorithms , 17(3-4):260–289, 2000. A preliminary version appeared in SODA 2000:246–255.[11] M. E. Dyer and C. S. Greenhill. Corrigendum: The complexity of counting graph homomor-phisms. Random Struct. Algorithms , 25(3):346–352, 2004.[12] L. A. Goldberg, M. Grohe, M. Jerrum, and M. Thurley. A complexity dichotomy for partitionfunctions with mixed signs. SIAM J. Comput. , 39(7):3336–3402, 2010.[13] M. Grohe and M. Thurley. Counting homomorphisms and partition functions. In M. Groheand J. Makowsky, editors, Model Theoretic Methods in Finite Combinatorics , volume 558 of Contemporary Mathematics , pages 243–292. American Mathematical Society, 2011.[14] P. Hell and J. Neˇsetˇril. Graphs and homomorphisms , volume 28 of Oxford lecture series inmathematics and its applications . Oxford University Press, 2004.[15] T. Helmuth, W. Perkins, and G. Regts. Algorithmic Pirogov-Sinai theory. In Proceedings of the51st Annual ACM SIGACT Symposium on Theory of Computing (STOC) , pages 1009–1020,2019.[16] H. W. Lenstra Jr. Algorithms in algebraic number theory. Bull. Amer. Math. Soc. , 26(2):211–244, 1992.[17] L. Li, P. Lu, and Y. Yin. Correlation decay up to uniqueness in spin systems. In Proceedings ofthe 24th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA) , pages 67–84, 2013.[18] L. Lov´asz. Operations with structures. Acta Math. Hungar. , 18(3-4):321–328, 1967.[19] H. Peters and G. Regts. Location of zeros for the partition function of the Ising model onbounded degree graphs. arXiv:1810.01699 , 2018. URL: https://arxiv.org/abs/1810.01699 .1820] A. Sinclair, P. Srivastava, and M. Thurley. Approximation algorithms for two-state anti-ferromagnetic spin systems on bounded degree graphs. In Proceedings of the 23rd AnnualACM-SIAM Symposium on Discrete Algorithms (SODA) , pages 941–953, 2012.[21] A. Sly. Computational transition at the uniqueness threshold. In Proceedings of the 51stAnnual IEEE Symposium on Foundations of Computer Science (FOCS) , pages 287–296, 2010.[22] M. Thurley. The Complexity of Partition Functions . PhD thesis, Humboldt Universit¨at zuBerlin, 2009.[23] M. Thurley. The complexity of partition functions on Hermitian matrices. arXiv:1004.0992 ,2010. URL: https://arxiv.org/abs/1004.0992 .[24] L. G. Valiant. The complexity of enumeration and reliability problems. SIAM J. Comput. ,8(3):410–421, 1979.[25] D. Weitz. Counting independent sets up to the tree threshold. In Proceedings of the 38thAnnual ACM SIGACT Symposium on Theory of Computing (STOC) , pages 140–149, 2006.[26] M. Xia. Holographic reduction: A domain changed application and its partial converse theo-rems.