Polynomial time randomised approximation schemes for the of dense graphs

Noga Alon∗ Alan Frieze† Dominic Welsh‡

Abstract (iii) How many acyclic orientations has G?

The Tutte-Gr¨othendieck polynomial T (G; x, y) of a graph Each of these is a special case of the general problem of G encodes numerous interesting combinatorial quanti- evaluating the Tutte polynomial of a graph (or matroid) ties associated with the graph. Its evaluation in various at a particular point of the (x, y)-plane — in other words points in the (x, y) plane give the number of spanning is a Tutte-Gr¨othendieck invariant. Other invariants in- forests of the graph, the number of its strongly connected clude: orientations, the number of its proper k-colorings, the (all terminal) reliability probability of the graph, and var- (iv) the chromatic and flow polynomials of a graph; ious other invariants the exact computation of each of which is well known to be #P -hard. Here we develop (v) the partition function of a Q-state ; a general technique that supplies fully polynomial ran- domised approximation schemes for approximating the (vi) the Jones polynomial of an alternating link; value of T (G; x, y) for any dense graph G, that is, any graph on n vertices whose minimum degree is Ω(n), (vii) the weight enumerator of a linear code over GF (q). whenever x 1 and y 1, and in various additional ≥ ≥ points. This region includes evaluations of reliability and It has been shown in Vertigan and Welsh [19] that apart partition functions of the ferromagnetic Q-state Potts from a few special points and 2 special hyperbolae, the model. exact evaluation of any such invariant is #P -hard even for the very restricted class of planar bipartite graphs. However the question of which points have a fully poly- 1 Introduction nomial randomised approximation scheme (fpras) is wide open. A survey of what is currently known is given in [21], here we prove several new results concerning the Consider the following very simple counting problems existence of a fpras for dense graphs. More precisely, for associated with a graph G. 0 < α < 1, let α denote the set of graphs G = (V,E) with V = n andG δ(G) αn. A graph is α-dense if it is | | ≥ (i) What is the number of connected subgraphs of G? a member of α or, somewhat loosely, dense if we omit the α. G (ii) How many subgraphs of G are forests? Various counting and approximation problems are ∗Department of Mathematics, Raymond and Beverly Sackler known to be easier for graphs of sufficiently high den- Faculty of Exact Sciences, Tel Aviv University, Tel Aviv, Israel. sity than for general graphs. The number of perfect Email: [email protected]. Research supported in part by a matchings in bipartite graphs (which is not an evalua- USA-Israeli BSF grant and by the Fund for Basic Research ad- tion of the Tutte polynomial) is one such example. The ministered by the Israel Academy of Sciences. results of Broder [3] and of Jerrum and Sinclair [10] sup- †Department of Mathematics, Carnegie Mellon University, Pittsburgh PA15213, U.S.A., Supported by NSF grant CCR- ply a fpras for approximating that number for graphs 9225008 on two vertex classes of n vertices each which are (1/4)- ‡Merton College and Mathematical Institute, Oxford, UK. Re- dense. Dyer, Frieze and Jerrum [5] found an fpras for the search supported in part by ESPRIT RAND. number of Hamilton cycles in graphs which are α-dense

1 when α > 1/2. Annan [2] obtained a fpras for the num- First recall that if A E(G), the rank of A, r(A) is ber of forests of a dense graph (given by the value of the defined by ⊆ Tutte polynomial at (2, 1)). Edwards [6] showed that the number of proper k colorings of sufficiently dense graphs r(A) = V (G) k(A), (given by evaluating the Tutte polynomial at (1 k, 0)) | | − can be computed exactly in polynomial time, whereas− where k(A) is the number of connected components of it is clear that this number cannot be approximated in the graph G : A having vertex set V = V (G) and edge polynomial time for general graphs unless RP = NP . set A. Our main new result is a general technique that supplies It is now straightforward to prove: fully polynomial randomised approximation schemes for The Tutte polynomial T (G; x, y) can be expressed in the approximating the value of T (G; x, y) for any dense form graph G, whenever x 1 and y 1, and in various additional points. ≥ ≥ r(E) r(A) A r(A) T (G; x, y) = (x 1) − (y 1)| |− . The graph terminology used is standard. The complexity X − − A E theory and notation follows Garey and Johnson [8]. The ⊆ matroid terminology follows Oxley [13]. Further details of most of the concepts treated here can be found in These ideas can be extended to matroids - see for exam- Welsh [20]. ple [4] and [20].

