Deterministic polynomial-time approximation algorithms for partition functions and graph polynomials
Viresh Patel, Guus Regts
Introduction
Computational counting is an important area of computer science where one seeks to find efficient algorithms to count certain combinatorial objects such as independent sets, proper colorings, or matchings in a graph. More generally, each combinatorial counting problem has an associated generating function, namely the independence polynomial for independent sets, the chromatic and more generally Tutte polynomial for proper graph colorings, and the matching polynomial for matchings. Such graph polynomials are studied in mathematics and computer science, but also in statistical physics where they are normally referred to as partition functions. A fundamental question asks for which graphs and at which numerical values one can approximately evaluate these polynomials efficiently. Indeed the counting problems correspond to evaluating these graph polynomials or partition functions at particular values.
Many of these counting problems are known to be computationally hard in the sense of being #P-hard, even when one restricts to graphs of maximum degree at most three . On the other hand several efficient randomized approximation algorithms exist for some of these #P-hard problems via the use of the powerful Markov chain Monte Carlo technique. In a major breakthrough, Weitz , inspired by ideas from statistical physics, developed the so-called correlation decay method allowing him to obtain the first efficient deterministic approximation algorithm for counting independent sets in graphs of maximum degree at most five. (One expects no such algorithm for graphs of maximum degree larger than five , while previously the best known (randomized) algorithm worked only for graphs of maximum degree at most four.) The correlation decay method has subsequently been refined and applied to various other problems; see e.g. and references therein.
In this paper we consider a different approach. The approach is quite robust in that it can be applied to a large class of graph polynomials and gives the first general polynomial-time method to approximate graph polynomials at complex values for bounded degree graphs. Very recently complex evaluations have also been considered by Harvey, Srivastava, and Vondrák for the special case of the independence polynomial. Complex evaluations of graph polynomials, aside from being the natural extensions of real evaluations, arise as interesting counting problems e.g. counting restricted tensions or flows can be modelled as the partition functions of a complex spin system (see ) and the number of homomorphisms into any fixed graph can be modelled as the partition function of a complex edge-coloring model (see ).
A further important aspect of our work is to highlight the explicit relation between the (absence of complex) roots of a graph polynomial and efficient algorithms to evaluate it. Indeed, in Remark 1.3 below we give the explicit connection between a conjecture of Sokal on zero-free regions of the chromatic polynomial and the notorious algorithmic problem of efficiently approximating the number of proper colorings in a bounded degree graph.
Our approach combines a number of ingredients including ideas from sparse graph limits , results on the locations of zeros of graph polynomials and partition functions and an algorithmic development due to Barvinok . The Taylor approximation technique of Barvinok has been used to construct deterministic quasi-polynomial-time approximation algorithms for evaluating a number of graph partition functions (for general graphs); see e.g. work by Barvinok , by Barvinok and Sobeŕon , and by the second author . We refer to Barvinok’s recent book for more background.
The approach can be roughly described as follows. First the problem of evaluating the partition function or graph polynomial is cast as the evaluation of a univariate polynomial. Next, a region is identified where this polynomial does not vanish; hence in this region the logarithm of the polynomial is well-approximated by a low-order Taylor approximation (of order , where in the degree of the polynomial). Finally we must compute this Taylor approximation by efficiently computing the first coefficients of the polynomial. So far this approach has only resulted in algorithms that run in quasi-polynomial time. The main technical contribution of the present paper is a polynomial-time algorithm for computing (essentially) the first coefficients of a large class of graph polynomials whenever we work with bounded degree graphs cf. Theorem 3.1, and we believe it to be of independent interest.
Below we shall state and discuss some concrete results that can be obtained by combining this approach with (known) results on the location of roots of graph polynomials and partition functions. In particular, we obtain new deterministic polynomial-time algorithms (FPTAS) for evaluating the independence polynomial, the Tutte polynomial, and computing partition functions of spin and edge-coloring models in the case of bounded degree graphs. Before we state our algorithmic results, we first need a definition. Since we will approximate polynomials at complex values, we define what it means to be a good approximation.
The independence polynomial of a graph is denoted by and is defined as
In Weitz proved, based on the correlation decay method, that if , where
then there exists a deterministic algorithm, which given a graph of maximum degree at most and , computes a multiplicative -approximation to in time . Sly and Sun proved this is tight by showing that, as soon as , one cannot efficiently approximate unless NP=RP.
In Section 4 we prove the following result, which has been independently obtained by Harvey, Srivastava and Vondrák using the correlation decay method.
From the proof of Theorem 1.1 it follows that the running time is in fact bounded by
for some absolute constants .
Theorem 1.1 in fact also applies to the multivariate independence polynomial, as we will briefly explain in Subsection 4.2.
For positive valued our result is weaker than Weitz’s result since . However our result works for negativeIn an unpublished note Srivastava notes that the correlation decay method of Weitz in fact also applies to negative as long as . and even complex . The case is relevant due to its connection to the Lovász local lemma, cf. . We remark here that by very recent results of Peters and the second author confirming a conjecture of Sokal , and by the method from Subsection 4.3 below, we are able to obtain an alternative proof of Weitz’s result. We say more about this in Section 8.
As an extension to Theorem 1.1, we are able to efficiently approximate the independence polynomial on almost the entire complex plane for the special class of claw-free graphs. We make use of a result of Chudnovsky and Seymour stating that the independence polynomial of a claw-free graph has only negative real roots. We prove the following result in Subsection 4.3.
Note that when is the line graph of some graph we have that is equal to the matching polynomial of . So in particular, Theorem 1.2 implies a result of Bayati, Gamarnik, Katz, Nair, and Tetali . Our proof of it however is entirely different from the proof in .
2 The Tutte polynomial
The random cluster formulation of the Tutte polynomial of a graph is a two-variable polynomial, which is denoted by and is defined by
where denotes the number of components of the graph . In particular, if , is equal to the chromatic polynomial of .
Jerrum and Sinclair showed that when and there exists a randomized polynomial-time approximation algorithm for computing evaluations of the Tutte polynomial in general. In Goldberg and Jerrum showed that approximating evaluations of the Tutte polynomial on general graphs for and is as hard as counting independent sets in bipartite graphs and in Goldberg and Jerrum showed that for several choices of real parameters it is even #P-hard to approximate the evaluation of the Tutte polynomial on general graphs. Goldberg and Guo looked at the complexity of approximately evaluating the Tutte polynomial for general graphs at complex values.
We will consider the Tutte polynomial as a univariate polynomial by considering to be constant. In Section 5 we prove the following result.
From the proof the Theorem 1.3 it follows that the running time is in fact bounded by
for some absolute constants .
The constant in the theorem above comes from a paper of Jackson, Procacci and Sokal and unfortunately takes half a page to state exactly. However, when satisfies (this includes the chromatic polynomial), the constant may be taken to be .
Sokal [30, Conjecture 21] conjectured that as long as . Combined with our results (and the technique from Section 4.3) a confirmation of the conjecture would imply an efficient approximation algorithm for computing the number of -colorings of any graph of maximum degree at most , a notorious problem in computational counting.
3 Partition functions of spin models
If is the adjacency matrix of some graph , then is equal to the number of graph homomorphisms from to . In is called the graph homomorphism partition function.
Building on a line of research started by Dyer and Greenhill and Bulatov and Grohe , a full dichotomy theorem has been proved for the complexity of exactly computing the partition function of a complex spin model by Cai, Chen and Lu . This dichotomy essentially says that computing the partition function of exactly is #P hard unless the matrix has some special structure.
Building on the work of Barvinok and Sobéron we prove in Section 6 the following result.
The constant can be replaced by if , and by if is large enough, cf. .
In Barvinok and Soberón introduced partition functions of graph homomorphisms of with multiplicities and gave a quasi-polynomial-time algorithm for computing them for certain matrices. In Section 6 we will show that our results also apply to these partition functions.
4 Partition functions of edge-coloring models
Just as for partition functions for spin models much work has been done to establish a complexity dichotomy result for exactly computing Holant problems; see . Not much is known about the complexity of approximating partition functions of edge-coloring models except for a few special cases. As already mentioned, Bayati, Gamarnik, Katz, Nair, and Tetali found an efficient approximation algorithm for counting matchings in bounded degree graphs and Lin, Liu and Lu found efficient approximation algorithms for counting edge covers. Both of these algorithms are based on the correlation decay method.
Building on work of the second author we will prove the following result in Section 7.
The constant may be replaced by if and by if is large enough; see . Moreover, for readers familiar with the orthogonal group invariance of these partition functions, it is interesting to note that one can use Corollary 6b from to find a much larger family of edge-coloring models for which the partition function can be efficiently approximated.
5 Organization
In the next section we shall consider an algorithm due to Barvinok to approximate evaluations of polynomials. Section 3 contains our main technical contribution: we will introduce a class of graph polynomials and give an efficient algorithm for computing their low order coefficients on bounded degree graphs. These two algorithms (or variations of them) will then be combined in Sections 4–7 to prove the results above. These sections can be read independently of one another. Finally, we conclude in Section 8 with some remarks and questions.
Approximating evaluations of polynomials
In this section we present an algorithm due to Barvinok to approximate evaluations of polynomials. We take a slightly different approach and give full details for the sake of completeness.
This can then be transformed to give a multiplicative approximation to . It will be more convenient for us to use a slightly different form of (6) which we derive below.
Thus defining the th inverse power sum to be we see that
In the next proposition we derive a variant of the Newton identities that relate the inverse power sums and the coefficients of the polynomial.
For the polynomial as above and its inverse power sums as defined above, we have for each that
From (7) we know that for we have . Differentiating both sides and multiplying by we obtain
Comparing coefficients of on each side gives the desired identity. ∎
The next lemma shows that the quality of the approximation (6) and hence (7) depends on the location of the complex roots of .
Let . Then, as , we have . We will first show that
By assumption we know that for each . Hence and so . Substituting this in into (9) and using that we obtain (8).
Take , where is chosen such that and (so it is easy to check that e.g. suffices). Then the right-hand side of (8) is at most . Write . Then we have and similarly . (This follows from the fact that for a complex number , we have .) Moreover, the angle between and is bounded by . This shows that is a multiplicative -approximation to . ∎
From (7) and Lemma 2.2, if we have an efficient way of computing the inverse power sums from up to (which by Proposition 2.1 is essentially equivalent to computing the first coefficients of ), then we have an efficient way of approximating evaluations of at points in the disk around zero where is nonvanishing. We formalize this in the corollary below. In the next section we will show that for certain types of graph polynomials we can compute the inverse power sums efficiently.
The corollary is immediate from (6), (7) and Lemma 2.2. ∎
Computing coefficients of graph polynomials
In this section we present our main technical contribution, which is an efficient way to compute the inverse power sums (and hence the coefficients) of a large class of graph polynomials for bounded degree graphs. Throughout, we will focus on graph polynomials whose coefficients can be expressed as linear combinations of induced subgraph counts. Note that in this section we make no assumptions on the locations of the roots of polynomials. The results in this section are stated only for graphs, but are in fact valid for multigraphs. So the reader could read multigraph instead of graph everywhere in this section. (The degree of a vertex in a multigraph is the number of edges incident with the vertex, where a loop is counted twice.)
We start with some definitions after which we state the main result of this section. Two graphs and are said to be isomorphic if there exists a bijection such that for any , we have that if and only if . We say that is an induced subgraph of if there is a subset such that is isomorphic to , the graph induced by . We write for the number of sets such that is isomorphic to (i.e. the number of induced subgraphs of isomorphic to ). Note that if is the empty graph we have for all .
Let be a multiplicative graph polynomial defined by
for every graph , the coefficients satisfy
for each , the coefficients can be computed in time .
If, for example, for each , the coefficient in (10) is equal to the number of independent sets of size in , then it is easy to see that (which is of course the independence polynomial) is a BIGCP. In this case the obvious brute force algorithm to compute the coefficient for an -vertex graph runs in time (by checking all -subsets of ) and if then this is quasi-polynomial time. Our main result of this section is a general algorithm for computing inverse power sums of BIGCPs (and hence the coefficients of BIGCP’s by Proposition 2.1), which when applied to this example, computes in polynomial time even when as long as the maximum degree of is bounded.
The algorithm in the theorem above only has access to the polynomial via condition (ii) in the definition of BIGCP, that is, it relies only on the algorithm which computes the complex numbers .
Assuming , the proof of the theorem above in fact yields a running time of , where can be explicitly determined (and does not depend on and ) and where we can crudely take , where and are the constants from the definition of BIGCP.
Before we prove Theorem 3.1 we will first gather some facts about induced subgraph counts and the number of connected induced subgraphs of fixed size that occur in a graph which we will need for the proof.
where for a graph , is the number of ordered pairs of subsets of , , such that and is isomorphic to and is isomorphic to . In particular, given and , is nonzero for only a finite number of graphs .
Computing the parameter is generally difficult, but it becomes easier if is connected (and is not too large) and has bounded degree.
there is an -time algorithm, which, given any -vertex graph with maximum degree at most , checks whether ;
there is an -time algorithm, which, given any -vertex graph with maximum degree at most , computes the number .
Note that Lemma 3.2 (i) enables us to test for graph isomorphism between bounded degree graphs when .
Let us list the vertices of , in such a way that for vertex has a neighbour among . Then to embed into we first select a target vertex for and then given that we have embedded with there are at most choices for where to embed . After iterations, we have a total of at most potential ways to embed and each possibility is checked in the procedure above. Hence we determine if is zero or not in time.
The procedure above gives a list (of size at most ) of all sets such that is isomorphic to , although the list may contain repetitions. It takes time to eliminate repetitions (by comparing every pair of elements in ), and the length of the resulting list gives the value of . ∎
Next we consider how to enumerate all possible connected induced subgraphs of fixed size in a bounded degree graph. We will need the following result of Borgs, Chayes, Kahn, and Lovász [10, Lemma 2.1]:
Let be a graph of maximum degree . Fix a vertex of . Then the number of connected induced subgraphs of with vertices containing the vertex is at most .
As a consequence we can efficiently enumerate all connected induced subgraphs of logarrithmic size that occur in a bounded degree graph .
By the previous result, we know that for all .
We inductively construct . For , is clearly the set of singleton vertices and takes time to output.
Given that we have found we compute as follows. We first compute the multiset
Here and takes time to find (assuming is given in adjacency list form). Therefore computing takes time , which is also the size of . Finally we compute the set by removing the repetitions in (by comparing each element with all previous elements), which takes time .
Starting from , we perform the above iteration times, requiring a total running time of .
It remains only to show that contains all the sets we desire. Clearly and assume by induction that contains all of size with connected. Given such that and is connected, take any tree of , remove a leaf and call the resulting set of vertices . Then it is clear that and this implies . ∎
Let be connected. Then for we have , as is connected. Thus is additive. Clearly, linear combinations of additive graph parameters are again additive. This implies that if is supported on connected graphs, then is additive.
Suppose next that is additive. We need to show that if is disconnected. By the previous part of the proof, we may assume that for all connected graphs . Let now with both and nonempty. We may assume by induction that for all graphs of order strictly smaller than we have . Now, by additivity we have
since for . On the other hand we have
As , this implies that and finishes the proof. ∎
2 Proof of Theorem 3.1
for each . By (11), for , the can be expressed as linear combinations of induced subgraph counts of graphs with at most vertices. Since , this implies that the same holds for . By induction, (12), and (13) we have that for each
for certain, yet unknown, coefficients .
Since is multiplicative, the inverse power sums are additive. Thus Lemma 3.5 implies that if is not connected. Denote by the set of connected graphs of order at most that occur as induced subgraphs in . This way we can rewrite (14) as follows:
The next lemma says that we can compute the coefficients efficiently for , where .
There is an -time algorithm, which given a BIGCP and an -vertex graph of bounded maximum degree, computes and lists the coefficients in (15) for all and all .
Using the algorithm of Lemma 3.4, we first compute the sets consisting of all subsets of such that and is connected, for . This takes time bounded by . (Note that the algorithm in Lemma 3.4 computes and lists all the sets for .) We next compute and list the graphs in by considering the set of graphs and removing copies of isomorphic graphs using Lemma 3.2 (i) to test for isomorphism. This takes time at most for each , so the total time to compute and list the is bounded by .
To prove the lemma, let us fix and show how to compute the coefficients , assuming that we have already computed and listed the coefficients for all . Let us fix . By (13), it suffices to compute the coefficient of in for (where we set . By (11), (12) and (14) we know that the coefficient of in is given by
As , the second sum in (16) is over at most pairs . For each such pair, we need to compute and look up . We can compute in time bounded by since is a BIGCP.
Looking up in the given list requires us to test isomorphism of with each graph in (noting that if by Lemma 3.5). Using Lemma 3.2(i) to test for graph isomorphism, this takes time at most
Here we use Lemma 3.3 to bound . Together, all this implies that the coefficient of in can be computed in time bounded by , and so the coefficient can be computed in time . Thus all coefficients for can be computed and listed in time bounded by . This can be done for each in time . ∎
To finish the proof of the theorem, we compute for each by adding all the numbers over all . This can be done in time
where we use that computing with takes time by Lemma 3.2(ii).
3 Extensions to colored graphs
In this section, we treat the case of colored graphs, which we shall require later. In fact all earlier proofs go through line by line for the colored case, but we chose to avoid excessive generality for the sake of exposition. Here we restate various definitions for the colored case and restate the main theorem.
We can then extend the definitions in the natural way to their colored versions. In particular , , become respectively the set of all vertex (resp. edge) colored graphs, the set of all vertex (resp. edge) colored graphs of order at most , and the set of all connected, vertex (resp. edge) colored induced subgraphs of of order at most . Note that becomes infinite in the colored setting but is finite in the uncolored setting, but this will not matter. The definition of (multiplicative) graph invariant and graph polynomial extend in the natural way to vertex (resp. edge) colored graphs and in particular a BIGCP for vertex (resp. edge) colored graphs is defined in exactly the same way. We need only note that although the sum in part (i) of the definition of BIGCP is infinite in the colored version, all but finitely many terms will be zero when evaluating for a particular choice of colored graph . Now the colored version of Theorem 3.1 reads as follows.
The independence polynomial
Now fix an -vertex graph of maximum degree at most . Let , where is the constant in Corollary 2.3. As the th coefficient of is equal to , where denotes the graph consisting of isolated vertices and as is clearly multiplicative and has constant term equal to , we have that is a BIGCP (taking ). So by Theorem 3.1 we see that for we can compute the first inverse power sums of in time . Noting that the degree of is at most , Corollary 2.3 implies we can compute a multiplicative -approximation to in time . This concludes the proof. ∎
Evaluating the independence polynomial at negative and complex values gives us new information about the distribution of independent sets in a graph, as illustrated by the following example. We denote by the polynomial defined in the same way as the independence polynomial except that in the sum (1), we only allow independent sets whose cardinality is even.
We apply the algorithm of Theorem 1.1 to compute multiplicative -approximations and to and respectively in time . We have
Taking half the sum of these equations and noting that , we see that is a multiplicative -approximation to provided both and have the same sign.
Clearly since the coefficients of are nonnegative real numbers. Also because we know by the result of Scott and Sokal that does not vanish in the interval , and we know is positive in the interval since all the coefficients of are nonnegative real numbers. Hence is positive on the whole interval and in particular . ∎
2 The multivariate independence polynomial
Here we will briefly mention how our results apply to the multivariate independence polynomial. For a graph and a variable for each define
Fix the complex values of , at which we wish to evaluate the multivariate independence polynomial. Now define a univariate graph polynomial by , where is what we wish to estimate. The coefficient of in is then given by the sum over all independent sets of of size , where an independent set is counted with weight . While we can no longer represent this as a linear combination of ordinary induced subgraph counts, we can view this as a linear combination of vertex-colored induced subgraph counts, as we will now explain.
Suppose now that has vertices labelled . We view as a vertex-colored graph by giving the vertex labeled color for . Then . So if has bounded degree, we can by Theorem 3.7 compute the logarithmic order inverse power sums of efficiently, as in the previous section.
The result of Shearer , cf. Scott and Sokal [41, Corollary 5.7] also applies to the multivariate independence polynomial (i.e. is non-zero whenever for all and ). This means is nonzero whenever for some . It then follows that we can efficiently approximate and hence if has maximum degree at most and if all satisfy .
3 The independence polynomial on claw-free graphs
In this subsection, we illustrate a technique of Barvinok for approximating graph polynomials on larger regions of the complex plane by making careful polynomial transformations. We use this technique to prove Theorem 1.2, which shows that we can approximate the independence polynomial of claw-free graphs on almost the entire complex plane. First we require a few preliminary results.
We also require the following lemma of Barvinok .
and and has degree ;
is a bounded strip parallel to the real axis in the complex plane, so is the same strip enlarged by a factor and rotated by an angle . The proposition then follows from elementary trigonometry. ∎
Set and let with . Set
and consider the polynomial . Note that the degree of is since the degree of is at most and the degree of is a constant .
We will use Corollary 2.3 to find a multiplicative -approximation to in time . In order to apply Corollary 2.3 to draw this conclusion, it is enough to check that (i) has no roots in the disk and that (ii) the first inverse power sums of can be computed in time , where is the degree of and is the constant in the statement of Corollary 2.3.
For (ii), we show that we can compute the first coefficients of in time , which is sufficient by Proposition 2.1. Given a polynomial , write . Then we note that , where we crucially use the fact that has no constant term since . In words, to obtain we substitute into and keep the first terms. Thus, in -time we can obtain the first coefficients of if we know the first coefficients of . As is a BIGCP, we can compute its first inverse power sums in time (as in the proof of Theorem 1.1), from which we can find its first coefficients in time by Proposition 2.1. This finishes the proof. ∎
We remark that, for the running time in the algorithm above, the in the exponent depends on and grows exponentially fast in . However, this dependence can be brought down to by adapting Lemma 4.3 as described by Barvinok .
The Tutte polynomial
By a result of Jackson, Procacci and Sokal, cf. [31, Theorem 1.2] (which is valid for loopless multigraphs) we know that there exists a constant depending on and such that for all with we have for all graphs of maximum degree at most . This is exactly opposite to what we need to apply Corollary 2.3, so let us define the graph polynomial by
for any graph . Note that has degree and that if is a multiplicative -approximation to , then is a multiplicative -approximation to , so it is sufficient to find the former.
We will show that for any -vertex graph of maximum degree at most , we can compute the first inverse power sums of in time , where and is the constant in Corollary 2.3. Corollary 2.3 then implies we can compute a multiplicative -approximation to and hence to in time .
We will show that is a BIGCP so that by Theorem 3.1 we can conclude that we can compute the first inverse power sums in time .
Since the Tutte polynomial (as a polynomial in ) is a monic and multiplicative graph polynomial (of degree ), we know that the constant term of equals and that is multiplicative. So it suffices to show conditions (i) and (ii) in Definition 3.1. The coefficient of in equals the coefficient of in and is by definition equal to the sum over all subsets of such that induces a graph with exactly components, where each subset is counted with weight . Let us call a component of a graph nontrivial if it consists of more than one vertex. Suppose some subset of the edges induces components of which are nontrivial. Then we have isolated vertices and so the graph , consisting of the union of these nontrivial components, has vertices and components. Thus we have a correspondence between subsets of that induce a graph with exactly components and subgraphs of with no isolated vertices satisfying . Therefore, writing for the minimum degree of the subgraph , the coefficient of in can be expressed as
In fact the first sum can be taken over graphs with at most vertices. This is because and
From (18), we can compute the coefficient of by checking all subsets of in time . This implies that is a BIGCP (taking and ). ∎
Csikvári and Frenkel introduced graph polynomials of bounded exponential type and showed that these polynomials have bounded roots on bounded degree graphs. This was utilized in to give quasi-polynomial-time approximation algorithm for evaluations of these polynomials. The Tutte polynomial with the second argument fixed is an example of such a polynomial. We remark here that the proof given above for the Tutte polynomial also easily extends to graph polynomial of bounded exponential type. So the algorithm in can be adapted to run in polynomial time on bounded degree graphs.
Partition functions of spin models
In this section we will state and prove a generalization of Theorem 1.4 and we will indicate how our method applies to partition functions of graph homomorphisms with multiplicities.
Let be a graph. Suppose also that for each we have a symmetric -matrix . Let us write . Then we can extend the definition of the partition function of a spin model as follows:
We will refer to as the partition function of . In this is called a Markov random field (if the are nonnegative) and in this is called a multi spin system. Clearly, if all are the same, this just reduces to the partition function of a spin model. We have the following result, which implies Theorem 1.4.
The constant may be replaced by if and by if is large enough; see .
Then and . Barvinok and Soberón [8, Theorem 1.6] showed that there exists a constant such that for all satisfying .
We will show that for any -vertex graph of maximum degree at most , we can compute the first inverse power sums of in time , where and is the constant in Corollary 2.3. Noting that the degree of is at most , Corollary 2.3 implies we can compute a multiplicative -approximation to in time . So it remains to show that we can compute the first inverse power sums of in time .
For a subset of , define to be the edge-colored graph induced by the edges in . The vertex set of consists of those vertices incident with edges in and hence has size at most . Then we see that the coefficient of in (21) can be written as follows:
where we interpret as the collection of edge-colored graphs on at most vertices. This shows how to extend to edge-colored graphs. The inner sum in (22) can be computed in time , and clearly has constant term equal to and it is multiplicative. This implies that the extension of to edge-colored graphs is a BIGCP (with constant and ) and so Theorem 3.7 implies that we can compute the first inverse power sums of in time bounded by . This finishes the proof. ∎
2 Partition functions of graph homomorphisms with multiplicities
We refer to for more details and background on this type of partition function.
Building on a result from Barvinok and Soberón [9, Section 2] and using exactly the same proof as above we directly establish the following:
Partition functions of edge-coloring models
In this section we state and prove a generalization of Theorem 1.5. It is along the same lines as the generalization of Theorem 1.4 in the previous section. The proof also goes along the same line, but as we will see below there are some details that are different.
Let be a graph. Suppose that we have -color edge-coloring models for each . Let us write . Often the pair is called a signature grid, cf. . Then we can extend the definition of the partition function of an edge-coloring model as follows:
We will refer to as the partition function of . Clearly, if all are equal we obtain the ordinary partition function of an edge-coloring model. It is also called the Holant problem of the signature grid cf. . We have the following result, which implies Theorem 1.5.
The constant may be replaced by if and by if is large enough; see . Moreover, for readers familiar with the orthogonal group invariance of these partition functions one can use Corollary 6b from to find a larger family of edge-coloring models for which the partition function can be efficiently approximated.
Observe that and that is a polynomial of degree at most . So, just as in the previous section, the problem of approximating the partition function is replaced by approximating an evaluation of a univariate polynomial.
By Corollary 6a from (which is valid for multigraphs) there exists such that whenever . We will show (in Theorem 7.2) that for any -vertex graph of maximum degree at most , we can compute the first inverse power sums of in time , where and is the constant in Corollary 2.3. Noting that the degree of is at most , Corollary 2.3 implies we can compute a multiplicative -approximation to in time .
Ideally we would like to do this using Theorem 3.1 just as in the proof of Theorem 6.1. Since partition functions of edge-coloring models are multiplicative, the polynomial is also multiplicative and it has constant term equal to . So to be able to apply Theorem 3.1 we need only check that the coefficients of can be expressed as linear combinations of (colored) induced graph counts. This is in fact proved in if all are equal, but there it is not clear whether the coefficients in (11) can be computed efficiently. So instead of directly applying Theorem 3.1 we will have to do a little more work, which we postpone to the next section. ∎
2 Computing coefficients of q(G)(z)𝑞𝐺𝑧q(G)(z)
where for , denotes the set of edges of that are incident with at least one vertex of .
The second sum inside the brackets of the third line of (26) is almost the partition function of , except that the pair may not actually be a graph as some of the edges of are not spanned by . We will refer to such a graph-like structure as a fragment and the edges in that are ‘sticking out’ (i.e. not spanned by ) as half edges. Formally, a fragment, is a pair , where is a vertex-colored graph and where is a map , which records the number of half edges incident with each vertex. Suppose has vertices labeled . From now on we will consider the graph as a vertex-colored graph, where vertex gets color for . For we let be the fragment where is equal to the number of edges that connect with . Note that the graph itself can be thought of as a fragment by taking the map to be for all .
Clearly, for each of size the expression inside the second sum of the third line of (26) only depends on the isomorphism class of the fragment . (An isomorphism from a fragment to a fragment is an isomorphism of the underlying vertex-colored graphs and such that for each , .) For a fragment let denote the set of edges of including half edges and let denote the vertex set of the underlying graph . Assume that for each we have a -color edge coloring-model and let Then define,
Here we implicitly identify the the color of a vertex of with the vertex itself. Define for a fragment , to be the number of sets of size such that is isomorphic to . Writing , we can rewrite (26) as
where the sum runs over fragments. This shows how to extend to vertex-colored graphs. Let us denote the coefficient of in (28) by . In it is proved that in case all are equal, can be expressed as a linear combination of the parameters for certain graphs . As mentioned above, the coefficients in this expression may not be easy to compute (at least we do not know how to do this). So we will have to work with the parameters instead. This is not a severe problem, since essentially if we replace ind in (11) by , then Theorem 3.1 remains valid. Indeed, we have the following theorem.
The proof of Theorem 7.2 follows the same line as the proof of Theorem 3.1. Essentially we need to replace graphs by fragments in the proof and check that everything remains valid. For completeness we will give the proof.
We first need to note that for a fragment the graph parameter can be extended to the collection of all fragments as follows: for a fragment we let denote the number of sets such that is isomorphic to as vertex-colored graphs and such that for each vertex of we have that the number of neighbours of in is equal to . Then for two fragments and we have
where the sum runs over all fragments and where for a fragment , denotes the number of pairs of subsets of such that and and . (Here is the fragment induced by , i.e., if , then where for we set .) We call a fragment connected if the graph is connected. We now adapt some of the statements and proofs of the results in Section 3 to include fragments.
Note that Lemma 7.3 enables us to test for isomorphism of fragments between bounded degree fragments when .
This follows immediately from the proof of Lemma 3.2. We apply the proof of Lemma 3.2 to the underlying graphs and then remove any potential embedding that either violates the vertex coloring constraints or the constraints that imposes. ∎
Concluding remarks and open questions
In this paper we have presented a direct connection between the absence of complex roots for a large class of graph polynomials (BIGCPs) and the existence of (deterministic) algorithms to efficiently approximate evaluations of these polynomials. We have illustrated its use by giving deterministic polynomial-time approximation algorithms for evaluations of the Tutte polynomial, the independence polynomial and graph polynomials obtained from spin and edge-coloring models at complex numbers on bounded degree graphs.
As is noted in the introduction Theorem 1.1 does not allow us to efficiently approximate the independence polynomial at for , while this can be done with the correlation decay approach cf. Weitz . However, confirming a conjecture of Sokal , Peters and the second author proved the following:
for all , we have .
Now combining this result with the approach in Section 4.3, it follows that with the methods in this paper we can efficiently approximate the independence polynomial at for , thereby giving a different proof of Weitz’s result.
Let us restate another conjecture of Sokal [30, Conjecture 21], which, if true, would by the methods of the present paper imply that we have an efficient algorithm for approximately counting the number of -colorings in any graph of maximum degree at most .
This connection between absence of complex roots and efficient approximation algorithms naturally leads to the question of how hard it is to approximate evaluations of these graph polynomials close to (complex) roots. In light of this we remark that some progress on this question has been made. As mentioned in the introduction, there exists a sequence of trees of maximum degree at most and with such that . This was utilized by Galanis, Goldberg and Štefankovič, to show that it is NP hard to approximate when .
Another question that arises naturally is the following. Barvinok found quasi-polynomial-time approximation algorithms for computing the permanent of certain matrices, based on absence of zeros. Our method for computing inverse power sums of BIGCPs on bounded degree graphs presented in Section 3 does not seem to apply to permanents of general matrices. It would be very interesting to find a more general method that also applies to permanents.
Our algorithmic results in Section 3 can be interpreted as giving a fixed parameter tractability result for determining for certain graphs . If has bounded degree, the algorithm runs in time . However, the algorithm only works for graphs for which are coefficients of a multiplicative graph polynomial. Very recently, we were able to extend the algorithm to all graphs ; see . A natural question is whether our approach can be extended to other classes of graphs such as planar graphs for example. More concretely, let us state the following question.
Acknowledgements
We thank Alexander Barvinok for stimulating discussions, useful remarks and for sharing the results in with us. We thank Andreas Galanis for informing us about . We are grateful to Pinyan Lu for some useful remarks on an earlier version of this paper.
We moreover thank the anonymous referees for helpful comments and suggestions, improving the presentation of the paper.