2 Tutte-Gr¨othendieck invariants 3 A catalogue of invariants

First consider the following recursive definition of the We now collect together some of the naturally occurring function T (G; x, y) of a graph G, and two independent interpretations of the Tutte polynomial. Throughout G variables x, y. is a graph, M is a matroid and E will denote E(G),E(M) respectively. If G has no edges then T (G; x, y) = 1, otherwise for any e E(G); ∈ (3.1) At (1,1) T counts the number of bases of M (span- ning trees in a connected graph). (2.1) T (G; x, y) = T (Ge0 ; x, y)+T (Ge00; x, y) if e is neither a loop nor an isthmus, where Ge0 denotes the deletion (3.2) At (2,1) T counts the number of independent sets of the edge e from G and Ge00 denotes the contraction of M, (forests in a graph). of e in G, (3.3) At (1,2) T counts the number of spanning sets of

(2.2) T (G; x, y) = xT (Ge0 ; x, y) e an isthmus, M, that is sets which contain a base.

(2.3) T (G; x, y) = yT (Ge00; x, y) e a loop. (3.4) At (2,0), T counts the number of acyclic orienta- tions of G. Stanley [17] also gives interpretations of From this, it is easy to show by induction that T is a T at (m, 0) for general positive integer m, in terms 2-variable polynomial in x, y, which we call the Tutte of acyclic orientations. polynomial of G. (3.5) Another interpretation at (2,0), and this for a dif- In other words, T may be calculated recursively by ferent class of matroids, was discovered by Zaslavsky choosing the edges in any order and repeatedly using [23]. This is in terms of counting the number of (2.1-3) to evaluate T . The remarkable fact is that T is different arrangements of sets of hyperplanes in n- well defined in the sense that the resulting polynomial is dimensional Euclidean space. independent of the order in which the edges are chosen. E d(B) (3.6) T (G; 1, 1) = ( 1)| |( 2) where B is the Alternatively, and this is often the easiest way to prove bicycle− space− of G,− see Read− and Rosenstiehl [15]. properties of T , we can show that T has the following When G is planar it also has interpretations in terms expansion. of the Arf invariant of the associated knot.

2 (3.7) The chromatic polynomial P (G; λ) is given by (3.15) Along the hyperbola xy = 1 when G is planar, T specialises to the Jones polynomial of the alternat- ing link or knot associated with G. This connection P (G; λ) = ( 1)r(E)λk(G)T (G; 1 λ, 0) − − was first discovered by Thistlethwaite [18]. where k(G) is the number of connected components. More details on these topics can be found in Welsh [20] (3.8) The flow polynomial F (G; λ) is given by and other more specialised interpretations can be found in the survey of Brylawski and Oxley [4]. E r(E) F (G; λ) = ( 1)| |− T (G; 0, 1 λ). − − (3.9) The (all terminal) reliability R(G; p) is given by 4 The ferromagnetic random

E r(E) r(E) cluster model R(G; p) = q| |− p T (G; 1, 1/q)

where q = 1 p. As we mentioned above, as Q varies between 0 < Q < , − T evaluates the partition function of the random cluster∞ model. For integer Q this is the Q-state Potts model and In each of the above cases, the interesting quantity (on when Q = 2 it is the . When x 1 and y 1, the left hand side) is given (up to an easily determined we have the region corresponding to ferromagnetism≥ ≥. In term) by an evaluation of the Tutte polynomial. We shall the case Q = 2 we know from Jerrum and Sinclair [11] use the phrase “specialises to” to indicate this. Thus for that there is a fpras for all G. Here we obtain a similar example, along y = 0, T specialises to the chromatic result for general Q but only for the dense case. polynomial. For the remainder of this paper, except for Sections 8, we It turns out that the hyperbolae Hα defined by assume that we are dealing with the Tutte polynoomial of an α-dense graph G.

Hα = (x, y):(x 1)(y 1) = α { − − } A first easy, but essential, observation is the following. Let G denote the obtained by selecting play a special role in the theory. We note several impor- p edges of G independently with probability p. tant specialisations below.

E r(E) E Lemma 1 Assume G is connected with n vertices and (3.10) Along H1, T (G; x, y) = x| |(x 1) −| |. − m edges. Assume x, y > 1 and let p = (y 1)/y and − (3.11) Along H2; when G is a graph T specialises to the Q = (x 1)(y 1). Let κ = κ(Gp) be the number of − − partition function of the Ising model. components of Gp. Then

(3.12) Along HQ, for general positive integer Q, T spe- ym cialises to the partition function of the Potts model T (G; x, y) = E(Qκ). (x 1)(y 1)n of . These quantities are useful in − − simulations or computations of the probabilities of configrations of spins on the vertices of the graph. Proof

n 1 r(A) A r(A) (3.13) Along H , when q is a prime power, for a ma- T (G; x, y) = (x 1) − − (y 1)| |− q X − − A E troid M of vectors over GF (q), T specialises to the ⊆ weight enumerator of the linear code over GF (q), κ(A) 1 A +κ(A) n = (x 1) − (y 1)| | − determined by M. X − − A E ⊆ (3.14) Along Hq for any positive, not necessarily inte-

ger, q, T specialises to the partition function of the where κ(A) is the number of components of GA = (V,A). random cluster model introduced by Fortuin and Thus Kasteleyn [7].

3 We first prove T (G; x, y) = Lemma 3 In the notation of Lemma 1. Let m A m A y y 1 | | 1 −| |  −    ˆ (x 1)(y 1)n X y y × 32 ln(nQ) 10/α A E n0 = min (n : n max ( ,Q )) . − − ⊆ ≥ α3p2 ((x 1)(y 1))κ(A) = − − If n n then ym 0 Qκ(A)Pr(G = G ). ≥ (x 1)(y 1)n X p A A E (a) Q 1 implies − − ⊆ ≥ 2 E(Q2κ) 2Q2s. ≤ We now describe a property of dense graphs which is the (b) Q < 1 implies key to much of the ensuing analysis. E(Qκ) Qs/2. Define G∗ = (V,E∗) by (u, v) E∗ iff N(u) N(v) ≥ α2n/2. ∈ | ∩ | ≥ Proof Let the components of G∗ be C1,C2,...Cρ, ρ s. Let t de- ≤ 2E Lemma 2 G∗ has at most s = 2/α 1 components. note the event κ(Gp) > tρ for 1 t t0 = α n/8 . d e − { } ≤ ≤ d e If t occurs then at least one Ci must contain vertices E Proof Suppose that G∗ has more than s compo- from t + 1 distinct components of Gp. In this case let nents. Then there exist v1, v2, . . . vs+1 such that N(vi) x1, x2, . . . xt+1 be in the same component of G∗ but in 2 | ∩ N(vj) < α n/2 if i = j. But then different components of G . The probability that G | 6 p p contains no path of length 2 connecting x2i 1 to x2i for s+1 s+1 −2 K each i, 1 i (t + 1)/2 is at most (1 p ) , where N(vi) N(vi) N(vi) N(vj) 2 ≤ ≤ b c − [ ≥ X | | − X | ∩ | K = (α n/2 2t)t/2. Hence, for t t0, n n0, i=1 i=1 i=j − ≤ ≥ 6 t+1 2 K s + 1 α2n Pr( t) n (1 p ) > (s + 1)αn E ≤ −   2 α2p2n/8 t − 2 2 (n e− ) . sα ≤ = (s + 1)αn 1 Thus for t t0, n n0  − 4  ≤ ≥ 2 ˆ t n. Pr( t) (n exp 4 ln(nQ)/α ) ≥ E ≤ {− } = (n2 4/αQˆ 4/α)t. 2 − − ˆ 1 m n Suppose first that Q 1. Then Let Q = max Q, Q− and ζ = y /((x 1)(y 1) ). ≥ { } − − t0 We claim that the following algorithm estimates 2κ 2ρ 2tρ ! 2n E(Q ) Q 1 + Q Pr( t) + Q Pr( t0 ) T (G; x, y) for G α. ≤ X E E ∈ G t=1 t0 Algorithm EVAL 2ρ 2 4/α 2ρ 4/α t Q 1 + (n − Q − ) ! begin X ≤ t=1 y 1 p := − ; Q := (x 1)(y 1); y 2n (2 4/α)(α2n/8) ˆ2s 2 − − +Q n − t := 16Q − ; 2ρ for id= 1 to t doe 2Q , ≤ begin which deals with (a). Generate Gp; κ(Gp) Zi := Q Suppose now that Q < 1. Then end κ ρ E(Q ) Q (1 Pr( 1)) Z˜ := Z1+Z2+ +Zt ; ≥ − E t ··· Qρ/2 Output Z = ζZ˜ ≥ end for n n0, which deals with (b). 2 ≥

4 Theorem 1 For fixed rational x, y, and  > 0, if T = 5 Reliability - (x = 1, y 1) T (G; x, y) and Z is the output of Algorithm EVAL, then ≥ The question here is: given a connected graph G and a 1 Pr Z T T . rational p, 0 < p < 1, can we efficiently estimate the {| − | ≥ } ≤ 4 reliability probability,

Z1+...+Zt φ(p) = φ(G, p) = Pr(Gp is connected). Proof Since Z = ζ t , from Lemma 1 we see that T = E(Z). From Chebychev’s inequality This is well known to be a #P -hard problem, but ap- Var(Z) proximation algorithms for p very large and G planar, Pr Z T T have been found by Karp and Luby [12]. Here we 2T 2 {| − | ≥ } ≤ show that fully polynomial randomised approximation 2 ζ Var(Zi) schemes exist for estimating reliability for the class of ≤ 2t T 2 dense graphs for all vaues of p. Consider the following ζ2 E(Z2) algorithm: i . ≤ 2t T 2 Algorithm RELIABILITY Case Q < 1 begin s 2 Lemma 3 gives t := 4p− − ; for id= 1 to tedo 2 2κ(Gp) E(Zi ) = E(Q ) 1 begin 2 2 2 ≤ 2 k 2 Generate G ; T = ζ (E(Zi)) = ζ (E(Q )) p 2 2s 1 Gp is connected ζ Q /4 Zi =  ≥ 0 Gp is not connected giving end Z1+Z2+ +Zt 4 Z = t ··· ; Pr Z T T . Output Z {| − | ≥ } ≤ 2tQ2s end Case Q 1 ≥ Theorem 2 The above algorithm is a fpras for estimat- ing the reliability probability in the class of dense graphs. ζ2 E(Q2κ) Pr Z T T {| − | ≥ } ≤ 2t T 2 Proof We have to show that for n sufficiently large, 2Q2s the output Z satisfies ≤ 2t 1 Pr( Z φ(p) φ(p)) . using Lemma 3, and noticing that for Q 1, T ζ. 4 ≥ ≥ | − | ≥ ≤ The result follows provided Clearly E(Z) = φ(p) and Var(Z) = φ(p)(1 φ(p))/t. Applying the Chebychev inequality − 16 t (Q < 1) ≥ 2Q2s Var(Z) Pr( Z φ(p) φ(p)) 2φ(p)2 and | − | ≥ ≤ 8Q2s 1 t (Q 1), ≥ 2 ≥ ≤ t2φ(p) 1 which it is by choice of t in EVAL. 2 , ≤ 4 Note: although polynomially bounded the running time grows when provided (x 1)(y 1) or its inverse grow. φ(p) ps. (1) − − ≥

5 We now prove that (1) holds for n sufficiently large. cyclic, that is, every edge belongs to a directed cycle. As in the proof of Lemma 3 let G∗ have components Equivalently, an orientation of a connected graph G is to- C1,C2,...,Cρ. Consider the multi-graph G˜ with ver- tally cyclic if the resulting digraph is strongly connected. tices 1, 2, . . . , ρ and an edge (i, j) for each edge of G Whereas we cannot see how to find a fpras for the number joining{ C to C}. In other words, G˜ is obtained from i j of acyclic orientations, even in dense graphs, we show G by contracting each component C of G to a single i ∗ that at (0,2) this is possible. vertex i. Since G is connected, G˜ contains a spanning tree. Let X be a fixed spanning tree of G. Here the question is: if we randomly orient the edges of G to form a digraph G~ , can we estimate the probability Now G is connected if (i) G X and (ii) for each i p p ψ(G) that G~ is strongly connected. We assume that G and all u, v C there exists w⊇such that G contains i p has no bridges, else ψ(G) = 0. We use the following the path u, w,∈ v. Thus if A is the event (i) and B is the i algorithm. event (ii) then

Pr(Gp is connected) P (A B1 ... Bρ) Algorithm CONNECT ≥ ∩ ∩ ∩ ρ begin 2 2s+1 P (A) P (Bi) t := − 2 ≥ Y d e i=1 for i = 1 to t do begin using the FKG inequality. Generate G~ ; 1 G~ is strongly connected Clearly Z = ρ 1 i  ~ P (A) = p − . 0 G is not strongly connected. end For fixed u, v C , the probability no (u, w, v) path i Z = Z1+ +Zt ; exists is not more∈ than ···t Output Z 2 (1 p2)α n/2. end − Hence Clearly E(Z) = ψ(G) and Var(Z) = ψ(G)(1 ψ(G))/t, 2 − 2 α n/2 Ci so Chebychev’s inequality gives P (Bi) 1 (1 p ) | |. ≥ − − 2 1 Thus Pr Z ψ(G) ψ(G) {| − | ≥ } ≤ t2ψ ρ ρ 1 2 α2n/2 Ci 1/4 (2) φ(p) p − 1 (1 p ) | | ≤ ≥ Y − − 2 i=1 provided t2ψ 4. ps ≥ ≥ 2 ln(n2/(1 p)) Lemma 4 for n n1 where n1 = α2p2 − . 2 ≥ (2s 1) ψ(G) 2− − , Note also that, for fixed p, the above algorithm works ≥ provided only that the network is not too sparse. Each for n sufficiently large. vertex should have at least Ω(n/ ln n) neighbours.

Proof Consider the multi-graph G˜ defined in the proof of Theorem 2. It is bridgeless, as G is, and so it 6 Strong Connectivity - (x = contains a spanning 2-edge connected subgraph Γ with at most 2ρ 2 edges. Thus by an old result of Robbins 0, y = 2) [16] there are− at least two orientations of Γ which will make it strongly connected. Fix one such orientation w0 By dualising Stanley’s result that T (G; 2, 0) counts the and let be the event that the random orientation is w0. E acyclic orientations of G, we see that T (G; 0, 2) enumer- Then 2 2ρ ates the number of orientations of G which are totally Pr( ) 2 − . E ≥

6 Now G~ is strongly connected if (i) occurs and (ii) for we can deduce that unless Q˜ is close to a root of E every component Ci of G∗ and every u, v Ci there are directed paths of length two from u to v which∈ avoid the ρ i i edges of Γ. For a fixed u, v, the probability of no such ( 1) piz = 0, (3) 2 X − α n/2 2ρ i=1 u, v path, given , is at most (3/4) − and so E κ 1 ˜κ α2n/2 2ρ then E(( 1) − Q ) will be sufficiently large and we 2 2ρ 3 − | − | ψ(G) 2 − 1 n(n 1)   ! will be able to approximate T . ≥ − − 4 If α > 1/2 then Gp is connected whp since every pair 1 2s 2 − of vertices have at least 2(α 1)n common neighbours. ≥ We can then take ρ = 1 in (3)− and there is no problem. provided 2 ln(2n2(4/3)2s) The approach does not seem to yield anything useful for n . α2 ln(4/3) x > 1 and y < 1. Puttingy ˜ = 2 y introduces a factor ≥ A r(A) − ( 1)| |− into the sum which is not easy to deal with. − 2 Combining Lemma 4 with (2) gives: 8 Random Graphs Proposition 1 The randomised algorithm CONNECT is a fpras for estimating the number of totally cyclic ori- Apart from its intrinsic interest, some insight into the entations of dense graphs. limitations of the above methods is gained by considering the case of an input which is a random graph. First fix x, y both strictly greater than 1, as the point at which we aim to approximate T . Now suppose that we 7 Other parts of the Tutte plane apply Algorithm EVAL to an input G, chosen randomly

from n,p1 ; with the slight modification that we allow The above arguments show that in the dense case T has EVALG to run for a time a fpras in the region x 1, y > 1. Annan [2] has dealt ≥ 2 2 with the case y = 1, x 1. τ = 16Qˆ − ≥ d e Now suppose that x < 1 and y > 1. Letx ˜ = 2 x. Then ˆ 1 where as usual Q = (x 1)(y 1) and Q = max Q, Q− . − − − { } n 1 r(A) n 1 r(A) Call this modified version EVAL . T (G; x, y) = ( 1) − − (˜x 1) − − 0 X − − A E ⊆ A r(A) (y 1)| |− Lemma 5 Let Z be the random output of EVAL0. If × − m y κ 1 ˜κ = E(( 1) − Q ) T = T (Gn,p1 ; x, y) then provided (˜x 1)(y 1)n − − − ln n y ˜ p1 8     where κ = κ(Gp) and Q = (˜x 1)(y 1). ≥ n y 1 − − − But 1 κ 1 ˜κ 2 ˜2κ lim Prp1 Pr Z T T  = 1. E((( 1) − Q ) ) = E(Q ) n {| − | ≥ } ≤ 4 − →∞ 2Q˜2ρ, ≤ Our notation is that Pr denotes probabilities com- where ρ is as in the proof of Lemma 3. p1 puted over the space of random graphs Gn,p1 . Prp κ 1 ˜κ So if E(( 1) − Q ) is not too small then one can use denotes (conditional) probabilities computed over the | − | Algorithm EVAL with a suitable value of t. Let pi = space of subgraphs of Gn,p1 . Prp2 denotes probabilities

Pr(κ = i), i = 1, 2, . . . , n. Since pi is negligible for i > ρ computed over Gn,p2 , where p2 = pp1.

7 Proof (Outline.) Recall how EVAL works. On Suppose that there exists a polynomial time algorithm input G and p it successively generates, independently, evaluating T for dense graphs at (a, 1). Then for any 2 3 Gp and then outputs dense G we can find a succession of thickenings G ,G , ... which are also dense and Z1 + ... + Zt Z = ζ   , k t T (G ; a, 1) CT (G; zk, 1) ≈

κ(Gp) where is interpreted as equality up to multiplication where Zi = Q and p = (y 1)/y. Here G is random − by an easily≈ determined constant and from (n, p1) so Gp can be regarded as drawn randomly G from (n, p2). G zk = (a + k 1)/k. − Examining now the proof of Theorem 1, we see that what we need to do is bound E (Z2). This can be done by a Provided a = 1 this gives us enough points to recover p2 6 standard, though somewhat tedius computation, which T (G; 2, 1) by Lagrange interpolation. But Annan [2] has will appear in the full version of the paper. shown that even in the dense case, T (G; 2, 1) (equalling the number of forests of G) has no polynomial-time eval-

What we would really like is to be able to choose Gn,p1 uation algorithm unless NP = RP 2 first and then x, y arbitrarily, instead of considering them fixed. Similarly, let (a, b) hyperbola Hλ with λ a positive integer. Then we can∈ write Note also that here the proof implies that we can effec- r(E) r(A) A r(A) tively deal with points x < 1, y > 1 as in Section 7. We T (G; a, b) = (a 1) − (b 1)| |− omit the details. X − − r(E) A r(A) A = (a 1) λ| |− (a 1)−| |. − X − A

9 Is exact counting hard? Suppose we can evaluate T for G α at (a, b). Then consider the transformation G G∈k; G 7→ The proof in [9] that evaluating T is #P -hard, at all but T (Gk; x, y) T (G; X,Y ) a few points, does not show it is hard in the case of dense ≈ graphs. We do not propose to classify which parts of the where X and Y are as given above. plane are #P -hard in the dense case, however the follow- ing results suggest that there is considerable variation in Take x = a, y = b, and since G Gk preserves density, → behaviour, so that a complete characterisation may be we obtain evaluations of T (G) at enough points along difficult. the hyperbola Hλ to be able to interpolate T (G; 1 λ, 0). But this gives the number of λ-colourings of G and− from λ 2 Edwards [6] we know that if α < λ−1 this evaluation is Lemma 6 Even when G is dense, evaluating T (G; a, 1) #P -hard for λ 3. Hence we have:− ≥ for a = 1, cannot be done in polynomial time unless for (a, b) Hλ for λ integer 3, it is #P -hard to 6 ∈ ≥ NP = RP . evaluate T (G; a, b) for G α, for any α satisfying λ 2 ∈ G 0 < α < λ−1 . Proof The k-thickening of a graph G is the graph − This illustrates the point that a complete characterisa- obtained by replacing each edge u, v by k parallel tion of the difficulty of exact evaluation in the dense case edges with endpoints u, v. From [9]{ we} know that the may prove difficult. For example, the main result of Ed- k-thickening Gk of G has Tutte polynomial given by wards [6] is that for α > (λ 2)/(λ 1), exact evaluation k k 1 n r(G) − − T (G ; x, y) = (1 + y + ... + y − ) − T (G; X,Y ) of the number of λ-colourings is in P . In other words: where evaluating T (G; 1 λ, 0) is in P whenever G α and α > (λ 2)/(λ 1).− ∈ G x + y + ... + yk 1 − − − This critical cut off, in which there exists some α (in X = k 1 c 1 + y + ... + y − this case αc = (λ 2)/(λ 1)) which separates tractable Y = yk. from almost certainly− intractable,− may well extend to

8 randomised approximation. This is because Edwards fpras along the curves where the hyperbolae (x 1)(y also showed it was NP -hard to decide if G had a λ- 1) = Q for integer Q 2, intersect this region. − − colouring when α < (λ 3)/(λ 2) but was in P for ≥ One possible scenario is that the following is true: larger values of α. Thus,− an immediate− consequence is: For each (x, y) either exact evaluation is in P or there exists a critical density α (x, y), which separates the Corollary 1 Even in the case of dense G α, if α < c ∈ G tractable case from the intractable, where intractable (λ 3)/(λ 2), where λ is a positive integer, there is no − − is to be interpreted in the sense “No fpras exists un- fpras for estimating T at (1 λ, 0) unless NP = RP . − less some very unlikely complexity hypothesis (such as NP = RP ) is true”. It is interesting that in the region If this is the case, then in the region x 1, y 1, ≥ ≥ αc(x, y) = 0, by our earlier argument. However it still λ 3 λ 2  −  < α <  −  , seems more plausible that, as conjectured in [21], there λ 2 λ 1 exists an fpras throughout this region, regardless of den- − − sity. where the decision problem is easy but exact counting is hard, there is no obvious obstacle to the existence of a fpras. Acknowledgement

The original impetus to look at evaluations of T in the 10 Conclusion dense case, arose in discussions with Marek Karpinski in a RAND meeting in Oxford in September 1992. Further (a) For x 1, y 1 there exists a fpras for all dense ≥ ≥ discussions with Joel Spencer, Nabil Kahale and James graphs; it is open whether one exists for non dense Annan have also been very helpful. graphs. (b) For x < 1, y > 1, there exists a fpras for strongly dense graphs (α > 1 ); again the question is open in 2 References the remaining case.

k [1] Alon, N. and Spencer, J. H. (1991) The Probabilistic At a few special points of this region, namely (x = (2 Method, John Wiley and Sons. 2)/(2k 1), y = 2k)(k = 1, 2, ...) there is a fpras for all− − dense graphs [via the k-thickening at (0,2)]. [2] Annan, J.D. (1994) A randomised approximation al- It would be very surprising if these were just sporadic gorithm for counting the number of forests in dense good points. graphs, , Probability and Computing, (to appear).

(c) For x > 0, y < 1, the situation is completely open. [3] Broder, A. Z. (1986), How hard is it to marry at A key point here is (2, 0) which enumerates acyclic random? (On the approximation of the permanent), orientations. 18th STOC, 50-58.

A possibly easier subregion is x 1, y < 1, but the [4] Brylawski, T.H. and Oxley, J.G. (1992) The Tutte obvious map (x, y) (x, y) doesn’t≥ seem to− work. polynomial and its applications, Matroid Applic- 7→ − tions (ed. N. White), Cambridge Univ. Press, 123- 225. (d) For x < 0, y 1, the antiferromagnetic region, the ≤ situation is more variable and more interesting. [5] Dyer M.E., Frieze A.M. and Jerrum M.R., Approx- imately counting Hamilton cycles in dense graphs, For example the arguments of Jerrum and Sinclair [11] Proceedings of the 4th Annual Symposium on Dis- and Welsh [22] show that unless NP = RP , there is no crete Algorithms (1994) 336-343.

9 [6] Edwards, K. (1986) The complexity of colouring [20] Welsh, D.J.A. (1993) Complexity: Knots, Colour- problems on dense graphs, Theoretical Computer ings and Counting, London Mathematical Society Science, 43, 337-343. Lecture Note Series 186, Cambridge University Press. [7] Fortuin, C.M. and Kasteleyn, P.W. (1972) On the random cluster model I. Introduction and relation [21] Welsh D.J.A. (1993) Randomised approximation to other models, Physica, 57, 536-564. schemes for Tutte-Grothendieck invariants, Proc. IMA Workshop on Probability and Algorithms, Min- [8] Garey, M.R. and Johnson, D.S. (1979) Computers neapolis, September (1993). and Intractability - A guide to the theory of NP- completeness. (San Francisco, Freeman.) [22] Welsh, D.J.A. (1994) Randomised approximation in the Tutte plane, Combinatorics, Probability and [9] Jaeger, F., Vertigan, D.L., Welsh, D.J.A. (1990) Computing (to be published). On the computational complexity of the Jones and Tutte polynomials, Math. Proc. Camb. Phil. Soc., [23] Zaslavsky, T. (1975) Facing up to arrangements: 108, 35-53. face count formulas for partitions of spaces by hy- perplanes, Memoirs of American Mathematical So- [10] Jerrum, M. R. and Sinclair, A. (1988), Conductance ciety 154. and the rapid mixing property for Markov chains: the approximation of the permanent resolved, 20th STOC, 235-243. [11] Jerrum, M.R. and Sinclair, A. (1990) Polynomial- time approximation algorithms for the Ising model, Proc. 17th ICALP, EATCS, 462-475. [12] Karp, R.M. and Luby, M. (1985) Monte-Carlo algo- rithms for the planar multiterminal network relia- bility problem, Journal of Complexity, 1, 45-64. [13] Oxley, J.G. (1992) Matroid Theory, Oxford Univ. Press. [14] Oxley, J.G. and Welsh, D.J.A. (1979) The Tutte polynomial and percolation, and Re- lated Topics (eds. J.A. Bondy and U.S.R. Murty), Academic Press, London, 329-339. [15] Rosenstiehl, P. and Read, R.C. (1978) On the prin- cipal edge tripartition of a graph, Ann. Discrete Math. 3, 195-226. [16] Robbins, H.E. (1939) A theorem on graphs, with an application to a problem in traffic control, Amer. Math. Monthly, 46, 281-283. [17] Stanley, R.P. (1973) Acyclic orientations of graphs, Discrete Math, 5, 171-178. [18] Thistlethwaite, M.B. (1987) A spanning tree expan- sion of the Jones polynomial, Topology 26, 297-309. [19] Vertigan, D.L. and Welsh, D.J.A. (1992) The com- putational complexity of the Tutte plane: the bi- partite case. Combinatorics, Probability and Com- puting, 1, 181-187.

10