Get 20M+ Full-Text Papers For Less Than $1.50/day. Start a 14-Day Trial for You or Your Team.

Learn More →

The complexity of approximating the complex-valued Potts model

The complexity of approximating the complex-valued Potts model comput. complex. (2022) 31:2 c The Author(s) 2022 1016-3328/22/010001-94 published online February 3, 2022 https://doi.org/10.1007/s00037-021-00218-x computational complexity THE COMPLEXITY OF APPROXIMATING THE COMPLEX-VALUED POTTS MODEL Andreas Galanis, Leslie Ann Goldberg, and Andres Herrera-Poyatos Abstract. We study the complexity of approximating the partition function of the q-state Potts model and the closely related Tutte poly- nomial for complex values of the underlying parameters. Apart from the classical connections with quantum computing and phase transitions in statistical physics, recent work in approximate counting has shown that the behaviour in the complex plane, and more precisely the location of zeros, is strongly connected with the complexity of the approxima- tion problem, even for positive real-valued parameters. Previous work in the complex plane by Goldberg and Guo focused on q =2, which corresponds to the case of the Ising model; for q> 2, the behaviour in the complex plane is not as well understood and most work applies only to the real-valued Tutte plane. Our main result is a complete classifi- cation of the complexity of the approximation problems for all non-real values of the parameters, by establishing #P-hardness results that ap- ply even when restricted to planar graphs. Our techniques apply to all q ≥ 2 and further complement/refine previous results both for the Ising model and the Tutte plane, answering in particular a question raised by Bordewich, Freedman, Lovasz ´ and Welsh in the context of quantum computations. Keywords. Counting Complexity, Potts model, Ising model, Tutte polynomial, Approximate Counting Subject classification. 68Q17 Computational difficulty of problems Birkh¨ auser 2 Page 2 of 94 Galanis, Goldberg & Herrera-Poyatos cc 1. Introduction The q-state Potts model is a classical model of ferromagnetism in statistical physics (Potts 1952; Welsh 1993) which generalises the well-known Ising model. On a (multi)graph G =(V, E), config- urations of the model are all possible assignments σ : V → [q] where [q]= {1,...,q} is a set of q spins with q ≥ 2. The model is parameterised by y, which is a function of the temperature of the model and is also known as the edge interaction. Each configura- m(σ) tion σ is assigned weight y where m(σ) denotes the number of monochromatic edges of G under σ. The partition function of the model is the aggregate weight over all configurations, i.e., m(σ) Z (G; q, y)= y , Potts σ : V →[q] When q = 2, this model is known as the Ising model, and we some- times use the notation Z (G; y) to denote its partition function. Ising The Ising/Potts models have an extremely useful generalisation to non-integer values of q via the so-called random-cluster formu- lation and the closely related Tutte polynomial. In particular, for numbers q and γ, the Tutte polynomial of a graph G is given by k(A) |A| (1.1) Z (G; q, γ)= q γ , Tutte A⊆E where k(A) denotes the number of connected components in the graph (V, A) (isolated vertices do count). When q is an integer with q ≥ 2, we have Z (G; q, y)= Z (G; q, y − 1), see, for in- Potts Tutte stance, the paper of Sokal (2005). The Tutte polynomial on planar graphs is particularly relevant in quantum computing since it cor- responds to the Jones polynomial of an “alternating link” (Welsh 1993, Chapter 5), and polynomial-time quantum computation can be simulated by additively approximating the Jones polynomial at a suitable value, as we will explain later in more detail, see also (Bordewich et al. 2005) for details. In this paper, we study the complexity of approximating the partition function of the Potts model and the Tutte polynomial on planar graphs as the parameter y ranges in the complex plane. cc Approximating the complex Potts model Page 3 of 94 2 Traditionally, this problem has been mainly considered in the case where y is a positive real; however recent developments have shown that for various models, including the Ising and Potts models, there is a close interplay between the location of zeros of the partition function in the complex plane and the approximability of the prob- lem, even for positive real values of y. The framework of viewing partition functions as polynomials in the complex plane of the underlying parameters has been well- explored in statistical physics and has recently gained traction in computer science as well in the context of approximate counting. On the positive side, zero-free regions in the complex plane trans- late into efficient algorithms for approximating the partition func- tion (Barvinok 2017; Patel & Regts 2017) and this scheme has led to a broad range of new algorithms even for positive real values of the underlying parameters (Guo et al. 2021, 2020; Harrow et al. 2020; Liu et al. 2019; Liu et al. 2019a,b; Peters & Regts 2018, 2019). On the negative side, the presence of zeros poses a barrier to this approach and, in fact, it has been demonstrated that zeros mark the onset of computational hardness for the approximabil- ity of the partition function (Bez´ akova ´ et al. 2020; Bez´ akova ´ et al. 2021; Goldberg & Guo 2017; Goldberg & Jerrum 2014). These new algorithmic and computational complexity developments stemming from the complex plane mesh with the statistical physics perspec- tive where zeros have long been studied in the context of pinpoint- ing phase transitions, see e.g., (Bena et al. 2005; Heilmann & Lieb 1972; Lieb & Sokal 1981; Sokal 2005; Welsh 1993; Yang & Lee 1952). For the problem of exactly computing the partition function of the Potts model, Jaeger et al. (1990), as a corollary of a more general classification theorem for the Tutte polynomial, established #P-hardness unless (q, y) is one of seven exceptional points, see Section 6.3 for more details; Vertigan (2005) further showed that the same classification applies on planar graphs with the exception of the Ising model (q = 2), where the problem is in FP. For the approximation problem, the only known result that applies for general values y in the complex plane is by Goldberg & Guo (2017), which addresses the case q =2; the case q ≥ 3is 2 Page 4 of 94 Galanis, Goldberg & Herrera-Poyatos cc largely open apart from the case when y is real which has been studied extensively even for planar graphs (Goldberg & Guo 2017; Goldberg & Jerrum 2008, 2012a, 2014; Jerrum & Sinclair 1993; Kuperberg 2015). We will review all these results more precisely in the next section, where we also state our main theorems. 1.1. Our main results. In this work, we completely classify the complexity of approximating Z (G; q, y) for q ≥ 2 and non- Potts real y, even on planar graphs G; in fact, our results also classify the complexity of the Tutte polynomial on planar graphs for reals q ≥ 2 and non-real γ. Along the way, we also answer a question for the Jones polynomial raised by Bordewich, Freedman, Lov´ asz &Welsh (2005). To formally state our results, we define the computational prob- lems we consider. Let K and ρ be real algebraic numbers with K> 1and ρ> 0. We investigate the complexity of the following problems for any integer q with q ≥ 2 and any algebraic number y. Name: Factor-K-NormPotts(q, y) Instance: A (multi)graph G. Output: If Z (G; q, y) = 0, the algorithm may output any ra- Potts tional number. Otherwise, it must output a rational number ˆ ˆ ˆ N such that N/K ≤|Z (G; q, y)|≤ KN . Potts A well-known fact is that the difficulty of the computational problem Factor-K-NormPotts(q, γ) does not depend on the constant K> 1. This can be proved using standard powering techniques, see (Goldberg & Guo 2017, Lemma 11) for a proof when q = 2. In fact, the complexity of the problem is the same 1− even for K =2 for any constant > 0where n is the size of the input. For z ∈ C\{0}, we denote by |z| the norm of z,by Arg(z) ∈ [0, 2π)the principal argument of z and by arg(z) the set {Arg(z)+2πj : j ∈ Z} of all the arguments of z,sothatfor any a ∈ arg(z)wehave z = |z| exp(ia). cc Approximating the complex Potts model Page 5 of 94 2 Name: Distance-ρ-ArgPotts(q, y) Instance: A (multi)graph G. Output: If Z (G; q, y) = 0, the algorithm may output any ra- Potts tional number. Otherwise, it must output a rational A such that, for some a ∈ arg(Z (G; q, γ)), |A − a|≤ ρ . Potts In the special case that q equals 2, we omit the argument q and write Ising instead of Potts in the name of the problem. Similarly, when the input of the problems is restricted to planar graphs, we write PlanarPotts instead of Potts.We also con- sider the problem Factor-K-NormTutte(q, γ) and the problem Distance-π/3-ArgTutte(q, γ) for the Tutte polynomial when q, γ are algebraic numbers. Note also that, when q, γ are real, the latter problem is equivalent to finding the sign of the Tutte polyno- mial, and we sometimes write SignTutte(q, γ)(and SignPlanarTutte(q, γ) for the planar version of the problem). Our first and main result is a full resolution of the complexity of approximating Z (G; q, y) for q ≥ 3 and non-real y.More Potts precisely, we show the following. Theorem 1.2. Let q ≥ 3 be an integer, y ∈ C\R be an algebraic number, and K> 1. Then, Factor-K-NormPlanarPotts(q, y) and Distance-π/3-ArgPlanarPotts(q, y) are #P-hard, unless 2πi/3 4πi/3 q =3 and y ∈{e ,e } when both problems can be solved exactly in polynomial time. We remark that, for real y> 0, the complexity of approximating Z (G; q, y) on planar graphs is not fully known, though on gen- Potts eral graphs the problem is #BIS-hard (Goldberg & Jerrum 2012a) and NP-hard for y ∈ (0, 1) (Goldberg & Jerrum 2008), for all q ≥ 3. For real y< 0, the problem is NP-hard on general graphs when y ∈ (−∞, 1 − q] for all q ≥ 3(Goldberg & Jerrum 2014) and Note, for y ∈ (−∞, 1 − q) ∪ [0, ∞), #P-hardness is impossible (assuming NP = #P): finding the sign of Z (G; q, y) is easy, even on non-planar Potts graphs (Goldberg & Jerrum 2014), and Z (G; q, y) can be approximated Potts using an NP-oracle. For y =1 − q, the same applies when q ≥ 6; the cases q ∈{3, 4, 5} are not fully resolved though Goldberg & Jerrum (2014) showed that q =3, 4 are NP-hard, whereas q = 5 should be easy unless Tutte’s 5-flow conjecture is false (Welsh 1993, Section 3.5). 2 Page 6 of 94 Galanis, Goldberg & Herrera-Poyatos cc #P-hard on planar graphs when y ∈ (1 − q, 0) and q ≥ 5(Kuper- berg (2015), see also Goldberg & Jerrum (2012b)). Our techniques for proving Theorem 1.2 allow us to resolve the remaining cases q =3, 4 for y ∈ (1 − q, 0) on planar graphs, as a special case of the following theorem that applies for general q ≥ 3. This is our second main result. Theorem 1.3. Let q ≥ 3 be an integer, y ∈ (−q +1, 0) be a real algebraic number, and K> 1. Then the computational prob- lems Factor-K-NormPlanarPotts(q, y) and Distance-π/3 -ArgPlanarPotts(q, y) are #P-hard, unless we are in the case (q, y)=(4, −1) when both problems can be solved exactly in poly- nomial time. Our third main contribution is a full classification of the range of the parameters where approximating the partition function of the Ising model is #P-hard. Note, on planar graphs G, Z (G; y) Ising can be computed in polynomial time for all y. For general (non- planar) graphs and non-real y, Goldberg and Guo show #P-hardness on the non-real unit circle (|y| =1) with y = ±i, and establish NP- hardness elsewhere. Our next result shows that the NP-hardness results of Goldberg & Guo (2017) for non-real y canbeelevatedto #P-hardness. Theorem 1.4. Let y ∈ C\R be an algebraic number, and K> 1. Then, Factor-K-NormIsing(y) and Distance-π/3-ArgIsing(y) are #P-hard, unless y = ±i when both problems can be solved ex- actly in polynomial time. For real y, we remark that the problems of approximating Z (G; y) Ising and determining its sign (when non-trivial) are well-understood: the problem is FPRASable for y> 1 and NP-hard for y ∈ (0, 1) (Jerrum & Sinclair 1993), #P-hard for y ∈ (−1, 0) Goldberg & Guo (2017); Goldberg & Jerrum (2014), and equivalent to approx- imating #PerfectMatchings for y< −1 Goldberg & Jerrum (2008). For y =0, ±1, Z (G; y) can be computed exactly in Ising polynomial time. Analogously to Footnote 2,for y ∈ (−∞, −1) ∪ (0, 1) #P-hardness is unlikely since the problem can be approximated with an NP-oracle. cc Approximating the complex Potts model Page 7 of 94 2 1.2. Consequences of our techniques for the Tutte/Jones polynomials. While our main results are on the Ising/Potts models, in order to prove them it is convenient to work in the “Tutte world”; this simplifies the proofs and has also the benefit of allowing us to generalise our results to non-integer q. The following result generalises Theorem 1.2 to non-integer q> 2. Theorem 1.5. Let q> 2 be a real, γ ∈ C\R be an algebraic num- ber, and K> 1. Then, Factor-K-NormPlanarTutte(q, γ) and Distance-π/3-ArgPlanarTutte(q, γ) are #P-hard, 2πi/3 4πi/3 unless q =3 and γ +1 ∈{e ,e } when both problems can be solved exactly in polynomial time. Our techniques can further be used to elevate previous NP-hardness results of Goldberg & Jerrum (2008, 2014) in the Tutte plane to #P-hardness for planar graphs, and answer a question for the Jones polynomial raised by Bordewich et al. (2005). A more detailed dis- cussion can be found in Section 7. 2. Proof outline In this section we provide some insight on the proofs of our main results. As mentioned earlier, the proofs are performed in the context of the Tutte polynomial. In previous #P-hardness results (Goldberg & Guo 2017; Gold- berg & Jerrum 2014) for the Tutte polynomial, the authors reduce the exact counting #MinimumCardinality (s, t)-Cut problem to the problem of approximating Z (G; q, γ) using an elaborate Tutte binary search based on suitable oracle calls. Key to these oracle calls are gadget constructions which are mainly based on series– parallel graphs which “implement” points (q ,γ ); this means that, by pasting the gadgets appropriately onto a graph G, the computa- tion of Z (G; q ,γ ) reduces to the computation of Z (G; q, γ). Tutte Tutte 2 Page 8 of 94 Galanis, Goldberg & Herrera-Poyatos cc Much of the work in (Goldberg & Guo 2017; Goldberg & Jerrum 2014), and for us as well, is understanding what values (q ,γ )can be implemented starting from (q, γ). For planar graphs, while the binary-search technique from (Gold- berg & Guo 2017) is still useful, we have to use a different over- all reduction scheme since #MinimumCardinality (s, t)-Cut is not #P-hard when the input is restricted to planar graphs (Provan & Ball 1983). To obtain our #P-hardness results our plan instead is to reduce the problem of exactly evaluating the Tutte polynomial for some appropriately selected parameters q ,γ to the problem of computing its sign and the problem of approximately evaluating it at parameters q, γ; note, this gives us the freedom to use any parameters q ,γ we wish as long as the corresponding exact prob- lem is #P-hard. Then, much of the work consists of understanding what values (q ,γ ) can be implemented starting from (q, γ), so we focus on that component first. We first review previous constructions in the literature, known as shifts, and then introduce our refinement of these constructions, which we call polynomial-time approximate shifts, and state our main result about them. 2.1. Shifts in the Tutte plane. We say that that there is a shift from (q, γ )to(q, γ ) if there is a graph H =(V, E)and 1 2 vertices s, t such that Z (H; q, γ ) st 1 γ = q , Z (H; q, γ ) s|t where Z (H; q, γ ) is the contribution to Z (H; q, γ )fromcon- st 1 Tutte 1 figurations A ⊆ E in which s, t belong to the same connected com- ponent in (V, A), while Z (H; q, γ ) is the contribution from all s|t 1 other configurations A. In the following, we will usually encounter shifts in the (x, y)-parametrisation of the Tutte plane, rather than the (q, γ)-parameterisation which was used for convenience here. To translate between these, set y = γ +1 and (x − 1)(y − 1) = q, see (Welsh 1993, Chapter 3). We denote by H the hyperbola {(x, y) ∈ C :(x − 1)(y − 1) = q}, and we will use both parametri- sations as convenient. Section 3.2 has a more detailed description of shifts that apply to the multivariate Tutte polynomial. cc Approximating the complex Potts model Page 9 of 94 2 As described earlier, shifts can be used to “move around” the complex plane. If one knows hardness for some (x ,y ) ∈H , 2 2 q and there is a shift from (x ,y ) ∈H to (x ,y ), then one also 1 1 q 2 2 obtains hardness for (x ,y ). This approach has been very effective 1 1 when attention is restricted to real parameters (Goldberg & Jerrum 2008, 2012b, 2014); however, when it comes to non-real parameters, the success of this approach has been limited. To illustrate this, in (Goldberg & Guo 2017), the authors established #P-hardness of the Ising model when y ∈ (−1, 0), and used this to obtain #P-hardness for y on the unit circle by constructing appropriate shifts. However, their shift construction does not extend to general complex numbers, and this kind of result seems unreachable with those techniques. 2.2. Polynomial-time approximate shifts. To obtain our main theorems, we instead need to consider what we call polynomial- time approximate shifts; such a shift from (x ,y ) ∈H to (x ,y ) ∈ 1 1 q 2 2 H is an algorithm that, for any positive integer n, computes in time polynomial in n agraph G that (x ,y )-implements (x ˆ , y ˆ ) n 1 1 2 2 −n with |y − y ˆ |≤ 2 . In fact, our constructions need to maintain 2 2 planarity, and we will typically ensure this by either making ev- ery G a series–parallel graph, in which case we call the algorithm a polynomial-time approximate series–parallel shift,or by making every G a theta graph, in which case we call the algorithm a polynomial-time approximate theta shift. These generalised shifts allow us to overcome the challenges mentioned above and are key ingredients in our reduction. Our main technical theorem about them is the following. Theorem 2.1. Let q ≥ 2 be a real algebraic number. Let x and y be algebraic numbers such that (x, y) ∈H , y ∈ (−1, 0) ∪ 2 2 (C\R) and (x, y) ∈{(i, −i), (−i, i), (ω ,ω ), (ω ,ω )},where ω = 3 3 3 3 3 exp(2πi/3). Then, for any pair of real algebraic numbers (x ,y ) ∈ A theta graph consists of two terminals s and t joined by internally disjoint paths Brown et al. (2001). A series–parallel graph with terminals s and t can be obtained from the single-edge graph with edge (s, t) by repeatedly subdividing edges or adding parallel edges (Brandst¨ adt et al. 1999, Chapter 11). 2 Page 10 of 94 Galanis, Goldberg & Herrera-Poyatos cc H there is a polynomial-time approximate series–parallel shift from (x, y) to (x ,y ). 2 2 The exceptions {(i, −i), (−i, i), (ω ,ω ), (ω ,ω )} are precisely the 3 3 3 3 non-real points of the (x, y) plane where the Tutte polynomial of a graph can be evaluated in polynomial time (see Section 6.3). As we will see, being able to (x, y)-implement approximations of any number in (−1, 0) is essentially the property that makes the approximation problem #P-hard at (x, y). We remark that the idea of implementing approximations of a given weight or edge interaction has been explored in the literature, though only when all the edge interactions involved are real. We review these results in Section 4. We study the properties of polynomial-time approximate shifts in Section 4 and prove Theorem 2.1 in Section 5. In the next section, we describe some of the techniques used. 2.2.1. Proof Outline of Theorem 2.1. Shifts, as defined in Section 2.1, have a transitivity property: if there is a shift from (x ,y )to(x ,y ) and from (x ,y )to(x ,y ), then there is a shift 1 1 2 2 2 2 3 3 from (x ,y )to(x ,y ), see Section 3.2 for more details. 1 1 3 3 The polynomial-time approximate shift given in Theorem 2.1 is constructed in a similar way. First, we construct a polynomial- time approximate shift from (x, y)tosome(x ,y ) such that y ∈ 2 2 2 (−1, 0), where x and y depend on x, y. Then, we construct a 2 2 polynomial-time approximate shift from (x ,y )to(x ,y ). Finally, 2 2 we combine both polynomial-time approximate shifts using an ana- logue of the transitivity property. However, when this approach is put into practice, there is a difficulty that causes various technical complications: we only have mild control in our constructions over the intermediate shift (x ,y ). In particular, even if the numbers x and y are algebraic, 2 2 we cannot guarantee that x and y are algebraic, and this causes 2 2 problems with obtaining the required transitivity property. In- stead, we have to work with a wider class of numbers, the set P of polynomial-time computable numbers. These are numbers that can be approximated efficiently, i.e., for y ∈ P there is an algorithm −n that computes y ˆ ∈ Q[i]with |y − y ˆ |≤ 2 in time polynomial n n cc Approximating the complex Potts model Page 11 of 94 2 in n (Ko 1991, Chapter 2). We denote by P = R ∩ P the set of R C polynomial-time computable real numbers. Our polynomial-time approximate shifts are constructed in Sec- tion 5. The first of these polynomial-time approximate shifts is provided by Lemma 2.2. Lemma 2.2. Let q be a real algebraic number with q ≥ 2.Let x and y be algebraic numbers such that (x, y) ∈H , y ∈ (−1, 0) ∪ 2 2 (C\R) and (x, y) ∈{(i, −i), (−i, i), (ω ,ω ), (ω ,ω )},where ω = 3 3 3 3 3 exp(2πi/3). Then there is a polynomial-time approximate series– parallel shift from (x, y) to (x ,y ) for some (x ,y ) ∈H with x ,y ∈ P and y ∈ (0, 1). The construction in Lemma 2.2 is obtained using a theta graph and trying to get a shift that is very close to the real line. However, we cannot control the point (x ,y ) that we are approximating, and as mentioned, x ,y might not be algebraic. The proof of Lemma 2.2 requires the most technical work in the paper and is given in Sec- tion 5.4. Using Lemma 2.2, we have a series–parallel polynomial-time approximate shift from (x, y)tosome(x ,y ) ∈H with x ,y ∈ P q R and y ∈ (0, 1). Next, we have to construct a polynomial-time approximate shift from (x ,y )to(x, ˆ y ˆ), where (x, ˆ y ˆ)isthe point that we want to shift to in Theorem 2.1. In fact, we actually use a theta shift, which also facilitates establishing the required tran- sitivity property later on. Note that since y is not necessarily algebraic, we cannot directly apply the results that have already appeared in the literature on implementing approximations of edge interactions. In the next lemma, we generalise these results to the setting of polynomial-time computable numbers, where we need to address some further complications that arise from computing with polynomial-time computable numbers instead of algebraic num- bers. The proof of the lemma is given in Section 5.5. Lemma 2.3. Let q, x, y ∈ P such that q> 0, (x, y) ∈H , y is R q positive and 1−q/2 <y < 1. There is a polynomial-time algorithm that takes as an input: ◦ two positive integers k and n, in unary; 2 Page 12 of 94 Galanis, Goldberg & Herrera-Poyatos cc ◦ a real algebraic number w ∈ [y , 1]. The algorithm produces a theta graph J that (x, y)-implements −n (ˆ x, y ˆ) such that y ˆ−w ≤ 2 .The size of J is at most a polynomial in k and n, independently of w. Then, we are able to combine the shifts in Lemmas 2.2 and 2.3 via a transitivity property for polynomial-time approximate shifts (see Lemma 4.8 in Section 4), and therefore prove Theorem 2.1, see Section 5 for the details. 2.3. The reductions. In Section 6.6 we show how to use a polynomial-time approximate shift from (x ,y )to(x ,y )tore- 1 1 2 2 duce the problem of approximating the Tutte polynomial at (x ,y ) 2 2 to the same problem at (x ,y ). The following lemma gives such a 1 1 reduction for the problem of approximating the norm, we also give an analogous result for approximating the argument. Lemma 2.4. Let q =0, γ and γ =0 be algebraic numbers, and 1 2 K> 1.For j ∈{1, 2},let y = γ +1 and x =1+ q/γ .If there is j j j j a polynomial-time series–parallel approximate shift from (x ,y ) to 1 1 (x ,y ), then we have a reduction from Factor-K-NormTutte 2 2 (q, γ ) to Factor-K-NormTutte(q, γ ). This reduction also 2 1 holds for the planar version of the problem. In order to prove Lemma 2.4, we need some lower bounds on the norm of the partition function Z (G; q, γ). This kind of lower Tutte bound plays an important role in several hardness results on the complexity of approximating partition functions (Bez´ akova ´ et al. 2020; Goldberg & Guo 2017). Here, we have to work a bit harder than usual since we have two (algebraic) underlying parameters (in the case of Tutte), and we need to use results in algebraic number theory, see Section 6.1 for details. By combining Theorem 2.1 and Lemma 2.4 with existing hard- ness results, we obtain our hardness results for non-real edge in- teractions in Section 6.8. On the way, we collect some hardness on real parameters as well that strengthen previous results in the liter- ature, and part of Section 6 is devoted to this. The main reason be- hind these improvements is that previous work on real parameters cc Approximating the complex Potts model Page 13 of 94 2 used reductions from approximately counting minimum cardinality (s, t)-cuts (Goldberg & Guo 2017; Goldberg & Jerrum 2014), the minimum 3-way cut problem (Goldberg & Jerrum 2008), or maxi- mum independent set for planar cubic graphs (Goldberg & Jerrum 2012b), which are either easy on planar graphs or the parameter regions they cover are considerably smaller or cannot be used to conclude #P-hardness. We instead reduce the exact computation of Z (G; q, γ) to its approximation, which has the advantage Tutte that the problem that we are reducing from is #P-hard for pla- nar graphs (Vertigan 2005). Interestingly, our reduction requires us to apply an algorithm of Kannan, Lenstra and Lovasz ´ (Kannan et al. 1988) to reconstruct the minimal polynomial of an algebraic number from an additive approximation of the number. The lower bounds on the partition function Z (G; q, γ) that are gathered Tutte in Section 6.1 also play a role in this reduction, the details will be giveninSection 6.5. 3. Preliminaries 3.1. The multivariate Tutte polynomial. The random clus- ter formulation of the multivariate Tutte polynomial is particularly convenient when working with implementations (as we will see in Section 3.2), and is defined as follows. Let G =(V, E) be a graph. For any γ : E → C and q ∈ C,the multivariate Tutte polynomial of G is k(A) (3.1) Z (G; q, γ)= q γ . Tutte e A⊆E e∈A We will make use of the following notation. Let s and t be two distinct vertices of G. We define k(A) Z (G; q, γ)= q γ . st e A⊆E: e∈A s and t in thesamecomponent Analogously, let Z be the contribution to Z (G; q, γ)fromthe s|t Tutte configurations A ⊆ E such that s and t are in different connected components in (V, A). That is, Z (G; q, γ)= Z (G; q, γ) − s|t Tutte Z (G; q, γ). st 2 Page 14 of 94 Galanis, Goldberg & Herrera-Poyatos cc 3.2. Implementing weights, series compositions and par- allel compositions. In this section, we define implementations, shifts, series compositions and parallel compositions. The defini- tions and results that we give are standard and can also be found, for instance, in (Jaeger et al. 1990, Section 4), (Goldberg & Jerrum 2012b, Section 2.1) or (Sokal 2005, Section 4). Let q ∈ C with q =0. The valueof q is fixed across all this section. Let H be a weighted graph with weight function γ ˆ.Let s and t be two distinct vertices of H, which are usually referred to as terminals. We say that the graph H γ ˆ-implements the weight w with respect to the terminals s and t if Z (H; q, γ ˆ) st w = q . Z (H; q, γ ˆ) s|t We say that H γ ˆ-implements the weight w if there are terminals s and t such that H γ ˆ-implements the weight w with respect to s and t. These definitions are motivated by Lemma 3.2,whose proof is a straightforward computation involving the definitions of implementations and the multivariate Tutte polynomial. Lemma 3.2 (Goldberg & Jerrum 2012b, Equation 2.2). Let G and H be two graphs with weight functions γ and γ ˆ, respectively. Let f be an edge of G with weight γ such that H γ ˆ-implements γ f f with respect to terminals s and t.Let G be the graph constructed by considering the union of G and H, identifying the terminals s and t with the endpoints of f in G and removing f.Let γ be the weight function on G that inherits the weights from γ and γ ˆ. Then Z (H; q, γ ˆ) s|t Z (G ; q, γ )= Z (G; q, γ) , st f st Z (H; q, γ ˆ) s|t Z (G ; q, γ )= Z (G; q, γ) . s|t f s|t Z (H;q,γ ˆ) s|t In particular, we have Z (G ; q, γ )= Z (G; q, γ). Tutte f 2 Tutte Moreover, if Gγ-implements a weight w,then G also γ -implements w. cc Approximating the complex Potts model Page 15 of 94 2 Therefore, if we can compute Z (H; q, γ ˆ) efficiently, then com- s|t puting Z (G; q, γ)isashardascomputing Z (G ; q, γ ). This Tutte Tutte f observation leads to some of the reductions that appear in this pa- per. In the remaining sections we usually assume that the weights are constant, that is, each edge of the graph has the same weight, and we will make it clear when this is not the case. In the constant weight function case Lemma 3.2 can be applied to each edge of the graph constructed by copying G and substituting each edge f in G by a copy of H (identifying the endpoints of f with s and t). Let α ,α ∈ C. We say that there is a shift from (q, α )to(q, α )if 1 2 1 2 thereisagraph H that α -implements α . An important property 1 2 of shifts is transitivity; if there are shifts from (q, α )to(q, α )and 1 2 from (q, α )to(q, α ), then there is a shift from (q, α )to(q, α ). 2 3 1 3 This is a consequence of Lemma 3.2.Let y = α +1 and y = 1 1 2 α +1. We define x and x by q =(x −1)(y −1) = (x −1)(y −1), 2 1 2 1 1 2 2 which is the change of variables that relates the Tutte polynomial and Z . We equivalently refer to the shift from (q, α )to(q, α ) Tutte 1 2 as a shift from (x ,y )to(x ,y ), and we also say that H (x ,y )- 1 1 2 2 1 1 implements (x ,y ). This notation is convenient to express many 2 2 of the shifts considered in this paper. To conclude this section we introduce two tools that will provide us with many examples of implementations and shifts: parallel compositions and series compositions. For each j ∈{1, 2},let G be a graph, let s and t be two terminals of G ,and let γ be j j j j a weight function such that G γ -implements a weight w with j j j respect to s and t . j j Parallel compositions. The parallel composition of (G ,s ,t ) 1 1 1 and (G ,s ,t ) is the graph G constructed by considering the union 2 2 2 of G and G and identifying s with s and t with t .Let γˆ be 1 2 1 2 1 2 the weight function on G inherited from γ and γ .It is well known 1 2 and easy to check that G γ ˆ-implements the weight w =(1 + w )(1 + w ) − 1 1 2 with respect to the terminals s and t .Let (x ,y )and (x ,y ) 1 1 1 1 2 2 be the Tutte coordinates of (q, w )and (q, w ), respectively, (so 1 2 y = w +1 and (x − 1)(y − 1) = q). Then the Tutte coordinates j j j j 2 Page 16 of 94 Galanis, Goldberg & Herrera-Poyatos cc of (q, w)are (x, y)with y = y y and (x − 1)(y − 1) = q.Let Υ be a 1 2 graph with two vertices s, t and one edge joining them, and let Υ be the parallel composition of n copies of (Υ,s,t) (so Υ has two vertices and n edges joining them). Then Υ (x, y)-implements (x ,y )with y = y and (x − 1)(y − 1) = q. This is known as an n-thickening of (x, y) and it yields a shift from (x, y)to(x ,y ). Series compositions. The series composition of (G ,s ,t )and 1 1 1 (G ,s ,t ) is the graph G constructed by considering the union of 2 2 2 G and G and identifying t with s .Let γˆ be the weight function 1 2 1 2 on G inherited from γ and γ . It is well known and easy to check 1 2 that G γ ˆ-implements the weight w w 1 2 w = w + w + q 1 2 with respect to the terminals s and t .Note that w satisfies 1 2 q q q (3.3) 1+ = 1+ 1+ . w w w 1 2 Let (x ,y )and (x ,y ) be the Tutte coordinates of (q, w )and 1 1 2 2 1 (q, w ), respectively (so y = w +1 and (x − 1)(y − 1) = q). 2 j j j j Then, in view of (3.3), the Tutte coordinates of (q, w)are (x, y) with x = x x and (x − 1)(y − 1) = q. Let Υ be a graph with two 1 2 vertices s, t and one edge joining them, and let Υ be the series composition of n copies of (Υ,s,t) (so Υ is a path graph with n edges). Then Υ (x, y)-implements (x ,y )with x = x and (x − 1)(y − 1) = q. This is known as an n-stretching of (x, y)and it yields a shift from (x, y)to(x ,y ). For series–parallel and theta graphs (see Footnote 4), these con- structions give that either Z (G; q, γ) = 0, or the series–parallel s|t graph G (with terminals s and t) γ-implements a weight w(G, s, t; q, γ) that can be computed from the recursive definition of series– parallel graphs in polynomial time. In particular, let Θ be (l ,...,l ) 1 m the theta graph with m internal paths of lengths l ,...,l .In this 1 m case, we have that We should mention that we will make use of the Θ asymptotic notation in this paper and this notation should not be confused with that of theta graphs. cc Approximating the complex Potts model Page 17 of 94 2 (3.4) w Θ ,s,t; q, γ = 1+ − 1, (l ,...,l ) 1 m x − 1 j=1 where x =1 + q/γ. Series–parallel graphs can be built using series and parallel compositions. The following definition is equivalent to the one in Footnote 4. A graph G is series–parallel (with terminals s and t)ifeither G is the graph with two vertices s and t and one edge joining them, or G is the parallel or series composition of (G ,s ,t )and (G ,s ,t ), where s = s , t = t and G is a series– 1 1 1 2 2 2 1 2 j parallel graph with terminals s and t (Brandst¨ adt et al. 1999, j j Chapter 11). Finally, the size of a graph G =(V, E) is the integer size(G)= |V | + |E|. Note that the size of Θ is 2 l − m +2. (l ,...,l ) j 1 m j=1 4. Polynomial-time approximate shifts Implementing a specific weight cannot always be achieved. Nonethe- less, sometimes we can implement an approximation of the desired weight with as much precision as we need. These implementa- tions have been exploited several times in the literature on Tutte polynomials and the Ising model; see (Goldberg & Jerrum 2008, 2012b, 2014, 2019). Here we collect some of these results appearing in (Goldberg & Jerrum 2014), whichinturnare basedonargu- ments in (Goldberg & Jerrum 2012b); here, we follow the presen- tation in (Goldberg & Jerrum 2019) (that was stated for q =2). Lemma 4.1. (Goldberg & Jerrum 2019, Lemma 22 Goldberg & Jerrum 2014, Lemma 5) Let x and y be real alge- braic numbers such that y ∈ [−1, 1] and (x − 1)(y − 1) = q> 0. There is a polynomial-time algorithm that takes as an input: ◦ two positive integers n and k, in unary; ◦ a real algebraic number y ∈ [1, |y| ]. This algorithm produces a theta graph G that (x, y)-implements −n (ˆ x, y ˆ) such that y −y ˆ ≤ 2 .The size of G is at most a polynomial in n and k, independently of y . 2 Page 18 of 94 Galanis, Goldberg & Herrera-Poyatos cc In Lemma 2.3 (Section 5), we give a similar result to Lemma 4.1 where the numbers x and y may not be algebraic. The fact that the graph G computed in Lemma 4.1 is a theta graph is not directly stated in the statement of (Goldberg & Jerrum 2014, Lemma 5) but it can easily be inferred from the proof. This also applies to Lemma 4.2. Lemma 4.2. (Goldberg & Jerrum (2019), Lemma 22, Goldberg & Jerrum (2014), Lemma 7)]Let x ,y ,x ,y be real 1 1 2 2 algebraic numbers such that y ∈ (−1, 1), y ∈ [−1, 1],and (x − 1 2 1 1)(y − 1) = (x − 1)(y − 1) = q< 0. There is a polynomial-time 1 2 2 algorithm that takes as an input: ◦ two positive integers n and k, in unary; −k ◦ a real algebraic number y ∈ [1, |y | ]. This algorithm produces a theta graph G =(V, E) and a weight function γ ˆ : E →{y − 1,y − 1} such that G γ ˆ-implements (ˆ x, y ˆ) 1 2 −n with y − y ˆ ≤ 2 .The size of G is at most a polynomial in n and k, independently of y . Corollary 4.3. Let x ,y ,x ,y be real algebraic numbers such 1 1 2 2 that y ∈ (−1, 0) ∪ (0, 1), y ∈ [−1, 1], (x − 1)(y − 1) = (x − 1 2 1 1 2 1)(y − 1) = q, q =0. There is a polynomial-time algorithm that takes as an input: ◦ two positive integers n and k, in unary; k −k ◦ a positive real algebraic number y such that |y |∈ [|y | , |y | ]. 1 1 This algorithm produces a theta graph G =(V, E) and a weight function γ ˆ : E →{y − 1,y − 1} such that G γ ˆ-implements (ˆ x, y ˆ) 1 2 −n with y − y ˆ ≤ 2 .The size of G is at most a polynomial in n and k, independently of y . Moreover, if either y < 0 or y < 0,then 1 2 the restriction that y is positive can be replaced with a restriction that y is non-zero. cc Approximating the complex Potts model Page 19 of 94 2 Proof. This result easily follows from Lemmas 4.1 and 4.2 by an argument of Goldberg and Jerrum (see the proof of (Goldberg & Jerrum 2014, Lemma 2)). We include here their argument for completeness. The case when y ≥ 1 has been covered in Lem- mas 4.1 and 4.2. First, let us assume that y ∈ (0, 1). We have −2k −2k 1 ≤ y · y ≤|y | and using Lemmas 4.1 and 4.2 we can imple- −2k −n 2k  −n ment y ˜ with |y ˜ − y · y |≤ 2 .We have |y y ˜ − y |≤ 2 ,sowe 1 1 2k set y ˆ = y y ˜. The graph G is the parallel composition of the graph used to implement y ˜ and 2k edges with weight y . Finally, let us assume that there is i ∈{1, 2} such that y < 0, and let us consider thecasewhere y is negative. We implement an approximation y ˆ of y /y > 0, and return y ˆ =ˆ y y . i i The graphs G produced by the algorithms given in Lemma 4.1, Lemma 4.2 and Corollary 4.3 are theta graphs. One may won- der which weights can be approximated as in these results. This leads to the following definition. Let (x ,y ), (x ,y ) ∈H .Let 1 1 2 2 q γ = y − 1and γ = y − 1. We say that there is a polynomial- 1 1 2 2 time approximate shift from (q, γ )to(q, γ ) or, equivalently, from 1 2 (x ,y )to(x ,y ), if there is an algorithm that, for any positive 1 1 2 2 integer n, computes in polynomial time in n agraph G that −n (x ,y )-implements (x ˆ , y ˆ )with |y − y ˆ |≤ 2 . If the graph G 1 1 2 2 2 2 n computed by this algorithm is always a theta graph (resp. a series– parallel graph), then we say that this is a polynomial-time approxi- mate theta shift (resp. polynomial-time approximate series–parallel shift ). Lemma 4.1 gives polynomial-time approximate theta shifts from (x ,y )to(x ,y ) when the considered numbers are real al- 1 1 2 2 gebraic, y ∈ [−1, 1], y ∈ [1, ∞)and q> 0. Note that shifts 1 2 are a particular case of polynomial-time approximate shifts. More- over, due to the transitivity property of shifts, if there is a shift from (x ,y )to(x ,y ) and there is a polynomial-time approxi- 1 1 2 2 mate shift from (x ,y )to(x ,y ), then there is a polynomial-time 2 2 3 3 approximate shift from (x ,y )to(x ,y ). In fact, polynomial- 1 1 3 3 time approximate shifts exhibit some of the properties of shifts; in Lemma 4.4 we show that they behave well with respect to parallel and series compositions and in Lemma 4.8 we show that they are transitive under certain conditions. In Section 5 we give more ex- amples of polynomial-time approximate shifts, some of which will 2 Page 20 of 94 Galanis, Goldberg & Herrera-Poyatos cc be constructed by transitivity. These approximate shifts play an important role in our hardness proofs. Lemma 4.4. Let q ∈ C \{0} and let (x ,y ) ∈H for each j j q j ∈{1, 2, 3}. Let us assume that there are polynomial-time approx- imate shifts from (x ,y ) to (x ,y ), and from (x ,y ) to (x ,y ). 1 1 2 2 1 1 3 3 Let (x ,y ), (x ,y ) ∈H with y = y y and x = x x . Then: 4 4 5 5 q 4 2 3 5 2 3 (i) there is a polynomial-time approximate shift from (x ,y ) to 1 1 (x ,y ); 4 4 (ii) there is a polynomial-time approximate shift from (x ,y ) to 1 1 (x ,y ). 5 5 Moreover, if the polynomial-time approximate shifts from (x ,y ) 1 1 to (x ,y ) and (x ,y ) are series–parallel, then the obtained 2 2 3 3 polynomial-time approximate shifts are also series–parallel. Proof. For j ∈{2, 3},let G be the graph computed by the n,j polynomial-time approximate shift from (x ,y )to(x ,y ), so G 1 1 j j n,j −n (x ,y )-implements (x ˆ , y ˆ )with |y − y ˆ |≤ 2 , for certain termi- 1 1 j j j j nals t and s . j j For Item i,let P be the parallel composition of (G ,s ,t )and n n,2 2 2 (G ,s ,t ). The graph P gives a shift from (x ,y )to(xˆ , y ˆ y ˆ ) ∈ n,3 3 3 n 1 1 4 2 3 −n H .Since |y − y ˆ |≤ 2 ,wehave |y ˆ |≤|y | +1 and q 3 3 3 3 −n |y y − y ˆ y ˆ |≤|y − y ˆ ||y ˆ | + |y − y ˆ ||y |≤ 2 (|y | +1+ |y |) . 2 3 2 3 2 2 3 3 3 2 3 2 Therefore, for k large enough, the graphs P give a polynomial- n+k time approximate shift from (x ,y )to(x ,y )with y = y y . 1 1 4 4 4 2 3 For Item ii, the proof is analogous but now we define the graph S as the series composition of (G ,s ,t )and (G ,s ,t ), which n n,2 2 2 n,3 3 3 gives a shift from (x ,y )to(xˆ x ˆ , y ˆ ) ∈H . 1 1 2 3 4 q Note that if the original polynomial-time approximate shifts are series–parallel, then the obtained ones are also series–parallel by the definition of series–parallel graphs. When it comes to hardness results, we are only interested in algebraic numbers. However, we will have to consider polynomial- time approximate shifts from (x ,y )to(x ,y ) such that the num- 1 1 2 2 bers involved are not algebraic. This is due to the fact that, even cc Approximating the complex Potts model Page 21 of 94 2 if x and y are algebraic, x and y might not be. Nonetheless, 1 1 2 2 in that case we can ensure that x and y are polynomial-time 2 2 computable. A real number x is polynomial-time computable if there is a function φ : N → Q that is computable in polynomial time (with the input written in unary notation, i.e., 0 ) such that −n |x − φ(n)|≤ 2 for all n ∈ N (Ko 1991, Chapter 2). The defini- tion given in (Ko 1991, Chapter 2) uses dyadic rational numbers instead of rational numbers, but these two definitions are easily seen to be equivalent. We denote the set of polynomial-time com- putable real numbers by P . One can easily show that the set P is R R a field. Real algebraic numbers are in P because we can approxi- mate them as closely as we want by applying Sturm sequences and binary search (Emiris et al. 2008). We say that a complex number z is polynomial-time computable if z = x + iy for some x, y ∈ P . We denote the set of polynomial-time computable complex num- bers by P . Algebraic numbers are in P (their real and imaginary C C parts are real algebraic numbers). It turns out that P is an al- gebraically closed field (Ko 1991, Chapter 2). In particular, for z ∈ P ,wehave |z|∈ P . C R If there is a polynomial-time approximate theta shift from (x ,y ) 1 1 to (x ,y )and x and y are algebraic, then we can compute in 2 2 1 1 polynomial time in n an algebraic number that additively approx- −n imates y up to an additive error 2 . Since we can approximate algebraic numbers by rational numbers efficiently, it follows that x and y are polynomial-time computable. However, if we only 2 2 know that x and y are polynomial-time computable, then it is 1 1 not clear if x and y are polynomial-time computable or not. 2 2 Lemma 4.7 gives a partial answer to this question and plays a key role in our transitivity result for polynomial-time approxi- mate shifts (Lemma 4.8). First, we need to prove some lemmas on polynomial-time computable numbers. Lemma 4.5. Let z ∈ P . There is an algorithm that computes b ∈ Q with |z|≤ b .Moreover, if z =0, then there is an algorithm 1 1 that computes b ∈ Q with 0 <b ≤|z|. 2 2 Proof. Let x = |z|.From x ∈ P , it follows that we can com- −n pute a sequence x ˆ ∈ Q such that |x − x ˆ |≤ 2 , that is, we have n n 2 Page 22 of 94 Galanis, Goldberg & Herrera-Poyatos cc −n −n x ∈ [ˆ x − 2 , x ˆ +2 ]. This computation for n = 1 gives the up- n n −n −n per bound x ˆ +1/2. Note that the sequences x ˆ − 2 and x ˆ +2 1 n n converge to x. Hence, if x = 0, then there must be n such that −n 0 < x ˆ − 2 ≤ x. We compute x ˆ until this inequality happens, n n obtaining the desired lower bound. Lemma 4.6. Let z ∈ P with |z| =1. There is a polynomial-time algorithm that takes as inputs two positive integers n and k and computes a positive integer r(n, k) such that (i) r(n, k) is increasing in k; (ii) r(n, k)= n +Θ(k); −r(n,k) 1 1 −n (iii) if |z − z ˆ|≤ 2 ,then  −  ≤ 2 . k k z −1 zˆ −1 Proof. By Lemma 4.5, we can compute an integer t ≥ 0such −t t that 2 ≤||z|− 1| and |z|≤ 2 . Note that for every integer k ≥ 1 k −t we have the bound z − 1 ≥ 2 . Indeed, if |z| < 1, then −t k k 2 ≤ 1 −|z|≤ 1 −|z| ≤ z − 1 −t k and when |z| > 1, we analogously find that 2 ≤|z|−1 ≤|z| −1 ≤ z − 1 . Let n and k be the inputs of our algorithm. Let r(n, k)= n+(t+ 1)(k + 1), and note that r is increasing in k and r(n, k)= n+Θ (k), establishing Items i and ii. −r(n,k) For Item iii,consider zˆ such that |z − z ˆ|≤ 2 .Since −r(n,k) t+1 |z ˆ|≤|z| +2 ≤ 2 , for every j ∈{0,...,k − 1} we have j k−1−j t(k−1)+j |z ˆ| |z| ≤ 2 and hence k−1 k−1 j k−1−j k k j k−1−j z − z ˆ = (z − z ˆ) z ˆ z ≤|z − z ˆ| |z ˆ| |z| j=0 j=0 k−1 t(k−1)+j t(k−1)+k −(n+2t+1) ≤|z − z ˆ| 2 < |z − z ˆ| 2 ≤ 2 . j=0 k k k k −(t+1) Moreover, we have that z − 1 − z ˆ − 1 ≤ z − z ˆ < 2 and, thus, k k −(t+1) −(t+1) z ˆ − 1 ≥ z − 1 − 2 ≥ 2 , cc Approximating the complex Potts model Page 23 of 94 2 k −t whereweusedthat z − 1 ≥ 2 . Therefore, we find that k k 1 1 z − z ˆ 2t+1 k k −n − = ≤ 2 z − z ˆ ≤ 2 . k k   k k z − 1 z ˆ − 1 (z − 1)(z ˆ − 1) Lemma 4.7. Let q ∈ P with q =0 and let γ ∈ P with γ ∈ C C {0}∪−q/2+ iqR. There is a polynomial-time algorithm that takes as an input: ◦ a positive integer n; ◦ a theta graph G =Θ with terminals s and t. (l ,...,l ) 1 m This algorithm computes f (n, G) such that (i) f (n, G)= n +Θ (size(G)); −f (n,G) (ii) for any γ ˆ with |γ − γ ˆ|≤ 2 ,wehave −n |w(G, s, t; q, γ) − w(G, s, t; q, γ ˆ)|≤ 2 . Proof. Let y = γ +1 and x =1 + q/γ.Note that |x| =1 if and only if |γ + q| = |γ|. By basic geometry, the latter statement is equivalent to γ ∈−q/2+ iqR. Hence, by hypothesis, |x| =1. There are two cases: ◦|x| < 1. Then for any positive integer k we have q |q| |q| |q| 1+ ≤ 1+ ≤ 1+ =1 + . x − 1 1 −|x| |1 −|x|| 1 −|x| ◦|x| > 1. Then for any positive integer k we have q |q| |q| |q| 1+ ≤ 1+ ≤ 1+ =1 + . x − 1 |x|− 1 |1 −|x|| |x| − 1 Since q, x ∈ P , we can apply Lemma 4.5 along with the above bounds to compute a non-negative integer t such that k t 1+ q/(x − 1) ≤ 2 for every positive integer k. Lemma 4.5 2 Page 24 of 94 Galanis, Goldberg & Herrera-Poyatos cc also allows us to compute non-negative integers t and t such that q γ t −t q γ |q|≤ 2 and 2 ≤|γ|. Let n and G =Θ be the inputs of our algorithm. Let (l ,...,l ) 1 m k =max{l ,...,l }.Since |x| = 1, we can compute g(n, G)= 1 m r(n +(t +1)(m +1)+ t ,k), where r is as in Lemma 4.6 for the x q polynomial-time computable number x. We compute f (n, G)= g(n, G)+ t +2t + 1. We claim that f satisfies the statement. In q γ view of the properties of r,wehave f (n, G)= g(n, G)+Θ (1) = n +Θ (size(G)) . We define y =1 + q/ x − 1 for every j ∈{1,...,m}. Recall that in (3.4) we argued that w(G, s, t; q, γ)= y − 1. j=1 −f (n,G) Let γ ˆ with |γ − γ ˆ|≤ 2 .Let yˆ =ˆ γ +1 and x ˆ =1+ q/(ˆ y − 1). Then w(G, s, t; q, γ ˆ)= y ˆ − 1, j=1 l −f (n,G) −t −1 j γ where y ˆ =1 + q/ x ˆ − 1 .Since |γ − γ ˆ|≤ 2 ≤ 2 ,we −t −1 −t −1 γ γ have |γ ˆ|≥|γ|− 2 ≥ 2 and q q γ ˆ − γ |x − x ˆ| = − = q γ γ ˆ γγ ˆ 2t +1 t +2t +1−f (n,G) −g(n,G) γ q γ ≤|q||γ ˆ − γ| 2 ≤ 2 =2 . In light of the properties of r (Lemma 4.6)and thefactthat l ≤ k, it follows that q q −n−(t +1)(m+1)−t x q |y − y ˆ | = − ≤|q| 2 j j l l j j x − 1 x ˆ − 1 −n−(t +1)(m+1) ≤ 2 t +1 for every j ∈{1,...,m}.Thus, we have |y ˆ |≤|y | +1 ≤ 2 . j j cc Approximating the complex Potts model Page 25 of 94 2 We obtain m m m j−1 m y − y ˆ = (y − y ˆ ) y ˆ y j j j j s s j=1 j=1 j=1 s=1 s=j+1 t (m−1)+j−1 < |y − y ˆ | 2 j j j=1 t (m−1) −n−(t +1)(m+1)+j−1 x x ≤ 2 2 j=1 −n−m−2 j −n ≤ 2 2 < 2 . j=1 −n Equivalently, |w(G, s, t; q, γ) − w(G, s, t; q, γ ˆ)| < 2 as we wanted to prove. We now prove the main transitivity property of polynomial- time approximate shifts that we will use in our constructions. Lemma 4.8. Let q ∈ P with q =0 and let (x ,y ) ∈H for each C j j q j ∈{1, 2, 3}. Let us assume that the following hypotheses hold: (i) x and y are polynomial-time computable; 2 2 (ii) y ∈{1}∪ (1 − q/2+ iqR); (iii) there is a polynomial-time approximate shift from (x ,y ) to 1 1 (x ,y ); 2 2 (iv) there is a polynomial-time approximate theta shift from (x ,y ) 2 2 to (x ,y ). 3 3 Then there is a polynomial-time approximate shift from (x ,y ) 1 1 to (x ,y ). Moreover, if the polynomial-time approximate shift 3 3 from (x ,y ) to (x ,y ) is series–parallel, then the polynomial-time 1 1 2 2 approximate shift from (x ,y ) to (x ,y ) is also series–parallel. 1 1 3 3 Proof. Let γ = y − 1 for every j ∈{1, 2, 3}.Let n be a j j positive integer. We give an algorithm that constructs a graph J , in polynomial time in n, such that J γ -implements γ ˆ with n n 1 3 −n |γ − γ ˆ |≤ 2 . This algorithm is as follows. First, we use the 3 3 2 Page 26 of 94 Galanis, Goldberg & Herrera-Poyatos cc approximate theta shift from (x ,y )to(x ,y ) to compute a theta 2 2 3 3 graph G with terminals s and t such that 2 2 2 −n−1 (4.9) |γ − w(G ,s ,t ; q, γ )|≤ 2 . 3 2 2 2 2 Thesizeof G is at most polynomial in n. In light of Lemma 4.7, we can compute, in polynomial time in n, a positive integer f (n + −f (n+1,G ) 1,G ) such that for any γ ˆ with |γ − γ ˆ |≤ 2 ,wehave 2 2 2 2 −n−1 (4.10) |w(G ,s ,t ; q, γ ) − w(G ,s ,t ; q, γ ˆ )|≤ 2 . 2 2 2 2 2 2 2 2 We also have f (n +1,G )= n +Θ (size(G )), so f (n +1,G ) 2 2 2 is bounded by a polynomial in n. Now we use the approximate shift from (x ,y )to(x ,y ) to compute, in polynomial time in 1 1 2 2 n, a graph G such that G γ -implements γ ˆ with |γ − γ ˆ |≤ 1 1 1 2 2 2 −f (n+1,G ) 2 . Combining (4.9)and (4.10) with the triangle inequal- −n ity, we obtain γ − w(G ,s ,t ; q, γ ˆ ) ≤ 2 . 3 2 2 2 2 Finally, we construct a graph J as a copy of G where every n 2 edge is substituted by a copy of G as in Lemma 3.2. Since the sizes of G and G are polynomial in n,the size of J also is polynomial 1 2 n in n. Recall that G γ ˆ -implements γ ˆ = w(G ,s ,t ; q, γ ˆ )and G 2 2 3 2 2 2 2 1 γ -implements γ ˆ . Therefore, the graph J γ -implements γ ˆ ,and 1 2 n 1 3 −n |γ − γ ˆ |≤ 2 , as we wanted to obtain. Finally, if the polynomial- 3 3 time approximate shift from (x ,y )to(x ,y ) is series–parallel, 1 1 2 2 then the graphs J are easily seen to be series–parallel, and the result follows. 5. Polynomial-time approximate shifts with complex weights In this section we show how to implement approximations of real weights when the original weight is a non-real algebraic number. As a consequence of our results, for any real algebraic number q with q ≥ 2 and any pair of algebraic numbers (x, y) ∈H with y ∈ R and 2 2 (x, y) ∈{(−i, i), (i − i), (ω ,ω ), (ω ,ω )},where ω =exp(2πi/3), 3 3 3 3 3 there is a polynomial-time approximate shift from (x, y)toany pair of real algebraic numbers (x ,y ) ∈H (see Theorem 2.1). Our approach to prove Theorem 2.1 is as follows. First, we show that there is (x ,y ) ∈H with y ∈ (0, 1) such that there is a q cc Approximating the complex Potts model Page 27 of 94 2 polynomial-time approximate theta shift from (x, y)to(x ,y ) (see Lemma 5.23). Since x and y are algebraic, it follows that x and y are polynomial-time computable. Secondly, we extend part of Lemma 4.1 to the case where the numbers involved are only known to be polynomial-time computable (see Lemma 2.3). Finally, we use the transitivity property given in Lemma 4.8 to combine both results in the proof of Theorem 2.1. 5.1. Computing with algebraic numbers. In our proofs we use and develop some algorithms on algebraic numbers. We gather these algorithms in this section. We represent an algebraic number z as its minimal polynomial p and a rectangle R of the complex plane such that z is the only root of p in R. We can compute the addition, subtraction, multiplication, division and conjugation of algebraic numbers in polynomial time in the length of their repre- sentations, see (Strzebonski ´ 1997) for details. As a consequence, we can also compute the real and imaginary parts of z and the norm of z, which are algebraic numbers themselves, in polynomial time. Note that an algebraic number is 0 if and only if its minimal polynomial is x, which can be easily checked in this representa- tion. Hence, we can also determine in polynomial time whether two algebraic numbers z and z are equal by checking if z − z is 1 2 1 2 When z is a real algebraic number, we can simply represent it as its minimal polynomial p and an interval I with rational endpoints such that z is the only root of p in I.If we are given a real algebraic number z with this representation, then we can approximate it as closely as we want by applying Sturm sequences and binary search (Emiris et al. 2008). In fact, for z and z real 1 2 algebraic numbers, Sturm sequences also allow us to check whether z ≥ z in time polynomial in the length of the representations of 1 2 z and z .See (Emiris et al. 2008) for more details and complexity 1 2 analysis. A root of unity is a complex number z such that z = 1 for some positive integer k. The smallest positive integer n such that z =1 is the order of z. Note that roots of unity are algebraic numbers. The roots of unity of order n share the same minimal polynomial, known as the n-th cyclotomic polynomial, whose degree is ϕ(n), the 2 Page 28 of 94 Galanis, Goldberg & Herrera-Poyatos cc Euler phi function. We can determine whether an algebraic number z is a root of unity by checking whether its minimal polynomial is cyclotomic, see (Bradford & Davenport 1989) for a polynomial- time algorithm. If z is a root of unity, then we can easily compute its order from its representation; we compute the smallest n such that the minimal polynomial of z divides z − 1. This computation runs in polynomial time in the length of the representation of z as a consequence of the elementary bound ϕ(n) ≥ n/2. Another operation that we can perform in polynomial time is checking if the argument of an algebraic number is in a fixed in- terval. Lemma 5.1. Let a, b ∈ Q ∩ [0, 1] with a ≤ b. Then for any alge- braic number z we can check whether Arg(z) ∈ [2πa, 2πb] in time polynomial in the length of the representation of z. Proof. We can split the interval [2πa, 2πb] into intervals of length at most π/2and checkifArg(z) belongs to any of those intervals. Hence, let us assume for the sake of simplicity that [2πa, 2πb] ⊆ [0,π/2]. The other cases are analogous. Note that 2πia 2πib e and e are roots of unity and, in particular, algebraic. −2πia 2πi(1/4−b) Thus, we can compute z = ze and z = ze .We have a b Arg(z ) ∈ [0,π/2] if and only if Arg(z) ∈ [2πa, π/2+2πa], and Arg(z ) ∈ [0,π/2] if and only if Arg(z) ∈ [−π/2+2πb, 2πb]. We conclude that Arg(z) ∈ [2πa, 2πb] if and only if Arg(z ) ∈ [0,π/2] and Arg(z ) ∈ [0,π/2]. Finally, note that, for any algebraic num- ber y, since Re(y)and Im(y) are algebraic, we can determine if Arg(y) ∈ [0,π/2] or not by checking the inequalities Re(y) ≥ 0 and Im(y) ≥ 0. In the rest of this section we show how to efficiently compute σ(n) a sequence σ(n) such that Arg(z ) ∈ [2πa, 2πb] for every n.We will use the following well-known result, see, e.g., (Brin & Stuck 2002, Section 1.2): if z ∈ C is not a root of unity and |z| =1, then {z : j ∈ N} is dense in the unit circle. Lemma 5.2. Let a, b ∈ Q ∩ [0, 1] with a<b.Let z be an algebraic number such that |z| =1 and z is not a root of unity. Then there cc Approximating the complex Potts model Page 29 of 94 2 exists a sequence of positive integers {σ(n)} and a positive integer k such that such that: (i) k can be computed from z; (ii) σ(n) can be computed in polynomial time in n; (iii) n ≤ σ(n) ≤ n + k − 1 for every positive integer n; σ(n) (iv) Arg(z ) ∈ [2aπ, 2bπ]+2πZ for every positive integer n. Proof. Our algorithm to compute σ(n) is as follows. Set σ(0) = 0. We compute σ(n) as the smallest integer such that n ≤ σ(n) σ(n) σ(n) and Arg(z ) ∈ [2aπ, 2bπ]. We can check whether Arg(z ) ∈ [2aπ, 2bπ] or not by applying the procedure given in Lemma 5.1. We show that σ(n) is well-defined. Let θ =Arg(z). Since z is not a root of unity, {z : j ∈ N} is dense in the unit circle, as we have discussed in the previous paragraph. Therefore, there is q ∈ N such that Arg(z ) ∈ [0, 2(b − a)π]. Note that we can compute q in constant time with the help of Lemma 5.1.Let τ =Arg(z ). Since z is not a root of unity, we find that τ =0. Let t = 2π/τ .Since t is the smallest positive integer such that tτ ≥ 2π, t can be computed by sequentially determining which qj of the following intervals contains the argument of z :(0,π/2), (π/2,π), (π, 3π/2) or (3π/2, 2π). Hence, we can compute k = tq. For each positive integer n,since tτ ≥ 2π and τ< 2(b − a)π,there is p ∈{0,...,t − 1} such that nθ + p τ ∈ [2aπ, 2bπ]+2πZ.The n n integer m = n + p q satisfies n ≤ m ≤ n + k − 1and n n n m θ ∈ nθ + p τ +2πZ ⊆ [2aπ, 2bπ]+2πZ. n n We conclude that σ(n) is well-defined and n ≤ σ(n) ≤ m ≤ n + k − 1, so our algorithm computes σ(n) in polynomial time in n. Lemma 5.3. Let z be a root of unity of order k with k ∈{1, 2, 4}. Then there exists a sequence of positive integers {σ(n)} and an integer l such that: (i) σ(n) can be computed in polynomial time in n; 2 Page 30 of 94 Galanis, Goldberg & Herrera-Poyatos cc (ii) n ≤ σ(n) ≤ n + k − 1 for every positive integer n; σ(n) 2πil/k (iii) z = e for every positive integer n; (iv) π< 2πl/k < 3π/2. Proof. Let θ =Arg(z). Since θ = 0, we can write θ =2πj/k for some integer j coprime with k. We consider two cases. Case I: k = 3. Then either we have θ =2π/3 and we compute σ(n) ∈{n, n +1,n +2} with σ(n) ≡ 2 (mod 3), or we have θ = 4π/3 and we compute σ(n) ∈{n, n +1,n +2} with σ(n) ≡ 1 σ(n) (mod 3). In any case, we have σ(n)θ ∈ 4π/3+2πZ,that is, z = 4πi/3 e for any positive integer n. Case II: k ≥ 5. Then there is an integer l such that k/2 < l< 3k/4, that is, 2πl/k ∈ (π, 3π/2). The Euclidean algorithm gives two integers t ,t such that t j + t k = 1. We compute 1 2 1 2 σ(n) ∈{n,...,n + k − 1} such that σ(n) ≡ t l (mod k). We can write σ(n)= t l + q k for some integer q .We have 1 n n 2πj 2π 2πl σ(n)θ = t l +q 2πj = l(1−t k) +q 2πj = +(q j −lt )2π 1 n 2 n n 2 k k k σ(n) 2πil/k and, equivalently, z = e for every positive integer n. Corollary 5.4. Let z be an algebraic number such that z ∈ R ∪ iR.Let θ =Arg(z). Then there exists a sequence of positive integers {σ(n)}, a positive integer k and a positive rational number C such that such that: (i) k and C can be computed from z; (ii) σ(n) can be computed in polynomial time in n; (iii) n ≤ σ(n) ≤ n + k − 1 for every positive integer n; (iv) cos(σ(n)θ) ≤−C and sin(σ(n)θ) ≤−C for every positive integer n. cc Approximating the complex Potts model Page 31 of 94 2 Proof. We may assume that |z| = 1 since, otherwise, we can compute the algebraic number z/|z| and apply the following algo- rithm to this quantity. We invoke either Lemma 5.2 for a =7/12 and b =8/12 or Lemma 5.3, depending on whether z is a root of unity or not, which can be checked as explained at the beginning of this section. In any case, we find a sequence σ and a positive integer k that satisfy the first three assertions announced in the statement. In the non-root of unity case, we have cos(σ(n)θ) ≤ cos(2πb) < 0 and sin(σ(n)θ) ≤ sin(2πa) < 0 for every positive integer n.In the root of unity case, the sequences cos(σ(n)θ) and sin(σ(n)θ)are negative constants. In any case, we can compute a positive ratio- nal number C such that cos(σ(n)θ) ≤−C and sin(σ(n)θ) ≤−C for every positive integer n. Corollary 5.5. Let z be an algebraic number with |z| > 1. Then for any x ∈ Q with x> 0, we can compute n such that Re (z ) ≥ x.Moreover, if z ∈ [0, ∞), then we can compute m such that Re (z ) ≤−x. iθ Proof. Let z = Re for some θ ∈ [0, 2π)and R> 1. We iθ determine if z/|z| = e is a root of unity or not, and compute iθ its order as explained before. If e is a root of unity of order k, k iθ then z ∈ (1, ∞), so computing n is straightforward. If e is not a root of unity, then, in view of Lemma 5.3 for a =1/12 and b =1/6, we can compute a sequence σ such that σ(j) ≥ j and σ(j)θ ∈ [π/6,π/3] + 2πZ for every positive integer j. We find that σ(j) σ(j) j Re(z ) ≥ R cos(π/3) ≥ R /2. Hence, we can compute j large σ(j) enough such that Re(z ) ≥ x and we choose n = σ(j). iθ Now let us assume that z ∈ [0, ∞). Note that e =1. If iθ e is a root of unity of order 2 or 4, then the result is trivial. If θ ∈{0,π/2,π, 3π/2}, then, by invoking Corollary 5.4,we com- pute σ and a positive rational number C such that σ(j) ≥ j and cos(σ(j)θ) ≤−C for every positive integer j. We find that σ(j) σ(j) j Re(z ) ≤−CR ≤−CR . Hence, we can compute j large σ(j) enough such that Re(z ) ≤−x and we choose m = σ(j). 5.2. Some shifts for non-real algebraic numbers. In this section we gather some of the shifts that we use in our proofs. Let 2 Page 32 of 94 Galanis, Goldberg & Herrera-Poyatos cc q be a real algebraic number with q ≥ 2and let(x, y) ∈H be a pair of algebraic numbers. We are interested in computing a shift from (x, y)to(x ,y ) ∈H with x ∈ R and |x | > 1 whenever 1 1 q 1 1 possible. The existence of this shift turns out to be closely related to the hardness of approximating |Z (G; q, γ)| with γ = y − 1; Tutte when we can compute such a shift the approximation problem is #P-hard, as we will see in Section 6. Recall that one can evaluate the Tutte polynomial of a graph in polynomial time at any of the 2 2 points in {(−i, i), (i, −i), (ω ,ω ), (ω ,ω )},where ω =exp(2πi/3) 3 3 3 3 3 (see Section 6.3). These are the points for which our results fail to construct the desired shift. The results of this section involve computations that might not run in polynomial time in the length of the representation of the algebraic numbers q, x and y involved. However, when applying these results, the numbers q, x and y are constants and, hence, this will not affect the complexity of our algorithms. Remark 5.6. Let q be a positive real number and let (x, y) ∈H . From (x − 1)(y − 1) = q it follows that x is real if and only if y is real. Note that x =1 + q/(y − 1) = (y + q − 1)/(y − 1). As noted in the proof of Lemma 4.7, we find that |x| =1 if and only if |y + q − 1| = |y − 1|,thatis, y is on the line 1 − q/2+ iR. Moreover, |x| > 1 if and only if Re(y) > 1 − q/2. Note that when q ≥ 2 and Re(y) > 0,wehave Re(y) > 1 − q/2 and, thus, |x| > 1. These observations will be applied several times in this section. Lemma 5.7. Let q be a real algebraic number with q ≥ 2.Let x and y be algebraic numbers such that (x, y) ∈H and Arg(y) ∈ {0,π/2, 2π/3,π, 4π/3, 3π/2}. Then we can compute a theta graph J that (x, y)-implements (x ,y ) with |x | > 1 and x ∈ R. 1 1 1 1 Proof. We show how to compute n such that Re(y ) > 0and n n Im(y ) > 0. For such a n,welet y = y and x =1 + q/(y − 1), 1 1 1 so Remark 5.6 ensures that |x | > 1and x ∈ R. Hence, we 1 1 can return J as the graph with two vertices and n edges joining them. Since y and |y| are algebraic numbers, we can compute the algebraic number y/ |y|. We can detect if y/ |y| is arootofunity or not as explained in Section 5.1. There are two cases: cc Approximating the complex Potts model Page 33 of 94 2 (i) y/ |y| is not a root of unity. Then we can apply Lemma 5.2 with a =1/12,b =1/6and z = y to compute the smallest positive integer n such that Arg(y ) ∈ [π/6,π/3]. Recall that such an integer exists because {(y/ |y|) : j ∈ N} is dense in the unit circle. Finally, since Arg(y ) ∈ [π/6,π/3], we have n n Re(y ) > 0and Im(y ) > 0. (ii) y/ |y| is a root of unity of order r with r ≥ 5. Recall that we can compute r by sequentially computing the powers of y/ |y| r+1 i2π/r until we obtain 1. Then we have (y/ |y|) = e .Note i2π/r that the real and imaginary parts of e =cos(2π/r)+ i sin(2π/r) are positive. Note that the argument given in Lemma 5.7 strongly uses the fact that q ≥ 2, that is, 1 − q/2 ≤ 0. A proof of a version of Lemma 5.7 with q ∈ (0, 2) is unknown to us. Now we deal with the cases Arg(y) ∈{π/2, 2π/3, 4π/3, 3π/2}, where the exemptions 2 2 (−i, i), (i, −i), (ω ,ω ), (ω ,ω )arise. Notethat(−i, i), (i, −i) ∈ 3 3 3 3 2 2 H and (ω ,ω ), (ω ,ω ) ∈H . In fact, one can easily check that 2 3 3 3 3 3 these are the only pairs (x, y) such that |y| =1 and q ∈{2, 3}. Lemma 5.8. Let q be a real algebraic number with q ≥ 2.Let x and y be algebraic numbers such that (x, y) ∈H , y =0 and Arg(y) ∈{2π/3, 4π/3}.If q =3 or |y| =1, then we can compute a series–parallel graph J that (x, y)-implements (x ,y ) with |x | > 1 1 1 1 and x ∈ R. Proof. Note that y/ |y| is a root of unity of order 3. We have Re(y)= |y| cos(2π/3) = −|y| /2 < 0. Let x =1 + q/(y − 1). We consider three cases. Case I: Re(y) > 1 − q/2. Then, by Remark 5.6, |x| > 1. We return J as the graph with 2 vertices and one edge joining them. Case II: Re(y) < 1−q/2. Then |x| < 1. Let y =1+q/(x −1). An n-stretch gives a shift from (x, y)to(x ,y ). Since x ∈ R,there are infinitely many values of n such that y ∈ R.Note that y con- n n verges to 1 − q ∈ (−∞, −1], and the distance between 1 − q and the set of complex points {z ∈ C :Arg(z) ∈{π/2, 2π/3, 4π/3, 3π/2}} is larger than 0. Hence, we can compute n such that Arg(y ) ∈ n 2 Page 34 of 94 Galanis, Goldberg & Herrera-Poyatos cc {0,π/2, 2π/3,π, 4π/3, 3π/2}.Since (x ,y ) ∈H , the result fol- n q lows from applying Lemma 5.7 to (x ,y ), the transitivity property of shifts and noticing that the obtained graph is series–parallel. Case III: Re(y)=1 − q/2. Note that q> 2 because for q =2 we would obtain Re(y) = 0. We distinguish three subcases: ◦|y| > 1. We compute the smallest positive integer n such n n that Arg(y )=2π/3and Re(y )= −|y| /2 < 1 − q/2. The proof is concluded by applying Case II to (x ,y ), where x =1 + q/(y − 1), the transitivity property of shifts and noticing that the obtained graph is series–parallel. ◦|y| < 1. We compute the smallest positive integer n such that n n |y| <q − 2and Arg(y )=2π/3. We have Re(y ) > 1 − q/2 (otherwise by applying Re(y )= −|y| /2 we would find that |y| ≥ q − 2), so |x | > 1 for x =1 + q/(x − 1). We return n n J as the graph with two vertices and n edges joining them. ◦|y| =1. Then 1 − q/2=Re(y)= −|y| /2= −1/2. It follows that q = 3, but this case (|y| =1 and q = 3) was excluded in the hypothesis. This finishes the proof. Lemma 5.9. Let q be a real algebraic number with q ≥ 2.Let y be an algebraic number such that y =0 and Arg(y) ∈{π/2, 3π/2}. (i) If q> 2, then we can compute a theta graph J that (x, y)- implements (x ,y ) with |x | > 1 and x ∈ R. 1 1 1 1 (ii) If q =2 and |y| =1, then we can compute a series–parallel graph J that (x, y)-implements (x ,y ) with y ∈ (−1, 0). 2 2 2 Proof. The hypotheses y =0 and Arg(y) ∈{π/2, 3π/2} are equivalent to y =0 and Re(y)=0. Let x =1 + q/(y − 1). If q> 2, then 1 − q/2 < 0=Re(y)and |x| > 1 as a consequence of Remark 5.6, so we return the graph with two vertices and one edge joining them as J . The second claim (case q = 2) has been studied in (Goldberg & Guo 2017, Lemma 3.15), where the graph constructed is a 2-thickening of a k-stretching.  cc Approximating the complex Potts model Page 35 of 94 2 Corollary 5.10. Let q be a real algebraic number with q ≥ 2. Let x and y be algebraic numbers such that (x, y) ∈H , y ∈ 2 2 (−∞, −1] ∪ [0, ∞) and (x, y) ∈{(i, −i), (−i, i), (ω ,ω ), (ω ,ω )}, 3 3 3 3 where ω =exp(2πi/3). Then we can compute (x ,y ) ∈H and a 3 2 2 q series–parallel graph J such that |x | < 1 and J (x, y)-implements (x ,y ). 2 2 Proof. First, we assume that y ∈ R.The case q =2 and y ∈ Ri is covered in Lemma 5.9, so we assume that q =2 or y ∈ Ri.By applying Lemmas 5.7, 5.8 or 5.9 (depending on the argument of y), we can compute a graph J that (x, y)-implements (x ,y )with 1 1 |x | > 1and x ∈ R. We apply Corollary 5.5 with z = x in order 1 1 1 to compute n such that Re(x ) > 1. A n-stretching of (x ,y )gives 1 1 a shift from (x ,y )to(x, ˆ y ˆ), where x ˆ = x and y ˆ =1 + q/(ˆ x − 1). 1 1 We have Re(y ˆ)=1 + q(Re(x ˆ) − 1)/ |x ˆ − 1| > 1, so |y ˆ| > 1. There are two cases: ◦ y ˆ ∈ R. We apply Corollary 5.5 with z =ˆ y to compute t t t such that Re(y ˆ ) < 1 − q/2 < 0. We set y =ˆ y and x =1+ q/(y − 1). By the transitivity property of shifts, we 2 2 have a shift from (x, y)to(x ,y ). Since Re(y ) < 1 − q/2, 2 2 2 we conclude that |x | < 1 (Remark 5.6). ◦ y ˆ ∈ R. Hence, we have y ˆ ∈ (1, ∞). We can compute a positive integer l such that the norm of y =ˆ y y is larger than 1. Note that y =ˆ y y ∈ R. A parallel composition yields a shift from (x, y)to(x ,y ), where x =1 + q/(y − 1). We compute the graph J by applying the previous case to (x ,y ). Now we deal with the case y ∈ (−1, 0). A 2-thickening gives us a shift from (x, y)to(a ,b ), where b = y ∈ (0, 1) and a = 1 1 1 1 1+ q/(b − 1) < 1 − q ≤−1. A 2-stretching gives us a shift from (a ,b )to(a ,b ), where a = a > 1and b =1 + q/(a − 1) > 1. 1 1 2 2 2 2 2 We compute a positive integer j such that b y< −q and, with the help of a j-thickening, construct a shift from (a ,b )to(a ,b )with 2 2 3 3 b = b . The transitivity property of shifts allows us to construct a shift from (x, y)to(a ,b ). To conclude the proof, we apply a 3 3 parallel composition between the latter shift and the identity shift 2 Page 36 of 94 Galanis, Goldberg & Herrera-Poyatos cc from (x, y)to(x, y), obtaining a shift from (x, y)to(x ,y )with 2 2 y = b y. Recall that b y = b y< −q,so q/(y − 1) ∈ (−1, 0) and 2 3 3 2 x =1 + q/(y − 1) ∈ (0, 1). 2 2 Finally, note that the graphs considered in this proof are series– parallel. 5.3. An approximate shift to (0, 1 − q). In Lemma 5.11 and Corollary 5.13 we give a polynomial-time approximate series–parallel shift from (x, y)to(0, 1 − q) under certain conditions. Lemma 5.11. Let q ∈ P with q> 0.Let (x, y) ∈H such that R q x, y ∈ P and Re(y) < 1 − q/2. Then there is a polynomial-time approximate theta shift from (x, y) to (0, 1 − q). Proof. Let x =1 + q/(y − 1). In light of Remark 5.6,wehave |x| < 1. Therefore, the weight y =1 + q/(x − 1) implemented by an j-stretch converges to 1 − q as j →∞.We have j j qx q |x| q |x| (5.12) |q − 1+ y | = ≤ ≤ . x − 1 1 −|x| 1 −|x| We use (5.12) to give a a polynomial-time approximate theta shift from (x, y)to(0, 1 − q). Let n be a positive integer, so the desired −n accuracy of the quantity in (5.12)is2 . We are going to return a path graph with j edges for j large enough. It remains to show how to compute j from n.Since q, |x|∈ P , we can compute b, c ∈ Q such that q ≤ c and 0 <b ≤ 1 −|x| (Lemma 4.5). Hence, |x|≤ −n 1 − b< 1, and it suffices to compute j with j ≥ log (2 b/c). 1−b Corollary 5.13. Let q be a real algebraic number with q ≥ 2. Let x and y be algebraic numbers such that (x, y) ∈H , y ∈ 2 2 (−∞, −1] ∪ [0, ∞) and (x, y) ∈{(−i, i), (i, −i), (ω ,ω ), (ω ,ω )}, 3 3 3 3 where ω =exp(2πi/3). Then there is a polynomial-time approxi- mate series–parallel shift from (x, y) to (0, 1 − q). Proof. From Corollary 5.10 we obtain a shift from (x, y)to (x ,y )with |x | < 1 or, equivalently, Re(y ) < 1 − q/2. The result 2 2 2 2 follows from applying Lemma 5.11 to (x ,y ) and the transitivity 2 2 property of shifts.  cc Approximating the complex Potts model Page 37 of 94 2 5.4. An approximate shift to (x ,y ) with y ∈ (0, 1). In Lemma 5.16 we show that if a sequence z of complex numbers has certain properties, then there is w ∈ (0, 1) ∩ P that is the n e limit of z for some non-negative integers e ,e ,... that we 1 2 j=1 can compute. Then we apply this result to a subsequence of {y }, where (x ,y ) is the pair implemented by an n-stretch of (x, y), obtaining a polynomial-time approximate theta shift from (x, y) to some (x ,y )with y ∈ (0, 1) (Lemma 5.23). First, we need the following elementary results. Lemma 5.14. We have sin(x) ≤ x ≤ π sin(x)/2 for every x ∈ [0,π/2]. Proof. First, we prove that sin(x) ≤ x for every x ∈ [0,π/2]. Let f (x)= x − sin(x). We have f (x)=1 − cos(x) > 0 for every x ∈ [0,π/2]. Hence, f is strictly increasing in [0,π/2]. Since f (0) = 0, we obtain x − sin(x) ≥ 0 for every x ∈ [0,π/2]. Now we prove that x ≤ π sin(x)/2 for every x ∈ [0,π/2]. Let g(x)= π sin(x)/2 − x for every x ∈ [0,π/2]. We have g (x)= π cos(x)/2 − 1. Let y ∈ [0,π/2] such that cos(y)=2/π.Note that g (x) > 0in[0,y), g(y)=0and g (x) < 0in(y, π/2]. Hence, g only reaches a minimum at x ∈{0,π/2}.Since g(0) = g(π/2) = 0, we conclude that 0 ≤ π sin(x)/2 − x for every x ∈ [0,π/2]. Lemma 5.15. Let {z } be a sequence of algebraic complex num- bers such that: (i) we can compute two rational numbers C and R such that C> 0, R ∈ (0, 1) and |z − z |≤ CR for every positive integer n; (ii) we can compute the representation of the algebraic number z in polynomial time in n. Then z ∈ P , i.e., z is polynomial-time computable. Proof. −n−1 Let n be an arbitrary positive integer. For j = log (2 /C) −n−1 we have |z − z |≤ 2 .Note that j =Θ(n) and hence z is j j 2 Page 38 of 94 Galanis, Goldberg & Herrera-Poyatos cc an algebraic number whose representation we can compute in time polynomial in n. So, we can also compute z ˆ ∈ Q[i] such that −n−1 |z − z ˆ |≤ 2 in time polynomial in n. Then, we have that j j −n |z − z ˆ |≤|z − z| + |z − z ˆ |≤ 2 . n n n n Since n was arbitrary, we have that z is polynomial-time com- putable. Lemma 5.16. Let r, c ∈ (0, 1) ∩ Q.Let {z } be a sequence of algebraic complex numbers with: (i) |z | < 1 for every positive integer n; (ii) z =1 − f (n)+ ig(n) with f, g : Z → (0, 1); n n n n (iii) cr ≤ f (n) ≤ r /2 and cr ≤ g(n) ≤ r /2 for every positive integer n. Then there is w ∈ (0, 1) and a bounded sequence of positive inte- gers {e } such that π π j n z − w ≤ + r j=1 2 c(1 − r) for every positive integer n. Moreover, if the representation of the algebraic number z can be computed in polynomial time in n, then w ∈ P and e can be computed in polynomial time in n. R n iθ Proof. We can write z = ρ e for some ρ ∈ (0, 1) and θ ∈ n n n n (0,π/2). Note that 1 − f (n) <ρ .Let h(n)=1 − ρ .We obtain n n (5.17) 0 <h(n) <f (n) ≤ r /2 for every positive integer n.We have Im (z ) g(n) sin (θ )= = . ρ 1 − h(n) In view of Lemma 5.14,weobtain g(n) πg(n) ≤ θ ≤ . 1 − h(n) 2(1 − h(n)) cc Approximating the complex Potts model Page 39 of 94 2 Since 0 <h(n) ≤ 1/2(see(5.17)), it follows that (5.18) g(n) ≤ θ ≤ πg(n). As a consequence, we find that, for any integer n with n ≥ 2, θ g(n − 1) π n−1 (5.19) ≤ π ≤ , θ g(n) 2cr n n where we used the fact that cr ≤ g(n) ≤ r /2. The bounds (5.17), (5.18)and (5.19) will be used several times in this proof. Let τ = 0. We define τ and e by induction on n.Let e be the 0 n n n largest integer such that τ + e θ ≤ 2π and let τ = τ + e θ . n−1 n n n n−1 n n By definition, {τ } is an increasing sequence that is bounded above by 2π. Moreover, we have 2π − θ <τ ,since τ + θ ≤ 2π n n n n contradicts the definition of e . That is, we have 0 ≤ 2π − τ <θ . n n n We show that e is bounded. Note that e ≤ 2π/θ ≤ 2π/(cr), n 1 1 whereweusedthat cr ≤ g(1) ≤ θ (recall (5.18)). For n ≥ 2we have τ − τ 2π − τ θ π n n−1 n−1 n−1 0 ≤ e = ≤ < ≤ , θ θ θ 2cr n n n where we applied (5.19). By combining the latter inequality with the case n = 1 we conclude that 2π (5.20) 0 ≤ e ≤ cr for every positive integer n. iτ The sequence {e } converges to 1. In fact, we show that it does it so exponentially fast. Note that the derivative of e has constant it norm 1. Therefore, e is a Lipschitz function with constant 1, that it is is, |e − e |≤|s − t| for every s, t ∈ R. It follows that iτ i2π iτ n n n (5.21) 1 − e = e − e ≤|2π − τ | <θ ≤ πg(n) ≤ r n n for every positive integer n, where we applied (5.18). n e Now we study the sequence {x } for x = ρ .Since n n j=1 ρ ∈ (0, 1), {x } is decreasing and has a limit w ∈ [0, 1). We claim j n that this is the real number in (0, 1) announced in the statement. 2 Page 40 of 94 Galanis, Goldberg & Herrera-Poyatos cc First, we prove that w> 0. Let b = 2π/(cr) .In view of (5.20), we have n n x ≥ ρ = (1 − h(j)) . j=1 j=1 Recall that a product of the form (1 − a )with a ∈ [0, 1) n n j=1 converges to a positive number if and only if a converges (Stein j=1 & Shakarchi 2010, Proposition 3.1). From (5.17)weobtain ∞ ∞ 1 r h(n) ≤ r = 2 2(1 − r) n=1 n=1 and, thus, (1 − h(j)) converges to a real number L with L> j=1 0. We conclude that w ≥ L > 0, as we wanted to prove. Now we show that {x } converges exponentially fast to w.Note that x =(1 − h(n)) x and, thus, for n ≥ 2, we have n n−1 0 ≤ x − x = x (1 − (1 − h(n)) ) n−1 n n−1 n n ≤ 1 − (1 − h(n)) ≤ h(n)e ≤ r , cr where we used the fact that (1 − x) ≥ 1 − kx for every x ∈ (0, 1) and k ∈ Z , and the bounds on h(n)and e (see (5.17)and (5.20)). We obtain q q π π (1 − r ) n+j n |x − x |≤ |x − x |≤ r = r n+q n n+j n+j−1 cr c(1 − r) j=1 j=1 for any positive integers n and q. Hence, by making q tend to ∞ we conclude that (5.22) |x − w|≤ r c(1 − r) for every positive integer n. cc Approximating the complex Potts model Page 41 of 94 2 In light of (5.21)and (5.22), we obtain for every positive integer n that n n e e j j z − w ≤ z − x + |x − w| n n j j j=1 j=1 ie θ j j = |x | e − 1 + |x − w| n n j=1 ie θ j j ≤  e − 1 + |x − w| j=1 π π iτ n n = e − 1 + |x − w|≤ r + r . 2 c(1 − r) Finally, we argue that if the representation of z can be com- puted in polynomial time in n,then e can be computed in poly- nomial time in n and we have w ∈ P .Note that e is the small- R 1 est positive integer such that Arg (z ) ∈ [3π/2, 2π) ∪{0} and e +1 Arg(z ) ∈ (0,π/2] and, thus, e can be computed by sequen- tially applying Lemma 5.1 with intervals [3π/2, 2π]and [0,π/2], with the z of Lemma 5.1 equal to z for every positive integer k ≤ e + 1. This takes constant time since the quantities and objects involved are constant. For n ≥ 2, let us assume that we have com- n−1 e puted e ,...,e ,and let y = z (so τ =Arg (y )). 1 n−1 n−1 n−1 n−1 j=1 Since the sequence {e } is bounded and the length of the repre- sentation of z is bounded by a polynomial in n, the computa- tion of y takes polynomial time in n.Then e is the smallest n−1 n non-negative integer such that Arg (y z ) ∈ [3π/2, 2π) ∪{0} n−1 e +1 and Arg (y z ) ∈ (0,π/2], and we can compute e again n−1 n by sequentially applying Lemma 5.1 with intervals [3π/2, 2π]and [0,π/2], with the z of Lemma 5.1 equal to z for every positive integer k ≤ e + 1. There is a bounded number of applications of Lemma 5.1 because e is bounded, and each application takes polynomial time in n because the length of the representation of y z is polynomial in n for any k ∈{1, 2,...,e }. We conclude n−1 n that w is the limit of a sequence of algebraic numbers that con- verges exponentially fast and the representation of its n-th element can be computed in polynomial time in n. As a consequence, we have w ∈ P by Lemma 5.15. R 2 Page 42 of 94 Galanis, Goldberg & Herrera-Poyatos cc Lemma 5.23. Let q be a real algebraic number with q> 0.Let x and y be algebraic numbers such that (x, y) ∈H , y ∈ R and |x| > 1. Then there is a polynomial-time approximate theta shift from (x, y) to (x ,y ) for some (x ,y ) ∈H with y ∈ (0, 1) ∩ P . q R Proof. Since y ∈ R,we have x ∈ R (Remark 5.6). Let us write iθ x = Re for some R> 1and θ ∈ (0, 2π). An m-stretch gives m m m a shift from (x, y)to(x ,y )with y =(x + q − 1)/(x − 1). m m iθ By plugging x = Re in the definition of y and multiplying by m −imθ R e − 1 in the numerator and denominator, we obtain 2m m m R − q +1+(q − 2)R cos (mθ) − iqR sin (mθ) (5.24) y = . 2m m 1+ R − 2R cos (mθ) If θ ∈{π/2, 3π/2},that is, x ∈ iR, then for m ≡ 2 (mod 4) we have cos (mθ)= −1, sin (mθ)=0 and m m m (1 + R ) − q (1 + R ) 1+ R − q y = = . 1+ R (1 + R ) Hence, for m ≡ 2 (mod 4) such that 1 + R >q,we have y ∈ (0, 1), so we can choose y = y and we are done. In the rest of the proof we assume that θ ∈{π/2, 3π/2}.We are going to apply Lemma 5.16 to a subsequence of y . First, we invoke Corollary 5.4 with z = x in order to find a sequence σ(m), a positive integer k and a positive rational C that satisfies: ◦ σ(m) can be computed in polynomial time in m; ◦ k and C can be computed in constant time from x; ◦ m ≤ σ(m) ≤ m + k − 1 for every positive integer m; ◦ sin(σ(m)θ) ≤−C and cos(σ(m)θ) ≤−C for every positive integer m. It follows that σ(m) σ(m) iσ(m)θ σ(m) m Re x =Re R e ≤−CR ≤−CR . cc Approximating the complex Potts model Page 43 of 94 2 Since R> 1, we can compute a positive integer m such that for σ(m) m ≥ m we have Re(x ) < 1 − q/2 and, thus, y < 1 (recall 1 σ(m) m m that y =(x + q − 1) / (x − 1) and Remark 5.6). Let q − qR cos (mθ) a =1 − Re(y )= ; m m 2m m 1+ R − 2R cos (mθ) −qR sin (mθ) b =Im(y )= ; m m 2m m 1+ R − 2R cos (mθ) that is, y =1 − a + ib .We have m m m 2σ(m) 2σ(m) σ(m) 2σ(m) R ≤ 1+ R − 2R cos (σ(m)θ) ≤ 4R . Therefore, we obtain qC −σ(m) −σ(m) R ≤ a ≤ 2qR , σ(m) (5.25) qC −σ(m) −σ(m) R ≤ b ≤ qR . σ(m) We compute a positive integer m such that m ≥ log (4q)and 2 2 m ≥ m . We also compute a rational number c with 2 1 −m −k−1 c ∈ (0,qCR /4). Note that computing these quantities takes constant time. Let f (m)= a and g(m)= b . σ(m+m ) σ(m+m ) 2 2 −m−k+1 −σ(m) −m In view of (5.25) and the inequalities R ≤ R ≤ R , we find that 1 1 −m −m −m −m (5.26) cR ≤ f (m) ≤ R ,cR ≤ g(m) ≤ R , 2 2 for any positive integer m. The sequence {z } = {y } sat- m σ(m+m ) isfies ◦ z < 1 for every positive integer m; ◦ z =1 − f (m)+ ig(m)with f, g : Z → (0, 1); ◦ f and g are bounded as in (5.26). ◦ z is an algebraic number whose representation can be com- puted in polynomial time in m. This is due to the facts σ(m+m ) σ(m+m ) 2 2 that z =(x + q − 1)/(x − 1), σ(m)can be computed in polynomial time in m,and σ(m)= O(m). 2 Page 44 of 94 Galanis, Goldberg & Herrera-Poyatos cc Therefore, we can apply Lemma 5.16 to the sequence {z } for −1 r = R .There are y ∈ (0, 1) ∩ P and a bounded sequence of positive integers {e } such that π π j  −m z − y ≤ + R j=1 2 c(1 − 1/R) for every positive integer m. Moreover, we can compute e in poly- nomial time in m.Let M = π/2+ π/(c(1 − 1/R)). For any positive −n integer n, we can compute an integer m with m ≥ log (2 /M ) 1/R and m =Θ(n) in polynomial time in n.We obtain j  −n z − y ≤ 2 . j=1 This gives the following polynomial-time approximate theta shift from (x, y)to(x ,y ), where x =1 + q/(y − 1). For each positive integer n we return a graph J that is the parallel composition of the path graphs that are used to implement the weights y , σ(j+m ) each one repeated e times, for j ∈{1,...,m}. The graph J j n e e m j m j (x, y)-implements (x, ˆ y ˆ) ∈H for y ˆ = z = y . j=1 j j=1 σ(j+m ) Lemma 2.2. Let q be a real algebraic number with q ≥ 2.Let x and y be algebraic numbers such that (x, y) ∈H , y ∈ (−1, 0) ∪ 2 2 (C\R) and (x, y) ∈{(i, −i), (−i, i), (ω ,ω ), (ω ,ω )},where ω = 3 3 3 3 3 exp(2πi/3). Then there is a polynomial-time approximate series– parallel shift from (x, y) to (x ,y ) for some (x ,y ) ∈H with x ,y ∈ P and y ∈ (0, 1). Proof. If y ∈ (−1, 0), then a 2-thickening of (x, y)gives the result. Hence, let us assume that y ∈ (−1, 0) in the rest of the proof. There are two cases: ◦ q =2 or y ∈ iR. We apply either Lemma 5.7, Lemma 5.8 or Lemma 5.9, depending on Arg(y), to find a shift from (x, y) to (x ,y ) ∈H with y ∈ R and |x | > 1. The graph of this 1 1 q 1 1 shift is series–parallel. Then we apply Lemma 5.23 to obtain a polynomial-time approximate theta shift from (x ,y )to 1 1 some (x ,y ) ∈H with y ∈ (0, 1) ∩ P . The result follows q R from the transitivity property of shifts. cc Approximating the complex Potts model Page 45 of 94 2 ◦ q =2and y ∈ iR.Since y = ±i, Lemma 5.9 gives a shift from (x, y)to(x ,y ) for some (x ,y ) ∈H with y ∈ (−1, 0). A 2-thickening of (x ,y ) gives the result. The fact that x ∈ P follows from x =1 + q/(y − 1) and y ∈ P . R R 5.5. Approximate shifts for polynomial-time computable real numbers. In this subsection we show how we can obtain a polynomial-time approximate shift from (x, y)to(x ,y ) for any (x, y), (x ,y ) ∈H when q ≥ 2, y ∈ (0, 1) ∩ P and y is a positive q R real algebraic number (Lemma 2.3). This extends a particular case of Lemma 4.1 to polynomial-time computable numbers. Our proof follows the same approach as that of (Goldberg & Jerrum 2019, Lemma 22) but we have to overcome some difficulties that arise when working with the class of numbers P . These difficulties will become apparent in the proof, but the reader that is familiar with the literature might want to skip the proof. Then we combine this result and Lemma 2.2 to prove Theorem 2.1, the main result of Section 5. Lemma 2.3. Let q, x, y ∈ P such that q> 0, (x, y) ∈H , y is R q positive and 1−q/2 <y < 1. There is a polynomial-time algorithm that takes as an input: ◦ two positive integers k and n, in unary; ◦ a real algebraic number w ∈ [y , 1]. The algorithm produces a theta graph J that (x, y)-implements −n (ˆ x, y ˆ) such that y ˆ−w ≤ 2 .The size of J is at most a polynomial in k and n, independently of w. Proof. If w =1, then J is the graph with vertices s and t and no edges. In the rest of the proof we focus on the case w ∈ (0, 1). Recall that x =1+q/(y−1). Since q> 0and y ∈ (1−q/2, 1), we find that x ∈ (−∞, −1). Let y =1 + q/(x − 1). A j-stretch gives j j a shift from (x, y)to(x ,y ). If j is even, then x > 1and y > 1. j j Otherwise, x < −1and y ∈ (1 − q/2, 1). Moreover, the sequences {y } and {y } are increasing and decreasing, respectively, and 2j+1 2j 2 Page 46 of 94 Galanis, Goldberg & Herrera-Poyatos cc |y − 1| can be made exponentially small as a function of j.We use these properties of y to show that we can compute y = j (e ,...,e ) 1 m j −n y such that y − w ≤ 2 .Let J be the parallel (e ,...,e ) j=1 j 1 m composition of the path graphs that (x, y)-implement (x ,y ), each one repeated e times, for j ∈{1,...,m}.Then J is a theta graph and, in view of (3.4), we have w(G; q, y − 1) = y − 1, that (e ,...,e ) 1 m is, J (x, y)-implements (x, ˆ y ˆ) ∈H with y ˆ = y . The graph q (e ,...,e ) 1 m J is the theta graph output by our algorithm. First, we define a sequence {d } that will be related to the exponents e ,...,e .Since q, x ∈ P , we can compute rational 1 m R upper bounds of q and x (Lemma 4.5) and, with the help of these bounds, a positive integer j such that j > log q.Let d = 0 for 0 0 j |x| every positive integer j with j< j and let d = 0 for every even 0 j positive integer j.For j odd with j ≥ j we define d recursively 0 j as the largest non-negative integer such that y ≥ w.The (d ,...,d ) integer d is well-defined because 0 <y < 1when j is odd and j j j ≥ j . An equivalent definition is that {d } satisfies 0 j (5.27) y <w/y ≤ 1 j (d ,...,d ) 1 j for every odd integer j with j ≥ j . A similar sequence {d } 0 j is used in the proofs of (Goldberg & Jerrum 2019, Lemma 22) and (Goldberg & Jerrum 2012b, Lemma 3.28). For any odd integer n −n m with m ≥ log (q2 − 1) we have 0 ≤ 1 − y ≤ 2 and, in light |x| of (5.27), −n 0 ≤ 1 − w/y ≤ 1 − y ≤ 2 . (d ,...,d ) m 1 m Since 1 ≥ y ≥ w, it follows that (d ,...,d ) 1 m −n −n (5.28) w − y ≤ y 2 ≤ 2 . (d ,...,d ) (d ,...,d ) 1 m 1 m Now we study the size of the integers d ,...,d . We bound d 1 m j using an argument given in (Goldberg & Jerrum 2012b, Lemma 3.28). First, we show that d is O(k). We have y ≥ w.We 0 j obtain d ≤ log (w)=log (w)log (y). 0 y y y j j 0 0 Since w ∈ [y , 1) and log (y) > 0, it follows that 0 < log (w) ≤ k y y and d ∈ O(k). Now we show that d is bounded for any j> j . j j 0 0 cc Approximating the complex Potts model Page 47 of 94 2 By applying (5.27) twice, we find that d d j j y <w/y = wy /y ≤ y j−2 (d ,...,d ) (d ,...,d ) 1 j−2 j 1 j j for every odd integer j with j> j . It follows that d ≤ log(y )/ log(y ) (here and in the rest of this paper log is j j−2 j taken in base e). For every x ∈ (1, 5/4), we have 3(x − 1)/4 ≤ log(x) ≤ x − 1. Hence, we obtain log(y ) log(1/y ) 4 1/y − 1 j−2 j−2 j−2 d ≤ = ≤ log(y ) log(1/y ) 3 1/y − 1 j j j 4y 1 − y 4y |x| +1 4y j j−2 j j 2 = = ≤ |x| , j−2 3y 1 − y 3y 3y j−2 j j−2 |x| +1 j−2 2 j−2 where the last inequality is a consequence of |x| (|x| +1) ≥ |x| +1. Since y /y converges to 1 and, thus, is bounded, it j j−2 follows that d is bounded. We conclude that d = O(k + m). j j j=1 Let us assume that we can compute d ,...,d for m = 1+ 1 m log (q2 − 1) . In light of (5.28), we can return J as the theta |x| graph that implements the weight w(J ; q, y − 1) = y − 1. (d ,...,d ) 1 m Since d = O(k + m)and m =Θ(n), the size of J is at most j=1 a polynomial in k and n. If y were algebraic, computing d ,...,d in polynomial time 1 m would be straightforward from their definition because we can ef- ficiently check inequalities between real algebraic numbers as ex- plained in Section 5.1. This is the approach followed in (Gold- berg & Jerrum 2019, Lemma 22). However, we only know that y ∈ P and, thus, it is not clear how to efficiently determine whether y ≥ w or not for any given d.In the rest of (d ,...,d ,d) 1 m−1 this proof, we show how to overcome this difficulty. −n Let n be a positive integer, so 2 is the desired accuracy for our algorithm. Let us assume that we have computed the integers d ,...,d and we want to compute d for an odd positive integer 1 j−1 j j with j ≥ j . We are going to sequentially try all the values d =0, 1,... until we have y < ≤ 1, (d ,...,d ,d) 1 j−1 2 Page 48 of 94 Galanis, Goldberg & Herrera-Poyatos cc in which case we have found the value d (see (5.27)). Recall that y − 1 is the weight implemented by a theta graph J (d ,...,d ,d) d 1 j−1 whose size is bounded by a polynomial in k and j. Therefore, by applying Lemma 4.7 with G = J and γ = y − 1, we can compute in polynomial time in n and the size of J , a positive integer f (n + 2,J )with f (n +2,J )= n + Θ(size(J )) such that if |γ − γ ˆ|≤ d d d −f (n+2,J ) −n−2 2 ,then |w(G; q, γ) − w(G; q, γ ˆ)|≤ 2 .Since y ∈ P , −f (n+2,J ) we can compute a rational number γ ˆ such that |γ − γ ˆ|≤ 2 in polynomial time in n and the size of J .Let yˆ = d (d ,...,d ,d) j−1 w(G; q, γ ˆ) + 1. Then we have computed in polynomial time in k, j and n a rational number y ˆ such that (d ,...,d ,d) 1 j−1 −n−2 y ˆ − y ≤ 2 . (d ,...,d ,d) (d ,...,d ,d) 1 j−1 1 j−1 Because y ˆ − w is a real algebraic number, we can check (d ,...,d ,d) 1 j−1 if the following inequality holds in polynomial time, −n−1 (5.29) y ˆ − w ≤ 2 . (d ,...,d ,d) j−1 If that is the case, then y − w ≤ y − y ˆ + y ˆ − w (d ,...,d ,d) (d ,...,d ,d) (d ,...,d ,d) (d ,...,d ,d) 1 j−1 1 j−1 1 j−1 1 j−1 −n −n ≤ 3 · 2 /4 < 2 , so y is a good enough approximation of w and we can (d ,...,d ,d) 1 j−1 stop the algorithm (even though we have not computed d ). Other- wise, we claim that y ˆ ≥ w if and only if y ≥ w. (d ,...,d ,d) (d ,...,d ,d) 1 1 j−1 j−1 If y ˆ ≥ w and w> y ,then (d ,...,d ,d) (d ,...,d ,d) 1 j−1 1 j−1 −n−2 y ˆ − w ≤ y ˆ − y ≤ 2 (d ,...,d ,d) (d ,...,d ,d) (d ,...,d ,d) 1 j−1 1 j−1 1 j−1 and (5.29) holds, a contradiction. The same reasoning applies when y ˆ <w and w ≤ y . Hence, we can check (d ,...,d ,d) (d ,...,d ,d) 1 j−1 1 j−1 whether y ≥ w or not by checking y ˆ ≥ w,pro- (d ,...,d ,d) (d ,...,d ,d) 1 j−1 1 j−1 vided that (5.29) does not hold. This gives a procedure to compute d for odd j with j ≥ j : j 0 1. Set d =0. 2. If (5.29) holds, then return d. We have failed to compute d , but we have succeeded in finding an approximation of w. cc Approximating the complex Potts model Page 49 of 94 2 3. If y ˆ ≥ w, then increase d by 1 and go to step 2. (d ,...,d ,d+1) 1 j−1 Else, we have d = d. We repeat this procedure to compute d sequentially until (5.29) holds, in which case we stop and return the graph J associated to y . (d ,...,d ,d) 1 j−1 It remains to show that this procedure always halts and runs in polynomial time. In light of (5.28), we find that, for odd m ≥ n+2 log (q2 − 1), |x| −n−1 y ˆ − w ≤ y ˆ − y + y − w ≤ 2 , (d ,...,d ) (d ,...,d ) (d ,...,d ) (d ,...,d ) 1 m 1 m 1 m 1 m that is, (5.29) holds. Therefore, our procedure that computes −n non-negative integers d ,...,d ,d with y − w ≤ 2 1 m−1 (d ,...,d ,d) 1 m−1 halts for m = O(n). As a consequence, the whole procedure runs in polynomial time in k and n. The proof of Lemma 2.3 can be adapted to to the case w ∈ −k (1,y ]. The main difference is that this time we work with the decreasing sequence {y }.We set d = 0 for odd j and, for even 2j j j, we define d recursively as the largest non-negative integer such that y ≤ w. The details of the proof are left to the reader. (d ,...,d ) When studying the hardness of approximating Z (G; q, γ)we Tutte only need the version stated in Lemma 2.3. Theorem 2.1. Let q ≥ 2 be a real algebraic number. Let x and y be algebraic numbers such that (x, y) ∈H , y ∈ (−1, 0) ∪ 2 2 (C\R) and (x, y) ∈{(i, −i), (−i, i), (ω ,ω ), (ω ,ω )},where ω = 3 3 3 3 3 exp(2πi/3). Then, for any pair of real algebraic numbers (x ,y ) ∈ H there is a polynomial-time approximate series–parallel shift from (x, y) to (x ,y ). Proof. First, let us assume that y ∈ (0, 1]. By Lemma 2.2, there is a polynomial-time approximate series–parallel shift from (x, y)to(x, ˜ y ˜) for some (x, ˜ y ˜) ∈H with x, ˜ y ˜ ∈ P and y ˜ ∈ (0, 1). q R Since q ≥ 2, we have 1 − q/2 ≤ 0and y˜ ∈ (1 − q/2, 1). Hence, Lemma 2.3 gives us a polynomial-time approximate theta shift from (x, ˜ y ˜)to(x ,y ). Since y ˜ ∈ 1 − q/2+ iR =1 − q/2+ iqR and x, ˜ y ˜ ∈ P , the transitivity property of polynomial-time approxi- mate shifts, Lemma 4.8, for (x ,y )=(x, y), (x ,y )=(x, ˜ y ˜)and 1 1 2 2 2 Page 50 of 94 Galanis, Goldberg & Herrera-Poyatos cc (x ,y )=(x ,y ) gives us a polynomial-time approximate series– 3 3 parallel shift from (x, y)to(x ,y ). Now we treat the case y = 0. As a consequence of what we have just shown in the paragraph above, there is a polynomial-time approximate series–parallel shift from (x, y)to(1 − 2q, 1/2) ∈H . −n An n-thickening gives a shift from (1 − 2q, 1/2) to (x , 2 ), where −n x =1+q/(2 −1), so there is also a polynomial-time approximate theta shift from (1−2q, 1/2) to (1−q, 0). We conclude that there is a polynomial-time approximate series–parallel shift from (x, y)to (1 − q, 0) by applying Lemma 4.8 with (x ,y )=(x, y), (x ,y )= 1 1 2 2 (1 − 2q, 1/2) and (x ,y )=(1 − q, 0). Note that we can indeed 3 3 apply Lemma 4.8 because 1−2q, 1/2 ∈ P and 1/2 ∈ 1−q/2+iqR. Now we deal with the case y > 1. We use again the polynomial- time approximate series–parallel shift from (x, y)to(x ,y )= 1 1 (1 − 2q, 1/2) ∈H . We use a 2-stretch to (1 − 2q, 1/2)-implement (x ,y )with x =(1−2q) ≥ 9and y =1+q/(x −1) > 1. Hence, 2 2 2 2 2 there is a polynomial-time approximate series–parallel shift from (x, y)to(x ,y ). Since x and y are real algebraic numbers with 2 2 2 2 y > 1and (x − 1)(y − 1) = q> 0, in view of Lemma 4.1,we have 2 2 2 a polynomial-time approximate theta shift from (x ,y )to(x ,y ). 2 2 Note that y ∈{1}∪ (1 − q/2+ iqR). Hence, we can apply the transitivity property shown in Lemma 4.8 with (x ,y )=(x, y), 1 1 (x ,y )=(x ,y )and (x ,y )=(x ,y ) and find a polynomial-time 2 2 2 2 3 3 approximate series–parallel shift from (x, y)to(x ,y ). Finally, we study the case y < 0. In light of Corollary 5.13, there is a polynomial-time approximate series–parallel shift from (x, y)to(0, 1 − q). Note that 1 − q ≤−1. In this proof we have already shown that there is a polynomial-time approximate series– parallel shift from (x, y)to(x ,y ) ∈H for y = y /(1 − q) > 0. 3 3 q 3 Since y = y (1 − q), by Lemma 4.4 with parameters (x ,y )= 3 1 1 (x, y), (x ,y )=(0, 1 − q)and (x ,y )=(x ,y ), we conclude that 2 2 3 3 3 3 there is a polynomial-time approximate series–parallel shift from (x, y)to(x ,y ). 6. Hardness results We begin with obtaining lower bounds on Z (G; q, γ) for alge- Tutte braic numbers q and γ. In Section 6.2, we review the algorithm cc Approximating the complex Potts model Page 51 of 94 2 of Kannan et al. (1988) for computing algebraic representations, andinSection 6.3 the exact #P-hardness results that we will use. The rest of the section gives various ingredients that are needed in the reduction, which are put together in Section 6.8 where we prove all of our main theorems. 6.1. Properties of Z (G; q, γ) for algebraic numbers q Tutte and γ. In this section we give a lower bound on Z (G; q, γ) Tutte and study the degree and height of Z (G; q, γ)when q and γ are Tutte algebraic numbers. First, we have to introduce some concepts and results from algebraic number theory. The degree of an algebraic number γ is the degree of its minimal polynomial p, and we denote it by d(γ). Recall that the degree of a field extension F/K is the dimension of F as a K-vector space, and it is denoted by [F : K]. It is well known that if γ is algebraic, then [K(γ): K] is the degree of the minimal polynomial of γ over K (Stewart 2004, Chapter 5). In particular, we have [Q(γ): Q]= d(γ). The usual height of a polynomial f ∈ Z[x ,...,x ] is the largest value among the abso- 1 m lute values of its coefficients and it is denoted by H(f ). The usual height of γ is H(γ)= H(p). One can find several (non-equivalent) definitions of the height of an algebraic number in the literature. Another one of these definitions is the absolute logarithmic height. First, we have to introduce the Mahler’s measure of a polynomial f ∈ Z[x], which is given by M (f)= |a | max{1, |α |}, d i i=1 where f (x)= a x , a =0, and α ,...,α are the roots of f . j d 1 d j=0 It is well known that −d(f ) (6.1) 2 H(f ) ≤ M (f ) ≤ H(f ) d(f)+1, see (Waldschmidt 2000, Lemma 3.11). The Mahler’s measure of an algebraic number γ with minimal polynomial p is M (γ)= M (p). −1 The absolute logarithmic height of γ is h(γ)= d(γ) log M (γ). Note that h(γ) ≥ 0 because M (γ) ≥ 1. Now we can state a lower bound for the evaluation of a polynomial at algebraic numbers. 2 Page 52 of 94 Galanis, Goldberg & Herrera-Poyatos cc Lemma 6.2 (Waldschmidt 2000, Section 3.5.4). Let f ∈ Z[x ,...,x ] be a polynomial in m variables and let 1 m γ ,...,γ be algebraic numbers. If f (γ ,...,γ ) =0,then we 1 m 1 m have −cT |f (γ ,...,γ )|≥ e , 1 m where T =deg f +log H(f ), c = D(2 + h(γ )+ ··· + h(γ )) and 1 m D =[Q(γ ,...,γ ): Q]. 1 m Corollary 6.3. Let q and γ be algebraic numbers. We can com- pute a rational number C with C > 1 such that, for any graph q,γ q,γ −size(G) G,either Z (G; q, γ)=0 or |Z (G; q, γ)|≥ C . Tutte Tutte q,γ Proof. Recall that we represent an algebraic number γ as its minimal polynomial p and a rectangle of the complex plane where γ is the only root of p.Let G =(V, E) be a graph. Let n = |V | and m = |E|. Let us assume that Z (G; q, γ) =0. We Tutte can apply Lemma 6.2 for f (q, γ)= Z (G; q, γ) to find that Tutte −cT |Z (G; q, γ)|≥ e ,where c and T are as in Lemma 6.2.We Tutte have c = D(2 + h(q)+ h(γ)) and D =[Q(q, γ): Q], so c ≥ 2. Note that, by definition of Z ,we have H(f ) ≤ 2 and deg f ≤ n+m. Tutte −2c size(G) Hence, we find that |Z (G; q, γ)|≥ e .It remains to Tutte 2c compute a rational number C in (e , ∞) to conclude the result. q,γ From D =[Q(q, γ): Q], we can compute D exactly. Moreover, we can apply (6.1) to upper bound h(q)and h(γ) in terms of the usual heights and degrees of q and γ, and compute an appropriate rational number C with the help of these upper bounds. q,γ The case q = 2 (Ising model) of Corollary 6.3 has previously been shown in (Goldberg & Guo 2017, Lemma 6.4). Note that the approach followed in this section can be applied to obtain lower bounds for other partition functions. In the rest of this section we upper bound the degree and the usual height of the algebraic number Z (G; q, γ) in terms of the Tutte usual heights and degrees of q and γ. We will make use of these bounds in the proof of Lemma 6.13. Let q and γ be two algebraic numbers. By the tower law, we have [Q(q, γ): Q]=[Q(q, γ): Q(q)][Q(q): Q] ≤ d(q)d(γ), where cc Approximating the complex Potts model Page 53 of 94 2 we used that the degree of the minimal polynomial of γ over Q(q) is bounded by d(γ). Since Z (G; q, γ)isin Q(q, γ), it follows Tutte that its degree is bounded by d(q)d(γ). Now we argue how we can bound the usual height of Z Tutte (G; q, γ). A well-known property of the absolute logarithmic height is that h(αβ) ≤ h(α)+ h(β), h(α + β) ≤ log 2 + h(α)+ h(β)and h(1/α)= h(α)(Waldschmidt 2000, Property 3.3). Moreover, if n is an integer, then h(n)=log |n|. A more general property is the following one. Lemma 6.4 (Waldschmidt 2000, Lemma 3.7). Let f ∈ Z[x ,...,x ] be a non-zero polynomial in t variables with 1 t integer coefficients. Let γ ,...,γ be algebraic numbers. Then 1 t h (f (γ ,...,γ )) ≤ log L(f)+ deg (f )h(γ ), 1 t j j=1 where L(f ) is the sum of the absolute values of the coefficients of f and deg (f ) is the degree of f with respect to the j-th variable. Corollary 6.5. Let q and γ be algebraic numbers. Then, for any graph G =(V, E) with n = |V | and m = |E|,wehave Z (G; q, γ) s|t d ≤ d (q) d (γ) , Z (G; q, γ) st Z (G; q, γ) 2d(q)d(γ) s|t m+1/2 nh(q)+mh(γ) H ≤ 2 e . Z (G; q, γ) st Proof. The degree bound on Z (G; q, γ)/Z (G; q, γ) follows s|t st from thefactthatthatitisin Q(q, γ). For its absolute logarithmic height, we have Z (G; q, γ) s|t h ≤ h (Z (G; q, γ)) + h Z (G; q, γ) . st s|t Z (G; q, γ) st Note that L(Z (G; q, γ))+L(Z (G; q, γ)) = 2 . As a consequence st s|t of Lemma 6.4, we find that h (Z (G; q, γ)) + h Z (G; q, γ) ≤ 2(m log 2 + nh(q)+ mh(γ)) . st s|t 2 Page 54 of 94 Galanis, Goldberg & Herrera-Poyatos cc Recall that M (α)=exp(d(α)h(α)). Thus, the bounds on the d(α) Mahler’s measure (6.1) yield the inequality H(α) ≤ (2 exp(h(α))) . We conclude that Z (G; q, γ) d(q)d(γ) s|t 2(m log 2+nh(q)+mh(γ)) H ≤ 2e Z (G; q, γ) st 2d(q)d(γ) m+1/2 nh(q)+mh(γ) = 2 e . One could derive analogous bounds to those of Corollary 6.5 for the algebraic number Z (G; q, γ) by applying the same ar- Tutte gument. 6.2. Computing representations of algebraic numbers via approximations. Kannan, Lenstra & Lovasz ´ (1988) showed how to reconstruct the minimal polynomial of an algebraic number from a certain number of digits of its binary expansion, and we will use their algorithm as a black-box in our reduction of Section 6.5,in the following form. Lemma 6.6 (Kannan et al. 1988, Theorem 1.19). Let α be an al- gebraic number and let d and U be upper bounds on the degree and usual height, respectively, of α. Suppose that we are given −b a rational approximation α to α such that |α − α|≤ 2 /(12d), where b is the smallest positive integer such that b d /2 (3d+4)/2 2d 2 ≥ 2 (d +1) U . Then the minimal polynomial of α can be determined in O(d (d + log U )) arithmetic operations on integers having O(d (d +log U )) binary bits. The algorithm in Lemma 6.6 is based on the Lenstra-Lenstra-Lovasz ´ lattice basis reduction algorithm, we refer the reader to (Yap 2000) for more details. 6.3. Exact Hardness results. We will use the following hard- ness results from (Jaeger et al. 1990) regarding the problem of ex- actly evaluating Z (G; q, γ), given a graph G. We refer to this Tutte problem as Tutte(q, γ). Jaeger et al. (1990) identify the follow- ing 9 “special” points of the Tutte plane: (1, −1), (0, 0), (4, −2), cc Approximating the complex Potts model Page 55 of 94 2 (2, −2), (2, −1), (2, −i − 1), (2,i − 1), (3,ω − 1), and (3,ω − 1), where i = −1and ω =exp(2πi/3). With these special points in mind, their main result on the complexity of Tutte(q, γ)can be stated as follows. Theorem 6.7 (Jaeger et al. 1990, Proposition 1). Let q and γ be algebraic numbers. Then Tutte(q, γ) is #P-hard unless q =1 or (q, γ) is a special point, in which case Tutte(q, γ) is in FP. Vertigan (2005) studied the complexity of the computational problem PlanarTutte(q, γ), which also turns out to be hard for most parameters q and γ. Theorem 6.8 (Vertigan 2005, Theorem 5.1). Let q and γ be al- gebraic numbers. Then PlanarTutte(q, γ) is #P-hard unless q ∈{1, 2} or (q, γ) is a special point, in which case PlanarTutte (q, γ) is in FP. 6.4. Computational problems. In this section, we define a few computational problems that will be useful in our reductions; these were also considered in (Goldberg & Guo 2017). Let q be a real algebraic number, γ ,...,γ be algebraic numbers, and K, ρ 1 k be real numbers with K> 1, ρ> 0. Name: Sign-Tutte(q, γ ,...,γ ). 1 k Instance: A (multi)graph G and a weight function γ ˆ : E →{γ ,...,γ }. 1 k Output: A correct statement of the form Z (G; q, γ ˆ) ≥ 0or Tutte Z (G; q, γ ˆ) ≤ 0. Tutte Name: Factor-K-NormTutte(q, γ ,...,γ ). 1 k Instance: A (multi)graph G and a weight function γ ˆ : E →{γ ,...,γ }. 1 k Output: If Z (G; q, γ ˆ) = 0, the algorithm may output any Tutte rational number. Otherwise, it must output N ∈ Q such ˆ ˆ that N/K ≤|Z (G; q, γ ˆ)|≤ KN . Tutte In the (x, y)-parametrisation, the special points are (0, 0), (1, 1), (−1, −1), 2 2 (0, −1), (−1, 0), (i, −i), (−i, i), (ω ,ω ), and (ω ,ω ). 3 3 3 3 2 Page 56 of 94 Galanis, Goldberg & Herrera-Poyatos cc Name: Distance-ρ-ArgTutte(q, γ). Instance: A (multi)graph G. Output: If Z (G; q, γ) = 0, the algorithm may output any Tutte rational number. Otherwise, it must output A ∈ Q such that, for some a ∈ arg(Z (G; q, γ)), we have |A − a|≤ ρ. Tutte We also consider these problems for the Potts model (with pa- rameters q and y = γ + 1), and we write Potts instead of Tutte in the name of these problems when we refer to the Potts ones. We also consider all these problems restricted to planar graphs, in which case we write PlanarTutte instead of Tutte in the name of the problem. It is a trivial observation that the planar case reduces to the general case. 6.5. Reducing exact computation to sign and approximate computation. In this section, we first review the binary search technique of Goldberg & Guo (2017), which we will refer to as “interval-shrinking”. Then, we use this to obtain several of our inapproximability theorems. Let f (ε)= −εA + B be a linear function, where A and B are real algebraic numbers with A =0. Let ε = B/A be the zero of f.Let (ε ,ε )beanopenintervalwithlength l> 0 such that ε is in (ε ,ε ) or, equivalently, f (ε )f (ε ) < 0. We want to find a small open subinterval of (ε ,ε )thatcontains ε . First, assume that we have an oracle that, on input ε, outputs the sign of f (ε), unless when f (ε) = 0, in which case the output of the oracle is unreliable. Let ε ,ε ,...,ε be a partition of the 0 1 4 interval (ε ,ε ) such that ε = ε , ε = ε and ε − ε ≥ l/10 0 4 i+1 i for every i ∈{0,..., 3}. We invoke the oracle with input ε to determine the sign of f (ε ) for every i ∈{0,..., 4};let s be the i i answer of the oracle. Then, we have a monotone sequence s ,...,s 0 4 of positive and negative signs with s = s . Hence, there are two 0 4 possibilities: either s = s = s ,in which case ε <ε and we 0 1 2 1 can recurse on (ε ,ε ), or s = s = s ,in which case ε <ε 1 4 2 3 4 3 and we can recurse on (ε ,ε ). In any of these two cases, we can 0 3 shrink the interval (ε ,ε )toatmost9/10 of its original length. Then, recursively, we can find an open subinterval of arbitrarily small length containing the zero of f . cc Approximating the complex Potts model Page 57 of 94 2 Next, assume that we have an oracle that returns a multiplica- tive approximation to the norm of f . More accurately, let η =1/41 and suppose that we have an oracle that, on input ε, returns a value f (ε) satisfying (1 − η) |f (ε)| < |f (ε)|≤ f (ε) ≤ (1 + η) |f (ε)| 1+ η when f (ε) = 0 (otherwise the value f (ε) is unreliable). The ap- proach given in Goldberg & Guo (2017) by Goldberg and Guo to shrink (ε ,ε ) is as follows. First, let us assume that A> 0, so f is strictly decreasing. Let ε ,ε ,...,ε be a partition of the in- 0 1 10 terval (ε ,ε ) such that ε = ε , ε = ε and ε − ε ≥ l/20 for 0 10 i+1 i every i ∈{0,..., 9}. These numbers are not chosen to be opti- mal but they suffice. We invoke our oracle to compute f (ε ) for i ∈{0,..., 10}.Let s be the sign (positive, negative, or zero) of ˆ ˆ f (ε ) − f (ε ) for each i ∈{0,..., 9}. We analyse the signs s for i i+1 i i ∈{0,..., 9}. First, we consider the case ε <ε <ε .Note i i+1 that we have f (ε ) >f (ε ) > 0. Moreover, i i+1 ˆ ˆ f (ε ) − f (ε ) ≥ (1 − η) f (ε ) − (1 + η) f (ε ) i i+1 i i+1 = A (ε − ε − η (2ε − ε − ε )) . i+1 i i i+1 ∗ ∗ Note that ε − ε and ε − ε are both at most l and, thus, we i i+1 obtain 2ε − ε − ε ≤ 2l.So since η =1/41 and ε − ε ≥ l/20, i i+1 i+1 i we conclude that s is positive. Now we consider the case ε <ε < i i ε . Thistimewehave f (ε ) <f (ε ) < 0, i+1 i+1 i ˆ ˆ f (ε ) − f (ε ) ≤ (1 + η)(−f (ε )) − (1 − η)(−f (ε )) i i+1 i i+1 = −A (ε − ε − η (ε + ε − 2ε )) , i+1 i i i+1 and 0 <ε + ε − 2ε < 2l. We conclude that s is negative. If i i+1 i ∗ ∗ ε ≤ ε and ε ≤ ε , then we do not know what the value of s i i+1 i will be. However, this is true for at most two consecutive values of i. With these properties of the signs s in mind, let us study the sequence s ,...,s . There are two possibilities. The first one is 0 9 that s ,s ,s ,s are all positive, in which case ε <ε and we can 0 1 2 3 2 recurse on (ε ,ε ). The second possibility is that s ,s ,s ,s are 2 10 6 7 8 9 all negative, in which case ε <ε and we can recurse on (ε ,ε ). 8 0 8 2 Page 58 of 94 Galanis, Goldberg & Herrera-Poyatos cc In any of these two cases, we can shrink the interval (ε ,ε )toat most 9/10 of its original length. Again using binary search it is possible to find a small open subinterval containing the zero of f . Let us now assume that A< 0. In this case, one can analogously prove that the sign s is positive when ε <ε <ε and negative i i i+1 when ε <ε <ε , so the same procedure allows us to shrink i i+1 (ε ,ε ). Let q and γ be real algebraic numbers with q ∈{0, 1} and γ> 0. Let H be a graph and let s and t be two distinct connected vertices of H. We are going to apply these interval stretching techniques to the linear function f (ε; H, γ)=Z (H; q, γ) 1 − s|t (6.9) + ε Z (H; q, γ)+ Z (H; q, γ) . st s|t Let us write this function as f (ε; H, γ)= B(H, γ)−εA(H, γ), where B(H, γ)= Z (H; q, γ)(1 − 1/q)and A(H, γ)= −Z (H; q, γ) − s|t st −1 q Z (H; q, γ). We have s|t f (0; H, γ)= Z (H; q, γ) 1 − ; s|t (6.10) f (1 − q; H, γ)=(1 − q)Z (H; q, γ). st Under certain hypotheses, we are going to prove that f (0; H, γ)f (1− q; H, γ) < 0, so A(H, γ) =0 and f (−; H, γ) has a zero between 0 and 1 − q. This allows us to find a suitable interval where we can perform interval-shrinking. For this purpose we will also need Lemma 6.11, that tells us that the zero of f (−; H, γ) is not close to either 0 or 1 − q. Lemma 6.11. Let q and γ be real algebraic numbers with q ∈ {0, 1} and γ> 0.Let H =(V, E) be a graph and let s and t be two distinct connected vertices of H.Let n = |V |, m = |E|, r = max{n, m} and c =2max{|q|, 1/|q|} max{γ, 1/γ}.Let ε be the zero of the function f (ε; H, γ)= B(H, γ) − A(H, γ), defined as in −r −r (6.9). Let us assume that |Z (H; q, γ)|≥ c , |Z (H; q, γ)|≥ c st s|t ∗ −2r and A(H, γ) =0.Then we have |1 − q − ε |≥|1 − q| c and ∗ −2r |ε |≥|1 − 1/q| c . cc Approximating the complex Potts model Page 59 of 94 2 Proof. In view of the definition of f (ε; H, γ) and equation (6.10), we have |f (ε ; H, γ) − f (1 − q)| |1 − q||Z (H; q, γ)| st |1 − q − ε | = = . |A(H, γ)| |A(H, γ)| Note that k(A)−1 |A| (6.12) |A(H, γ)|≤ max{|q|, 1/|q|} |q| |γ| ≤ c . A⊆E −r Moreover, we have |Z (H; q, γ)|≥ c by hypothesis, so we con- st ∗ −2r clude that |1 − q − ε |≥|1 − q|c . Analogously, we find that |f (ε ; H, γ) − f (0)| |ε | = |A(H, γ)| |1 − 1/q| Z (H; q, γ) s|t −2r = ≥ 1 − c . |A(H, γ)| q Lemma 6.13. Let K be a real number with K> 1.Let q, γ and γ be real algebraic numbers such that q> 1, γ ∈ (−2, −1) 2 1 and γ > 0. Let us assume that we have access to an oracle for Factor-K-NormPlanarTutte(q, γ ,γ ). Then there exists an 1 2 algorithm that takes as input a positive integer ρ and a planar graph H along with two distinct connected vertices s and t of H, and, for γ =(γ +1) − 1, this algorithm computes a represen- tation of the algebraic number Z (H; q, γ)/Z (H; q, γ) in polyno- s|t st mial time in ρ and the size of H. Moreover, if we have access to the more powerful oracle Factor-K-NormTutte(q, γ ,γ ),then we 1 2 can remove the constraint that H is planar. Proof. Since Factor-K-NormPlanarTutte(q, z) is equally hard for any K> 1 (see Section 1.1), we may assume that K =1+η for η =1/41. Let ρ, H =(V, E)and s, t be the inputs of our algorithm. Let n = |V | and m = |E|.Let c =2max{|q|, 1/|q|} max{γ, 1/γ},so c ≥ 2, and let r =max{n, m}.Let H be a copy of H with an extra edge from s to t.Let γ be a weight that we can implement and let ε = γ + 1, so the pair (1 + q/(ε − 1),ε)is(q, γ ) written 2 Page 60 of 94 Galanis, Goldberg & Herrera-Poyatos cc in (x, y) coordinates. We will choose γ and argue how we can implement γ later in the proof. When we say we implement ε, we mean that we implement the pair (1 + q/(ε − 1),ε)in(x, y) notation or, equivalently, γ . Let τ be the weight function on H that assigns the weight γ to the edges of H and the weight γ to the new edge. Then, as was observed in (Goldberg & Jerrum 2014, Lemma 2), we have Z (H ; q, τ)= Z (H; q, γ)(1 + γ ) Tutte st + Z (H; q, γ) 1+ s|t (6.14) = Z (H; q, γ) 1 − s|t + ε Z (H; q, γ)+ Z (H; q, γ) st s|t = f (ε; H, γ), where f (ε; H, γ) was introduced in (6.9). Hence, Z (H ; q, τ ) Tutte can be seen as a function, with variable ε, of the form f (ε; H, γ)= B(H, γ) − εA(H, γ), where B(H, γ)= Z (H; q, γ)(1 − 1/q)and s|t −1 A(H, γ)= −Z (H; q, γ) − q Z (H; q, γ). This construction will st s|t be used several times in this section. Now we analyse f (−; H, γ) for our particular setting (q> 1). Since q and γ are positive, the quantities Z (H; q, γ)and Z (H; q, γ) are positive, so A(H, γ)is st s|t negative. From q> 1and (6.10), it follows that f (0; H, γ)= B(H, γ) > 0and f (1 − q; H, γ) < 0, so f (0; H, γ)f (1 − q; H, γ) < 0 as we wanted. We conclude that the zero ε of f (ε; H, γ)isin (1 − q, 0). Note that ε ∈ (1 − q, 0) if and only if γ ∈ (−q, −1). Moreover, we have m −r Z (H; q, γ) ≥ qγ ≥ c , st (6.15) n −r Z (H; q, γ) ≥ q ≥ c . s|t This allow us to apply Lemma 6.11. Once we have all these prop- erties of f (ε; H, γ) at our disposal, we can proceed to describe our algorithm. Our algorithm also works for q ∈ (−∞, 0)∩(0, 1) as long as f (0; H, γ)f (1 − q; H, γ) < 0 and the hypotheses of Lemma 6.11 hold. In the rest of the proof we will only use the fact that q> 1 cc Approximating the complex Potts model Page 61 of 94 2 one more time, but this will be made explicit and can easily be adapted to the case q< 1aswewill explaininLemma 6.19. −j Our algorithm computes a positive integer j such that c ≤ |q − 1|/2. Let j be an integer with j ≥ j . We will first show how to additively approximate Z (H; q, γ)/Z (H; q, γ) with error s|t st −j at most 2|q|c /|q − 1|. If we could efficiently implement the point (1 − q/(ε − 1),ε)(in (x, y) coordinates) for any ε ∈ [1 − q, 0] using only planar graphs, then our algorithm could perform the interval-shrinking technique explained at the beginning of this section. This would allow us −j−4r to compute an interval of length at most c where the linear function f (ε) has a zero, which would, in turn, provide us with the desired additive approximation, as we will see later. However, some difficulties arise since we do not know how to implement any specific real algebraic weight. This difficulty was overcome by Goldberg and Jerrum by developing Lemmas 4.1 and 4.2.Here we use the version of these lemmas given in Corollary 4.3.Let y = γ +1, x =1+ q/(y − 1), y = γ +1 and x =1+ q/(y − 1). 1 1 1 1 2 2 2 2 Note that y ∈ (−1, 0), y > 1and q = 0. Hence, Corollary 4.3 1 2 allows us to efficiently implement approximations of real algebraic numbers when applied with the parameters x ,y ,x ,y .Every 1 1 2 2 time we invoke Corollary 4.3 we will be using these parameters. We are going to use this corollary to implement approximations of ε ∈ (1 − q, 0). This is the only point where our algorithm uses the fact that γ ∈ (−2, −1) or, equivalently, y ∈ (−1, 0). In further 1 1 lemmas where we study the case q< 1, we will have to implement approximations of ε ∈ (0, 1 − q) and, hence, we will get away with the weaker hypothesis γ ∈ (−1, 0), or, equivalently, y ∈ (0, 1). 1 1 (This hypothesis is “weaker” in the sense that a 2-thickening of a y ∈ (−1, 0) implements a y ∈ (0, 1).) 1 1 We want to implement numbers ε and ε so that ε ∈ (ε ,ε ) ⊆ (1 − q, 0). Note that here we are using that q> 1. When q< 1our algorithm would work on the interval (0, 1 − q) instead of (1 − q, 0). This paragraph is the last time that we use the hypothesis q> 1 in this proof. The argument given in this paragraph will be revisited when we deal with the case q< 1 in further lemmas. Our algorithm first applies the algorithm given in Corollary 4.3 2 Page 62 of 94 Galanis, Goldberg & Herrera-Poyatos cc −2r k  −k with y = −(1 − 1/q)c /2, k such that |y | < |y | < |y | 1 1 and n = 2r log (c) − log (1 − 1/q)+2 .Note that k = O(r) 2 2 and n = O(r). This procedure computes a theta graph and a weight function taking weights in {γ ,γ } that implement a point 1 2 −n −2r (1 + q/(ε − 1),ε ) such that |y − ε |≤ 2 ≤ (1 − 1/q)c /4in −2r polynomial time in r = O(size(H)). We have −3(1 − 1/q)c /4 ≤ −2r ∗ ε ≤−(1 − 1/q)c /4, so, by Lemma 6.11, we find that ε <ε < 0. Now our algorithm invokes again Corollary 4.3, thistimewith −2r k  −k inputs y =1 − q +(q − 1)c /2, k such that |y | < |y | < |y | 1 1 and n = 2r log (c) − min{0, log (q − 1)} +2 . This implements 2 2 −2r (1 + q/(ε − 1),ε )with |y − ε |≤ (q − 1)c /4, which gives 1 − q + −2r  −2r (q − 1)c /4 ≤ ε ≤ 1 − q +3(q − 1)c /4. Again by Lemma 6.11, we find that 1 − q< ε <ε . The interval (ε ,ε ) is the starting interval for the interval-shrinking procedure. Let us assume that we are carrying out the interval-shrinking technique explained at the beginning of this section, so we have an interval (ε ,ε )oflength l where f changes sign. Let us also assume that we can implement the endpoints ε and ε .We want to find a subinterval of length at most 9l/10 where f changes sign. −j−4r We can assume that l> c , since otherwise we do not need to shrink the interval further. Let p = 10 be the number of subin- tervals into which (ε ,ε ) is partitioned by the interval-shrinking technique. We want to find numbers ε ,...,ε such that we can 1 p−1 implement the point (1 + q/(ε − 1),ε ) for every i ∈{1,...,p − 1} i i and, for ε = ε and ε = ε ,we have ε − ε ≥ l/2p for ev- 0 p i i−1 ery i ∈{1,...,p}, which is what is required to perform interval- shrinking. For each i ∈{1,...,p − 1}, our algorithm computes ε = ε + il/p and then it applies the algorithm given in Corol- k  −k lary 4.3 with y = ε , k such that |y | < |y | < |y | and 1 1 n = (j +4r)log (c)+log (4p) . This procedure computes a graph 2 2 and a weight function taking weights in {γ ,γ } that implement a 1 2 −n −j−4r point (1 + q/(ε − 1),ε ) such that |ε − ε |≤ 2 ≤ c /(4p). i i i This application of the procedure given in Corollary 4.3 takes poly- nomial time in j, r and k.Note that k is polynomial in r and j −j−4r because |1 − q|≥|ε |≥ l/p ≥ c /p for any i ∈{1,...,p − 1}. The algebraic numbers ε ,ε ,...,ε ,ε form a partition the inter- 1 p−1 val (ε ,ε ). Our algorithm has computed theta (and, thus, planar) cc Approximating the complex Potts model Page 63 of 94 2 graphs that implement (1 + q/(ε − 1),ε ), so it can use the ora- i i cle Factor-K-NormPlanarTutte(q, γ ,γ ) to multiplicatively 1 2 approximate f (ε ) for every i ∈{0,...,p}.Note that 1 l −j−4r ε − ε ≥ ε − ε − c ≥ i i−1 i i−1 2p 2p for every i ∈{1,...,p}. Therefore, our algorithm can apply the interval-shrinking technique discussed at the beginning of this sec- tion to shrink (ε ,ε ). To guarantee that this interval-shrinking technique computes −j−4r an interval of length at most c , it suffices to subdivide the original interval (j +4r)log (c)+log |1 − q| times due to 10/9 10/9 the fact that each iteration shrinks the interval to 9/10 of its size. In (Goldberg & Guo 2017; Goldberg & Jerrum 2014) the authors used the information provided by this interval-shrinking proce- dure to solve the problem #Minimum Cardinality (s, t)-Cut for arbitrary graphs (not-necessarily planar). Here we follow a dif- ferent approach that allows us to compute the representation of Z (H; q, γ)/Z (H; q, γ). s|t st Once our algorithm has computed an interval of length at most −j−4r c where f has a zero, it implements a point (1 + q/(ˆ ε − 1), ε ˆ) such that ε ˆ is in this interval. This can be done by applying Corollary 4.3 with the same parameters as before other than y , which is set as the middle point of the computed interval. Let ∗ ∗ −j−4r ε be the zero of f.Note that |ε ˆ − ε |≤ c . Recall that f (ε; H, γ)= B(H, γ) − A(H, γ)ε.For a graph H and a weight function τ as in (6.14), with γ =ˆ ε − 1 (which we can now imple- ment as promised before (6.14)), we obtain |Z (H ; q, τ )| = |f (ˆ ε)| = |f (ˆ ε) − f (ε )| T utte (6.16) −j−4r −j−3r ≤|A(H, γ)|c ≤ c , where we used the elementary bound |A(H, γ)|≤ c , which has been established in (6.12). By dividing by Z (H; q, γ)in(6.14), st which is non-zero, and rearranging the terms we find that Z (H ; q, τ ) ε ˆ − 1 Z (H; q, γ) Tutte s|t =ˆ ε + 1+ . Z (H; q, γ) q Z (H; q, γ) st st 2 Page 64 of 94 Galanis, Goldberg & Herrera-Poyatos cc Dividing by 1 + (ε ˆ − 1)/q =(q − 1+ εˆ)/q yields qZ (H ; q, τ ) εq ˆ Z (H; q, γ) Tutte s|t (6.17) = − + . (q − 1+ εˆ)Z (H; q, γ) 1 − q − ε ˆ Z (H; q, γ) st st −2r We claim that |1 − q − ε ˆ|≥|1 − q|c /2. Recall that in view of ∗ −2r Lemma 6.11,wehave |1 − q − ε |≥|1 − q|c . Hence, we obtain ∗ ∗ |1 − q − ε ˆ|≥|1 − q − ε |−|ε − ε ˆ| |1 − q| −2r −j−4r −2r ≥|1 − q| c − c ≥ c , −j−4r −j −4r −4r whereweusedthat c ≤ c c ≤|q − 1| c /2 by definition of j . Therefore, we can apply this lower bound in conjunction with (6.15), (6.16)and (6.17) to conclude that Z (H; q, γ) εq ˆ 2|q||Z (H ; q, τ )| 2|q| s|t Tutte 3r −j − ≤ c ≤ c . Z (H; q, γ) 1 − q − ε ˆ |1 − q| |1 − q| st Our algorithm then computes εq ˆ /(1 − q − ε ˆ) as an approxima- tion of α = Z (H; q, γ) /Z (H; q, γ). We have shown that α st s|t is a real algebraic number that we can additively approximate −j up to an error at most 2|q|c /|1 − q| in polynomial time in j and the size of H. Technically, our approximation εq ˆ /(1 − q − ε ˆ) is another algebraic number. For this reason, our algorithm ap- proximates εq ˆ /(1 − q − ε ˆ) by a rational number α (with additive −j erroratmost2|q|c / |q − 1|) and uses this rational number as our approximation of α. The overall error that we make is then −j |α − α|≤ 4|q|c / |1 − q|. In view of Corollary 6.5,wehave d(α) ≤ d(q)d(γ) ≤ d(q)d(γ ), wherewehaveusedthat γ ∈ Q(γ ) and, thus, d(γ) ≤ d(γ ). More- 2 2 over, Corollary 6.5 yields 2d(q)d(γ) m+1/2 nh(q)+mh(γ) H(α) ≤ 2 e . Since h(γ)= h((γ − 1) − 1) ≤ ρ(1 + h(γ )) by Lemma 6.4,our al- 2 2 gorithm can compute a rational number D with D > 1such q,γ q,γ 2 2 ρ size(H) that H(α) ≤ D . The only non-trivial step of this computa- q,γ tion is upper bounding h(q)and h(γ ) in terms of the degrees and 2 cc Approximating the complex Potts model Page 65 of 94 2 usual heights of q and γ as in (6.1). Let d = d(q)d(γ )= O(1) 2 2 ρ size(H) and U = D .Let b be as in Lemma 6.6.Then we have q,γ 2dρ size(H) 2 = O(D ), so b = O(ρ size(H)). By choosing j appro- q,γ priately, we can use the algorithm that we have developed in this −b proof to find a rational approximation α with |α − α|≤ 2 /(12d). As we have argued, this takes polynomial time in b and size(H). Since b = O(ρ size(H)), we conclude that the computation of α runs in polynomial time in ρ and size(H). Once we have com- puted this approximation, our algorithm invokes the algorithm given in Lemma 6.6 to determine the minimal polynomial of α in time O(d (d +log U )) = O(ρ size(H)). Finally, it remains to compute an interval of the real line where α is the only root of its minimal polynomial. Since α is a real algebraic number and we know its minimal polynomial, our algorithm can use Sturm se- quences to isolate the real roots of this minimal polynomial. Then, by approximating α it decides which one of the computed intervals corresponds to α. Finally, note that our algorithm also works for arbitrary graphs (not-necessarily planar) as long as our oracle provides us with re- liable answers for any graph. Lemma 6.18. Let q, γ and γ be real algebraic numbers such that 1 2 q> 1, γ ∈ (−2, −1) and γ > 0. Let us assume that we have access 1 2 to an oracle for the problem Sign-PlanarTutte(q, γ ,γ ).Then 1 2 there exists an algorithm that takes as input a positive integer ρ and a planar graph H along with two distinct connected vertices s and t of H, and, for γ =(γ +1) − 1, this algorithm computes a representation of the algebraic number Z (H; q, γ)/Z (H; q, γ) s|t st in polynomial time in ρ and the size of H . Moreover, if we have access to the more powerful oracle Sign-Tutte(q, γ ,γ ),then we 1 2 can remove the constraint that H is planar. Proof. The algorithm is exactly the same one of Lemma 6.13. The proof is analogous too. The only difference is in the interval- shrinking technique, where we split (ε ,ε ) into 4 intervals instead of 10 (so p = 4 in the proof), but this has been discussed at the beginning of this section.  2 Page 66 of 94 Galanis, Goldberg & Herrera-Poyatos cc Lemma 6.19. Let K be arealnumberwith K> 1.Let q, γ and γ be real algebraic numbers such that 0 <q < 1, γ ∈ (−1, 0) 2 1 and γ > 0. Let us assume that we have access to an oracle for Factor-K-NormPlanarTutte(q, γ ,γ ). Then there exists an 1 2 algorithm that takes as input a positive integer ρ and a planar graph H along with two distinct connected vertices s and t of H, and, for γ =(γ +1) − 1, this algorithm computes a represen- tation of the algebraic number Z (H; q, γ)/Z (H; q, γ) in polyno- s|t st mial time in ρ and the size of H. Moreover, if we have access to the more powerful oracle Factor-K-NormTutte(q, γ ,γ ),then we 1 2 can remove the constraint that H is planar. Proof. We claim that the algorithm presented in Lemma 6.13 also works in this setting. Let f (ε; H, γ)= B(H, γ)−εA(H, γ)asin (6.9). As we pointed out in the proof of Lemma 6.13, the algorithm worksaslongas f (0; H, γ)f (1 − q; H, γ) < 0 and the hypothesis of Lemma 6.11 hold. First, since q and γ are positive, equations (6.15) −1 hold. It follows that A(H, γ)= −Z (H; q, γ)−q Z (H; q, γ) =0. st st Hence, the hypothesis of Lemma 6.11 hold. In view of (6.10)and the fact that q ∈ (0, 1) and γ is positive, we have f (0; H, γ) < 0and f (1 − q; H, γ) > 0. We conclude that f (0; H, γ)f (1 − q; H, γ) < 0, as we wanted. This time the interval-stretching technique applied in Lemma 6.13 runs on a subinterval (ε ,ε )of(0, 1 − q), so we only need to implement positive values of ε. For this reason, we can get away with the hypothesis γ ∈ (−1, 0) instead of the hypothesis γ ∈ (−2, −1), as was announced in the proof of Lemma 6.13.Fi- nally, we must indicate how our algorithm implements the numbers ε and ε so that ε ∈ (ε ,ε ) ⊆ (0, 1 − q), as this was only done in Lemma 6.13 for q> 1. The argument that we give here also applies when q< 0. Let y = γ +1, x =1 + q/(y − 1), y = γ +1 and 1 1 1 1 2 2 x =1 + q/(y − 1). We have y ∈ (0, 1), y > 1, q< 1and q =0. 2 2 1 2 Our algorithm first applies the algorithm given in Corollary 4.3 −2r k  −k with y = |1 − 1/q| c /2, k such that |y | < |y | < |y | and 1 1 n = 2r log (c) − min{0, log |1 − 1/q|} +2 .Note that k = O(r) 2 2 and n = O(r). This procedure computes a theta graph and a weight function taking weights in {γ ,γ } that implement a point 1 2 −n −2r (1 + q/(ε − 1),ε ) such that |y − ε |≤ 2 ≤|1 − 1/q|c /4in cc Approximating the complex Potts model Page 67 of 94 2 −2r polynomial time in r = O(size(H)). We obtain |1 − 1/q|c /4 ≤ −2r  ∗ ε ≤ 3|1 − 1/q|c /4, so, by Lemma 6.11, we find that 0 <ε <ε . Next our algorithm invokes again Corollary 4.3, this time with in- −2r k  −k puts y =1 − q − (1 − q)c /2, k such that |y | < |y | < |y | 1 1 and n = 2r log (c) − min{0, log (1 − q)} +2 . This implements 2 2 −2r (1 + q/(ε − 1),ε )with |y − ε |≤ (1 − q)c /4, which gives −2r  −2r 1 − q − 3(1 − q)c /4 ≤ ε ≤ 1 − q +(1 − q)c /4. Again by Lemma 6.11, we find that ε <ε < 1 − q. The interval (ε ,ε )is the starting interval for the interval-shrinking procedure that we needed. Lemma 6.20. Let q, γ and γ be real algebraic numbers such 1 2 that 0 <q < 1, γ ∈ (−1, −0) and γ > 0. Let us assume 1 2 that we have access to an oracle for the computational problem Sign-PlanarTutte(q, γ ,γ ). Then there exists an algorithm 1 2 that takes as input a positive integer ρ and a planar graph H along with two distinct connected vertices s and t of H, and, for γ =(γ +1) − 1, this algorithm computes a representation of the algebraic number Z (H; q, γ)/Z (H; q, γ) in polynomial time in ρ s|t st and the size of H. Moreover, if we have access to the more powerful oracle Sign-Tutte(q, γ ,γ ), then we can remove the constraint 1 2 that H is planar. Proof. The algorithm is exactly the same the one of Lemma 6.19, the only difference being in the interval-stretching technique as we have already explained. Lemma 6.21. Let K be a real number with K> 1.Let q, γ and γ be real algebraic numbers such that q< 0, γ ∈ (−1, 0) 2 1 and γ > 0. Let us assume that we have access to an oracle for Factor-K-NormPlanarTutte(q, γ ,γ ). Then there exists an 1 2 algorithm that takes as input: ◦ a positive integer ρ; ◦ a planar graph H =(V, E) such that, for γ =(γ +1) − 1, we have γ ≥ (8 max{|q|, 1/|q|}) ,where r =max{|V |, |E|}; 2 Page 68 of 94 Galanis, Goldberg & Herrera-Poyatos cc ◦ two distinct connected vertices s and t of H. This algorithm computes a representation of the algebraic number Z (H; q, γ)/Z (H; q, γ) in polynomial time in ρ and the size of H. s|t st Moreover, for such inputs ρ, H and s, t,we have Z (H; q, γ) =0 st and Z (H; q, γ) =0. If we have access to the more powerful Tutte oracle Factor-K-NormTutte(q, γ ,γ ), then we can remove the 1 2 constraint that H is planar. Proof. We claim that the algorithm presented in Lemmas 6.13 and 6.19 also works in this setting. Let n = |V | and m = |E|.Let c =2max{|q|, 1/|q|}γ. We may assume that r ≥ 2. First, let us assume that H is connected. Let f (ε; H, ρ)= B(H, γ) − εA(H, γ) as in (6.9), so B(H, γ)= Z (H; q, γ)(1 − 1/q)and A(H, γ)= s|t −1 −Z (H; q, γ) − q Z (H; q, γ). Recall that we have to prove st s|t that the conditions of Lemma 6.11 hold, as well as the inequal- ity f (0; H, γ)f (1 − q; H, γ) < 0. Let δ =(2max{|q|, 1/|q|}) /γ. Note that 0 <δ ≤ 1/4 because γ ≥ (8 max{|q|, 1/|q|}) .Each one of the (at most 2 ) terms in Z (H; q, γ), other than the term with st m−1 n−1 all edges in A, has absolute value at most γ |q| max{|q|, 1} ≤ −m m δ2 γ |q|.Since H is connected, the term with all edges in A is qγ . Thus, we have the inequalities m m m m (6.22) γ q − δγ |q|≤ Z (H; q, γ) ≤ γ q + δγ |q| < 0. st In particular, Z (H; q, γ) = 0. It also follows that st m m −r |Z (H; q, γ)|≥ γ |q|(1 − δ) ≥ γ |q|3/4 ≥ c , st which is one of the conditions of Lemma 6.11. Recall that an (s, t)- cut of H is a subset A of edges of H such that any path from s to t in H has an edge in A. The size of this (s, t)-cut is the cardinality of A. Let k be the size of a minimum cardinality (s, t)-cut in H,and let C k(A) |A| be the number of (s, t)-cuts of size k. We study the terms q γ appearing in Z (H; q, γ), so A is a subset of E such that s and t s|t are not connected in (V, A). Note that such an A is the complement of an (s, t)-cut and, hence, |A|≤ m − k.Moreover, if A is not the complement of an (s, t)-cut of size k, then the absolute value of cc Approximating the complex Potts model Page 69 of 94 2 k(A) |A| m−k−1 2 n−2 −m m−k 2 q γ is at most γ q max{1, |q|} ≤ δ2 γ q .Thus, we have the inequalities m−k 2 m−k 2 0 <Cγ q − δγ q ≤ Z (H; q, γ) s|t (6.23) m−k 2 m−k 2 ≤ Cγ q + δγ q . The inequalities (6.22)and (6.23) have been previously given in the proof of (Goldberg & Jerrum 2014, Lemma 2). As a consequence, we find that m−k 2 m−k 2 m−k 2 −r Z (H; q, γ) ≥ Cγ q (1−δ) ≥ Cγ q 3/4 ≥ γ q 3/4 ≥ c , s|t which is another one of the conditions of Lemma 6.11.In view of (6.10) and the facts that q< 0 and we know the signs of Z (H; q, γ)and Z (H; q, γ), it follows that f (0; H, γ) > 0and s|t st f (1 − q; H, γ) < 0. Hence, we find that f (0; H, γ)f (1 − q; H, γ) < 0, as we wanted. Note that A(H, γ) has to be non-zero because f (−; H, γ) is non-constant as f (0; H, γ)f (1 − q; H, γ) < 0. This is the last condition of Lemma 6.11 that we had to check. We conclude that we can apply the algorithm given in the proof of Lemma 6.19 to compute Z (H; q, γ)/Z (H; q, γ) in polynomial st s|t time in ρ and the size of H. Finally, we show that Z (H; q, γ) = Tutte 0. This is not needed for the algorithm of Lemma 6.19, but is part of the statement of the current lemma. In light of (6.22)and (6.23), we have |Z (H; q, γ)|≥ γ |q|(1 − δ)and Z (H; q, γ) ≤ st s|t m−k 2 Cγ q (1 + δ). Note that 3 5 m m m−k 2 m−k 2 γ |q|(1 − δ) ≥ γ |q| > Cγ q ≥ γ q (1 + δ), 4 4 r m whereweusedthat γ ≥ (8 max{|q|, 1/|q|}) ≥ 8 · 2 |q| > 5C|q| since r ≥ 2. Therefore, we find that |Z (H; q, γ)| > Z (H; q, γ) . st s|t We conclude that Z (H; q, γ)= Z (H; q, γ)+ Z (H; q, γ) < 0. Tutte st s|t It remains to consider the case where H is not connected. Let H ,...,H be the connected components of H, and let us assume 1 l 2 Page 70 of 94 Galanis, Goldberg & Herrera-Poyatos cc that the vertices s and t are in H without loss of generality. We have Z (H; q, γ)= Z (H ; q, γ) Z (H ; q, γ) ··· Z (H ; q, γ); st st 1 Tutte 2 Tutte l Z (H; q, γ)= Z (H ; q, γ) Z (H ; q, γ) ··· Z (H ; q, γ); 1 Tutte 2 Tutte l s|t s|t Z (H; q, γ)= Z (H ; q, γ) Z (H ; q, γ) ··· Z (H ; q, γ) . Tutte Tutte 1 Tutte 2 Tutte l We have already shown that the quantities Z (H ; q, γ), Z (H ; q, γ) st 1 st 1 and Z (H ; q, γ) are non-zero for all j. Hence, we obtain Tutte j Z (H; q, γ)/Z (H; q, γ)= Z (H ; q, γ)/Z (H ; q, γ), and we can s|t st s|t 1 st 1 apply our algorithm to H instead of H . Moreover, we have Z (H; q, γ) =0 and Z (H; q, γ) = 0 as we wanted. This fin- st Tutte ishes the proof. Lemma 6.24. Let q, γ and γ be real algebraic numbers such that 1 2 q< 0, γ ∈ (−1, 0) and γ > 0. Let us assume that we have access 1 2 to an oracle for Sign-PlanarTutte(q, γ ,γ ). Then there exists 1 2 an algorithm that takes as input: ◦ a positive integer ρ ; ◦ a planar graph H =(V, E) such that, for γ =(γ +1) − 1, we have γ ≥ (8 max{|q|, 1/|q|}) ,where r =max{|V |, |E|}; ◦ two distinct connected vertices s and t of H. This algorithm computes a representation of the algebraic number Z (H; q, γ)/Z (H; q, γ) in polynomial time in ρ and the size of H. s|t st Moreover, for such inputs ρ, H and s, t,we have Z (H; q, γ) =0 st and Z (H; q, γ) =0. If we have access to the more powerful Tutte oracle Sign-Tutte(q, γ ,γ ), then we can remove the constraint 1 2 that H is planar. Proof. The algorithm is the same one as that of Lemma 6.21, the only difference being in the interval-stretching technique, as we have already explained. Now we deal with the last part of our reduction, where we reduce the computation of Z (G; q, γ) to the computation of Tutte Z (H; q, γ)/Z (H; q, γ) on the subgraphs H of G.First, let us s|t st introduce some notation. cc Approximating the complex Potts model Page 71 of 94 2 Definition 6.25. We say that a pair (q, γ) of algebraic numbers is zero-free for a graph G if q =0 and, for every subgraph H of G and every pair of distinct vertices s and t in the same connected component of H, the quantities Z (H, q, γ) and Z (H, q, γ) are st Tutte non-zero. Note that if (q, γ) is zero-free for G,then (q, γ) is also zero-free for any subgraph of H. We consider the following computational problems. Name: RatioTutte(q, γ). Instance: A (multi)graph G =(V, E) such that (q, γ) is zero-free for G and two distinct vertices s and t in the same connected component of G. Output: A representation of the algebraic number Z (G; q, γ)/Z (G; q, γ). s|t st Name: ZeroFreeTutte(q, γ). Instance: A (multi)graph G =(V, E) such that (q, γ) is zero-free for G. Output: A representation of the algebraic number Z (G; q, γ). Tutte We also consider the planar versions of these problems, RatioPlanarTutte(q, γ)and ZeroFreePlanarTutte(q, γ). Then we can express the last part of our reduction as a reduction between these two computational problems. Lemma 6.26. Let q and γ be algebraic numbers with q =0.Then we have the reductions ZeroFreePlanarTutte(q, γ) ≤ RatioPlanarTutte(q, γ), ZeroFreeTutte(q, γ) ≤ RatioTutte(q, γ). Proof. First, we show that ZeroFreePlanarTutte(q, γ)re- duces to RatioPlanarTutte(q, γ). Let G be the input of the problem ZeroFreePlanarTutte(q, γ). The reduction computes a representation of Z (G; q, γ) as follows. We assume that G is Tutte not a tree since it is known how to compute the Tutte polynomial of a tree in polynomial time (Sokal 2005, Example 2.1). Then we 2 Page 72 of 94 Galanis, Goldberg & Herrera-Poyatos cc can find an edge e =(s, t)of G that is not a bridge. We are go- ingtouse theoraclefor RatioPlanarTutte(q, γ) to reduce the computation of Z (G; q, γ)tothatof Z (G \ e; q, γ), where Tutte Tutte G \ e is formed from G by deleting e.Note that if G is planar, then G \ e is also planar. Since (q, γ) is zero-free for G,we have Z (G; q, γ) =0. Let α = Z (G; q, γ)/Z (G; q, γ). First, note that st s|t st Z (G; q, γ)= Z (G; q, γ)+ Z (G; q, γ)= Z (G; q, γ)(1 + α) . Tutte st s|t st By calling the oracle the algorithm obtains a representation of the factor 1 + α.Since e is not a bridge, s and t are connected in G \ e, so, by calling the oracle again, the algorithm has access to a representation of the algebraic number β = Z (G \ e; q, γ)/Z (G \ s|t st e; q, γ). We have −1 Z (G; q, γ)= Z (G \ e; q, γ)(1 + γ)+ γq Z (G \ e; q, γ) st st s|t 1+ γ β −1 = Z (G \ e; q, γ) + γq , Tutte 1+ β 1+ β where we multiplied and divided by Z (G \ e; q, γ)= Z (G \ Tutte st e; q, γ)(1 + β), which is non-zero since (q, γ) is zero-free for G.Note that the fact that Z (G \ e; q, γ) = 0 is equivalent to β = −1. Tutte We obtain 1+ α −1 Z (G; q, γ)= Z (G \ e; q, γ) 1+ γ + γq β . Tutte Tutte 1+ β The algorithm then computes a representation of Z (G \ e; q, γ) Tutte recursively. Note that this reduction also works between the non- planar versions of the problems. In the rest of this section we put our reduction together. There is one result for each one of the cases q> 1, 0 <q < 1and q< 0 (see Lemmas 6.27, 6.28 and 6.31). Lemma 6.27. Let K be arealnumberwith K> 1.Let q, γ and γ be real algebraic numbers such that q> 1, γ ∈ (−2, −1) and 2 1 γ > 0. Then we have the following reductions: PlanarTutte(q, γ ) ≤ 2 T Factor-K-NormPlanarTutte(q, γ ,γ ), 1 2 PlanarTutte(q, γ ) ≤ Sign-PlanarTutte(q, γ ,γ ), 2 T 1 2 cc Approximating the complex Potts model Page 73 of 94 2 where ≤ denotes a Turing reduction. Moreover, these reductions also hold for the analogous non-planar problems. Proof. We claim that the problems PlanarTutte(q, γ )and ZeroFreePlanarTutte(q, γ ) are equivalent. This follows from the fact that (q, γ ) is zero-free for every graph G. Lemma 6.26 gives us a reduction from ZeroFreePlanarTutte(q, γ )to RatioPlanarTutte(q, γ ). Recall that we have q> 0, γ ∈ 2 1 (−2, −1) and γ > 0. Thus, we can apply Lemma 6.13 with ρ =1 to obtain a reduction from the problem RatioPlanarTutte(q, γ ) to the problem Factor-K-NormPlanarTutte(q, γ ,γ ), which 1 2 gives the first reduction of the statement. The second reduction is derived analogously, but this time we apply Lemma 6.18 instead of Lemma 6.13. Finally, note that our reductions also hold for the non-planar version of the problems since the algorithms given in Lemma 6.13 and Lemma 6.18 work for arbitrary graphs (non- necessarily planar) as long as the oracle does. Lemma 6.28. Let K be arealnumberwith K> 1.Let q, γ and γ be real algebraic numbers such that 0 <q < 1, γ ∈ (−1, 0) and 2 1 γ > 0. Then we have the following reductions: PlanarTutte(q, γ ) ≤ Sign-PlanarTutte(q, γ ,γ ), 2 T 1 2 PlanarTutte(q, γ ) ≤ 2 T Factor-K-NormPlanarTutte(q, γ ,γ ). 1 2 Moreover, these reductions also hold for the analogous non-planar problems. Proof. The proof is analogous to that of Lemma 6.27;now,we instead combine Lemmas 6.26, 6.19 and 6.20. So far we have obtained reductions when q> 1or0 <q < 1. To obtain a similar result when q< 0 we have to introduce the following variant of Tutte(q, γ), where q is an algebraic number and γ is a positive real algebraic number. 2 Page 74 of 94 Galanis, Goldberg & Herrera-Poyatos cc Name: ThickenedTutte(q, γ). Instance: A (multi)graph G =(V, E). Output: A representation of the algebraic number Z (G; q, (γ+ Tutte ρ(G) 1) − 1), where ρ(G) is the smallest positive integer such ρ(G) r that (γ +1) − 1 >M (G) for M (G) = (8 max{|q|, 1/|q|}) and r =max{|V |, |E|}. We also consider the planar version of this problem, ThickenedPlanarTutte(q, γ), where the input graph is promised to be planar. Lemma 6.29. Let q be an algebraic number and let γ be a real al- gebraic number with γ> 0.Then ThickenedPlanarTutte(q, γ) is #P-hard unless q ∈{1, 2},and ThickenedTutte(q, γ) is #P- hard unless q =1. Proof. We are going to reduce the problem PlanarTutte(q, 2) to ThickenedPlanarTutte(q, γ). The result then follows from the #P-hardness of PlanarTutte(q, 2), cf. Theorem 6.8. Let G be an m-edge instance of PlanarTutte(q, 2). For j =1,...,m,let G be the graph obtained from G by j-thickening max{n,jm} each of its edges. We have M (G ) = (8 max{|q|, 1/|q|}) so M (G ), and therefore ρ(G ), are non-decreasing in j.Let γ = j j j jρ(G ) ρ(G ) j j (γ +1) − 1 and note that Z (G ; q, (γ +1) − 1) = Tutte j Z (G; q, γ ). Note that the points γ ,...,γ are distinct be- Tutte j 1 m cause jρ(G ) ≤ jρ(G ) < (j +1)ρ(G ) for every j.Moreover, j j+1 j+1 their representation is polynomial in the size of G, and hence so is the representation of Z (G; q, γ ). Tutte j The reduction constructs G ,...,G and computes 1 m Z (G; q, γ ) using the oracle for ThickenedPlanarTutte(q, γ) Tutte j with input G . By interpolation, we then recover the polynomial Z (G; q, x), whose degree is m when q is viewed as a constant, in Tutte time polynomial in the size of G. The reduction is then completed by evaluating Z (G; q, x)at x =2. Tutte Finally note that this reduction also works from Tutte(q, 2) to ThickenedTutte(q, γ). The only difference is that Tutte(q, 2) is also #P-hard for q = 2 (see Theorem 6.7), so we also get #P- hardness in this case.  cc Approximating the complex Potts model Page 75 of 94 2 We are going to reduce ThickenedPlanarTutte(q, γ )to Factor-K-NormPlanarTutte(q, γ ,γ ) for appropriate γ and 1 2 1 γ . In order to do so, we need to adapt Lemma 6.26 to this con- text. For this purpose, we consider the following computational problems. Name: RatioThickenedTutte(q, γ). Instance: A (multi)graph G =(V, E), two distinct connected ver- tices s and t of G, and a positive integer ρ such that, for γ =(γ +1) − 1, (q, γ ) is zero-free for G and γ >M (G), ρ ρ ρ where M (G) = (8 max{|q|, 1/|q|}) and r =max{|V |, |E|}. Output: A representation of the algebraic number Z (G; q, γ )/Z (G; q, γ ). ρ st ρ s|t Name: ZeroFreeThickenedTutte(q, γ). Instance: A (multi)graph G =(V, E) and a positive integer ρ such that, for γ =(γ +1) − 1, (q, γ ) is zero-free for G ρ ρ and γ >M (G), where M (G) = (8 max{|q|, 1/|q|}) and r =max{|V |, |E|}. Output: A representation of the algebraic number Z (G; q, γ ). Tutte ρ We also consider the planar versions of these problems, RatioThickenedPlanarTutte(q, γ)and ZeroFreeThickenedPlanarTutte(q, γ). Lemma 6.30. Let q and γ be algebraic numbers with q =0.Then we have the reductions ZeroFreeThickenedPlanarTutte(q, γ) ≤ RatioThickenedPlanarTutte(q, γ), ZeroFreeThickenedTutte(q, γ) ≤ RatioThickenedTutte(q, γ). Proof. The reduction is almost exactly the one explained in Lemma 6.26. The only difference is that, for an input (G, ρ), each call to the oracle has as parameters a subgraph H of G, two vertices s and t determined in the reduction, and the same positive integer ρ.  2 Page 76 of 94 Galanis, Goldberg & Herrera-Poyatos cc Lemma 6.31. Let K be arealnumberwith K> 1.Let q, γ and γ be real algebraic numbers such that q< 0, γ ∈ (−1, 0) and 2 1 γ > 0. Then we have the following reductions: ThickenedPlanarTutte(q, γ ) ≤ 2 T Sign-PlanarTutte(q, γ ,γ ), 1 2 ThickenedPlanarTutte(q, γ ) ≤ 2 T Factor-K-NormPlanarTutte(q, γ ,γ ). 1 2 Moreover, these reductions also hold for the analogous non-planar problems. Proof. Let G and ρ be the inputs of the problem ThickenedPlanarTutte(q, γ ). Let H be a subgraph of G and let s and t be two distinct connected vertices of H.By applying Lemma 6.21 we find that Z (H; q, (γ +1) − 1) and st 2 ρ ρ Z (H; q, (γ +1) − 1) are non-zero. Hence, (q, (γ +1) − 1) is Tutte 2 2 zero-free for G. This shows that ThickenedPlanarTutte(q, γ ) reduces to ZeroFreeThickenedPlanarTutte(q, γ ). Lemma 6.30 gives us a reduction from the problem ZeroFreeThickenedPlanarTutte(q, γ )to RatioThickenedPlanarTutte(q, γ ). Recall that we have q< 0, γ ∈ (−1, 0) and γ > 0. Thus, Lemma 6.21 gives a reduction 1 2 from RatioThickenedPlanarTutte(q, γ )to Factor-K-NormPlanarTutte(q, γ ,γ ), which completes the 1 2 proof for the first reduction of the statement. The second reduc- tion is analogous, but this time we apply Lemma 6.24 instead of Lemma 6.21. Finally, note that our reductions also hold for the analogous non-planar problems since the algorithms given in Lemma 6.21 and Lemma 6.24 work for arbitrary graphs (non- necessarily planar) as long as the oracle does. 6.6. The connection between approximate shifts and re- ductions. In this section we show how a polynomial-time ap- proximate shift from (q, γ )to(q, γ ) may allow us to reduce the 1 2 problems of approximating the norm of the Tutte polynomial at (q, γ ) to the same problem at (q, γ ) (see Lemma 2.4). We also de- 2 1 rive a similar result for the problem Distance-ρ-ArgTutte(q, γ) in Lemma 6.34. cc Approximating the complex Potts model Page 77 of 94 2 Lemma 6.32. Let q, γ and γ be algebraic numbers with q =0 1 2 such that there is a polynomial-time series–parallel approximate shift from (q, γ ) to (q, γ ). Then there is an algorithm that has as 1 2 input a graph G and a positive integer k and computes, in polyno- mial time in k and the size of G, a graph H and a representation of an algebraic number D with D =0 such that Z (H; q, γ ) Tutte 1 −k Z (G; q, γ ) − ≤ 2 . Tutte 2 Moreover, if the graph G is planar, then the graph H is also planar, and if q and γ are real, then D is also real. Proof. Let G =(V, E)and k be the inputs of the algorithm. Let n = |V | and m = |E|. By the definition of series–parallel polynomial-time approximate shifts, for any positive integer j,one can compute, in polynomial time in j, a series–parallel graph J −j that γ -implements γ ˆ with |γ − γ ˆ|≤ 2 for terminals s and t.By 1 2 definition of implementations, we have γ ˆ = qZ (J ; q, γ )/Z (J ; q, st j 1 s|t j γ )and Z (J ; q, γ ) = 0. We construct a graph G that is a copy 1 s|t j 1 j of G where every edge f in G has been replaced by a copy of J as in Lemma 3.2, identifying the endpoints of f with s and t.In light of Lemma 3.2,wehave Z (J ; q, γ ) s|t j 1 Z (G ; q, γ )= Z (G; q, γ ˆ) . Tutte j 1 Tutte We can compute a representation of D = Z (J ; q, γ ) /q in poly- j s|t j 1 nomial time in the size of J because J is a series–parallel graph. j j However, note that this hypothesis is not essential as long as there while constructing is some way to compute a representation of D −j J .Note that |γ ˆ|≤|γ | +2 ,so |Z (G; q, γ ) − Z (G; q, γ ˆ)| j 2 Tutte 2 Tutte is upper bounded by |A|−1 k(A) |A| k(A) |A|−1−t |A| t |q| γ −γ ˆ  ≤ |q| |γ − γ ˆ| γ γ ˆ 2 2 t=0 A⊆E A⊆E |A|−1 k(A) ≤ |q| |γ −γ ˆ| (|A|−1) |γ |+s 2 2 A⊆E m−1 ≤|γ − γ ˆ||q| 2 (m − 1) |γ | + . 2 2 2 2 Page 78 of 94 Galanis, Goldberg & Herrera-Poyatos cc −j n m m−1 −k Hence, for j such that 2 |q| 2 (m − 1)(|γ | +1/2) ≤ 2 , which can be achieved for j = O(size(G)+ k), we obtain Z (G ; q, γ ) Tutte j 1 Z (G; q, γ ) −  = Tutte 2 −k |Z (G; q, γ ) − Z (G; q, γ ˆ)|≤ 2 . Tutte 2 Tutte The algorithm returns H = G and D = D =0. Note that if G is planar, then H = G is also planar by construction. If q and γ j 1 2 m are real, then the number D =(Z (J ; q, γ )/q ) is clearly real s|t j 1 too. In the rest of this section we use Lemma 6.32 to translate in- formation about the function Z (−; q, γ ) for certain graphs to Tutte 1 information about Z (G; q, γ ). This leads to the reductions Tutte 2 given in Lemmas 2.4 and 6.34. These results are stated for polyno- mial series–parallel approximate shifts, but they would also hold even if the shifts are not series–parallel as long as, in the proof of Lemma 6.32, the graphs J are planar and we can compute D = Z (J ; q, γ ) /q in polynomial time in the size of J . j s|t j 1 j We are now ready to prove Lemma 2.4, which was stated in the Proof Outline, and which we restate here for convenience. Lemma 2.4. Let q =0, γ and γ =0 be algebraic numbers, and 1 2 K> 1.For j ∈{1, 2},let y = γ +1 and x =1+ q/γ .If there is j j j j a polynomial-time series–parallel approximate shift from (x ,y ) to 1 1 (x ,y ), then we have a reduction from Factor-K-NormTutte 2 2 (q, γ ) to Factor-K-NormTutte(q, γ ). This reduction also 2 1 holds for the planar version of the problem. Proof. We are going to solve the problem Factor-4K-NonZero-NormTutte(q, γ ) in polynomial time with the help of an oracle for Factor-K-NormTutte(q, γ ). Re- call that hardness of these problems does not depend on K (see Sec- tion 1.1). Let C > 1 be the constant computed in Corollary 6.3 q,γ for the algebraic numbers q and γ = γ ; so, for any graph G,either −size(G) Z (G; q, γ )=0or |Z (G; q, γ )|≥ C .Let G =(V, E) Tutte 2 Tutte 2 q,γ be the input of Factor-4K-NonZero-NormTutte(q, γ ). We 2 cc Approximating the complex Potts model Page 79 of 94 2 assume that Z (G; q, γ ) = 0 since otherwise we can output any- Tutte 2 −size(G) −k thing. Let k be the smallest integer such that 2 ≤ C /2. q,γ The reduction uses the algorithm given in Lemma 6.32 to compute agraph H and a representation of an algebraic number D with D =0 such that Z (H; q, γ ) Tutte 1 −k Z (G; q, γ ) − ≤ 2 Tutte 2 −size(G) q,γ (6.33) |Z (G; q, γ )| Tutte 2 ≤ . Therefore, we have 1 |Z (H; q, γ )| 3 Tutte 1 ≤ ≤ . 2 D |Z (G; q, γ )| 2 Tutte 2 By invoking the oracle for Factor-K-NormTutte(q, γ ), the reduction computes a rational number N such that we have N/K ≤ |Z (H; q, γ )|≤ KN . The reduction also computes a non-zero Tutte 1 ˆ ˆ ˆ ˆ rational number D such that 1/2 ≤ D/D ≤ 2. Then N = N/D satisfies ≤|Z (G; q, γ )|≤ 4KN, Tutte 2 4K so the reduction outputs N as solution of the computational prob- lem Factor-4K-NonZero-NormTutte(q, γ ). Note that this reduction analogously applies to the planar case since the graph H is planar when G is planar (see Lemma 6.32). We next give the analogue of Lemma 2.4 for the argument. Lemma 6.34. Let q, γ and γ be algebraic numbers with q =0. 1 2 If there is a polynomial-time series–parallel approximate shift from (q, γ ) to (q, γ ),then Distance-5π/12-ArgTutte(q, γ ) reduces 1 2 2 to Distance-π/3-ArgTutte(q, γ ). This reduction also holds for the planar version of the problem. 2 Page 80 of 94 Galanis, Goldberg & Herrera-Poyatos cc Proof. Let C be the constant computed in Corollary 6.3 for q,γ γ = γ .Let G =(V, E) be the input of the problem Distance-π/2-ArgTutte(q, γ ). We assume that Z (G; q, γ ) 2 Tutte 2 = 0 since otherwise we can output anything. The reduction pro- ceeds again similarly to that of Lemma 2.4. First, it applies Lemma 6.32 for appropriate k as in (6.33) to compute a graph H and a representation of a real algebraic number D with D =0 such that Z (H; q, γ ) Tutte 1 −k−2 Z (G; q, γ ) − ≤ 2 Tutte 2 −size(G) q,γ (6.35) |Z (G; q, γ )| Tutte 2 ≤ . Let α = Z (G; q, γ )and β = Z (H; q, γ )/D,so (6.35) Tutte 2 Tutte 1 can be rewritten as |α − β|≤|α| /8. We claim that |Arg(α) − Arg(β)|≤ π/24. Since β is in the disc of centre α and radius |α|/8, by basic geometry, we have π/2 |α|/8 so sin(θ)=1/8, where θ is the angle between 0, α and the inter- section of the circle of radius |α|/8 and center α with the tangent line that goes through 0. Since sin(π/24) > 1/8, we conclude that |Arg(α) − Arg(β)|≤ θ ≤ π/24 as we claimed. By invoking the ora- cle for Distance-π/3-ArgTutte(q, γ ), the reduction computes a rational number A such that, for some a ∈ arg(Z (H; q, γ )), 1 1 Tutte 1 we have |a − A |≤ π/3. Since the reduction has at its dis- 1 1 posal a representation of the algebraic number D,it can com- pute (in polynomial time in the length of this representation) a |α| cc Approximating the complex Potts model Page 81 of 94 2 rational number A such that, for some a ∈ arg(D), we have 2 2 ˆ ˆ ˆ ˆ |a − A |≤ π/24. The reduction outputs A = A − A .We 2 2 1 2 claim that there is an argument a of α such that |a − A|≤ 5π/12. Note that b = a − a is an argument of β. By the triangle in- 1 2 ˆ ˆ ˆ equality, we have |b − A|≤|a − A | + |A − a |≤ 9π/24. Let 1 1 2 2 a =Arg(α)+(b−Arg(β)), which is an argument of α. We conclude that ˆ ˆ ˆ |a − A|≤|b − A| + |a − b| = |b − A| + |Arg(α) − Arg(β)|≤ 5π/12. This reduction analogously applies to the planar case since the graph H is planar when G is planar (see Lemma 6.32). One could actually change the angles ρ =5π/12 and ρ = π/3 2 1 in the statement of Lemma 6.34 as long as ρ <ρ , but ρ =5π/12 1 2 2 and ρ = π/3 will suffice for our purposes. 6.7. Hardness for the Tutte polynomial. In this section we use the reductions of Section 6.5 to obtain intermediate hardness results that will be used to obtain our main theorems in the upcom- ing sections. We start with the following corollary which strength- enspreviousresults of Goldberg & Jerrum (2014) (that applied to general graphs rather than planar). Corollary 6.36. Let K> 1 be a real number. Let q =0, 2,and γ ,γ be real algebraic numbers with γ ∈ (−∞, −2) ∪ (0, ∞) and 1 2 2 either ◦ q> 1, γ ∈ (−2, −1),or ◦ q< 1, γ ∈ (−1, 0). Then, the problems Factor-K-NormPlanarTutte(q, γ ,γ ) 1 2 and Sign-PlanarTutte(q, γ ,γ ) are #P-hard. 1 2 Proof. We consider first the case when γ > 0. For q, γ ,γ as 2 1 2 in the first item, the conclusion follows from Theorem 6.8 and the reductions given in Lemma 6.27. For the second item: when q ∈ (0, 1), the result follows from the reductions given in Lemma 6.28 and Theorem 6.8, while for q< 0, the result follows from Lem- mas 6.29 and 6.31. 2 Page 82 of 94 Galanis, Goldberg & Herrera-Poyatos cc The other case is when γ < −2. Then, we can γ -implement 2 2 (γ +1) − 1 > 0 with a 2-thickening and proceed as in the previous case. Lemma 6.37. Let K be arealnumberwith K> 1.Let x, y be a real algebraic numbers such that (x, y) =(−1, −1), min{x, y}≤ −1 and max{x, y} < 0.Let q =(x − 1)(y − 1) and γ = y − 1. Then the problems Factor-K-NormPlanarTutte(q, γ) and Sign-PlanarTutte(q, γ) are #P-hard. Proof. Note that q> 2. We claim that we can (x, y)-implement (x ,y )with y ∈ (−1, 0), and (x ,y )with |y | > 1 using planar (in 1 2 1 2 2 2 fact, series–parallel) graphs. The result then follows by invoking Corollary 6.36 with γ = y − 1and γ = y − 1. 1 1 2 2 The case min{x, y} < −1 is treated in (Goldberg & Jerrum 2014, Lemmas 8–11). Hence, we may assume that −1 ≤ x< 0and −1 ≤ y< 0. Since (x, y) =(−1, −1) by hypothesis, there are two cases: ◦ x = −1and −1 <y < 0. As pointed out in (Goldberg & Jerrum 2014, Corollary 26), a 3-thickening from (x, y)imple- ments the point (x ,y )= 1 − ,y with x < −1and 1+y+y y ∈ (−1, 0), so the point (x ,y ) has already been studied in this proof. ◦−1 <x< 0and y = −1. This time we perform a 3-stretching from (x, y) to implement a point (x ,y )with x ∈ (−1, 0) and y < −1. Lemma 6.38. Let K> 1 be arealnumberand q, x, y be real al- gebraic numbers with max{|x|, |y|} < 1 and q =(x − 1)(y − 1) > 32/27. Then, for γ = y−1, Factor-K-NormPlanarTutte(q, γ) and Sign-PlanarTutte(q, γ) are #P-hard, unless q =2. Proof. In view of (Goldberg & Jerrum 2014, Lemmas 12 and 15), we can (x, y)-implement points (x ,y )and (x ,y )with y ∈ 1 1 2 2 1 (−1, 0) and y > 1. These implementations only use series–parallel graphs. Hence, we can apply (the first item of) Corollary 6.36 with γ = y − 1and γ = y − 1 to finish the proof. 1 1 2 2 cc Approximating the complex Potts model Page 83 of 94 2 6.8. Proofs of our main theorems. In this section we show how our main Theorems 1.2, 1.3, 1.4 and 1.5 follow from the #P- hardness results of Section 6.7. We start with Theorem 1.5. Theorem 1.5. Let q> 2 be a real, γ ∈ C\R be an algebraic num- ber, and K> 1. Then, Factor-K-NormPlanarTutte(q, γ) and Distance-π/3-ArgPlanarTutte(q, γ) are #P-hard, 2πi/3 4πi/3 unless q =3 and γ +1 ∈{e ,e } when both problems can be solved exactly in polynomial time. Proof. Let (x, y) ∈H be such that y = γ + 1. Consider the point (x ,y ) ∈ H with y = −1/2and x =1 + q/(y − 1). 2 2 q 2 2 2 Note that x =1 − 2q/3 ≤ 1 − 4/3 < 0. There are two cases. Either x ≤−1and thepoint (x ,y ) satisfies the hypothesis 2 2 2 of Lemma 6.37,or −1 <x < 0and thepoint (x ,y )satis- 2 2 2 fies the hypothesis of Lemma 6.38. In any case, we conclude that the computational problems Sign-PlanarTutte(q, γ )and Factor-K-NormPlanarTutte(q, γ ) are #P-hard for γ = y − 2 2 2 1when q> 2. By Lemma 2.4 (for γ = γ and γ = γ ), we see that the problem 1 2 2 Factor-K-NormPlanarTutte(q, γ ) reduces to the problem Factor-K-NormPlanarTutte(q, γ), proving that the latter is #P-hard too. The proof for Distance-π/3-ArgPlanarTutte (q, γ) is analogous: first observe that since q, γ are real and 5π/12 < π/2, the problem Sign-PlanarTutte(q, γ ) reduces (trivially) to Distance-5π/12-ArgPlanarTutte(q, γ ). Moreover, apply- ing Theorem 2.1 with x and y as above, y = y ∈ (−1, 0) and x = x , we have a polynomial-time series–parallel approximate shift from (x, y)to(x ,y ) or, equivalently, from (q, γ)to(q, γ ). Using Lemma 6.34 with γ = γ and γ = γ , we conclude that 1 2 2 the problem Distance-5π/12-ArgPlanarTutte(q, γ ) reduces to Distance-π/3-ArgPlanarTutte(q, γ), proving that the lat- ter is #P-hard, as wanted. Theorem 1.4. Let y ∈ C\R be an algebraic number, and K> 1. Then, Factor-K-NormIsing(y) and Distance-π/3-ArgIsing(y) are #P-hard, unless y = ±i when both problems can be solved ex- actly in polynomial time. 2 Page 84 of 94 Galanis, Goldberg & Herrera-Poyatos cc Proof. Let q =2, γ = y − 1, y = −1/2, γ = y − 1. From the 2 2 2 result of Goldberg and Guo Goldberg & Guo (2017), the problems Factor-K-NormIsing(y )and Distance-π/3-ArgIsing(y )are 2 2 #P-hard, hence the problems Factor-K-NormPlanarTutte (q, γ )and Distance-π/3-ArgPlanarTutte(q, γ ) are #P-hard 2 2 as well, using that Z (G; y )= Z (G;2,γ ). Ising 2 Tutte 2 By applying Lemma 2.4 and Theorem 2.1 analogously to the proof of Theorem 1.5, we conclude that the problems Factor-K-NormPlanarTutte(q, γ)and Distance-π/3 -ArgPlanarTutte(q, γ) are #P-hard, and hence Factor-K-NormIsing(y)and Distance-π/3-ArgIsing(y), us- ing that Z (G; y)= Z (G;2,γ). Ising Tutte Theorem 1.2. Let q ≥ 3 be an integer, y ∈ C\R be an algebraic number, and K> 1. Then, Factor-K-NormPlanarPotts(q, y) and Distance-π/3-ArgPlanarPotts(q, y) are #P-hard, unless 2πi/3 4πi/3 q =3 and y ∈{e ,e } when both problems can be solved exactly in polynomial time. Proof. Just apply Theorem 1.5 to the integer q, and use the equality Z (G; q, y)= Z (G; q, y − 1). Potts Tutte Theorem 1.3. Let q ≥ 3 be an integer, y ∈ (−q +1, 0) be a real algebraic number, and K> 1. Then the computational prob- lems Factor-K-NormPlanarPotts(q, y) and Distance-π/3 -ArgPlanarPotts(q, y) are #P-hard, unless we are in the case (q, y)=(4, −1) when both problems can be solved exactly in poly- nomial time. Proof. Let y ∈ (−q +1, 0). The point (x, y)with x =1 + q/(y − 1) satisfies x ∈ (1 − q, 0), (x, y) =(−1, −1) and y< 0. If x ≤−1or y ≤−1, #P-hardness follows from Lemma 6.37. Otherwise, we have q ≥ 3and x, y ∈ (−1, 0), so hardness follows from Lemma 6.38.  cc Approximating the complex Potts model Page 85 of 94 2 7. Further consequences of our results In this final section, we discuss some further consequences of our techniques, as mentioned in Section 1.2. First, in Section 7.1, we explain how our results can be used to obtain hardness for the computational problems Sign-PlanarTutte(q, γ)and Factor-K-NormPlanarTutte(q, γ) (and the non-planar ver- sion of these problems) at other parameters than the ones studied in Section 6.7, building on work of Goldberg & Jerrum (2014). Secondly, in Section 7.2, we apply our results to the problem of approximating the Jones polynomial of an alternating link, which is connected to the quantum complexity class BQP as explained in (Bordewich et al. 2005). 7.1. Hardness results for real algebraic parameters in the Tutte plane. The regions studied in Lemmas 6.37 and 6.38 have been studied by Goldberg & Jerrum (2014), where they showed #P-hardness of SignPlanarTutte(q, γ) at several regions of the real algebraic plane. As we explained in Section 6.7,we obtain hardness at a point (q, γ)aslongaswecan γ-implement algebraic numbers γ and γ as in Corollary 6.36. Goldberg and Jerrum came 1 2 up with multiple implementations that achieve the conditions of Corollary 6.36. By applying their implementations, we obtain #P- hardness for Factor-K-NormTutte(q, y−1) in the same regions where they obtained #P-hardness of SignPlanarTutte(q, γ) in (Goldberg & Jerrum 2014, Theorem 1). Some of the implementations developed in (Goldberg & Jer- rum 2014) consist of planar graphs (as those used in Lemmas 6.37 and 6.38), so we can extend their results to the planar version of the problems for some of the previous regions. Theorem 7.1. Let q and γ be real algebraic numbers with q = 0, 1, 2.Let y = γ +1 and x =1 + q/(y − 1). The computational problems Sign-PlanarTutte(q, γ) and Factor-K-NormPlanarTutte(q, γ) are #P-hard when x, y are real algebraic numbers satisfying one of the following: (i) min(x, y) ≤−1, max(x, y) < 0 and (x, y) =(−1, −1), 2 Page 86 of 94 Galanis, Goldberg & Herrera-Poyatos cc (ii) |x| > 1, |y| > 1 and xy < 0, (iii) max(|x|, |y|) < 1 and q> 32/27, (iv) max(|x|, |y|) < 1, q ≤ 32/27 and x< −2y − 1, (v) max(|x|, |y|) < 1, q ≤ 32/27 and y< −2x − 1. Proof. The proof follows from the following results of Goldberg & Jerrum (2014), which show how to implement γ and γ with a 1 2 planar (actually series–parallel) graph as in Corollary 6.36 for each of the regions in the statement. Item i follows from Lemma 6.37.For Item ii,note that q< 0, so we have to implement γ ∈ (−1, 0) and γ ∈ [−2, 0]. We choose 1 2 γ = y − 1and γ as implemented in (Goldberg & Jerrum 2014, 2 1 Lemma 16). Item iii follows from Lemma 6.37.For Item iv,we implement γ ∈ (−1, 0) and γ ∈ [−2, 0]; the implementations are 1 2 as in (Goldberg & Jerrum 2014, Lemmas 14 and 15). For Item v, we implement γ ∈ (−1, 0) and γ ∈ [−2, 0]; the implementations 1 2 areasin(Goldberg & Jerrum 2014, Lemmas 13 and 15). The complexity of approximating the Tutte polynomial of a planar graph has previously been studied in (Goldberg & Jerrum 2012b)and (Kuperberg 2015). Our result on this matter (The- orem 7.1) strengthens the results of (Goldberg & Jerrum 2012b) in three directions. First, we also study the complexity of deter- mining the sign of the Tutte polynomial. Secondly, we find new regions where the approximation problem is hard. These regions are 3, 4 and 5, as well as the points in region 1 such that q ≤ 5 and q = 3. Finally, we prove #P-hardness, whereas in (Goldberg & Jerrum 2012b) hardness was obtained under the hypothesis that RP = NP. For q ∈ Z ,let P (G; q) count the number of proper q-colourings of a graph G.The chromatic polynomial of G is the only polyno- mial that agrees with P (G; q) on positive integers. It is well known that P (G; q)= Z (G; q, −1), see for instance (Sokal 2005). The Tutte value q =32/27 appearing in Theorem 7.1 is,in some sense,a phase transition for the complexity of computing the sign of P (G, q): this sign depends upon G in an essentially trivial way for q< 32/27 cc Approximating the complex Potts model Page 87 of 94 2 (Jackson 1993, Theorem 5) and its computation is #P-hard for q> 32/27, see (Goldberg & Jerrum 2014) for an in detail discus- sion of the relevance of the phase transition q =32/27. 7.2. Hardness results for the Jones polynomial. We briefly review some relevant facts about links and the Jones polynomial that relate it to the Tutte polynomial on graphs, see (Welsh 1993) for their definitions. Let V (T ) denote the Jones polynomial of a link L. By a result of Thistlethwaite, when L is an alternat- ing link with associated planar graph G(L), we have V (t)= −1 f (t)T (G(L); −t, −t ), where f (t) is an easily computable factor L L that is plus or minus a half integer power of t,and T (G; x, y)isthe Tutte polynomial of G in the (x, y)-parametrisation (Thistleth- waite 1987; Welsh 1993). Moreover, every planar graph is the graph of an alternating link (Welsh 1993, Chapter 2). Hence, we can translate our results on the complexity of approximating the Tutte polynomial of a planar graph to the complexity of approx- imating the Jones polynomial of an alternating link, and obtain #P-hardness results for approximating V (t). More formally, we consider the following problems. Name: Factor-K-NormJones(t). Instance: A link L. Output: If V (t) = 0, the algorithm may output any rational ˆ ˆ number. Otherwise, it must output N ∈ Q such that N/K ≤ |V (t)|≤ KN . Name: Distance-ρ-ArgJones(q, γ). Instance: A link L. Output: If V (t) = 0, the algorithm may output any rational number. Otherwise, it must output A ∈ Q such that, for some a ∈ arg(V (t)), we have |A − a|≤ ρ. Corollary 7.2. Let K be a real number with K> 1.Let t be an algebraic number with Re(t) > 0.Then Factor-K-NormJones(t) and Distance-π/3-ArgJones(t) are #P-hard unless t ∈ 2πi/3 4πi/3 {1, −e , −e } when both problems can be solved exactly. 2 Page 88 of 94 Galanis, Goldberg & Herrera-Poyatos cc −1 Proof. Letusconsiderthe point(x, y)=(−t, −t )inthe 2πi/3 4πi/3 Tutte plane. Note that t ∈{1, −e , −e } if andonlyif(x, y) 4πi/3 2πi/3 2πi/3 4πi/3 is one of the special points (−1,−1), (e ,e )and (e ,e ), where the Jones polynomial of a link can be exactly evaluated in polynomial time in the size of the link (Jaeger et al. 1990). Let us assume that t is not one of these three values. We have −1 q =(−t−1)(−t −1) = 2+2Re(t) > 2. When t is non-real, in view of Theorem 1.5, Factor-K-NormPlanarTutte(q, y − 1) and Distance-π/3-ArgPlanarTutte(q, y −1) are #P-hard and the result follows. When t is real, note that y< 0, x< 0and q> 2. Thus, either (x, y) is such that max{|x|, |y|} ≥ 1and (x, y) =(−1, −1), so hardness is covered in region 1 of Theo- rem 7.1,ormax{|x|, |y|} < 1, so hardness is coveredinregion3of Theorem 7.1. 2πi/5 The case t = e of Corollary 7.2 is particularly relevant due to its connection with quantum computation. This connection between approximate counting and the quantum complexity class BQP was explored by Bordewich, Freedman, Lov´ asz and Welsh in (Bordewich et al. 2005), where they posed the question of de- termining the complexity of the following problem: Name: Sign-Real-PlanarTutte(q, γ) Instance: A planar (multi)graph G. Output: Determine whether Re(Z (G; q, γ)) ≥ 0 Tutte or Re(Z (G; q, γ)) ≤ 0. Tutte The non-planar version of Sign-Real-PlanarTutte(q, γ)has been studied in (Goldberg & Guo 2017, Section 5), where it was shown that determining the sign of the real part of the Tutte poly- 2πi/5 nomial is #P-hard in certain cases that include t = e . Our results on the complexity of Sign-PlanarTutte(q, γ) allow us to adapt the argument in (Goldberg & Guo 2017) to answer the question asked in (Bordewich et al. 2005). Corollary 7.3. Consider (x, y)=(exp(−aπi/b), exp(aπi/b)), where a and b are positive integers such that 1/2 <a/b < 3/2 and a = b.Let q =(x − 1)(y − 1) and γ = y − 1.Then q ∈ (2, 4) and Sign-Real-PlanarTutte(q, γ) is #P-hard. cc Approximating the complex Potts model Page 89 of 94 2 Proof. The proof is essentially the same one as that of (Gold- berg & Guo 2017, Theorem 1.7). First, note that q =(x − 1)(y − 1) = 2 − x − y =2 − exp(−aπi/b) − exp(aπi/b)=2 − 2cos(aπ/b), which is real. Since 1/2 <a/b < 3/2and a = b,we have q ∈ (2, 4). A b-thickening allows us to (x, y)-implement (1 − q/2, −1). Since Sign-PlanarTutte(q, −2) is #P-hard (see Theorem 7.1), we conclude that Sign-Real-PlanarTutte(q, γ)is#P-hard. Corollary 7.3 includes the case where a =3 and b =5. In this case, we have x =exp(−aπi/b)= − exp(πi) exp(−3πi/5) = −1 −1 − exp(2πi/5) and y = x . That is, (x, y)=(−t, −t ) for t = exp(2πi/5), which is the point of interest in (Bordewich et al. 2005). Acknowledgements We thank Ben Green, Joel Ouaknine and Oliver Riordan for use- ful discussions on Section 6.1. We also thank Miriam Backens for useful conversations and suggestions about this work. A short preliminary version without proofs has appeared on the proceed- ings of MFCS 2020. The third author is supported by an Oxford- DeepMind Graduate Scholarship and a EPSRC Doctoral Training Partnership. Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, dis- tribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If ma- terial is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or 2 Page 90 of 94 Galanis, Goldberg & Herrera-Poyatos cc exceeds the permitted use, you will need to obtain permission di- rectly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/. Funding Open Access funding enabled and organized by Projekt DEAL Publisher’s Note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. References A. Barvinok (2017). Combinatorics and Complexity of Partition Func- tions. Algorithms and Combinatorics. Springer International Publish- ing. A. Barvinok & G. Regts (2019). Weighted counting of solutions to sparse systems of equations. Combinatorics, Probability and Computing 28(5), 696–719. I. Bena, M. Droz & A. Lipowski (2005). Statistical mechanics of equilibrium and nonequilibrium phase transitions: the Yang–Lee for- malism. International Journal of Modern Physics B 19(29), 4269–4329. ´ ´ ˇ I. Bezakova, A. Galanis, L. A. Goldberg & D. Stefankovic (2020). Inapproximability of the independent set polynomial in the complex plane. SIAM Journal on Computing 49(5), STOC18– 395–STOC18–448. ISSN 0097-5397. URL https://doi.org/10.1137/ 18M1184485. ´ ´ ˇ I. Bezakova, A. Galanis, L. A. Goldberg & D. Stefankovic (2021). The complexity of approximating the matching polynomial in the complex plane. ACM Transactions on Computation Theory 13(2), Art. 13, 37. ISSN 1942-3454. URL https://doi.org/10.1145/ M. Bordewich, M. Freedman, L. Lovasz & D. Welsh (2005). Ap- proximate counting and quantum computation. Combinatorics, Proba- bility and Computing 14(5-6), 737–754. cc Approximating the complex Potts model Page 91 of 94 2 R. J. Bradford & J. H. Davenport (1989). Effective tests for cy- clotomic polynomials. In Symbolic and algebraic computation,volume 358 of Lecture Notes in Comput. Sci., 244–251. Springer, Berlin. A. Brandstadt ¨ , V. B. Le & J. P. Spinrad (1999). Graph classes: a survey. SIAM Monographs on Discrete Mathematics and Applications. Society for Industrial and Applied Mathematics (SIAM), Philadelphia, PA. M. Brin & G. Stuck (2002). Introduction to Dynamical Systems. Cambridge University Press. J. I. Brown, C. Hickman, A. D. Sokal & D. G. Wagner (2001). On the chromatic roots of generalized theta graphs. Journal of Combi- natorial Theory. Series B 83(2), 272–297. I. Z. Emiris, B. Mourrain & E. P. Tsigaridas (2008). Real alge- braic numbers: Complexity Analysis and Experimentation. In Reliable Implementation of Real Number Algorithms: Theory and Practice,57– 82. Springer. L. A. Goldberg & H. Guo (2017). The complexity of approximat- ing complex-valued Ising and Tutte partition functions. Computational Complexity 26(4), 765–833. L. A. Goldberg & M. Jerrum (2008). Inapproximability of the Tutte polynomial. Information and Computation 206(7), 908–929. L. A. Goldberg & M. Jerrum (2012a). Approximating the partition function of the ferromagnetic Potts model. Journal of the ACM 59(5), Art. 25, 31. L. A. Goldberg & M. Jerrum (2012b). Inapproximability of the Tutte polynomial of a planar graph. Computational Complexity 21(4), 605–642. L. A. Goldberg & M. Jerrum (2014). The complexity of computing the sign of the Tutte polynomial. SIAM Journal on Computing 43(6), 1921–1952. L. A. Goldberg & M. Jerrum (2019). Approximating Pairwise Cor- relations in the Ising Model. ACM Transactions on Computation Theory 11(4), 23. 2 Page 92 of 94 Galanis, Goldberg & Herrera-Poyatos cc H. Guo, C. Liao, P. Lu & C. Zhang (2021). Zeros of Holant problems: locations and algorithms. ACM Transactions on Algorithms 17(1), Art. 4, 25. ISSN 1549-6325. URL https://doi.org/10.1145/ H. Guo, J. Liu & P. Lu (2020). Zeros of Ferromagnetic 2-Spin Sys- tems. In Proceedings of the Thirty-First Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’20, 181–192. USA. A. Harrow, S. Mehraban & M. Soleimanifar (2020). Classical algorithms, correlation decay, and complex zeros of partition functions of quantum many-body systems. In Proceedings of the 52nd Annual ACM SIGACT Symposium on Theory of Computing, 378–386. O. J. Heilmann & E. H. Lieb (1972). Theory of monomer-dimer systems. Communications in Mathematical Physics 25(3), 190–232. Bill Jackson (1993). A zero-free interval for chromatic polynomials of graphs. Combinatorics, Probability and Computing 2(3), 325–336. ISSN 0963-5483. URL https://doi.org/10.1017/S0963548300000705. F. Jaeger, D. L. Vertigan & D. J. A. Welsh (1990). On the computational complexity of the Jones and Tutte polynomials. Math- ematical Proceedings of the Cambridge Philosophical Society 108(1), 35–53. M. Jerrum & A. Sinclair (1993). Polynomial-time approximation algorithms for the Ising model. SIAM Journal on Computing 22(5), 1087–1116. R. Kannan, A. K. Lenstra & L. Lovasz ´ (1988). Polynomial factor- ization and nonrandomness of bits of algebraic and some transcendental numbers. Mathematics of Computation 50(181), 235–250. K.-I Ko (1991). Complexity theory of real functions. Progress in The- oretical Computer Science. Birkh¨ auser Boston, Inc., Boston, MA. G. Kuperberg (2015). How hard is it to approximate the Jones poly- nomial? Theory of Computing 11, 183–219. E. H. Lieb & A. D. Sokal (1981). A general Lee-Yang theorem for one-component and multicomponent ferromagnets. Communications in Mathematical Physics 80(2), 153–179. cc Approximating the complex Potts model Page 93 of 94 2 J. Liu, A. Sinclair & P. Srivastava (2019). A Deterministic Algo- rithm for Counting Colorings with 2-Delta Colors. In IEEE 60th Annual Symposium on Foundations of Computer Science (FOCS 2019), 1380– J. Liu, A. Sinclair & P. Srivastava (2019a). Fisher zeros and cor- relation decay in the Ising model. Journal of Mathematical Physics 60(10), 103 304. J. Liu, A. Sinclair & P. Srivastava (2019b). The Ising partition function: Zeros and deterministic approximation. Journal of Statistical Physics 174(2), 287–315. V. Patel & G. Regts (2017). Deterministic Polynomial-Time Ap- proximation Algorithms for Partition Functions and Graph Polynomi- als. SIAM Journal on Computing 46(6), 1893–1919. H. Peters & G. Regts (2018). Location of zeros for the partition function of the Ising model on bounded degree graphs. Journal of the London Mathematical Society . H. Peters & G. Regts (2019). On a Conjecture of Sokal Concerning Roots of the Independence Polynomial. Michigan Mathematical Journal 68(1), 33–55. R. B. Potts (1952). Some generalized order-disorder transformations. Proceedings of the Cambridge Philosophical Society 48, 106–109. J. S. Provan & M. O. Ball (1983). The complexity of counting cuts and of computing the probability that a graph is connected. SIAM Journal on Computing 12(4), 777–788. A. D. Sokal (2005). The multivariate Tutte polynomial (alias Potts model) for graphs and matroids. In Surveys in combinatorics 2005,vol- ume 327 of London Math. Soc. Lecture Note Ser., 173–226. Cambridge Univ. Press, Cambridge. E. M. Stein & R. Shakarchi (2010). Complex analysis,volume 2. Princeton University Press. I. Stewart (2004). Galois Theory. Chapman & Hall/CRC Mathemat- ics. Chapman & Hall/CRC, Boca Raton, FL, 3rd edition. 2 Page 94 of 94 Galanis, Goldberg & Herrera-Poyatos cc A. W. Strzebonski (1997). Computing in the field of complex alge- braic numbers. Journal of Symbolic Computation 24(6), 647–656. M. B. Thistlethwaite (1987). A spanning tree expansion of the Jones polynomial. Topology 26(3), 297–309. D. Vertigan (2005). The computational complexity of Tutte invariants for planar graphs. SIAM Journal on Computing 35(3), 690–712. M. Waldschmidt (2000). Diophantine approximation on linear al- gebraic groups, volume 326 of Grundlehren der Mathematischen Wissenschaften [Fundamental Principles of Mathematical Sciences]. Springer-Verlag, Berlin. Transcendence properties of the exponential function in several variables. D. J. A. Welsh (1993). Complexity: knots, colourings and counting, volume 186 of London Mathematical Society Lecture Note Series. Cam- bridge University Press, Cambridge. C.-N. Yang & T.-D. Lee (1952). Statistical theory of equations of state and phase transitions. I. Theory of condensation. Physical Review 87(3), 404. C. K. Yap (2000). Fundamental problems of algorithmic algebra. Ox- ford University Press, New York. Manuscript received 20 July 2020 Andreas Galanis Leslie Ann Goldberg andreas.galanis@cs.ox.ac.uk leslie.goldberg@cs.ox.ac.uk Andres ´ Herrera-Poyatos Department of Computer Science University of Oxford Wolfson Building, Oxford, OX1 3QD, UK andres.herrerapoyatos@balliol.ox.ac.uk http://www.deepdyve.com/assets/images/DeepDyve-Logo-lg.png computational complexity Springer Journals

The complexity of approximating the complex-valued Potts model

Loading next page...
 
/lp/springer-journals/the-complexity-of-approximating-the-complex-valued-potts-model-udxyoucPCs

References (67)

Publisher
Springer Journals
Copyright
Copyright © The Author(s) 2022. corrected publication 2022
ISSN
1016-3328
eISSN
1420-8954
DOI
10.1007/s00037-021-00218-x
Publisher site
See Article on Publisher Site

Abstract

comput. complex. (2022) 31:2 c The Author(s) 2022 1016-3328/22/010001-94 published online February 3, 2022 https://doi.org/10.1007/s00037-021-00218-x computational complexity THE COMPLEXITY OF APPROXIMATING THE COMPLEX-VALUED POTTS MODEL Andreas Galanis, Leslie Ann Goldberg, and Andres Herrera-Poyatos Abstract. We study the complexity of approximating the partition function of the q-state Potts model and the closely related Tutte poly- nomial for complex values of the underlying parameters. Apart from the classical connections with quantum computing and phase transitions in statistical physics, recent work in approximate counting has shown that the behaviour in the complex plane, and more precisely the location of zeros, is strongly connected with the complexity of the approxima- tion problem, even for positive real-valued parameters. Previous work in the complex plane by Goldberg and Guo focused on q =2, which corresponds to the case of the Ising model; for q> 2, the behaviour in the complex plane is not as well understood and most work applies only to the real-valued Tutte plane. Our main result is a complete classifi- cation of the complexity of the approximation problems for all non-real values of the parameters, by establishing #P-hardness results that ap- ply even when restricted to planar graphs. Our techniques apply to all q ≥ 2 and further complement/refine previous results both for the Ising model and the Tutte plane, answering in particular a question raised by Bordewich, Freedman, Lovasz ´ and Welsh in the context of quantum computations. Keywords. Counting Complexity, Potts model, Ising model, Tutte polynomial, Approximate Counting Subject classification. 68Q17 Computational difficulty of problems Birkh¨ auser 2 Page 2 of 94 Galanis, Goldberg & Herrera-Poyatos cc 1. Introduction The q-state Potts model is a classical model of ferromagnetism in statistical physics (Potts 1952; Welsh 1993) which generalises the well-known Ising model. On a (multi)graph G =(V, E), config- urations of the model are all possible assignments σ : V → [q] where [q]= {1,...,q} is a set of q spins with q ≥ 2. The model is parameterised by y, which is a function of the temperature of the model and is also known as the edge interaction. Each configura- m(σ) tion σ is assigned weight y where m(σ) denotes the number of monochromatic edges of G under σ. The partition function of the model is the aggregate weight over all configurations, i.e., m(σ) Z (G; q, y)= y , Potts σ : V →[q] When q = 2, this model is known as the Ising model, and we some- times use the notation Z (G; y) to denote its partition function. Ising The Ising/Potts models have an extremely useful generalisation to non-integer values of q via the so-called random-cluster formu- lation and the closely related Tutte polynomial. In particular, for numbers q and γ, the Tutte polynomial of a graph G is given by k(A) |A| (1.1) Z (G; q, γ)= q γ , Tutte A⊆E where k(A) denotes the number of connected components in the graph (V, A) (isolated vertices do count). When q is an integer with q ≥ 2, we have Z (G; q, y)= Z (G; q, y − 1), see, for in- Potts Tutte stance, the paper of Sokal (2005). The Tutte polynomial on planar graphs is particularly relevant in quantum computing since it cor- responds to the Jones polynomial of an “alternating link” (Welsh 1993, Chapter 5), and polynomial-time quantum computation can be simulated by additively approximating the Jones polynomial at a suitable value, as we will explain later in more detail, see also (Bordewich et al. 2005) for details. In this paper, we study the complexity of approximating the partition function of the Potts model and the Tutte polynomial on planar graphs as the parameter y ranges in the complex plane. cc Approximating the complex Potts model Page 3 of 94 2 Traditionally, this problem has been mainly considered in the case where y is a positive real; however recent developments have shown that for various models, including the Ising and Potts models, there is a close interplay between the location of zeros of the partition function in the complex plane and the approximability of the prob- lem, even for positive real values of y. The framework of viewing partition functions as polynomials in the complex plane of the underlying parameters has been well- explored in statistical physics and has recently gained traction in computer science as well in the context of approximate counting. On the positive side, zero-free regions in the complex plane trans- late into efficient algorithms for approximating the partition func- tion (Barvinok 2017; Patel & Regts 2017) and this scheme has led to a broad range of new algorithms even for positive real values of the underlying parameters (Guo et al. 2021, 2020; Harrow et al. 2020; Liu et al. 2019; Liu et al. 2019a,b; Peters & Regts 2018, 2019). On the negative side, the presence of zeros poses a barrier to this approach and, in fact, it has been demonstrated that zeros mark the onset of computational hardness for the approximabil- ity of the partition function (Bez´ akova ´ et al. 2020; Bez´ akova ´ et al. 2021; Goldberg & Guo 2017; Goldberg & Jerrum 2014). These new algorithmic and computational complexity developments stemming from the complex plane mesh with the statistical physics perspec- tive where zeros have long been studied in the context of pinpoint- ing phase transitions, see e.g., (Bena et al. 2005; Heilmann & Lieb 1972; Lieb & Sokal 1981; Sokal 2005; Welsh 1993; Yang & Lee 1952). For the problem of exactly computing the partition function of the Potts model, Jaeger et al. (1990), as a corollary of a more general classification theorem for the Tutte polynomial, established #P-hardness unless (q, y) is one of seven exceptional points, see Section 6.3 for more details; Vertigan (2005) further showed that the same classification applies on planar graphs with the exception of the Ising model (q = 2), where the problem is in FP. For the approximation problem, the only known result that applies for general values y in the complex plane is by Goldberg & Guo (2017), which addresses the case q =2; the case q ≥ 3is 2 Page 4 of 94 Galanis, Goldberg & Herrera-Poyatos cc largely open apart from the case when y is real which has been studied extensively even for planar graphs (Goldberg & Guo 2017; Goldberg & Jerrum 2008, 2012a, 2014; Jerrum & Sinclair 1993; Kuperberg 2015). We will review all these results more precisely in the next section, where we also state our main theorems. 1.1. Our main results. In this work, we completely classify the complexity of approximating Z (G; q, y) for q ≥ 2 and non- Potts real y, even on planar graphs G; in fact, our results also classify the complexity of the Tutte polynomial on planar graphs for reals q ≥ 2 and non-real γ. Along the way, we also answer a question for the Jones polynomial raised by Bordewich, Freedman, Lov´ asz &Welsh (2005). To formally state our results, we define the computational prob- lems we consider. Let K and ρ be real algebraic numbers with K> 1and ρ> 0. We investigate the complexity of the following problems for any integer q with q ≥ 2 and any algebraic number y. Name: Factor-K-NormPotts(q, y) Instance: A (multi)graph G. Output: If Z (G; q, y) = 0, the algorithm may output any ra- Potts tional number. Otherwise, it must output a rational number ˆ ˆ ˆ N such that N/K ≤|Z (G; q, y)|≤ KN . Potts A well-known fact is that the difficulty of the computational problem Factor-K-NormPotts(q, γ) does not depend on the constant K> 1. This can be proved using standard powering techniques, see (Goldberg & Guo 2017, Lemma 11) for a proof when q = 2. In fact, the complexity of the problem is the same 1− even for K =2 for any constant > 0where n is the size of the input. For z ∈ C\{0}, we denote by |z| the norm of z,by Arg(z) ∈ [0, 2π)the principal argument of z and by arg(z) the set {Arg(z)+2πj : j ∈ Z} of all the arguments of z,sothatfor any a ∈ arg(z)wehave z = |z| exp(ia). cc Approximating the complex Potts model Page 5 of 94 2 Name: Distance-ρ-ArgPotts(q, y) Instance: A (multi)graph G. Output: If Z (G; q, y) = 0, the algorithm may output any ra- Potts tional number. Otherwise, it must output a rational A such that, for some a ∈ arg(Z (G; q, γ)), |A − a|≤ ρ . Potts In the special case that q equals 2, we omit the argument q and write Ising instead of Potts in the name of the problem. Similarly, when the input of the problems is restricted to planar graphs, we write PlanarPotts instead of Potts.We also con- sider the problem Factor-K-NormTutte(q, γ) and the problem Distance-π/3-ArgTutte(q, γ) for the Tutte polynomial when q, γ are algebraic numbers. Note also that, when q, γ are real, the latter problem is equivalent to finding the sign of the Tutte polyno- mial, and we sometimes write SignTutte(q, γ)(and SignPlanarTutte(q, γ) for the planar version of the problem). Our first and main result is a full resolution of the complexity of approximating Z (G; q, y) for q ≥ 3 and non-real y.More Potts precisely, we show the following. Theorem 1.2. Let q ≥ 3 be an integer, y ∈ C\R be an algebraic number, and K> 1. Then, Factor-K-NormPlanarPotts(q, y) and Distance-π/3-ArgPlanarPotts(q, y) are #P-hard, unless 2πi/3 4πi/3 q =3 and y ∈{e ,e } when both problems can be solved exactly in polynomial time. We remark that, for real y> 0, the complexity of approximating Z (G; q, y) on planar graphs is not fully known, though on gen- Potts eral graphs the problem is #BIS-hard (Goldberg & Jerrum 2012a) and NP-hard for y ∈ (0, 1) (Goldberg & Jerrum 2008), for all q ≥ 3. For real y< 0, the problem is NP-hard on general graphs when y ∈ (−∞, 1 − q] for all q ≥ 3(Goldberg & Jerrum 2014) and Note, for y ∈ (−∞, 1 − q) ∪ [0, ∞), #P-hardness is impossible (assuming NP = #P): finding the sign of Z (G; q, y) is easy, even on non-planar Potts graphs (Goldberg & Jerrum 2014), and Z (G; q, y) can be approximated Potts using an NP-oracle. For y =1 − q, the same applies when q ≥ 6; the cases q ∈{3, 4, 5} are not fully resolved though Goldberg & Jerrum (2014) showed that q =3, 4 are NP-hard, whereas q = 5 should be easy unless Tutte’s 5-flow conjecture is false (Welsh 1993, Section 3.5). 2 Page 6 of 94 Galanis, Goldberg & Herrera-Poyatos cc #P-hard on planar graphs when y ∈ (1 − q, 0) and q ≥ 5(Kuper- berg (2015), see also Goldberg & Jerrum (2012b)). Our techniques for proving Theorem 1.2 allow us to resolve the remaining cases q =3, 4 for y ∈ (1 − q, 0) on planar graphs, as a special case of the following theorem that applies for general q ≥ 3. This is our second main result. Theorem 1.3. Let q ≥ 3 be an integer, y ∈ (−q +1, 0) be a real algebraic number, and K> 1. Then the computational prob- lems Factor-K-NormPlanarPotts(q, y) and Distance-π/3 -ArgPlanarPotts(q, y) are #P-hard, unless we are in the case (q, y)=(4, −1) when both problems can be solved exactly in poly- nomial time. Our third main contribution is a full classification of the range of the parameters where approximating the partition function of the Ising model is #P-hard. Note, on planar graphs G, Z (G; y) Ising can be computed in polynomial time for all y. For general (non- planar) graphs and non-real y, Goldberg and Guo show #P-hardness on the non-real unit circle (|y| =1) with y = ±i, and establish NP- hardness elsewhere. Our next result shows that the NP-hardness results of Goldberg & Guo (2017) for non-real y canbeelevatedto #P-hardness. Theorem 1.4. Let y ∈ C\R be an algebraic number, and K> 1. Then, Factor-K-NormIsing(y) and Distance-π/3-ArgIsing(y) are #P-hard, unless y = ±i when both problems can be solved ex- actly in polynomial time. For real y, we remark that the problems of approximating Z (G; y) Ising and determining its sign (when non-trivial) are well-understood: the problem is FPRASable for y> 1 and NP-hard for y ∈ (0, 1) (Jerrum & Sinclair 1993), #P-hard for y ∈ (−1, 0) Goldberg & Guo (2017); Goldberg & Jerrum (2014), and equivalent to approx- imating #PerfectMatchings for y< −1 Goldberg & Jerrum (2008). For y =0, ±1, Z (G; y) can be computed exactly in Ising polynomial time. Analogously to Footnote 2,for y ∈ (−∞, −1) ∪ (0, 1) #P-hardness is unlikely since the problem can be approximated with an NP-oracle. cc Approximating the complex Potts model Page 7 of 94 2 1.2. Consequences of our techniques for the Tutte/Jones polynomials. While our main results are on the Ising/Potts models, in order to prove them it is convenient to work in the “Tutte world”; this simplifies the proofs and has also the benefit of allowing us to generalise our results to non-integer q. The following result generalises Theorem 1.2 to non-integer q> 2. Theorem 1.5. Let q> 2 be a real, γ ∈ C\R be an algebraic num- ber, and K> 1. Then, Factor-K-NormPlanarTutte(q, γ) and Distance-π/3-ArgPlanarTutte(q, γ) are #P-hard, 2πi/3 4πi/3 unless q =3 and γ +1 ∈{e ,e } when both problems can be solved exactly in polynomial time. Our techniques can further be used to elevate previous NP-hardness results of Goldberg & Jerrum (2008, 2014) in the Tutte plane to #P-hardness for planar graphs, and answer a question for the Jones polynomial raised by Bordewich et al. (2005). A more detailed dis- cussion can be found in Section 7. 2. Proof outline In this section we provide some insight on the proofs of our main results. As mentioned earlier, the proofs are performed in the context of the Tutte polynomial. In previous #P-hardness results (Goldberg & Guo 2017; Gold- berg & Jerrum 2014) for the Tutte polynomial, the authors reduce the exact counting #MinimumCardinality (s, t)-Cut problem to the problem of approximating Z (G; q, γ) using an elaborate Tutte binary search based on suitable oracle calls. Key to these oracle calls are gadget constructions which are mainly based on series– parallel graphs which “implement” points (q ,γ ); this means that, by pasting the gadgets appropriately onto a graph G, the computa- tion of Z (G; q ,γ ) reduces to the computation of Z (G; q, γ). Tutte Tutte 2 Page 8 of 94 Galanis, Goldberg & Herrera-Poyatos cc Much of the work in (Goldberg & Guo 2017; Goldberg & Jerrum 2014), and for us as well, is understanding what values (q ,γ )can be implemented starting from (q, γ). For planar graphs, while the binary-search technique from (Gold- berg & Guo 2017) is still useful, we have to use a different over- all reduction scheme since #MinimumCardinality (s, t)-Cut is not #P-hard when the input is restricted to planar graphs (Provan & Ball 1983). To obtain our #P-hardness results our plan instead is to reduce the problem of exactly evaluating the Tutte polynomial for some appropriately selected parameters q ,γ to the problem of computing its sign and the problem of approximately evaluating it at parameters q, γ; note, this gives us the freedom to use any parameters q ,γ we wish as long as the corresponding exact prob- lem is #P-hard. Then, much of the work consists of understanding what values (q ,γ ) can be implemented starting from (q, γ), so we focus on that component first. We first review previous constructions in the literature, known as shifts, and then introduce our refinement of these constructions, which we call polynomial-time approximate shifts, and state our main result about them. 2.1. Shifts in the Tutte plane. We say that that there is a shift from (q, γ )to(q, γ ) if there is a graph H =(V, E)and 1 2 vertices s, t such that Z (H; q, γ ) st 1 γ = q , Z (H; q, γ ) s|t where Z (H; q, γ ) is the contribution to Z (H; q, γ )fromcon- st 1 Tutte 1 figurations A ⊆ E in which s, t belong to the same connected com- ponent in (V, A), while Z (H; q, γ ) is the contribution from all s|t 1 other configurations A. In the following, we will usually encounter shifts in the (x, y)-parametrisation of the Tutte plane, rather than the (q, γ)-parameterisation which was used for convenience here. To translate between these, set y = γ +1 and (x − 1)(y − 1) = q, see (Welsh 1993, Chapter 3). We denote by H the hyperbola {(x, y) ∈ C :(x − 1)(y − 1) = q}, and we will use both parametri- sations as convenient. Section 3.2 has a more detailed description of shifts that apply to the multivariate Tutte polynomial. cc Approximating the complex Potts model Page 9 of 94 2 As described earlier, shifts can be used to “move around” the complex plane. If one knows hardness for some (x ,y ) ∈H , 2 2 q and there is a shift from (x ,y ) ∈H to (x ,y ), then one also 1 1 q 2 2 obtains hardness for (x ,y ). This approach has been very effective 1 1 when attention is restricted to real parameters (Goldberg & Jerrum 2008, 2012b, 2014); however, when it comes to non-real parameters, the success of this approach has been limited. To illustrate this, in (Goldberg & Guo 2017), the authors established #P-hardness of the Ising model when y ∈ (−1, 0), and used this to obtain #P-hardness for y on the unit circle by constructing appropriate shifts. However, their shift construction does not extend to general complex numbers, and this kind of result seems unreachable with those techniques. 2.2. Polynomial-time approximate shifts. To obtain our main theorems, we instead need to consider what we call polynomial- time approximate shifts; such a shift from (x ,y ) ∈H to (x ,y ) ∈ 1 1 q 2 2 H is an algorithm that, for any positive integer n, computes in time polynomial in n agraph G that (x ,y )-implements (x ˆ , y ˆ ) n 1 1 2 2 −n with |y − y ˆ |≤ 2 . In fact, our constructions need to maintain 2 2 planarity, and we will typically ensure this by either making ev- ery G a series–parallel graph, in which case we call the algorithm a polynomial-time approximate series–parallel shift,or by making every G a theta graph, in which case we call the algorithm a polynomial-time approximate theta shift. These generalised shifts allow us to overcome the challenges mentioned above and are key ingredients in our reduction. Our main technical theorem about them is the following. Theorem 2.1. Let q ≥ 2 be a real algebraic number. Let x and y be algebraic numbers such that (x, y) ∈H , y ∈ (−1, 0) ∪ 2 2 (C\R) and (x, y) ∈{(i, −i), (−i, i), (ω ,ω ), (ω ,ω )},where ω = 3 3 3 3 3 exp(2πi/3). Then, for any pair of real algebraic numbers (x ,y ) ∈ A theta graph consists of two terminals s and t joined by internally disjoint paths Brown et al. (2001). A series–parallel graph with terminals s and t can be obtained from the single-edge graph with edge (s, t) by repeatedly subdividing edges or adding parallel edges (Brandst¨ adt et al. 1999, Chapter 11). 2 Page 10 of 94 Galanis, Goldberg & Herrera-Poyatos cc H there is a polynomial-time approximate series–parallel shift from (x, y) to (x ,y ). 2 2 The exceptions {(i, −i), (−i, i), (ω ,ω ), (ω ,ω )} are precisely the 3 3 3 3 non-real points of the (x, y) plane where the Tutte polynomial of a graph can be evaluated in polynomial time (see Section 6.3). As we will see, being able to (x, y)-implement approximations of any number in (−1, 0) is essentially the property that makes the approximation problem #P-hard at (x, y). We remark that the idea of implementing approximations of a given weight or edge interaction has been explored in the literature, though only when all the edge interactions involved are real. We review these results in Section 4. We study the properties of polynomial-time approximate shifts in Section 4 and prove Theorem 2.1 in Section 5. In the next section, we describe some of the techniques used. 2.2.1. Proof Outline of Theorem 2.1. Shifts, as defined in Section 2.1, have a transitivity property: if there is a shift from (x ,y )to(x ,y ) and from (x ,y )to(x ,y ), then there is a shift 1 1 2 2 2 2 3 3 from (x ,y )to(x ,y ), see Section 3.2 for more details. 1 1 3 3 The polynomial-time approximate shift given in Theorem 2.1 is constructed in a similar way. First, we construct a polynomial- time approximate shift from (x, y)tosome(x ,y ) such that y ∈ 2 2 2 (−1, 0), where x and y depend on x, y. Then, we construct a 2 2 polynomial-time approximate shift from (x ,y )to(x ,y ). Finally, 2 2 we combine both polynomial-time approximate shifts using an ana- logue of the transitivity property. However, when this approach is put into practice, there is a difficulty that causes various technical complications: we only have mild control in our constructions over the intermediate shift (x ,y ). In particular, even if the numbers x and y are algebraic, 2 2 we cannot guarantee that x and y are algebraic, and this causes 2 2 problems with obtaining the required transitivity property. In- stead, we have to work with a wider class of numbers, the set P of polynomial-time computable numbers. These are numbers that can be approximated efficiently, i.e., for y ∈ P there is an algorithm −n that computes y ˆ ∈ Q[i]with |y − y ˆ |≤ 2 in time polynomial n n cc Approximating the complex Potts model Page 11 of 94 2 in n (Ko 1991, Chapter 2). We denote by P = R ∩ P the set of R C polynomial-time computable real numbers. Our polynomial-time approximate shifts are constructed in Sec- tion 5. The first of these polynomial-time approximate shifts is provided by Lemma 2.2. Lemma 2.2. Let q be a real algebraic number with q ≥ 2.Let x and y be algebraic numbers such that (x, y) ∈H , y ∈ (−1, 0) ∪ 2 2 (C\R) and (x, y) ∈{(i, −i), (−i, i), (ω ,ω ), (ω ,ω )},where ω = 3 3 3 3 3 exp(2πi/3). Then there is a polynomial-time approximate series– parallel shift from (x, y) to (x ,y ) for some (x ,y ) ∈H with x ,y ∈ P and y ∈ (0, 1). The construction in Lemma 2.2 is obtained using a theta graph and trying to get a shift that is very close to the real line. However, we cannot control the point (x ,y ) that we are approximating, and as mentioned, x ,y might not be algebraic. The proof of Lemma 2.2 requires the most technical work in the paper and is given in Sec- tion 5.4. Using Lemma 2.2, we have a series–parallel polynomial-time approximate shift from (x, y)tosome(x ,y ) ∈H with x ,y ∈ P q R and y ∈ (0, 1). Next, we have to construct a polynomial-time approximate shift from (x ,y )to(x, ˆ y ˆ), where (x, ˆ y ˆ)isthe point that we want to shift to in Theorem 2.1. In fact, we actually use a theta shift, which also facilitates establishing the required tran- sitivity property later on. Note that since y is not necessarily algebraic, we cannot directly apply the results that have already appeared in the literature on implementing approximations of edge interactions. In the next lemma, we generalise these results to the setting of polynomial-time computable numbers, where we need to address some further complications that arise from computing with polynomial-time computable numbers instead of algebraic num- bers. The proof of the lemma is given in Section 5.5. Lemma 2.3. Let q, x, y ∈ P such that q> 0, (x, y) ∈H , y is R q positive and 1−q/2 <y < 1. There is a polynomial-time algorithm that takes as an input: ◦ two positive integers k and n, in unary; 2 Page 12 of 94 Galanis, Goldberg & Herrera-Poyatos cc ◦ a real algebraic number w ∈ [y , 1]. The algorithm produces a theta graph J that (x, y)-implements −n (ˆ x, y ˆ) such that y ˆ−w ≤ 2 .The size of J is at most a polynomial in k and n, independently of w. Then, we are able to combine the shifts in Lemmas 2.2 and 2.3 via a transitivity property for polynomial-time approximate shifts (see Lemma 4.8 in Section 4), and therefore prove Theorem 2.1, see Section 5 for the details. 2.3. The reductions. In Section 6.6 we show how to use a polynomial-time approximate shift from (x ,y )to(x ,y )tore- 1 1 2 2 duce the problem of approximating the Tutte polynomial at (x ,y ) 2 2 to the same problem at (x ,y ). The following lemma gives such a 1 1 reduction for the problem of approximating the norm, we also give an analogous result for approximating the argument. Lemma 2.4. Let q =0, γ and γ =0 be algebraic numbers, and 1 2 K> 1.For j ∈{1, 2},let y = γ +1 and x =1+ q/γ .If there is j j j j a polynomial-time series–parallel approximate shift from (x ,y ) to 1 1 (x ,y ), then we have a reduction from Factor-K-NormTutte 2 2 (q, γ ) to Factor-K-NormTutte(q, γ ). This reduction also 2 1 holds for the planar version of the problem. In order to prove Lemma 2.4, we need some lower bounds on the norm of the partition function Z (G; q, γ). This kind of lower Tutte bound plays an important role in several hardness results on the complexity of approximating partition functions (Bez´ akova ´ et al. 2020; Goldberg & Guo 2017). Here, we have to work a bit harder than usual since we have two (algebraic) underlying parameters (in the case of Tutte), and we need to use results in algebraic number theory, see Section 6.1 for details. By combining Theorem 2.1 and Lemma 2.4 with existing hard- ness results, we obtain our hardness results for non-real edge in- teractions in Section 6.8. On the way, we collect some hardness on real parameters as well that strengthen previous results in the liter- ature, and part of Section 6 is devoted to this. The main reason be- hind these improvements is that previous work on real parameters cc Approximating the complex Potts model Page 13 of 94 2 used reductions from approximately counting minimum cardinality (s, t)-cuts (Goldberg & Guo 2017; Goldberg & Jerrum 2014), the minimum 3-way cut problem (Goldberg & Jerrum 2008), or maxi- mum independent set for planar cubic graphs (Goldberg & Jerrum 2012b), which are either easy on planar graphs or the parameter regions they cover are considerably smaller or cannot be used to conclude #P-hardness. We instead reduce the exact computation of Z (G; q, γ) to its approximation, which has the advantage Tutte that the problem that we are reducing from is #P-hard for pla- nar graphs (Vertigan 2005). Interestingly, our reduction requires us to apply an algorithm of Kannan, Lenstra and Lovasz ´ (Kannan et al. 1988) to reconstruct the minimal polynomial of an algebraic number from an additive approximation of the number. The lower bounds on the partition function Z (G; q, γ) that are gathered Tutte in Section 6.1 also play a role in this reduction, the details will be giveninSection 6.5. 3. Preliminaries 3.1. The multivariate Tutte polynomial. The random clus- ter formulation of the multivariate Tutte polynomial is particularly convenient when working with implementations (as we will see in Section 3.2), and is defined as follows. Let G =(V, E) be a graph. For any γ : E → C and q ∈ C,the multivariate Tutte polynomial of G is k(A) (3.1) Z (G; q, γ)= q γ . Tutte e A⊆E e∈A We will make use of the following notation. Let s and t be two distinct vertices of G. We define k(A) Z (G; q, γ)= q γ . st e A⊆E: e∈A s and t in thesamecomponent Analogously, let Z be the contribution to Z (G; q, γ)fromthe s|t Tutte configurations A ⊆ E such that s and t are in different connected components in (V, A). That is, Z (G; q, γ)= Z (G; q, γ) − s|t Tutte Z (G; q, γ). st 2 Page 14 of 94 Galanis, Goldberg & Herrera-Poyatos cc 3.2. Implementing weights, series compositions and par- allel compositions. In this section, we define implementations, shifts, series compositions and parallel compositions. The defini- tions and results that we give are standard and can also be found, for instance, in (Jaeger et al. 1990, Section 4), (Goldberg & Jerrum 2012b, Section 2.1) or (Sokal 2005, Section 4). Let q ∈ C with q =0. The valueof q is fixed across all this section. Let H be a weighted graph with weight function γ ˆ.Let s and t be two distinct vertices of H, which are usually referred to as terminals. We say that the graph H γ ˆ-implements the weight w with respect to the terminals s and t if Z (H; q, γ ˆ) st w = q . Z (H; q, γ ˆ) s|t We say that H γ ˆ-implements the weight w if there are terminals s and t such that H γ ˆ-implements the weight w with respect to s and t. These definitions are motivated by Lemma 3.2,whose proof is a straightforward computation involving the definitions of implementations and the multivariate Tutte polynomial. Lemma 3.2 (Goldberg & Jerrum 2012b, Equation 2.2). Let G and H be two graphs with weight functions γ and γ ˆ, respectively. Let f be an edge of G with weight γ such that H γ ˆ-implements γ f f with respect to terminals s and t.Let G be the graph constructed by considering the union of G and H, identifying the terminals s and t with the endpoints of f in G and removing f.Let γ be the weight function on G that inherits the weights from γ and γ ˆ. Then Z (H; q, γ ˆ) s|t Z (G ; q, γ )= Z (G; q, γ) , st f st Z (H; q, γ ˆ) s|t Z (G ; q, γ )= Z (G; q, γ) . s|t f s|t Z (H;q,γ ˆ) s|t In particular, we have Z (G ; q, γ )= Z (G; q, γ). Tutte f 2 Tutte Moreover, if Gγ-implements a weight w,then G also γ -implements w. cc Approximating the complex Potts model Page 15 of 94 2 Therefore, if we can compute Z (H; q, γ ˆ) efficiently, then com- s|t puting Z (G; q, γ)isashardascomputing Z (G ; q, γ ). This Tutte Tutte f observation leads to some of the reductions that appear in this pa- per. In the remaining sections we usually assume that the weights are constant, that is, each edge of the graph has the same weight, and we will make it clear when this is not the case. In the constant weight function case Lemma 3.2 can be applied to each edge of the graph constructed by copying G and substituting each edge f in G by a copy of H (identifying the endpoints of f with s and t). Let α ,α ∈ C. We say that there is a shift from (q, α )to(q, α )if 1 2 1 2 thereisagraph H that α -implements α . An important property 1 2 of shifts is transitivity; if there are shifts from (q, α )to(q, α )and 1 2 from (q, α )to(q, α ), then there is a shift from (q, α )to(q, α ). 2 3 1 3 This is a consequence of Lemma 3.2.Let y = α +1 and y = 1 1 2 α +1. We define x and x by q =(x −1)(y −1) = (x −1)(y −1), 2 1 2 1 1 2 2 which is the change of variables that relates the Tutte polynomial and Z . We equivalently refer to the shift from (q, α )to(q, α ) Tutte 1 2 as a shift from (x ,y )to(x ,y ), and we also say that H (x ,y )- 1 1 2 2 1 1 implements (x ,y ). This notation is convenient to express many 2 2 of the shifts considered in this paper. To conclude this section we introduce two tools that will provide us with many examples of implementations and shifts: parallel compositions and series compositions. For each j ∈{1, 2},let G be a graph, let s and t be two terminals of G ,and let γ be j j j j a weight function such that G γ -implements a weight w with j j j respect to s and t . j j Parallel compositions. The parallel composition of (G ,s ,t ) 1 1 1 and (G ,s ,t ) is the graph G constructed by considering the union 2 2 2 of G and G and identifying s with s and t with t .Let γˆ be 1 2 1 2 1 2 the weight function on G inherited from γ and γ .It is well known 1 2 and easy to check that G γ ˆ-implements the weight w =(1 + w )(1 + w ) − 1 1 2 with respect to the terminals s and t .Let (x ,y )and (x ,y ) 1 1 1 1 2 2 be the Tutte coordinates of (q, w )and (q, w ), respectively, (so 1 2 y = w +1 and (x − 1)(y − 1) = q). Then the Tutte coordinates j j j j 2 Page 16 of 94 Galanis, Goldberg & Herrera-Poyatos cc of (q, w)are (x, y)with y = y y and (x − 1)(y − 1) = q.Let Υ be a 1 2 graph with two vertices s, t and one edge joining them, and let Υ be the parallel composition of n copies of (Υ,s,t) (so Υ has two vertices and n edges joining them). Then Υ (x, y)-implements (x ,y )with y = y and (x − 1)(y − 1) = q. This is known as an n-thickening of (x, y) and it yields a shift from (x, y)to(x ,y ). Series compositions. The series composition of (G ,s ,t )and 1 1 1 (G ,s ,t ) is the graph G constructed by considering the union of 2 2 2 G and G and identifying t with s .Let γˆ be the weight function 1 2 1 2 on G inherited from γ and γ . It is well known and easy to check 1 2 that G γ ˆ-implements the weight w w 1 2 w = w + w + q 1 2 with respect to the terminals s and t .Note that w satisfies 1 2 q q q (3.3) 1+ = 1+ 1+ . w w w 1 2 Let (x ,y )and (x ,y ) be the Tutte coordinates of (q, w )and 1 1 2 2 1 (q, w ), respectively (so y = w +1 and (x − 1)(y − 1) = q). 2 j j j j Then, in view of (3.3), the Tutte coordinates of (q, w)are (x, y) with x = x x and (x − 1)(y − 1) = q. Let Υ be a graph with two 1 2 vertices s, t and one edge joining them, and let Υ be the series composition of n copies of (Υ,s,t) (so Υ is a path graph with n edges). Then Υ (x, y)-implements (x ,y )with x = x and (x − 1)(y − 1) = q. This is known as an n-stretching of (x, y)and it yields a shift from (x, y)to(x ,y ). For series–parallel and theta graphs (see Footnote 4), these con- structions give that either Z (G; q, γ) = 0, or the series–parallel s|t graph G (with terminals s and t) γ-implements a weight w(G, s, t; q, γ) that can be computed from the recursive definition of series– parallel graphs in polynomial time. In particular, let Θ be (l ,...,l ) 1 m the theta graph with m internal paths of lengths l ,...,l .In this 1 m case, we have that We should mention that we will make use of the Θ asymptotic notation in this paper and this notation should not be confused with that of theta graphs. cc Approximating the complex Potts model Page 17 of 94 2 (3.4) w Θ ,s,t; q, γ = 1+ − 1, (l ,...,l ) 1 m x − 1 j=1 where x =1 + q/γ. Series–parallel graphs can be built using series and parallel compositions. The following definition is equivalent to the one in Footnote 4. A graph G is series–parallel (with terminals s and t)ifeither G is the graph with two vertices s and t and one edge joining them, or G is the parallel or series composition of (G ,s ,t )and (G ,s ,t ), where s = s , t = t and G is a series– 1 1 1 2 2 2 1 2 j parallel graph with terminals s and t (Brandst¨ adt et al. 1999, j j Chapter 11). Finally, the size of a graph G =(V, E) is the integer size(G)= |V | + |E|. Note that the size of Θ is 2 l − m +2. (l ,...,l ) j 1 m j=1 4. Polynomial-time approximate shifts Implementing a specific weight cannot always be achieved. Nonethe- less, sometimes we can implement an approximation of the desired weight with as much precision as we need. These implementa- tions have been exploited several times in the literature on Tutte polynomials and the Ising model; see (Goldberg & Jerrum 2008, 2012b, 2014, 2019). Here we collect some of these results appearing in (Goldberg & Jerrum 2014), whichinturnare basedonargu- ments in (Goldberg & Jerrum 2012b); here, we follow the presen- tation in (Goldberg & Jerrum 2019) (that was stated for q =2). Lemma 4.1. (Goldberg & Jerrum 2019, Lemma 22 Goldberg & Jerrum 2014, Lemma 5) Let x and y be real alge- braic numbers such that y ∈ [−1, 1] and (x − 1)(y − 1) = q> 0. There is a polynomial-time algorithm that takes as an input: ◦ two positive integers n and k, in unary; ◦ a real algebraic number y ∈ [1, |y| ]. This algorithm produces a theta graph G that (x, y)-implements −n (ˆ x, y ˆ) such that y −y ˆ ≤ 2 .The size of G is at most a polynomial in n and k, independently of y . 2 Page 18 of 94 Galanis, Goldberg & Herrera-Poyatos cc In Lemma 2.3 (Section 5), we give a similar result to Lemma 4.1 where the numbers x and y may not be algebraic. The fact that the graph G computed in Lemma 4.1 is a theta graph is not directly stated in the statement of (Goldberg & Jerrum 2014, Lemma 5) but it can easily be inferred from the proof. This also applies to Lemma 4.2. Lemma 4.2. (Goldberg & Jerrum (2019), Lemma 22, Goldberg & Jerrum (2014), Lemma 7)]Let x ,y ,x ,y be real 1 1 2 2 algebraic numbers such that y ∈ (−1, 1), y ∈ [−1, 1],and (x − 1 2 1 1)(y − 1) = (x − 1)(y − 1) = q< 0. There is a polynomial-time 1 2 2 algorithm that takes as an input: ◦ two positive integers n and k, in unary; −k ◦ a real algebraic number y ∈ [1, |y | ]. This algorithm produces a theta graph G =(V, E) and a weight function γ ˆ : E →{y − 1,y − 1} such that G γ ˆ-implements (ˆ x, y ˆ) 1 2 −n with y − y ˆ ≤ 2 .The size of G is at most a polynomial in n and k, independently of y . Corollary 4.3. Let x ,y ,x ,y be real algebraic numbers such 1 1 2 2 that y ∈ (−1, 0) ∪ (0, 1), y ∈ [−1, 1], (x − 1)(y − 1) = (x − 1 2 1 1 2 1)(y − 1) = q, q =0. There is a polynomial-time algorithm that takes as an input: ◦ two positive integers n and k, in unary; k −k ◦ a positive real algebraic number y such that |y |∈ [|y | , |y | ]. 1 1 This algorithm produces a theta graph G =(V, E) and a weight function γ ˆ : E →{y − 1,y − 1} such that G γ ˆ-implements (ˆ x, y ˆ) 1 2 −n with y − y ˆ ≤ 2 .The size of G is at most a polynomial in n and k, independently of y . Moreover, if either y < 0 or y < 0,then 1 2 the restriction that y is positive can be replaced with a restriction that y is non-zero. cc Approximating the complex Potts model Page 19 of 94 2 Proof. This result easily follows from Lemmas 4.1 and 4.2 by an argument of Goldberg and Jerrum (see the proof of (Goldberg & Jerrum 2014, Lemma 2)). We include here their argument for completeness. The case when y ≥ 1 has been covered in Lem- mas 4.1 and 4.2. First, let us assume that y ∈ (0, 1). We have −2k −2k 1 ≤ y · y ≤|y | and using Lemmas 4.1 and 4.2 we can imple- −2k −n 2k  −n ment y ˜ with |y ˜ − y · y |≤ 2 .We have |y y ˜ − y |≤ 2 ,sowe 1 1 2k set y ˆ = y y ˜. The graph G is the parallel composition of the graph used to implement y ˜ and 2k edges with weight y . Finally, let us assume that there is i ∈{1, 2} such that y < 0, and let us consider thecasewhere y is negative. We implement an approximation y ˆ of y /y > 0, and return y ˆ =ˆ y y . i i The graphs G produced by the algorithms given in Lemma 4.1, Lemma 4.2 and Corollary 4.3 are theta graphs. One may won- der which weights can be approximated as in these results. This leads to the following definition. Let (x ,y ), (x ,y ) ∈H .Let 1 1 2 2 q γ = y − 1and γ = y − 1. We say that there is a polynomial- 1 1 2 2 time approximate shift from (q, γ )to(q, γ ) or, equivalently, from 1 2 (x ,y )to(x ,y ), if there is an algorithm that, for any positive 1 1 2 2 integer n, computes in polynomial time in n agraph G that −n (x ,y )-implements (x ˆ , y ˆ )with |y − y ˆ |≤ 2 . If the graph G 1 1 2 2 2 2 n computed by this algorithm is always a theta graph (resp. a series– parallel graph), then we say that this is a polynomial-time approxi- mate theta shift (resp. polynomial-time approximate series–parallel shift ). Lemma 4.1 gives polynomial-time approximate theta shifts from (x ,y )to(x ,y ) when the considered numbers are real al- 1 1 2 2 gebraic, y ∈ [−1, 1], y ∈ [1, ∞)and q> 0. Note that shifts 1 2 are a particular case of polynomial-time approximate shifts. More- over, due to the transitivity property of shifts, if there is a shift from (x ,y )to(x ,y ) and there is a polynomial-time approxi- 1 1 2 2 mate shift from (x ,y )to(x ,y ), then there is a polynomial-time 2 2 3 3 approximate shift from (x ,y )to(x ,y ). In fact, polynomial- 1 1 3 3 time approximate shifts exhibit some of the properties of shifts; in Lemma 4.4 we show that they behave well with respect to parallel and series compositions and in Lemma 4.8 we show that they are transitive under certain conditions. In Section 5 we give more ex- amples of polynomial-time approximate shifts, some of which will 2 Page 20 of 94 Galanis, Goldberg & Herrera-Poyatos cc be constructed by transitivity. These approximate shifts play an important role in our hardness proofs. Lemma 4.4. Let q ∈ C \{0} and let (x ,y ) ∈H for each j j q j ∈{1, 2, 3}. Let us assume that there are polynomial-time approx- imate shifts from (x ,y ) to (x ,y ), and from (x ,y ) to (x ,y ). 1 1 2 2 1 1 3 3 Let (x ,y ), (x ,y ) ∈H with y = y y and x = x x . Then: 4 4 5 5 q 4 2 3 5 2 3 (i) there is a polynomial-time approximate shift from (x ,y ) to 1 1 (x ,y ); 4 4 (ii) there is a polynomial-time approximate shift from (x ,y ) to 1 1 (x ,y ). 5 5 Moreover, if the polynomial-time approximate shifts from (x ,y ) 1 1 to (x ,y ) and (x ,y ) are series–parallel, then the obtained 2 2 3 3 polynomial-time approximate shifts are also series–parallel. Proof. For j ∈{2, 3},let G be the graph computed by the n,j polynomial-time approximate shift from (x ,y )to(x ,y ), so G 1 1 j j n,j −n (x ,y )-implements (x ˆ , y ˆ )with |y − y ˆ |≤ 2 , for certain termi- 1 1 j j j j nals t and s . j j For Item i,let P be the parallel composition of (G ,s ,t )and n n,2 2 2 (G ,s ,t ). The graph P gives a shift from (x ,y )to(xˆ , y ˆ y ˆ ) ∈ n,3 3 3 n 1 1 4 2 3 −n H .Since |y − y ˆ |≤ 2 ,wehave |y ˆ |≤|y | +1 and q 3 3 3 3 −n |y y − y ˆ y ˆ |≤|y − y ˆ ||y ˆ | + |y − y ˆ ||y |≤ 2 (|y | +1+ |y |) . 2 3 2 3 2 2 3 3 3 2 3 2 Therefore, for k large enough, the graphs P give a polynomial- n+k time approximate shift from (x ,y )to(x ,y )with y = y y . 1 1 4 4 4 2 3 For Item ii, the proof is analogous but now we define the graph S as the series composition of (G ,s ,t )and (G ,s ,t ), which n n,2 2 2 n,3 3 3 gives a shift from (x ,y )to(xˆ x ˆ , y ˆ ) ∈H . 1 1 2 3 4 q Note that if the original polynomial-time approximate shifts are series–parallel, then the obtained ones are also series–parallel by the definition of series–parallel graphs. When it comes to hardness results, we are only interested in algebraic numbers. However, we will have to consider polynomial- time approximate shifts from (x ,y )to(x ,y ) such that the num- 1 1 2 2 bers involved are not algebraic. This is due to the fact that, even cc Approximating the complex Potts model Page 21 of 94 2 if x and y are algebraic, x and y might not be. Nonetheless, 1 1 2 2 in that case we can ensure that x and y are polynomial-time 2 2 computable. A real number x is polynomial-time computable if there is a function φ : N → Q that is computable in polynomial time (with the input written in unary notation, i.e., 0 ) such that −n |x − φ(n)|≤ 2 for all n ∈ N (Ko 1991, Chapter 2). The defini- tion given in (Ko 1991, Chapter 2) uses dyadic rational numbers instead of rational numbers, but these two definitions are easily seen to be equivalent. We denote the set of polynomial-time com- putable real numbers by P . One can easily show that the set P is R R a field. Real algebraic numbers are in P because we can approxi- mate them as closely as we want by applying Sturm sequences and binary search (Emiris et al. 2008). We say that a complex number z is polynomial-time computable if z = x + iy for some x, y ∈ P . We denote the set of polynomial-time computable complex num- bers by P . Algebraic numbers are in P (their real and imaginary C C parts are real algebraic numbers). It turns out that P is an al- gebraically closed field (Ko 1991, Chapter 2). In particular, for z ∈ P ,wehave |z|∈ P . C R If there is a polynomial-time approximate theta shift from (x ,y ) 1 1 to (x ,y )and x and y are algebraic, then we can compute in 2 2 1 1 polynomial time in n an algebraic number that additively approx- −n imates y up to an additive error 2 . Since we can approximate algebraic numbers by rational numbers efficiently, it follows that x and y are polynomial-time computable. However, if we only 2 2 know that x and y are polynomial-time computable, then it is 1 1 not clear if x and y are polynomial-time computable or not. 2 2 Lemma 4.7 gives a partial answer to this question and plays a key role in our transitivity result for polynomial-time approxi- mate shifts (Lemma 4.8). First, we need to prove some lemmas on polynomial-time computable numbers. Lemma 4.5. Let z ∈ P . There is an algorithm that computes b ∈ Q with |z|≤ b .Moreover, if z =0, then there is an algorithm 1 1 that computes b ∈ Q with 0 <b ≤|z|. 2 2 Proof. Let x = |z|.From x ∈ P , it follows that we can com- −n pute a sequence x ˆ ∈ Q such that |x − x ˆ |≤ 2 , that is, we have n n 2 Page 22 of 94 Galanis, Goldberg & Herrera-Poyatos cc −n −n x ∈ [ˆ x − 2 , x ˆ +2 ]. This computation for n = 1 gives the up- n n −n −n per bound x ˆ +1/2. Note that the sequences x ˆ − 2 and x ˆ +2 1 n n converge to x. Hence, if x = 0, then there must be n such that −n 0 < x ˆ − 2 ≤ x. We compute x ˆ until this inequality happens, n n obtaining the desired lower bound. Lemma 4.6. Let z ∈ P with |z| =1. There is a polynomial-time algorithm that takes as inputs two positive integers n and k and computes a positive integer r(n, k) such that (i) r(n, k) is increasing in k; (ii) r(n, k)= n +Θ(k); −r(n,k) 1 1 −n (iii) if |z − z ˆ|≤ 2 ,then  −  ≤ 2 . k k z −1 zˆ −1 Proof. By Lemma 4.5, we can compute an integer t ≥ 0such −t t that 2 ≤||z|− 1| and |z|≤ 2 . Note that for every integer k ≥ 1 k −t we have the bound z − 1 ≥ 2 . Indeed, if |z| < 1, then −t k k 2 ≤ 1 −|z|≤ 1 −|z| ≤ z − 1 −t k and when |z| > 1, we analogously find that 2 ≤|z|−1 ≤|z| −1 ≤ z − 1 . Let n and k be the inputs of our algorithm. Let r(n, k)= n+(t+ 1)(k + 1), and note that r is increasing in k and r(n, k)= n+Θ (k), establishing Items i and ii. −r(n,k) For Item iii,consider zˆ such that |z − z ˆ|≤ 2 .Since −r(n,k) t+1 |z ˆ|≤|z| +2 ≤ 2 , for every j ∈{0,...,k − 1} we have j k−1−j t(k−1)+j |z ˆ| |z| ≤ 2 and hence k−1 k−1 j k−1−j k k j k−1−j z − z ˆ = (z − z ˆ) z ˆ z ≤|z − z ˆ| |z ˆ| |z| j=0 j=0 k−1 t(k−1)+j t(k−1)+k −(n+2t+1) ≤|z − z ˆ| 2 < |z − z ˆ| 2 ≤ 2 . j=0 k k k k −(t+1) Moreover, we have that z − 1 − z ˆ − 1 ≤ z − z ˆ < 2 and, thus, k k −(t+1) −(t+1) z ˆ − 1 ≥ z − 1 − 2 ≥ 2 , cc Approximating the complex Potts model Page 23 of 94 2 k −t whereweusedthat z − 1 ≥ 2 . Therefore, we find that k k 1 1 z − z ˆ 2t+1 k k −n − = ≤ 2 z − z ˆ ≤ 2 . k k   k k z − 1 z ˆ − 1 (z − 1)(z ˆ − 1) Lemma 4.7. Let q ∈ P with q =0 and let γ ∈ P with γ ∈ C C {0}∪−q/2+ iqR. There is a polynomial-time algorithm that takes as an input: ◦ a positive integer n; ◦ a theta graph G =Θ with terminals s and t. (l ,...,l ) 1 m This algorithm computes f (n, G) such that (i) f (n, G)= n +Θ (size(G)); −f (n,G) (ii) for any γ ˆ with |γ − γ ˆ|≤ 2 ,wehave −n |w(G, s, t; q, γ) − w(G, s, t; q, γ ˆ)|≤ 2 . Proof. Let y = γ +1 and x =1 + q/γ.Note that |x| =1 if and only if |γ + q| = |γ|. By basic geometry, the latter statement is equivalent to γ ∈−q/2+ iqR. Hence, by hypothesis, |x| =1. There are two cases: ◦|x| < 1. Then for any positive integer k we have q |q| |q| |q| 1+ ≤ 1+ ≤ 1+ =1 + . x − 1 1 −|x| |1 −|x|| 1 −|x| ◦|x| > 1. Then for any positive integer k we have q |q| |q| |q| 1+ ≤ 1+ ≤ 1+ =1 + . x − 1 |x|− 1 |1 −|x|| |x| − 1 Since q, x ∈ P , we can apply Lemma 4.5 along with the above bounds to compute a non-negative integer t such that k t 1+ q/(x − 1) ≤ 2 for every positive integer k. Lemma 4.5 2 Page 24 of 94 Galanis, Goldberg & Herrera-Poyatos cc also allows us to compute non-negative integers t and t such that q γ t −t q γ |q|≤ 2 and 2 ≤|γ|. Let n and G =Θ be the inputs of our algorithm. Let (l ,...,l ) 1 m k =max{l ,...,l }.Since |x| = 1, we can compute g(n, G)= 1 m r(n +(t +1)(m +1)+ t ,k), where r is as in Lemma 4.6 for the x q polynomial-time computable number x. We compute f (n, G)= g(n, G)+ t +2t + 1. We claim that f satisfies the statement. In q γ view of the properties of r,wehave f (n, G)= g(n, G)+Θ (1) = n +Θ (size(G)) . We define y =1 + q/ x − 1 for every j ∈{1,...,m}. Recall that in (3.4) we argued that w(G, s, t; q, γ)= y − 1. j=1 −f (n,G) Let γ ˆ with |γ − γ ˆ|≤ 2 .Let yˆ =ˆ γ +1 and x ˆ =1+ q/(ˆ y − 1). Then w(G, s, t; q, γ ˆ)= y ˆ − 1, j=1 l −f (n,G) −t −1 j γ where y ˆ =1 + q/ x ˆ − 1 .Since |γ − γ ˆ|≤ 2 ≤ 2 ,we −t −1 −t −1 γ γ have |γ ˆ|≥|γ|− 2 ≥ 2 and q q γ ˆ − γ |x − x ˆ| = − = q γ γ ˆ γγ ˆ 2t +1 t +2t +1−f (n,G) −g(n,G) γ q γ ≤|q||γ ˆ − γ| 2 ≤ 2 =2 . In light of the properties of r (Lemma 4.6)and thefactthat l ≤ k, it follows that q q −n−(t +1)(m+1)−t x q |y − y ˆ | = − ≤|q| 2 j j l l j j x − 1 x ˆ − 1 −n−(t +1)(m+1) ≤ 2 t +1 for every j ∈{1,...,m}.Thus, we have |y ˆ |≤|y | +1 ≤ 2 . j j cc Approximating the complex Potts model Page 25 of 94 2 We obtain m m m j−1 m y − y ˆ = (y − y ˆ ) y ˆ y j j j j s s j=1 j=1 j=1 s=1 s=j+1 t (m−1)+j−1 < |y − y ˆ | 2 j j j=1 t (m−1) −n−(t +1)(m+1)+j−1 x x ≤ 2 2 j=1 −n−m−2 j −n ≤ 2 2 < 2 . j=1 −n Equivalently, |w(G, s, t; q, γ) − w(G, s, t; q, γ ˆ)| < 2 as we wanted to prove. We now prove the main transitivity property of polynomial- time approximate shifts that we will use in our constructions. Lemma 4.8. Let q ∈ P with q =0 and let (x ,y ) ∈H for each C j j q j ∈{1, 2, 3}. Let us assume that the following hypotheses hold: (i) x and y are polynomial-time computable; 2 2 (ii) y ∈{1}∪ (1 − q/2+ iqR); (iii) there is a polynomial-time approximate shift from (x ,y ) to 1 1 (x ,y ); 2 2 (iv) there is a polynomial-time approximate theta shift from (x ,y ) 2 2 to (x ,y ). 3 3 Then there is a polynomial-time approximate shift from (x ,y ) 1 1 to (x ,y ). Moreover, if the polynomial-time approximate shift 3 3 from (x ,y ) to (x ,y ) is series–parallel, then the polynomial-time 1 1 2 2 approximate shift from (x ,y ) to (x ,y ) is also series–parallel. 1 1 3 3 Proof. Let γ = y − 1 for every j ∈{1, 2, 3}.Let n be a j j positive integer. We give an algorithm that constructs a graph J , in polynomial time in n, such that J γ -implements γ ˆ with n n 1 3 −n |γ − γ ˆ |≤ 2 . This algorithm is as follows. First, we use the 3 3 2 Page 26 of 94 Galanis, Goldberg & Herrera-Poyatos cc approximate theta shift from (x ,y )to(x ,y ) to compute a theta 2 2 3 3 graph G with terminals s and t such that 2 2 2 −n−1 (4.9) |γ − w(G ,s ,t ; q, γ )|≤ 2 . 3 2 2 2 2 Thesizeof G is at most polynomial in n. In light of Lemma 4.7, we can compute, in polynomial time in n, a positive integer f (n + −f (n+1,G ) 1,G ) such that for any γ ˆ with |γ − γ ˆ |≤ 2 ,wehave 2 2 2 2 −n−1 (4.10) |w(G ,s ,t ; q, γ ) − w(G ,s ,t ; q, γ ˆ )|≤ 2 . 2 2 2 2 2 2 2 2 We also have f (n +1,G )= n +Θ (size(G )), so f (n +1,G ) 2 2 2 is bounded by a polynomial in n. Now we use the approximate shift from (x ,y )to(x ,y ) to compute, in polynomial time in 1 1 2 2 n, a graph G such that G γ -implements γ ˆ with |γ − γ ˆ |≤ 1 1 1 2 2 2 −f (n+1,G ) 2 . Combining (4.9)and (4.10) with the triangle inequal- −n ity, we obtain γ − w(G ,s ,t ; q, γ ˆ ) ≤ 2 . 3 2 2 2 2 Finally, we construct a graph J as a copy of G where every n 2 edge is substituted by a copy of G as in Lemma 3.2. Since the sizes of G and G are polynomial in n,the size of J also is polynomial 1 2 n in n. Recall that G γ ˆ -implements γ ˆ = w(G ,s ,t ; q, γ ˆ )and G 2 2 3 2 2 2 2 1 γ -implements γ ˆ . Therefore, the graph J γ -implements γ ˆ ,and 1 2 n 1 3 −n |γ − γ ˆ |≤ 2 , as we wanted to obtain. Finally, if the polynomial- 3 3 time approximate shift from (x ,y )to(x ,y ) is series–parallel, 1 1 2 2 then the graphs J are easily seen to be series–parallel, and the result follows. 5. Polynomial-time approximate shifts with complex weights In this section we show how to implement approximations of real weights when the original weight is a non-real algebraic number. As a consequence of our results, for any real algebraic number q with q ≥ 2 and any pair of algebraic numbers (x, y) ∈H with y ∈ R and 2 2 (x, y) ∈{(−i, i), (i − i), (ω ,ω ), (ω ,ω )},where ω =exp(2πi/3), 3 3 3 3 3 there is a polynomial-time approximate shift from (x, y)toany pair of real algebraic numbers (x ,y ) ∈H (see Theorem 2.1). Our approach to prove Theorem 2.1 is as follows. First, we show that there is (x ,y ) ∈H with y ∈ (0, 1) such that there is a q cc Approximating the complex Potts model Page 27 of 94 2 polynomial-time approximate theta shift from (x, y)to(x ,y ) (see Lemma 5.23). Since x and y are algebraic, it follows that x and y are polynomial-time computable. Secondly, we extend part of Lemma 4.1 to the case where the numbers involved are only known to be polynomial-time computable (see Lemma 2.3). Finally, we use the transitivity property given in Lemma 4.8 to combine both results in the proof of Theorem 2.1. 5.1. Computing with algebraic numbers. In our proofs we use and develop some algorithms on algebraic numbers. We gather these algorithms in this section. We represent an algebraic number z as its minimal polynomial p and a rectangle R of the complex plane such that z is the only root of p in R. We can compute the addition, subtraction, multiplication, division and conjugation of algebraic numbers in polynomial time in the length of their repre- sentations, see (Strzebonski ´ 1997) for details. As a consequence, we can also compute the real and imaginary parts of z and the norm of z, which are algebraic numbers themselves, in polynomial time. Note that an algebraic number is 0 if and only if its minimal polynomial is x, which can be easily checked in this representa- tion. Hence, we can also determine in polynomial time whether two algebraic numbers z and z are equal by checking if z − z is 1 2 1 2 When z is a real algebraic number, we can simply represent it as its minimal polynomial p and an interval I with rational endpoints such that z is the only root of p in I.If we are given a real algebraic number z with this representation, then we can approximate it as closely as we want by applying Sturm sequences and binary search (Emiris et al. 2008). In fact, for z and z real 1 2 algebraic numbers, Sturm sequences also allow us to check whether z ≥ z in time polynomial in the length of the representations of 1 2 z and z .See (Emiris et al. 2008) for more details and complexity 1 2 analysis. A root of unity is a complex number z such that z = 1 for some positive integer k. The smallest positive integer n such that z =1 is the order of z. Note that roots of unity are algebraic numbers. The roots of unity of order n share the same minimal polynomial, known as the n-th cyclotomic polynomial, whose degree is ϕ(n), the 2 Page 28 of 94 Galanis, Goldberg & Herrera-Poyatos cc Euler phi function. We can determine whether an algebraic number z is a root of unity by checking whether its minimal polynomial is cyclotomic, see (Bradford & Davenport 1989) for a polynomial- time algorithm. If z is a root of unity, then we can easily compute its order from its representation; we compute the smallest n such that the minimal polynomial of z divides z − 1. This computation runs in polynomial time in the length of the representation of z as a consequence of the elementary bound ϕ(n) ≥ n/2. Another operation that we can perform in polynomial time is checking if the argument of an algebraic number is in a fixed in- terval. Lemma 5.1. Let a, b ∈ Q ∩ [0, 1] with a ≤ b. Then for any alge- braic number z we can check whether Arg(z) ∈ [2πa, 2πb] in time polynomial in the length of the representation of z. Proof. We can split the interval [2πa, 2πb] into intervals of length at most π/2and checkifArg(z) belongs to any of those intervals. Hence, let us assume for the sake of simplicity that [2πa, 2πb] ⊆ [0,π/2]. The other cases are analogous. Note that 2πia 2πib e and e are roots of unity and, in particular, algebraic. −2πia 2πi(1/4−b) Thus, we can compute z = ze and z = ze .We have a b Arg(z ) ∈ [0,π/2] if and only if Arg(z) ∈ [2πa, π/2+2πa], and Arg(z ) ∈ [0,π/2] if and only if Arg(z) ∈ [−π/2+2πb, 2πb]. We conclude that Arg(z) ∈ [2πa, 2πb] if and only if Arg(z ) ∈ [0,π/2] and Arg(z ) ∈ [0,π/2]. Finally, note that, for any algebraic num- ber y, since Re(y)and Im(y) are algebraic, we can determine if Arg(y) ∈ [0,π/2] or not by checking the inequalities Re(y) ≥ 0 and Im(y) ≥ 0. In the rest of this section we show how to efficiently compute σ(n) a sequence σ(n) such that Arg(z ) ∈ [2πa, 2πb] for every n.We will use the following well-known result, see, e.g., (Brin & Stuck 2002, Section 1.2): if z ∈ C is not a root of unity and |z| =1, then {z : j ∈ N} is dense in the unit circle. Lemma 5.2. Let a, b ∈ Q ∩ [0, 1] with a<b.Let z be an algebraic number such that |z| =1 and z is not a root of unity. Then there cc Approximating the complex Potts model Page 29 of 94 2 exists a sequence of positive integers {σ(n)} and a positive integer k such that such that: (i) k can be computed from z; (ii) σ(n) can be computed in polynomial time in n; (iii) n ≤ σ(n) ≤ n + k − 1 for every positive integer n; σ(n) (iv) Arg(z ) ∈ [2aπ, 2bπ]+2πZ for every positive integer n. Proof. Our algorithm to compute σ(n) is as follows. Set σ(0) = 0. We compute σ(n) as the smallest integer such that n ≤ σ(n) σ(n) σ(n) and Arg(z ) ∈ [2aπ, 2bπ]. We can check whether Arg(z ) ∈ [2aπ, 2bπ] or not by applying the procedure given in Lemma 5.1. We show that σ(n) is well-defined. Let θ =Arg(z). Since z is not a root of unity, {z : j ∈ N} is dense in the unit circle, as we have discussed in the previous paragraph. Therefore, there is q ∈ N such that Arg(z ) ∈ [0, 2(b − a)π]. Note that we can compute q in constant time with the help of Lemma 5.1.Let τ =Arg(z ). Since z is not a root of unity, we find that τ =0. Let t = 2π/τ .Since t is the smallest positive integer such that tτ ≥ 2π, t can be computed by sequentially determining which qj of the following intervals contains the argument of z :(0,π/2), (π/2,π), (π, 3π/2) or (3π/2, 2π). Hence, we can compute k = tq. For each positive integer n,since tτ ≥ 2π and τ< 2(b − a)π,there is p ∈{0,...,t − 1} such that nθ + p τ ∈ [2aπ, 2bπ]+2πZ.The n n integer m = n + p q satisfies n ≤ m ≤ n + k − 1and n n n m θ ∈ nθ + p τ +2πZ ⊆ [2aπ, 2bπ]+2πZ. n n We conclude that σ(n) is well-defined and n ≤ σ(n) ≤ m ≤ n + k − 1, so our algorithm computes σ(n) in polynomial time in n. Lemma 5.3. Let z be a root of unity of order k with k ∈{1, 2, 4}. Then there exists a sequence of positive integers {σ(n)} and an integer l such that: (i) σ(n) can be computed in polynomial time in n; 2 Page 30 of 94 Galanis, Goldberg & Herrera-Poyatos cc (ii) n ≤ σ(n) ≤ n + k − 1 for every positive integer n; σ(n) 2πil/k (iii) z = e for every positive integer n; (iv) π< 2πl/k < 3π/2. Proof. Let θ =Arg(z). Since θ = 0, we can write θ =2πj/k for some integer j coprime with k. We consider two cases. Case I: k = 3. Then either we have θ =2π/3 and we compute σ(n) ∈{n, n +1,n +2} with σ(n) ≡ 2 (mod 3), or we have θ = 4π/3 and we compute σ(n) ∈{n, n +1,n +2} with σ(n) ≡ 1 σ(n) (mod 3). In any case, we have σ(n)θ ∈ 4π/3+2πZ,that is, z = 4πi/3 e for any positive integer n. Case II: k ≥ 5. Then there is an integer l such that k/2 < l< 3k/4, that is, 2πl/k ∈ (π, 3π/2). The Euclidean algorithm gives two integers t ,t such that t j + t k = 1. We compute 1 2 1 2 σ(n) ∈{n,...,n + k − 1} such that σ(n) ≡ t l (mod k). We can write σ(n)= t l + q k for some integer q .We have 1 n n 2πj 2π 2πl σ(n)θ = t l +q 2πj = l(1−t k) +q 2πj = +(q j −lt )2π 1 n 2 n n 2 k k k σ(n) 2πil/k and, equivalently, z = e for every positive integer n. Corollary 5.4. Let z be an algebraic number such that z ∈ R ∪ iR.Let θ =Arg(z). Then there exists a sequence of positive integers {σ(n)}, a positive integer k and a positive rational number C such that such that: (i) k and C can be computed from z; (ii) σ(n) can be computed in polynomial time in n; (iii) n ≤ σ(n) ≤ n + k − 1 for every positive integer n; (iv) cos(σ(n)θ) ≤−C and sin(σ(n)θ) ≤−C for every positive integer n. cc Approximating the complex Potts model Page 31 of 94 2 Proof. We may assume that |z| = 1 since, otherwise, we can compute the algebraic number z/|z| and apply the following algo- rithm to this quantity. We invoke either Lemma 5.2 for a =7/12 and b =8/12 or Lemma 5.3, depending on whether z is a root of unity or not, which can be checked as explained at the beginning of this section. In any case, we find a sequence σ and a positive integer k that satisfy the first three assertions announced in the statement. In the non-root of unity case, we have cos(σ(n)θ) ≤ cos(2πb) < 0 and sin(σ(n)θ) ≤ sin(2πa) < 0 for every positive integer n.In the root of unity case, the sequences cos(σ(n)θ) and sin(σ(n)θ)are negative constants. In any case, we can compute a positive ratio- nal number C such that cos(σ(n)θ) ≤−C and sin(σ(n)θ) ≤−C for every positive integer n. Corollary 5.5. Let z be an algebraic number with |z| > 1. Then for any x ∈ Q with x> 0, we can compute n such that Re (z ) ≥ x.Moreover, if z ∈ [0, ∞), then we can compute m such that Re (z ) ≤−x. iθ Proof. Let z = Re for some θ ∈ [0, 2π)and R> 1. We iθ determine if z/|z| = e is a root of unity or not, and compute iθ its order as explained before. If e is a root of unity of order k, k iθ then z ∈ (1, ∞), so computing n is straightforward. If e is not a root of unity, then, in view of Lemma 5.3 for a =1/12 and b =1/6, we can compute a sequence σ such that σ(j) ≥ j and σ(j)θ ∈ [π/6,π/3] + 2πZ for every positive integer j. We find that σ(j) σ(j) j Re(z ) ≥ R cos(π/3) ≥ R /2. Hence, we can compute j large σ(j) enough such that Re(z ) ≥ x and we choose n = σ(j). iθ Now let us assume that z ∈ [0, ∞). Note that e =1. If iθ e is a root of unity of order 2 or 4, then the result is trivial. If θ ∈{0,π/2,π, 3π/2}, then, by invoking Corollary 5.4,we com- pute σ and a positive rational number C such that σ(j) ≥ j and cos(σ(j)θ) ≤−C for every positive integer j. We find that σ(j) σ(j) j Re(z ) ≤−CR ≤−CR . Hence, we can compute j large σ(j) enough such that Re(z ) ≤−x and we choose m = σ(j). 5.2. Some shifts for non-real algebraic numbers. In this section we gather some of the shifts that we use in our proofs. Let 2 Page 32 of 94 Galanis, Goldberg & Herrera-Poyatos cc q be a real algebraic number with q ≥ 2and let(x, y) ∈H be a pair of algebraic numbers. We are interested in computing a shift from (x, y)to(x ,y ) ∈H with x ∈ R and |x | > 1 whenever 1 1 q 1 1 possible. The existence of this shift turns out to be closely related to the hardness of approximating |Z (G; q, γ)| with γ = y − 1; Tutte when we can compute such a shift the approximation problem is #P-hard, as we will see in Section 6. Recall that one can evaluate the Tutte polynomial of a graph in polynomial time at any of the 2 2 points in {(−i, i), (i, −i), (ω ,ω ), (ω ,ω )},where ω =exp(2πi/3) 3 3 3 3 3 (see Section 6.3). These are the points for which our results fail to construct the desired shift. The results of this section involve computations that might not run in polynomial time in the length of the representation of the algebraic numbers q, x and y involved. However, when applying these results, the numbers q, x and y are constants and, hence, this will not affect the complexity of our algorithms. Remark 5.6. Let q be a positive real number and let (x, y) ∈H . From (x − 1)(y − 1) = q it follows that x is real if and only if y is real. Note that x =1 + q/(y − 1) = (y + q − 1)/(y − 1). As noted in the proof of Lemma 4.7, we find that |x| =1 if and only if |y + q − 1| = |y − 1|,thatis, y is on the line 1 − q/2+ iR. Moreover, |x| > 1 if and only if Re(y) > 1 − q/2. Note that when q ≥ 2 and Re(y) > 0,wehave Re(y) > 1 − q/2 and, thus, |x| > 1. These observations will be applied several times in this section. Lemma 5.7. Let q be a real algebraic number with q ≥ 2.Let x and y be algebraic numbers such that (x, y) ∈H and Arg(y) ∈ {0,π/2, 2π/3,π, 4π/3, 3π/2}. Then we can compute a theta graph J that (x, y)-implements (x ,y ) with |x | > 1 and x ∈ R. 1 1 1 1 Proof. We show how to compute n such that Re(y ) > 0and n n Im(y ) > 0. For such a n,welet y = y and x =1 + q/(y − 1), 1 1 1 so Remark 5.6 ensures that |x | > 1and x ∈ R. Hence, we 1 1 can return J as the graph with two vertices and n edges joining them. Since y and |y| are algebraic numbers, we can compute the algebraic number y/ |y|. We can detect if y/ |y| is arootofunity or not as explained in Section 5.1. There are two cases: cc Approximating the complex Potts model Page 33 of 94 2 (i) y/ |y| is not a root of unity. Then we can apply Lemma 5.2 with a =1/12,b =1/6and z = y to compute the smallest positive integer n such that Arg(y ) ∈ [π/6,π/3]. Recall that such an integer exists because {(y/ |y|) : j ∈ N} is dense in the unit circle. Finally, since Arg(y ) ∈ [π/6,π/3], we have n n Re(y ) > 0and Im(y ) > 0. (ii) y/ |y| is a root of unity of order r with r ≥ 5. Recall that we can compute r by sequentially computing the powers of y/ |y| r+1 i2π/r until we obtain 1. Then we have (y/ |y|) = e .Note i2π/r that the real and imaginary parts of e =cos(2π/r)+ i sin(2π/r) are positive. Note that the argument given in Lemma 5.7 strongly uses the fact that q ≥ 2, that is, 1 − q/2 ≤ 0. A proof of a version of Lemma 5.7 with q ∈ (0, 2) is unknown to us. Now we deal with the cases Arg(y) ∈{π/2, 2π/3, 4π/3, 3π/2}, where the exemptions 2 2 (−i, i), (i, −i), (ω ,ω ), (ω ,ω )arise. Notethat(−i, i), (i, −i) ∈ 3 3 3 3 2 2 H and (ω ,ω ), (ω ,ω ) ∈H . In fact, one can easily check that 2 3 3 3 3 3 these are the only pairs (x, y) such that |y| =1 and q ∈{2, 3}. Lemma 5.8. Let q be a real algebraic number with q ≥ 2.Let x and y be algebraic numbers such that (x, y) ∈H , y =0 and Arg(y) ∈{2π/3, 4π/3}.If q =3 or |y| =1, then we can compute a series–parallel graph J that (x, y)-implements (x ,y ) with |x | > 1 1 1 1 and x ∈ R. Proof. Note that y/ |y| is a root of unity of order 3. We have Re(y)= |y| cos(2π/3) = −|y| /2 < 0. Let x =1 + q/(y − 1). We consider three cases. Case I: Re(y) > 1 − q/2. Then, by Remark 5.6, |x| > 1. We return J as the graph with 2 vertices and one edge joining them. Case II: Re(y) < 1−q/2. Then |x| < 1. Let y =1+q/(x −1). An n-stretch gives a shift from (x, y)to(x ,y ). Since x ∈ R,there are infinitely many values of n such that y ∈ R.Note that y con- n n verges to 1 − q ∈ (−∞, −1], and the distance between 1 − q and the set of complex points {z ∈ C :Arg(z) ∈{π/2, 2π/3, 4π/3, 3π/2}} is larger than 0. Hence, we can compute n such that Arg(y ) ∈ n 2 Page 34 of 94 Galanis, Goldberg & Herrera-Poyatos cc {0,π/2, 2π/3,π, 4π/3, 3π/2}.Since (x ,y ) ∈H , the result fol- n q lows from applying Lemma 5.7 to (x ,y ), the transitivity property of shifts and noticing that the obtained graph is series–parallel. Case III: Re(y)=1 − q/2. Note that q> 2 because for q =2 we would obtain Re(y) = 0. We distinguish three subcases: ◦|y| > 1. We compute the smallest positive integer n such n n that Arg(y )=2π/3and Re(y )= −|y| /2 < 1 − q/2. The proof is concluded by applying Case II to (x ,y ), where x =1 + q/(y − 1), the transitivity property of shifts and noticing that the obtained graph is series–parallel. ◦|y| < 1. We compute the smallest positive integer n such that n n |y| <q − 2and Arg(y )=2π/3. We have Re(y ) > 1 − q/2 (otherwise by applying Re(y )= −|y| /2 we would find that |y| ≥ q − 2), so |x | > 1 for x =1 + q/(x − 1). We return n n J as the graph with two vertices and n edges joining them. ◦|y| =1. Then 1 − q/2=Re(y)= −|y| /2= −1/2. It follows that q = 3, but this case (|y| =1 and q = 3) was excluded in the hypothesis. This finishes the proof. Lemma 5.9. Let q be a real algebraic number with q ≥ 2.Let y be an algebraic number such that y =0 and Arg(y) ∈{π/2, 3π/2}. (i) If q> 2, then we can compute a theta graph J that (x, y)- implements (x ,y ) with |x | > 1 and x ∈ R. 1 1 1 1 (ii) If q =2 and |y| =1, then we can compute a series–parallel graph J that (x, y)-implements (x ,y ) with y ∈ (−1, 0). 2 2 2 Proof. The hypotheses y =0 and Arg(y) ∈{π/2, 3π/2} are equivalent to y =0 and Re(y)=0. Let x =1 + q/(y − 1). If q> 2, then 1 − q/2 < 0=Re(y)and |x| > 1 as a consequence of Remark 5.6, so we return the graph with two vertices and one edge joining them as J . The second claim (case q = 2) has been studied in (Goldberg & Guo 2017, Lemma 3.15), where the graph constructed is a 2-thickening of a k-stretching.  cc Approximating the complex Potts model Page 35 of 94 2 Corollary 5.10. Let q be a real algebraic number with q ≥ 2. Let x and y be algebraic numbers such that (x, y) ∈H , y ∈ 2 2 (−∞, −1] ∪ [0, ∞) and (x, y) ∈{(i, −i), (−i, i), (ω ,ω ), (ω ,ω )}, 3 3 3 3 where ω =exp(2πi/3). Then we can compute (x ,y ) ∈H and a 3 2 2 q series–parallel graph J such that |x | < 1 and J (x, y)-implements (x ,y ). 2 2 Proof. First, we assume that y ∈ R.The case q =2 and y ∈ Ri is covered in Lemma 5.9, so we assume that q =2 or y ∈ Ri.By applying Lemmas 5.7, 5.8 or 5.9 (depending on the argument of y), we can compute a graph J that (x, y)-implements (x ,y )with 1 1 |x | > 1and x ∈ R. We apply Corollary 5.5 with z = x in order 1 1 1 to compute n such that Re(x ) > 1. A n-stretching of (x ,y )gives 1 1 a shift from (x ,y )to(x, ˆ y ˆ), where x ˆ = x and y ˆ =1 + q/(ˆ x − 1). 1 1 We have Re(y ˆ)=1 + q(Re(x ˆ) − 1)/ |x ˆ − 1| > 1, so |y ˆ| > 1. There are two cases: ◦ y ˆ ∈ R. We apply Corollary 5.5 with z =ˆ y to compute t t t such that Re(y ˆ ) < 1 − q/2 < 0. We set y =ˆ y and x =1+ q/(y − 1). By the transitivity property of shifts, we 2 2 have a shift from (x, y)to(x ,y ). Since Re(y ) < 1 − q/2, 2 2 2 we conclude that |x | < 1 (Remark 5.6). ◦ y ˆ ∈ R. Hence, we have y ˆ ∈ (1, ∞). We can compute a positive integer l such that the norm of y =ˆ y y is larger than 1. Note that y =ˆ y y ∈ R. A parallel composition yields a shift from (x, y)to(x ,y ), where x =1 + q/(y − 1). We compute the graph J by applying the previous case to (x ,y ). Now we deal with the case y ∈ (−1, 0). A 2-thickening gives us a shift from (x, y)to(a ,b ), where b = y ∈ (0, 1) and a = 1 1 1 1 1+ q/(b − 1) < 1 − q ≤−1. A 2-stretching gives us a shift from (a ,b )to(a ,b ), where a = a > 1and b =1 + q/(a − 1) > 1. 1 1 2 2 2 2 2 We compute a positive integer j such that b y< −q and, with the help of a j-thickening, construct a shift from (a ,b )to(a ,b )with 2 2 3 3 b = b . The transitivity property of shifts allows us to construct a shift from (x, y)to(a ,b ). To conclude the proof, we apply a 3 3 parallel composition between the latter shift and the identity shift 2 Page 36 of 94 Galanis, Goldberg & Herrera-Poyatos cc from (x, y)to(x, y), obtaining a shift from (x, y)to(x ,y )with 2 2 y = b y. Recall that b y = b y< −q,so q/(y − 1) ∈ (−1, 0) and 2 3 3 2 x =1 + q/(y − 1) ∈ (0, 1). 2 2 Finally, note that the graphs considered in this proof are series– parallel. 5.3. An approximate shift to (0, 1 − q). In Lemma 5.11 and Corollary 5.13 we give a polynomial-time approximate series–parallel shift from (x, y)to(0, 1 − q) under certain conditions. Lemma 5.11. Let q ∈ P with q> 0.Let (x, y) ∈H such that R q x, y ∈ P and Re(y) < 1 − q/2. Then there is a polynomial-time approximate theta shift from (x, y) to (0, 1 − q). Proof. Let x =1 + q/(y − 1). In light of Remark 5.6,wehave |x| < 1. Therefore, the weight y =1 + q/(x − 1) implemented by an j-stretch converges to 1 − q as j →∞.We have j j qx q |x| q |x| (5.12) |q − 1+ y | = ≤ ≤ . x − 1 1 −|x| 1 −|x| We use (5.12) to give a a polynomial-time approximate theta shift from (x, y)to(0, 1 − q). Let n be a positive integer, so the desired −n accuracy of the quantity in (5.12)is2 . We are going to return a path graph with j edges for j large enough. It remains to show how to compute j from n.Since q, |x|∈ P , we can compute b, c ∈ Q such that q ≤ c and 0 <b ≤ 1 −|x| (Lemma 4.5). Hence, |x|≤ −n 1 − b< 1, and it suffices to compute j with j ≥ log (2 b/c). 1−b Corollary 5.13. Let q be a real algebraic number with q ≥ 2. Let x and y be algebraic numbers such that (x, y) ∈H , y ∈ 2 2 (−∞, −1] ∪ [0, ∞) and (x, y) ∈{(−i, i), (i, −i), (ω ,ω ), (ω ,ω )}, 3 3 3 3 where ω =exp(2πi/3). Then there is a polynomial-time approxi- mate series–parallel shift from (x, y) to (0, 1 − q). Proof. From Corollary 5.10 we obtain a shift from (x, y)to (x ,y )with |x | < 1 or, equivalently, Re(y ) < 1 − q/2. The result 2 2 2 2 follows from applying Lemma 5.11 to (x ,y ) and the transitivity 2 2 property of shifts.  cc Approximating the complex Potts model Page 37 of 94 2 5.4. An approximate shift to (x ,y ) with y ∈ (0, 1). In Lemma 5.16 we show that if a sequence z of complex numbers has certain properties, then there is w ∈ (0, 1) ∩ P that is the n e limit of z for some non-negative integers e ,e ,... that we 1 2 j=1 can compute. Then we apply this result to a subsequence of {y }, where (x ,y ) is the pair implemented by an n-stretch of (x, y), obtaining a polynomial-time approximate theta shift from (x, y) to some (x ,y )with y ∈ (0, 1) (Lemma 5.23). First, we need the following elementary results. Lemma 5.14. We have sin(x) ≤ x ≤ π sin(x)/2 for every x ∈ [0,π/2]. Proof. First, we prove that sin(x) ≤ x for every x ∈ [0,π/2]. Let f (x)= x − sin(x). We have f (x)=1 − cos(x) > 0 for every x ∈ [0,π/2]. Hence, f is strictly increasing in [0,π/2]. Since f (0) = 0, we obtain x − sin(x) ≥ 0 for every x ∈ [0,π/2]. Now we prove that x ≤ π sin(x)/2 for every x ∈ [0,π/2]. Let g(x)= π sin(x)/2 − x for every x ∈ [0,π/2]. We have g (x)= π cos(x)/2 − 1. Let y ∈ [0,π/2] such that cos(y)=2/π.Note that g (x) > 0in[0,y), g(y)=0and g (x) < 0in(y, π/2]. Hence, g only reaches a minimum at x ∈{0,π/2}.Since g(0) = g(π/2) = 0, we conclude that 0 ≤ π sin(x)/2 − x for every x ∈ [0,π/2]. Lemma 5.15. Let {z } be a sequence of algebraic complex num- bers such that: (i) we can compute two rational numbers C and R such that C> 0, R ∈ (0, 1) and |z − z |≤ CR for every positive integer n; (ii) we can compute the representation of the algebraic number z in polynomial time in n. Then z ∈ P , i.e., z is polynomial-time computable. Proof. −n−1 Let n be an arbitrary positive integer. For j = log (2 /C) −n−1 we have |z − z |≤ 2 .Note that j =Θ(n) and hence z is j j 2 Page 38 of 94 Galanis, Goldberg & Herrera-Poyatos cc an algebraic number whose representation we can compute in time polynomial in n. So, we can also compute z ˆ ∈ Q[i] such that −n−1 |z − z ˆ |≤ 2 in time polynomial in n. Then, we have that j j −n |z − z ˆ |≤|z − z| + |z − z ˆ |≤ 2 . n n n n Since n was arbitrary, we have that z is polynomial-time com- putable. Lemma 5.16. Let r, c ∈ (0, 1) ∩ Q.Let {z } be a sequence of algebraic complex numbers with: (i) |z | < 1 for every positive integer n; (ii) z =1 − f (n)+ ig(n) with f, g : Z → (0, 1); n n n n (iii) cr ≤ f (n) ≤ r /2 and cr ≤ g(n) ≤ r /2 for every positive integer n. Then there is w ∈ (0, 1) and a bounded sequence of positive inte- gers {e } such that π π j n z − w ≤ + r j=1 2 c(1 − r) for every positive integer n. Moreover, if the representation of the algebraic number z can be computed in polynomial time in n, then w ∈ P and e can be computed in polynomial time in n. R n iθ Proof. We can write z = ρ e for some ρ ∈ (0, 1) and θ ∈ n n n n (0,π/2). Note that 1 − f (n) <ρ .Let h(n)=1 − ρ .We obtain n n (5.17) 0 <h(n) <f (n) ≤ r /2 for every positive integer n.We have Im (z ) g(n) sin (θ )= = . ρ 1 − h(n) In view of Lemma 5.14,weobtain g(n) πg(n) ≤ θ ≤ . 1 − h(n) 2(1 − h(n)) cc Approximating the complex Potts model Page 39 of 94 2 Since 0 <h(n) ≤ 1/2(see(5.17)), it follows that (5.18) g(n) ≤ θ ≤ πg(n). As a consequence, we find that, for any integer n with n ≥ 2, θ g(n − 1) π n−1 (5.19) ≤ π ≤ , θ g(n) 2cr n n where we used the fact that cr ≤ g(n) ≤ r /2. The bounds (5.17), (5.18)and (5.19) will be used several times in this proof. Let τ = 0. We define τ and e by induction on n.Let e be the 0 n n n largest integer such that τ + e θ ≤ 2π and let τ = τ + e θ . n−1 n n n n−1 n n By definition, {τ } is an increasing sequence that is bounded above by 2π. Moreover, we have 2π − θ <τ ,since τ + θ ≤ 2π n n n n contradicts the definition of e . That is, we have 0 ≤ 2π − τ <θ . n n n We show that e is bounded. Note that e ≤ 2π/θ ≤ 2π/(cr), n 1 1 whereweusedthat cr ≤ g(1) ≤ θ (recall (5.18)). For n ≥ 2we have τ − τ 2π − τ θ π n n−1 n−1 n−1 0 ≤ e = ≤ < ≤ , θ θ θ 2cr n n n where we applied (5.19). By combining the latter inequality with the case n = 1 we conclude that 2π (5.20) 0 ≤ e ≤ cr for every positive integer n. iτ The sequence {e } converges to 1. In fact, we show that it does it so exponentially fast. Note that the derivative of e has constant it norm 1. Therefore, e is a Lipschitz function with constant 1, that it is is, |e − e |≤|s − t| for every s, t ∈ R. It follows that iτ i2π iτ n n n (5.21) 1 − e = e − e ≤|2π − τ | <θ ≤ πg(n) ≤ r n n for every positive integer n, where we applied (5.18). n e Now we study the sequence {x } for x = ρ .Since n n j=1 ρ ∈ (0, 1), {x } is decreasing and has a limit w ∈ [0, 1). We claim j n that this is the real number in (0, 1) announced in the statement. 2 Page 40 of 94 Galanis, Goldberg & Herrera-Poyatos cc First, we prove that w> 0. Let b = 2π/(cr) .In view of (5.20), we have n n x ≥ ρ = (1 − h(j)) . j=1 j=1 Recall that a product of the form (1 − a )with a ∈ [0, 1) n n j=1 converges to a positive number if and only if a converges (Stein j=1 & Shakarchi 2010, Proposition 3.1). From (5.17)weobtain ∞ ∞ 1 r h(n) ≤ r = 2 2(1 − r) n=1 n=1 and, thus, (1 − h(j)) converges to a real number L with L> j=1 0. We conclude that w ≥ L > 0, as we wanted to prove. Now we show that {x } converges exponentially fast to w.Note that x =(1 − h(n)) x and, thus, for n ≥ 2, we have n n−1 0 ≤ x − x = x (1 − (1 − h(n)) ) n−1 n n−1 n n ≤ 1 − (1 − h(n)) ≤ h(n)e ≤ r , cr where we used the fact that (1 − x) ≥ 1 − kx for every x ∈ (0, 1) and k ∈ Z , and the bounds on h(n)and e (see (5.17)and (5.20)). We obtain q q π π (1 − r ) n+j n |x − x |≤ |x − x |≤ r = r n+q n n+j n+j−1 cr c(1 − r) j=1 j=1 for any positive integers n and q. Hence, by making q tend to ∞ we conclude that (5.22) |x − w|≤ r c(1 − r) for every positive integer n. cc Approximating the complex Potts model Page 41 of 94 2 In light of (5.21)and (5.22), we obtain for every positive integer n that n n e e j j z − w ≤ z − x + |x − w| n n j j j=1 j=1 ie θ j j = |x | e − 1 + |x − w| n n j=1 ie θ j j ≤  e − 1 + |x − w| j=1 π π iτ n n = e − 1 + |x − w|≤ r + r . 2 c(1 − r) Finally, we argue that if the representation of z can be com- puted in polynomial time in n,then e can be computed in poly- nomial time in n and we have w ∈ P .Note that e is the small- R 1 est positive integer such that Arg (z ) ∈ [3π/2, 2π) ∪{0} and e +1 Arg(z ) ∈ (0,π/2] and, thus, e can be computed by sequen- tially applying Lemma 5.1 with intervals [3π/2, 2π]and [0,π/2], with the z of Lemma 5.1 equal to z for every positive integer k ≤ e + 1. This takes constant time since the quantities and objects involved are constant. For n ≥ 2, let us assume that we have com- n−1 e puted e ,...,e ,and let y = z (so τ =Arg (y )). 1 n−1 n−1 n−1 n−1 j=1 Since the sequence {e } is bounded and the length of the repre- sentation of z is bounded by a polynomial in n, the computa- tion of y takes polynomial time in n.Then e is the smallest n−1 n non-negative integer such that Arg (y z ) ∈ [3π/2, 2π) ∪{0} n−1 e +1 and Arg (y z ) ∈ (0,π/2], and we can compute e again n−1 n by sequentially applying Lemma 5.1 with intervals [3π/2, 2π]and [0,π/2], with the z of Lemma 5.1 equal to z for every positive integer k ≤ e + 1. There is a bounded number of applications of Lemma 5.1 because e is bounded, and each application takes polynomial time in n because the length of the representation of y z is polynomial in n for any k ∈{1, 2,...,e }. We conclude n−1 n that w is the limit of a sequence of algebraic numbers that con- verges exponentially fast and the representation of its n-th element can be computed in polynomial time in n. As a consequence, we have w ∈ P by Lemma 5.15. R 2 Page 42 of 94 Galanis, Goldberg & Herrera-Poyatos cc Lemma 5.23. Let q be a real algebraic number with q> 0.Let x and y be algebraic numbers such that (x, y) ∈H , y ∈ R and |x| > 1. Then there is a polynomial-time approximate theta shift from (x, y) to (x ,y ) for some (x ,y ) ∈H with y ∈ (0, 1) ∩ P . q R Proof. Since y ∈ R,we have x ∈ R (Remark 5.6). Let us write iθ x = Re for some R> 1and θ ∈ (0, 2π). An m-stretch gives m m m a shift from (x, y)to(x ,y )with y =(x + q − 1)/(x − 1). m m iθ By plugging x = Re in the definition of y and multiplying by m −imθ R e − 1 in the numerator and denominator, we obtain 2m m m R − q +1+(q − 2)R cos (mθ) − iqR sin (mθ) (5.24) y = . 2m m 1+ R − 2R cos (mθ) If θ ∈{π/2, 3π/2},that is, x ∈ iR, then for m ≡ 2 (mod 4) we have cos (mθ)= −1, sin (mθ)=0 and m m m (1 + R ) − q (1 + R ) 1+ R − q y = = . 1+ R (1 + R ) Hence, for m ≡ 2 (mod 4) such that 1 + R >q,we have y ∈ (0, 1), so we can choose y = y and we are done. In the rest of the proof we assume that θ ∈{π/2, 3π/2}.We are going to apply Lemma 5.16 to a subsequence of y . First, we invoke Corollary 5.4 with z = x in order to find a sequence σ(m), a positive integer k and a positive rational C that satisfies: ◦ σ(m) can be computed in polynomial time in m; ◦ k and C can be computed in constant time from x; ◦ m ≤ σ(m) ≤ m + k − 1 for every positive integer m; ◦ sin(σ(m)θ) ≤−C and cos(σ(m)θ) ≤−C for every positive integer m. It follows that σ(m) σ(m) iσ(m)θ σ(m) m Re x =Re R e ≤−CR ≤−CR . cc Approximating the complex Potts model Page 43 of 94 2 Since R> 1, we can compute a positive integer m such that for σ(m) m ≥ m we have Re(x ) < 1 − q/2 and, thus, y < 1 (recall 1 σ(m) m m that y =(x + q − 1) / (x − 1) and Remark 5.6). Let q − qR cos (mθ) a =1 − Re(y )= ; m m 2m m 1+ R − 2R cos (mθ) −qR sin (mθ) b =Im(y )= ; m m 2m m 1+ R − 2R cos (mθ) that is, y =1 − a + ib .We have m m m 2σ(m) 2σ(m) σ(m) 2σ(m) R ≤ 1+ R − 2R cos (σ(m)θ) ≤ 4R . Therefore, we obtain qC −σ(m) −σ(m) R ≤ a ≤ 2qR , σ(m) (5.25) qC −σ(m) −σ(m) R ≤ b ≤ qR . σ(m) We compute a positive integer m such that m ≥ log (4q)and 2 2 m ≥ m . We also compute a rational number c with 2 1 −m −k−1 c ∈ (0,qCR /4). Note that computing these quantities takes constant time. Let f (m)= a and g(m)= b . σ(m+m ) σ(m+m ) 2 2 −m−k+1 −σ(m) −m In view of (5.25) and the inequalities R ≤ R ≤ R , we find that 1 1 −m −m −m −m (5.26) cR ≤ f (m) ≤ R ,cR ≤ g(m) ≤ R , 2 2 for any positive integer m. The sequence {z } = {y } sat- m σ(m+m ) isfies ◦ z < 1 for every positive integer m; ◦ z =1 − f (m)+ ig(m)with f, g : Z → (0, 1); ◦ f and g are bounded as in (5.26). ◦ z is an algebraic number whose representation can be com- puted in polynomial time in m. This is due to the facts σ(m+m ) σ(m+m ) 2 2 that z =(x + q − 1)/(x − 1), σ(m)can be computed in polynomial time in m,and σ(m)= O(m). 2 Page 44 of 94 Galanis, Goldberg & Herrera-Poyatos cc Therefore, we can apply Lemma 5.16 to the sequence {z } for −1 r = R .There are y ∈ (0, 1) ∩ P and a bounded sequence of positive integers {e } such that π π j  −m z − y ≤ + R j=1 2 c(1 − 1/R) for every positive integer m. Moreover, we can compute e in poly- nomial time in m.Let M = π/2+ π/(c(1 − 1/R)). For any positive −n integer n, we can compute an integer m with m ≥ log (2 /M ) 1/R and m =Θ(n) in polynomial time in n.We obtain j  −n z − y ≤ 2 . j=1 This gives the following polynomial-time approximate theta shift from (x, y)to(x ,y ), where x =1 + q/(y − 1). For each positive integer n we return a graph J that is the parallel composition of the path graphs that are used to implement the weights y , σ(j+m ) each one repeated e times, for j ∈{1,...,m}. The graph J j n e e m j m j (x, y)-implements (x, ˆ y ˆ) ∈H for y ˆ = z = y . j=1 j j=1 σ(j+m ) Lemma 2.2. Let q be a real algebraic number with q ≥ 2.Let x and y be algebraic numbers such that (x, y) ∈H , y ∈ (−1, 0) ∪ 2 2 (C\R) and (x, y) ∈{(i, −i), (−i, i), (ω ,ω ), (ω ,ω )},where ω = 3 3 3 3 3 exp(2πi/3). Then there is a polynomial-time approximate series– parallel shift from (x, y) to (x ,y ) for some (x ,y ) ∈H with x ,y ∈ P and y ∈ (0, 1). Proof. If y ∈ (−1, 0), then a 2-thickening of (x, y)gives the result. Hence, let us assume that y ∈ (−1, 0) in the rest of the proof. There are two cases: ◦ q =2 or y ∈ iR. We apply either Lemma 5.7, Lemma 5.8 or Lemma 5.9, depending on Arg(y), to find a shift from (x, y) to (x ,y ) ∈H with y ∈ R and |x | > 1. The graph of this 1 1 q 1 1 shift is series–parallel. Then we apply Lemma 5.23 to obtain a polynomial-time approximate theta shift from (x ,y )to 1 1 some (x ,y ) ∈H with y ∈ (0, 1) ∩ P . The result follows q R from the transitivity property of shifts. cc Approximating the complex Potts model Page 45 of 94 2 ◦ q =2and y ∈ iR.Since y = ±i, Lemma 5.9 gives a shift from (x, y)to(x ,y ) for some (x ,y ) ∈H with y ∈ (−1, 0). A 2-thickening of (x ,y ) gives the result. The fact that x ∈ P follows from x =1 + q/(y − 1) and y ∈ P . R R 5.5. Approximate shifts for polynomial-time computable real numbers. In this subsection we show how we can obtain a polynomial-time approximate shift from (x, y)to(x ,y ) for any (x, y), (x ,y ) ∈H when q ≥ 2, y ∈ (0, 1) ∩ P and y is a positive q R real algebraic number (Lemma 2.3). This extends a particular case of Lemma 4.1 to polynomial-time computable numbers. Our proof follows the same approach as that of (Goldberg & Jerrum 2019, Lemma 22) but we have to overcome some difficulties that arise when working with the class of numbers P . These difficulties will become apparent in the proof, but the reader that is familiar with the literature might want to skip the proof. Then we combine this result and Lemma 2.2 to prove Theorem 2.1, the main result of Section 5. Lemma 2.3. Let q, x, y ∈ P such that q> 0, (x, y) ∈H , y is R q positive and 1−q/2 <y < 1. There is a polynomial-time algorithm that takes as an input: ◦ two positive integers k and n, in unary; ◦ a real algebraic number w ∈ [y , 1]. The algorithm produces a theta graph J that (x, y)-implements −n (ˆ x, y ˆ) such that y ˆ−w ≤ 2 .The size of J is at most a polynomial in k and n, independently of w. Proof. If w =1, then J is the graph with vertices s and t and no edges. In the rest of the proof we focus on the case w ∈ (0, 1). Recall that x =1+q/(y−1). Since q> 0and y ∈ (1−q/2, 1), we find that x ∈ (−∞, −1). Let y =1 + q/(x − 1). A j-stretch gives j j a shift from (x, y)to(x ,y ). If j is even, then x > 1and y > 1. j j Otherwise, x < −1and y ∈ (1 − q/2, 1). Moreover, the sequences {y } and {y } are increasing and decreasing, respectively, and 2j+1 2j 2 Page 46 of 94 Galanis, Goldberg & Herrera-Poyatos cc |y − 1| can be made exponentially small as a function of j.We use these properties of y to show that we can compute y = j (e ,...,e ) 1 m j −n y such that y − w ≤ 2 .Let J be the parallel (e ,...,e ) j=1 j 1 m composition of the path graphs that (x, y)-implement (x ,y ), each one repeated e times, for j ∈{1,...,m}.Then J is a theta graph and, in view of (3.4), we have w(G; q, y − 1) = y − 1, that (e ,...,e ) 1 m is, J (x, y)-implements (x, ˆ y ˆ) ∈H with y ˆ = y . The graph q (e ,...,e ) 1 m J is the theta graph output by our algorithm. First, we define a sequence {d } that will be related to the exponents e ,...,e .Since q, x ∈ P , we can compute rational 1 m R upper bounds of q and x (Lemma 4.5) and, with the help of these bounds, a positive integer j such that j > log q.Let d = 0 for 0 0 j |x| every positive integer j with j< j and let d = 0 for every even 0 j positive integer j.For j odd with j ≥ j we define d recursively 0 j as the largest non-negative integer such that y ≥ w.The (d ,...,d ) integer d is well-defined because 0 <y < 1when j is odd and j j j ≥ j . An equivalent definition is that {d } satisfies 0 j (5.27) y <w/y ≤ 1 j (d ,...,d ) 1 j for every odd integer j with j ≥ j . A similar sequence {d } 0 j is used in the proofs of (Goldberg & Jerrum 2019, Lemma 22) and (Goldberg & Jerrum 2012b, Lemma 3.28). For any odd integer n −n m with m ≥ log (q2 − 1) we have 0 ≤ 1 − y ≤ 2 and, in light |x| of (5.27), −n 0 ≤ 1 − w/y ≤ 1 − y ≤ 2 . (d ,...,d ) m 1 m Since 1 ≥ y ≥ w, it follows that (d ,...,d ) 1 m −n −n (5.28) w − y ≤ y 2 ≤ 2 . (d ,...,d ) (d ,...,d ) 1 m 1 m Now we study the size of the integers d ,...,d . We bound d 1 m j using an argument given in (Goldberg & Jerrum 2012b, Lemma 3.28). First, we show that d is O(k). We have y ≥ w.We 0 j obtain d ≤ log (w)=log (w)log (y). 0 y y y j j 0 0 Since w ∈ [y , 1) and log (y) > 0, it follows that 0 < log (w) ≤ k y y and d ∈ O(k). Now we show that d is bounded for any j> j . j j 0 0 cc Approximating the complex Potts model Page 47 of 94 2 By applying (5.27) twice, we find that d d j j y <w/y = wy /y ≤ y j−2 (d ,...,d ) (d ,...,d ) 1 j−2 j 1 j j for every odd integer j with j> j . It follows that d ≤ log(y )/ log(y ) (here and in the rest of this paper log is j j−2 j taken in base e). For every x ∈ (1, 5/4), we have 3(x − 1)/4 ≤ log(x) ≤ x − 1. Hence, we obtain log(y ) log(1/y ) 4 1/y − 1 j−2 j−2 j−2 d ≤ = ≤ log(y ) log(1/y ) 3 1/y − 1 j j j 4y 1 − y 4y |x| +1 4y j j−2 j j 2 = = ≤ |x| , j−2 3y 1 − y 3y 3y j−2 j j−2 |x| +1 j−2 2 j−2 where the last inequality is a consequence of |x| (|x| +1) ≥ |x| +1. Since y /y converges to 1 and, thus, is bounded, it j j−2 follows that d is bounded. We conclude that d = O(k + m). j j j=1 Let us assume that we can compute d ,...,d for m = 1+ 1 m log (q2 − 1) . In light of (5.28), we can return J as the theta |x| graph that implements the weight w(J ; q, y − 1) = y − 1. (d ,...,d ) 1 m Since d = O(k + m)and m =Θ(n), the size of J is at most j=1 a polynomial in k and n. If y were algebraic, computing d ,...,d in polynomial time 1 m would be straightforward from their definition because we can ef- ficiently check inequalities between real algebraic numbers as ex- plained in Section 5.1. This is the approach followed in (Gold- berg & Jerrum 2019, Lemma 22). However, we only know that y ∈ P and, thus, it is not clear how to efficiently determine whether y ≥ w or not for any given d.In the rest of (d ,...,d ,d) 1 m−1 this proof, we show how to overcome this difficulty. −n Let n be a positive integer, so 2 is the desired accuracy for our algorithm. Let us assume that we have computed the integers d ,...,d and we want to compute d for an odd positive integer 1 j−1 j j with j ≥ j . We are going to sequentially try all the values d =0, 1,... until we have y < ≤ 1, (d ,...,d ,d) 1 j−1 2 Page 48 of 94 Galanis, Goldberg & Herrera-Poyatos cc in which case we have found the value d (see (5.27)). Recall that y − 1 is the weight implemented by a theta graph J (d ,...,d ,d) d 1 j−1 whose size is bounded by a polynomial in k and j. Therefore, by applying Lemma 4.7 with G = J and γ = y − 1, we can compute in polynomial time in n and the size of J , a positive integer f (n + 2,J )with f (n +2,J )= n + Θ(size(J )) such that if |γ − γ ˆ|≤ d d d −f (n+2,J ) −n−2 2 ,then |w(G; q, γ) − w(G; q, γ ˆ)|≤ 2 .Since y ∈ P , −f (n+2,J ) we can compute a rational number γ ˆ such that |γ − γ ˆ|≤ 2 in polynomial time in n and the size of J .Let yˆ = d (d ,...,d ,d) j−1 w(G; q, γ ˆ) + 1. Then we have computed in polynomial time in k, j and n a rational number y ˆ such that (d ,...,d ,d) 1 j−1 −n−2 y ˆ − y ≤ 2 . (d ,...,d ,d) (d ,...,d ,d) 1 j−1 1 j−1 Because y ˆ − w is a real algebraic number, we can check (d ,...,d ,d) 1 j−1 if the following inequality holds in polynomial time, −n−1 (5.29) y ˆ − w ≤ 2 . (d ,...,d ,d) j−1 If that is the case, then y − w ≤ y − y ˆ + y ˆ − w (d ,...,d ,d) (d ,...,d ,d) (d ,...,d ,d) (d ,...,d ,d) 1 j−1 1 j−1 1 j−1 1 j−1 −n −n ≤ 3 · 2 /4 < 2 , so y is a good enough approximation of w and we can (d ,...,d ,d) 1 j−1 stop the algorithm (even though we have not computed d ). Other- wise, we claim that y ˆ ≥ w if and only if y ≥ w. (d ,...,d ,d) (d ,...,d ,d) 1 1 j−1 j−1 If y ˆ ≥ w and w> y ,then (d ,...,d ,d) (d ,...,d ,d) 1 j−1 1 j−1 −n−2 y ˆ − w ≤ y ˆ − y ≤ 2 (d ,...,d ,d) (d ,...,d ,d) (d ,...,d ,d) 1 j−1 1 j−1 1 j−1 and (5.29) holds, a contradiction. The same reasoning applies when y ˆ <w and w ≤ y . Hence, we can check (d ,...,d ,d) (d ,...,d ,d) 1 j−1 1 j−1 whether y ≥ w or not by checking y ˆ ≥ w,pro- (d ,...,d ,d) (d ,...,d ,d) 1 j−1 1 j−1 vided that (5.29) does not hold. This gives a procedure to compute d for odd j with j ≥ j : j 0 1. Set d =0. 2. If (5.29) holds, then return d. We have failed to compute d , but we have succeeded in finding an approximation of w. cc Approximating the complex Potts model Page 49 of 94 2 3. If y ˆ ≥ w, then increase d by 1 and go to step 2. (d ,...,d ,d+1) 1 j−1 Else, we have d = d. We repeat this procedure to compute d sequentially until (5.29) holds, in which case we stop and return the graph J associated to y . (d ,...,d ,d) 1 j−1 It remains to show that this procedure always halts and runs in polynomial time. In light of (5.28), we find that, for odd m ≥ n+2 log (q2 − 1), |x| −n−1 y ˆ − w ≤ y ˆ − y + y − w ≤ 2 , (d ,...,d ) (d ,...,d ) (d ,...,d ) (d ,...,d ) 1 m 1 m 1 m 1 m that is, (5.29) holds. Therefore, our procedure that computes −n non-negative integers d ,...,d ,d with y − w ≤ 2 1 m−1 (d ,...,d ,d) 1 m−1 halts for m = O(n). As a consequence, the whole procedure runs in polynomial time in k and n. The proof of Lemma 2.3 can be adapted to to the case w ∈ −k (1,y ]. The main difference is that this time we work with the decreasing sequence {y }.We set d = 0 for odd j and, for even 2j j j, we define d recursively as the largest non-negative integer such that y ≤ w. The details of the proof are left to the reader. (d ,...,d ) When studying the hardness of approximating Z (G; q, γ)we Tutte only need the version stated in Lemma 2.3. Theorem 2.1. Let q ≥ 2 be a real algebraic number. Let x and y be algebraic numbers such that (x, y) ∈H , y ∈ (−1, 0) ∪ 2 2 (C\R) and (x, y) ∈{(i, −i), (−i, i), (ω ,ω ), (ω ,ω )},where ω = 3 3 3 3 3 exp(2πi/3). Then, for any pair of real algebraic numbers (x ,y ) ∈ H there is a polynomial-time approximate series–parallel shift from (x, y) to (x ,y ). Proof. First, let us assume that y ∈ (0, 1]. By Lemma 2.2, there is a polynomial-time approximate series–parallel shift from (x, y)to(x, ˜ y ˜) for some (x, ˜ y ˜) ∈H with x, ˜ y ˜ ∈ P and y ˜ ∈ (0, 1). q R Since q ≥ 2, we have 1 − q/2 ≤ 0and y˜ ∈ (1 − q/2, 1). Hence, Lemma 2.3 gives us a polynomial-time approximate theta shift from (x, ˜ y ˜)to(x ,y ). Since y ˜ ∈ 1 − q/2+ iR =1 − q/2+ iqR and x, ˜ y ˜ ∈ P , the transitivity property of polynomial-time approxi- mate shifts, Lemma 4.8, for (x ,y )=(x, y), (x ,y )=(x, ˜ y ˜)and 1 1 2 2 2 Page 50 of 94 Galanis, Goldberg & Herrera-Poyatos cc (x ,y )=(x ,y ) gives us a polynomial-time approximate series– 3 3 parallel shift from (x, y)to(x ,y ). Now we treat the case y = 0. As a consequence of what we have just shown in the paragraph above, there is a polynomial-time approximate series–parallel shift from (x, y)to(1 − 2q, 1/2) ∈H . −n An n-thickening gives a shift from (1 − 2q, 1/2) to (x , 2 ), where −n x =1+q/(2 −1), so there is also a polynomial-time approximate theta shift from (1−2q, 1/2) to (1−q, 0). We conclude that there is a polynomial-time approximate series–parallel shift from (x, y)to (1 − q, 0) by applying Lemma 4.8 with (x ,y )=(x, y), (x ,y )= 1 1 2 2 (1 − 2q, 1/2) and (x ,y )=(1 − q, 0). Note that we can indeed 3 3 apply Lemma 4.8 because 1−2q, 1/2 ∈ P and 1/2 ∈ 1−q/2+iqR. Now we deal with the case y > 1. We use again the polynomial- time approximate series–parallel shift from (x, y)to(x ,y )= 1 1 (1 − 2q, 1/2) ∈H . We use a 2-stretch to (1 − 2q, 1/2)-implement (x ,y )with x =(1−2q) ≥ 9and y =1+q/(x −1) > 1. Hence, 2 2 2 2 2 there is a polynomial-time approximate series–parallel shift from (x, y)to(x ,y ). Since x and y are real algebraic numbers with 2 2 2 2 y > 1and (x − 1)(y − 1) = q> 0, in view of Lemma 4.1,we have 2 2 2 a polynomial-time approximate theta shift from (x ,y )to(x ,y ). 2 2 Note that y ∈{1}∪ (1 − q/2+ iqR). Hence, we can apply the transitivity property shown in Lemma 4.8 with (x ,y )=(x, y), 1 1 (x ,y )=(x ,y )and (x ,y )=(x ,y ) and find a polynomial-time 2 2 2 2 3 3 approximate series–parallel shift from (x, y)to(x ,y ). Finally, we study the case y < 0. In light of Corollary 5.13, there is a polynomial-time approximate series–parallel shift from (x, y)to(0, 1 − q). Note that 1 − q ≤−1. In this proof we have already shown that there is a polynomial-time approximate series– parallel shift from (x, y)to(x ,y ) ∈H for y = y /(1 − q) > 0. 3 3 q 3 Since y = y (1 − q), by Lemma 4.4 with parameters (x ,y )= 3 1 1 (x, y), (x ,y )=(0, 1 − q)and (x ,y )=(x ,y ), we conclude that 2 2 3 3 3 3 there is a polynomial-time approximate series–parallel shift from (x, y)to(x ,y ). 6. Hardness results We begin with obtaining lower bounds on Z (G; q, γ) for alge- Tutte braic numbers q and γ. In Section 6.2, we review the algorithm cc Approximating the complex Potts model Page 51 of 94 2 of Kannan et al. (1988) for computing algebraic representations, andinSection 6.3 the exact #P-hardness results that we will use. The rest of the section gives various ingredients that are needed in the reduction, which are put together in Section 6.8 where we prove all of our main theorems. 6.1. Properties of Z (G; q, γ) for algebraic numbers q Tutte and γ. In this section we give a lower bound on Z (G; q, γ) Tutte and study the degree and height of Z (G; q, γ)when q and γ are Tutte algebraic numbers. First, we have to introduce some concepts and results from algebraic number theory. The degree of an algebraic number γ is the degree of its minimal polynomial p, and we denote it by d(γ). Recall that the degree of a field extension F/K is the dimension of F as a K-vector space, and it is denoted by [F : K]. It is well known that if γ is algebraic, then [K(γ): K] is the degree of the minimal polynomial of γ over K (Stewart 2004, Chapter 5). In particular, we have [Q(γ): Q]= d(γ). The usual height of a polynomial f ∈ Z[x ,...,x ] is the largest value among the abso- 1 m lute values of its coefficients and it is denoted by H(f ). The usual height of γ is H(γ)= H(p). One can find several (non-equivalent) definitions of the height of an algebraic number in the literature. Another one of these definitions is the absolute logarithmic height. First, we have to introduce the Mahler’s measure of a polynomial f ∈ Z[x], which is given by M (f)= |a | max{1, |α |}, d i i=1 where f (x)= a x , a =0, and α ,...,α are the roots of f . j d 1 d j=0 It is well known that −d(f ) (6.1) 2 H(f ) ≤ M (f ) ≤ H(f ) d(f)+1, see (Waldschmidt 2000, Lemma 3.11). The Mahler’s measure of an algebraic number γ with minimal polynomial p is M (γ)= M (p). −1 The absolute logarithmic height of γ is h(γ)= d(γ) log M (γ). Note that h(γ) ≥ 0 because M (γ) ≥ 1. Now we can state a lower bound for the evaluation of a polynomial at algebraic numbers. 2 Page 52 of 94 Galanis, Goldberg & Herrera-Poyatos cc Lemma 6.2 (Waldschmidt 2000, Section 3.5.4). Let f ∈ Z[x ,...,x ] be a polynomial in m variables and let 1 m γ ,...,γ be algebraic numbers. If f (γ ,...,γ ) =0,then we 1 m 1 m have −cT |f (γ ,...,γ )|≥ e , 1 m where T =deg f +log H(f ), c = D(2 + h(γ )+ ··· + h(γ )) and 1 m D =[Q(γ ,...,γ ): Q]. 1 m Corollary 6.3. Let q and γ be algebraic numbers. We can com- pute a rational number C with C > 1 such that, for any graph q,γ q,γ −size(G) G,either Z (G; q, γ)=0 or |Z (G; q, γ)|≥ C . Tutte Tutte q,γ Proof. Recall that we represent an algebraic number γ as its minimal polynomial p and a rectangle of the complex plane where γ is the only root of p.Let G =(V, E) be a graph. Let n = |V | and m = |E|. Let us assume that Z (G; q, γ) =0. We Tutte can apply Lemma 6.2 for f (q, γ)= Z (G; q, γ) to find that Tutte −cT |Z (G; q, γ)|≥ e ,where c and T are as in Lemma 6.2.We Tutte have c = D(2 + h(q)+ h(γ)) and D =[Q(q, γ): Q], so c ≥ 2. Note that, by definition of Z ,we have H(f ) ≤ 2 and deg f ≤ n+m. Tutte −2c size(G) Hence, we find that |Z (G; q, γ)|≥ e .It remains to Tutte 2c compute a rational number C in (e , ∞) to conclude the result. q,γ From D =[Q(q, γ): Q], we can compute D exactly. Moreover, we can apply (6.1) to upper bound h(q)and h(γ) in terms of the usual heights and degrees of q and γ, and compute an appropriate rational number C with the help of these upper bounds. q,γ The case q = 2 (Ising model) of Corollary 6.3 has previously been shown in (Goldberg & Guo 2017, Lemma 6.4). Note that the approach followed in this section can be applied to obtain lower bounds for other partition functions. In the rest of this section we upper bound the degree and the usual height of the algebraic number Z (G; q, γ) in terms of the Tutte usual heights and degrees of q and γ. We will make use of these bounds in the proof of Lemma 6.13. Let q and γ be two algebraic numbers. By the tower law, we have [Q(q, γ): Q]=[Q(q, γ): Q(q)][Q(q): Q] ≤ d(q)d(γ), where cc Approximating the complex Potts model Page 53 of 94 2 we used that the degree of the minimal polynomial of γ over Q(q) is bounded by d(γ). Since Z (G; q, γ)isin Q(q, γ), it follows Tutte that its degree is bounded by d(q)d(γ). Now we argue how we can bound the usual height of Z Tutte (G; q, γ). A well-known property of the absolute logarithmic height is that h(αβ) ≤ h(α)+ h(β), h(α + β) ≤ log 2 + h(α)+ h(β)and h(1/α)= h(α)(Waldschmidt 2000, Property 3.3). Moreover, if n is an integer, then h(n)=log |n|. A more general property is the following one. Lemma 6.4 (Waldschmidt 2000, Lemma 3.7). Let f ∈ Z[x ,...,x ] be a non-zero polynomial in t variables with 1 t integer coefficients. Let γ ,...,γ be algebraic numbers. Then 1 t h (f (γ ,...,γ )) ≤ log L(f)+ deg (f )h(γ ), 1 t j j=1 where L(f ) is the sum of the absolute values of the coefficients of f and deg (f ) is the degree of f with respect to the j-th variable. Corollary 6.5. Let q and γ be algebraic numbers. Then, for any graph G =(V, E) with n = |V | and m = |E|,wehave Z (G; q, γ) s|t d ≤ d (q) d (γ) , Z (G; q, γ) st Z (G; q, γ) 2d(q)d(γ) s|t m+1/2 nh(q)+mh(γ) H ≤ 2 e . Z (G; q, γ) st Proof. The degree bound on Z (G; q, γ)/Z (G; q, γ) follows s|t st from thefactthatthatitisin Q(q, γ). For its absolute logarithmic height, we have Z (G; q, γ) s|t h ≤ h (Z (G; q, γ)) + h Z (G; q, γ) . st s|t Z (G; q, γ) st Note that L(Z (G; q, γ))+L(Z (G; q, γ)) = 2 . As a consequence st s|t of Lemma 6.4, we find that h (Z (G; q, γ)) + h Z (G; q, γ) ≤ 2(m log 2 + nh(q)+ mh(γ)) . st s|t 2 Page 54 of 94 Galanis, Goldberg & Herrera-Poyatos cc Recall that M (α)=exp(d(α)h(α)). Thus, the bounds on the d(α) Mahler’s measure (6.1) yield the inequality H(α) ≤ (2 exp(h(α))) . We conclude that Z (G; q, γ) d(q)d(γ) s|t 2(m log 2+nh(q)+mh(γ)) H ≤ 2e Z (G; q, γ) st 2d(q)d(γ) m+1/2 nh(q)+mh(γ) = 2 e . One could derive analogous bounds to those of Corollary 6.5 for the algebraic number Z (G; q, γ) by applying the same ar- Tutte gument. 6.2. Computing representations of algebraic numbers via approximations. Kannan, Lenstra & Lovasz ´ (1988) showed how to reconstruct the minimal polynomial of an algebraic number from a certain number of digits of its binary expansion, and we will use their algorithm as a black-box in our reduction of Section 6.5,in the following form. Lemma 6.6 (Kannan et al. 1988, Theorem 1.19). Let α be an al- gebraic number and let d and U be upper bounds on the degree and usual height, respectively, of α. Suppose that we are given −b a rational approximation α to α such that |α − α|≤ 2 /(12d), where b is the smallest positive integer such that b d /2 (3d+4)/2 2d 2 ≥ 2 (d +1) U . Then the minimal polynomial of α can be determined in O(d (d + log U )) arithmetic operations on integers having O(d (d +log U )) binary bits. The algorithm in Lemma 6.6 is based on the Lenstra-Lenstra-Lovasz ´ lattice basis reduction algorithm, we refer the reader to (Yap 2000) for more details. 6.3. Exact Hardness results. We will use the following hard- ness results from (Jaeger et al. 1990) regarding the problem of ex- actly evaluating Z (G; q, γ), given a graph G. We refer to this Tutte problem as Tutte(q, γ). Jaeger et al. (1990) identify the follow- ing 9 “special” points of the Tutte plane: (1, −1), (0, 0), (4, −2), cc Approximating the complex Potts model Page 55 of 94 2 (2, −2), (2, −1), (2, −i − 1), (2,i − 1), (3,ω − 1), and (3,ω − 1), where i = −1and ω =exp(2πi/3). With these special points in mind, their main result on the complexity of Tutte(q, γ)can be stated as follows. Theorem 6.7 (Jaeger et al. 1990, Proposition 1). Let q and γ be algebraic numbers. Then Tutte(q, γ) is #P-hard unless q =1 or (q, γ) is a special point, in which case Tutte(q, γ) is in FP. Vertigan (2005) studied the complexity of the computational problem PlanarTutte(q, γ), which also turns out to be hard for most parameters q and γ. Theorem 6.8 (Vertigan 2005, Theorem 5.1). Let q and γ be al- gebraic numbers. Then PlanarTutte(q, γ) is #P-hard unless q ∈{1, 2} or (q, γ) is a special point, in which case PlanarTutte (q, γ) is in FP. 6.4. Computational problems. In this section, we define a few computational problems that will be useful in our reductions; these were also considered in (Goldberg & Guo 2017). Let q be a real algebraic number, γ ,...,γ be algebraic numbers, and K, ρ 1 k be real numbers with K> 1, ρ> 0. Name: Sign-Tutte(q, γ ,...,γ ). 1 k Instance: A (multi)graph G and a weight function γ ˆ : E →{γ ,...,γ }. 1 k Output: A correct statement of the form Z (G; q, γ ˆ) ≥ 0or Tutte Z (G; q, γ ˆ) ≤ 0. Tutte Name: Factor-K-NormTutte(q, γ ,...,γ ). 1 k Instance: A (multi)graph G and a weight function γ ˆ : E →{γ ,...,γ }. 1 k Output: If Z (G; q, γ ˆ) = 0, the algorithm may output any Tutte rational number. Otherwise, it must output N ∈ Q such ˆ ˆ that N/K ≤|Z (G; q, γ ˆ)|≤ KN . Tutte In the (x, y)-parametrisation, the special points are (0, 0), (1, 1), (−1, −1), 2 2 (0, −1), (−1, 0), (i, −i), (−i, i), (ω ,ω ), and (ω ,ω ). 3 3 3 3 2 Page 56 of 94 Galanis, Goldberg & Herrera-Poyatos cc Name: Distance-ρ-ArgTutte(q, γ). Instance: A (multi)graph G. Output: If Z (G; q, γ) = 0, the algorithm may output any Tutte rational number. Otherwise, it must output A ∈ Q such that, for some a ∈ arg(Z (G; q, γ)), we have |A − a|≤ ρ. Tutte We also consider these problems for the Potts model (with pa- rameters q and y = γ + 1), and we write Potts instead of Tutte in the name of these problems when we refer to the Potts ones. We also consider all these problems restricted to planar graphs, in which case we write PlanarTutte instead of Tutte in the name of the problem. It is a trivial observation that the planar case reduces to the general case. 6.5. Reducing exact computation to sign and approximate computation. In this section, we first review the binary search technique of Goldberg & Guo (2017), which we will refer to as “interval-shrinking”. Then, we use this to obtain several of our inapproximability theorems. Let f (ε)= −εA + B be a linear function, where A and B are real algebraic numbers with A =0. Let ε = B/A be the zero of f.Let (ε ,ε )beanopenintervalwithlength l> 0 such that ε is in (ε ,ε ) or, equivalently, f (ε )f (ε ) < 0. We want to find a small open subinterval of (ε ,ε )thatcontains ε . First, assume that we have an oracle that, on input ε, outputs the sign of f (ε), unless when f (ε) = 0, in which case the output of the oracle is unreliable. Let ε ,ε ,...,ε be a partition of the 0 1 4 interval (ε ,ε ) such that ε = ε , ε = ε and ε − ε ≥ l/10 0 4 i+1 i for every i ∈{0,..., 3}. We invoke the oracle with input ε to determine the sign of f (ε ) for every i ∈{0,..., 4};let s be the i i answer of the oracle. Then, we have a monotone sequence s ,...,s 0 4 of positive and negative signs with s = s . Hence, there are two 0 4 possibilities: either s = s = s ,in which case ε <ε and we 0 1 2 1 can recurse on (ε ,ε ), or s = s = s ,in which case ε <ε 1 4 2 3 4 3 and we can recurse on (ε ,ε ). In any of these two cases, we can 0 3 shrink the interval (ε ,ε )toatmost9/10 of its original length. Then, recursively, we can find an open subinterval of arbitrarily small length containing the zero of f . cc Approximating the complex Potts model Page 57 of 94 2 Next, assume that we have an oracle that returns a multiplica- tive approximation to the norm of f . More accurately, let η =1/41 and suppose that we have an oracle that, on input ε, returns a value f (ε) satisfying (1 − η) |f (ε)| < |f (ε)|≤ f (ε) ≤ (1 + η) |f (ε)| 1+ η when f (ε) = 0 (otherwise the value f (ε) is unreliable). The ap- proach given in Goldberg & Guo (2017) by Goldberg and Guo to shrink (ε ,ε ) is as follows. First, let us assume that A> 0, so f is strictly decreasing. Let ε ,ε ,...,ε be a partition of the in- 0 1 10 terval (ε ,ε ) such that ε = ε , ε = ε and ε − ε ≥ l/20 for 0 10 i+1 i every i ∈{0,..., 9}. These numbers are not chosen to be opti- mal but they suffice. We invoke our oracle to compute f (ε ) for i ∈{0,..., 10}.Let s be the sign (positive, negative, or zero) of ˆ ˆ f (ε ) − f (ε ) for each i ∈{0,..., 9}. We analyse the signs s for i i+1 i i ∈{0,..., 9}. First, we consider the case ε <ε <ε .Note i i+1 that we have f (ε ) >f (ε ) > 0. Moreover, i i+1 ˆ ˆ f (ε ) − f (ε ) ≥ (1 − η) f (ε ) − (1 + η) f (ε ) i i+1 i i+1 = A (ε − ε − η (2ε − ε − ε )) . i+1 i i i+1 ∗ ∗ Note that ε − ε and ε − ε are both at most l and, thus, we i i+1 obtain 2ε − ε − ε ≤ 2l.So since η =1/41 and ε − ε ≥ l/20, i i+1 i+1 i we conclude that s is positive. Now we consider the case ε <ε < i i ε . Thistimewehave f (ε ) <f (ε ) < 0, i+1 i+1 i ˆ ˆ f (ε ) − f (ε ) ≤ (1 + η)(−f (ε )) − (1 − η)(−f (ε )) i i+1 i i+1 = −A (ε − ε − η (ε + ε − 2ε )) , i+1 i i i+1 and 0 <ε + ε − 2ε < 2l. We conclude that s is negative. If i i+1 i ∗ ∗ ε ≤ ε and ε ≤ ε , then we do not know what the value of s i i+1 i will be. However, this is true for at most two consecutive values of i. With these properties of the signs s in mind, let us study the sequence s ,...,s . There are two possibilities. The first one is 0 9 that s ,s ,s ,s are all positive, in which case ε <ε and we can 0 1 2 3 2 recurse on (ε ,ε ). The second possibility is that s ,s ,s ,s are 2 10 6 7 8 9 all negative, in which case ε <ε and we can recurse on (ε ,ε ). 8 0 8 2 Page 58 of 94 Galanis, Goldberg & Herrera-Poyatos cc In any of these two cases, we can shrink the interval (ε ,ε )toat most 9/10 of its original length. Again using binary search it is possible to find a small open subinterval containing the zero of f . Let us now assume that A< 0. In this case, one can analogously prove that the sign s is positive when ε <ε <ε and negative i i i+1 when ε <ε <ε , so the same procedure allows us to shrink i i+1 (ε ,ε ). Let q and γ be real algebraic numbers with q ∈{0, 1} and γ> 0. Let H be a graph and let s and t be two distinct connected vertices of H. We are going to apply these interval stretching techniques to the linear function f (ε; H, γ)=Z (H; q, γ) 1 − s|t (6.9) + ε Z (H; q, γ)+ Z (H; q, γ) . st s|t Let us write this function as f (ε; H, γ)= B(H, γ)−εA(H, γ), where B(H, γ)= Z (H; q, γ)(1 − 1/q)and A(H, γ)= −Z (H; q, γ) − s|t st −1 q Z (H; q, γ). We have s|t f (0; H, γ)= Z (H; q, γ) 1 − ; s|t (6.10) f (1 − q; H, γ)=(1 − q)Z (H; q, γ). st Under certain hypotheses, we are going to prove that f (0; H, γ)f (1− q; H, γ) < 0, so A(H, γ) =0 and f (−; H, γ) has a zero between 0 and 1 − q. This allows us to find a suitable interval where we can perform interval-shrinking. For this purpose we will also need Lemma 6.11, that tells us that the zero of f (−; H, γ) is not close to either 0 or 1 − q. Lemma 6.11. Let q and γ be real algebraic numbers with q ∈ {0, 1} and γ> 0.Let H =(V, E) be a graph and let s and t be two distinct connected vertices of H.Let n = |V |, m = |E|, r = max{n, m} and c =2max{|q|, 1/|q|} max{γ, 1/γ}.Let ε be the zero of the function f (ε; H, γ)= B(H, γ) − A(H, γ), defined as in −r −r (6.9). Let us assume that |Z (H; q, γ)|≥ c , |Z (H; q, γ)|≥ c st s|t ∗ −2r and A(H, γ) =0.Then we have |1 − q − ε |≥|1 − q| c and ∗ −2r |ε |≥|1 − 1/q| c . cc Approximating the complex Potts model Page 59 of 94 2 Proof. In view of the definition of f (ε; H, γ) and equation (6.10), we have |f (ε ; H, γ) − f (1 − q)| |1 − q||Z (H; q, γ)| st |1 − q − ε | = = . |A(H, γ)| |A(H, γ)| Note that k(A)−1 |A| (6.12) |A(H, γ)|≤ max{|q|, 1/|q|} |q| |γ| ≤ c . A⊆E −r Moreover, we have |Z (H; q, γ)|≥ c by hypothesis, so we con- st ∗ −2r clude that |1 − q − ε |≥|1 − q|c . Analogously, we find that |f (ε ; H, γ) − f (0)| |ε | = |A(H, γ)| |1 − 1/q| Z (H; q, γ) s|t −2r = ≥ 1 − c . |A(H, γ)| q Lemma 6.13. Let K be a real number with K> 1.Let q, γ and γ be real algebraic numbers such that q> 1, γ ∈ (−2, −1) 2 1 and γ > 0. Let us assume that we have access to an oracle for Factor-K-NormPlanarTutte(q, γ ,γ ). Then there exists an 1 2 algorithm that takes as input a positive integer ρ and a planar graph H along with two distinct connected vertices s and t of H, and, for γ =(γ +1) − 1, this algorithm computes a represen- tation of the algebraic number Z (H; q, γ)/Z (H; q, γ) in polyno- s|t st mial time in ρ and the size of H. Moreover, if we have access to the more powerful oracle Factor-K-NormTutte(q, γ ,γ ),then we 1 2 can remove the constraint that H is planar. Proof. Since Factor-K-NormPlanarTutte(q, z) is equally hard for any K> 1 (see Section 1.1), we may assume that K =1+η for η =1/41. Let ρ, H =(V, E)and s, t be the inputs of our algorithm. Let n = |V | and m = |E|.Let c =2max{|q|, 1/|q|} max{γ, 1/γ},so c ≥ 2, and let r =max{n, m}.Let H be a copy of H with an extra edge from s to t.Let γ be a weight that we can implement and let ε = γ + 1, so the pair (1 + q/(ε − 1),ε)is(q, γ ) written 2 Page 60 of 94 Galanis, Goldberg & Herrera-Poyatos cc in (x, y) coordinates. We will choose γ and argue how we can implement γ later in the proof. When we say we implement ε, we mean that we implement the pair (1 + q/(ε − 1),ε)in(x, y) notation or, equivalently, γ . Let τ be the weight function on H that assigns the weight γ to the edges of H and the weight γ to the new edge. Then, as was observed in (Goldberg & Jerrum 2014, Lemma 2), we have Z (H ; q, τ)= Z (H; q, γ)(1 + γ ) Tutte st + Z (H; q, γ) 1+ s|t (6.14) = Z (H; q, γ) 1 − s|t + ε Z (H; q, γ)+ Z (H; q, γ) st s|t = f (ε; H, γ), where f (ε; H, γ) was introduced in (6.9). Hence, Z (H ; q, τ ) Tutte can be seen as a function, with variable ε, of the form f (ε; H, γ)= B(H, γ) − εA(H, γ), where B(H, γ)= Z (H; q, γ)(1 − 1/q)and s|t −1 A(H, γ)= −Z (H; q, γ) − q Z (H; q, γ). This construction will st s|t be used several times in this section. Now we analyse f (−; H, γ) for our particular setting (q> 1). Since q and γ are positive, the quantities Z (H; q, γ)and Z (H; q, γ) are positive, so A(H, γ)is st s|t negative. From q> 1and (6.10), it follows that f (0; H, γ)= B(H, γ) > 0and f (1 − q; H, γ) < 0, so f (0; H, γ)f (1 − q; H, γ) < 0 as we wanted. We conclude that the zero ε of f (ε; H, γ)isin (1 − q, 0). Note that ε ∈ (1 − q, 0) if and only if γ ∈ (−q, −1). Moreover, we have m −r Z (H; q, γ) ≥ qγ ≥ c , st (6.15) n −r Z (H; q, γ) ≥ q ≥ c . s|t This allow us to apply Lemma 6.11. Once we have all these prop- erties of f (ε; H, γ) at our disposal, we can proceed to describe our algorithm. Our algorithm also works for q ∈ (−∞, 0)∩(0, 1) as long as f (0; H, γ)f (1 − q; H, γ) < 0 and the hypotheses of Lemma 6.11 hold. In the rest of the proof we will only use the fact that q> 1 cc Approximating the complex Potts model Page 61 of 94 2 one more time, but this will be made explicit and can easily be adapted to the case q< 1aswewill explaininLemma 6.19. −j Our algorithm computes a positive integer j such that c ≤ |q − 1|/2. Let j be an integer with j ≥ j . We will first show how to additively approximate Z (H; q, γ)/Z (H; q, γ) with error s|t st −j at most 2|q|c /|q − 1|. If we could efficiently implement the point (1 − q/(ε − 1),ε)(in (x, y) coordinates) for any ε ∈ [1 − q, 0] using only planar graphs, then our algorithm could perform the interval-shrinking technique explained at the beginning of this section. This would allow us −j−4r to compute an interval of length at most c where the linear function f (ε) has a zero, which would, in turn, provide us with the desired additive approximation, as we will see later. However, some difficulties arise since we do not know how to implement any specific real algebraic weight. This difficulty was overcome by Goldberg and Jerrum by developing Lemmas 4.1 and 4.2.Here we use the version of these lemmas given in Corollary 4.3.Let y = γ +1, x =1+ q/(y − 1), y = γ +1 and x =1+ q/(y − 1). 1 1 1 1 2 2 2 2 Note that y ∈ (−1, 0), y > 1and q = 0. Hence, Corollary 4.3 1 2 allows us to efficiently implement approximations of real algebraic numbers when applied with the parameters x ,y ,x ,y .Every 1 1 2 2 time we invoke Corollary 4.3 we will be using these parameters. We are going to use this corollary to implement approximations of ε ∈ (1 − q, 0). This is the only point where our algorithm uses the fact that γ ∈ (−2, −1) or, equivalently, y ∈ (−1, 0). In further 1 1 lemmas where we study the case q< 1, we will have to implement approximations of ε ∈ (0, 1 − q) and, hence, we will get away with the weaker hypothesis γ ∈ (−1, 0), or, equivalently, y ∈ (0, 1). 1 1 (This hypothesis is “weaker” in the sense that a 2-thickening of a y ∈ (−1, 0) implements a y ∈ (0, 1).) 1 1 We want to implement numbers ε and ε so that ε ∈ (ε ,ε ) ⊆ (1 − q, 0). Note that here we are using that q> 1. When q< 1our algorithm would work on the interval (0, 1 − q) instead of (1 − q, 0). This paragraph is the last time that we use the hypothesis q> 1 in this proof. The argument given in this paragraph will be revisited when we deal with the case q< 1 in further lemmas. Our algorithm first applies the algorithm given in Corollary 4.3 2 Page 62 of 94 Galanis, Goldberg & Herrera-Poyatos cc −2r k  −k with y = −(1 − 1/q)c /2, k such that |y | < |y | < |y | 1 1 and n = 2r log (c) − log (1 − 1/q)+2 .Note that k = O(r) 2 2 and n = O(r). This procedure computes a theta graph and a weight function taking weights in {γ ,γ } that implement a point 1 2 −n −2r (1 + q/(ε − 1),ε ) such that |y − ε |≤ 2 ≤ (1 − 1/q)c /4in −2r polynomial time in r = O(size(H)). We have −3(1 − 1/q)c /4 ≤ −2r ∗ ε ≤−(1 − 1/q)c /4, so, by Lemma 6.11, we find that ε <ε < 0. Now our algorithm invokes again Corollary 4.3, thistimewith −2r k  −k inputs y =1 − q +(q − 1)c /2, k such that |y | < |y | < |y | 1 1 and n = 2r log (c) − min{0, log (q − 1)} +2 . This implements 2 2 −2r (1 + q/(ε − 1),ε )with |y − ε |≤ (q − 1)c /4, which gives 1 − q + −2r  −2r (q − 1)c /4 ≤ ε ≤ 1 − q +3(q − 1)c /4. Again by Lemma 6.11, we find that 1 − q< ε <ε . The interval (ε ,ε ) is the starting interval for the interval-shrinking procedure. Let us assume that we are carrying out the interval-shrinking technique explained at the beginning of this section, so we have an interval (ε ,ε )oflength l where f changes sign. Let us also assume that we can implement the endpoints ε and ε .We want to find a subinterval of length at most 9l/10 where f changes sign. −j−4r We can assume that l> c , since otherwise we do not need to shrink the interval further. Let p = 10 be the number of subin- tervals into which (ε ,ε ) is partitioned by the interval-shrinking technique. We want to find numbers ε ,...,ε such that we can 1 p−1 implement the point (1 + q/(ε − 1),ε ) for every i ∈{1,...,p − 1} i i and, for ε = ε and ε = ε ,we have ε − ε ≥ l/2p for ev- 0 p i i−1 ery i ∈{1,...,p}, which is what is required to perform interval- shrinking. For each i ∈{1,...,p − 1}, our algorithm computes ε = ε + il/p and then it applies the algorithm given in Corol- k  −k lary 4.3 with y = ε , k such that |y | < |y | < |y | and 1 1 n = (j +4r)log (c)+log (4p) . This procedure computes a graph 2 2 and a weight function taking weights in {γ ,γ } that implement a 1 2 −n −j−4r point (1 + q/(ε − 1),ε ) such that |ε − ε |≤ 2 ≤ c /(4p). i i i This application of the procedure given in Corollary 4.3 takes poly- nomial time in j, r and k.Note that k is polynomial in r and j −j−4r because |1 − q|≥|ε |≥ l/p ≥ c /p for any i ∈{1,...,p − 1}. The algebraic numbers ε ,ε ,...,ε ,ε form a partition the inter- 1 p−1 val (ε ,ε ). Our algorithm has computed theta (and, thus, planar) cc Approximating the complex Potts model Page 63 of 94 2 graphs that implement (1 + q/(ε − 1),ε ), so it can use the ora- i i cle Factor-K-NormPlanarTutte(q, γ ,γ ) to multiplicatively 1 2 approximate f (ε ) for every i ∈{0,...,p}.Note that 1 l −j−4r ε − ε ≥ ε − ε − c ≥ i i−1 i i−1 2p 2p for every i ∈{1,...,p}. Therefore, our algorithm can apply the interval-shrinking technique discussed at the beginning of this sec- tion to shrink (ε ,ε ). To guarantee that this interval-shrinking technique computes −j−4r an interval of length at most c , it suffices to subdivide the original interval (j +4r)log (c)+log |1 − q| times due to 10/9 10/9 the fact that each iteration shrinks the interval to 9/10 of its size. In (Goldberg & Guo 2017; Goldberg & Jerrum 2014) the authors used the information provided by this interval-shrinking proce- dure to solve the problem #Minimum Cardinality (s, t)-Cut for arbitrary graphs (not-necessarily planar). Here we follow a dif- ferent approach that allows us to compute the representation of Z (H; q, γ)/Z (H; q, γ). s|t st Once our algorithm has computed an interval of length at most −j−4r c where f has a zero, it implements a point (1 + q/(ˆ ε − 1), ε ˆ) such that ε ˆ is in this interval. This can be done by applying Corollary 4.3 with the same parameters as before other than y , which is set as the middle point of the computed interval. Let ∗ ∗ −j−4r ε be the zero of f.Note that |ε ˆ − ε |≤ c . Recall that f (ε; H, γ)= B(H, γ) − A(H, γ)ε.For a graph H and a weight function τ as in (6.14), with γ =ˆ ε − 1 (which we can now imple- ment as promised before (6.14)), we obtain |Z (H ; q, τ )| = |f (ˆ ε)| = |f (ˆ ε) − f (ε )| T utte (6.16) −j−4r −j−3r ≤|A(H, γ)|c ≤ c , where we used the elementary bound |A(H, γ)|≤ c , which has been established in (6.12). By dividing by Z (H; q, γ)in(6.14), st which is non-zero, and rearranging the terms we find that Z (H ; q, τ ) ε ˆ − 1 Z (H; q, γ) Tutte s|t =ˆ ε + 1+ . Z (H; q, γ) q Z (H; q, γ) st st 2 Page 64 of 94 Galanis, Goldberg & Herrera-Poyatos cc Dividing by 1 + (ε ˆ − 1)/q =(q − 1+ εˆ)/q yields qZ (H ; q, τ ) εq ˆ Z (H; q, γ) Tutte s|t (6.17) = − + . (q − 1+ εˆ)Z (H; q, γ) 1 − q − ε ˆ Z (H; q, γ) st st −2r We claim that |1 − q − ε ˆ|≥|1 − q|c /2. Recall that in view of ∗ −2r Lemma 6.11,wehave |1 − q − ε |≥|1 − q|c . Hence, we obtain ∗ ∗ |1 − q − ε ˆ|≥|1 − q − ε |−|ε − ε ˆ| |1 − q| −2r −j−4r −2r ≥|1 − q| c − c ≥ c , −j−4r −j −4r −4r whereweusedthat c ≤ c c ≤|q − 1| c /2 by definition of j . Therefore, we can apply this lower bound in conjunction with (6.15), (6.16)and (6.17) to conclude that Z (H; q, γ) εq ˆ 2|q||Z (H ; q, τ )| 2|q| s|t Tutte 3r −j − ≤ c ≤ c . Z (H; q, γ) 1 − q − ε ˆ |1 − q| |1 − q| st Our algorithm then computes εq ˆ /(1 − q − ε ˆ) as an approxima- tion of α = Z (H; q, γ) /Z (H; q, γ). We have shown that α st s|t is a real algebraic number that we can additively approximate −j up to an error at most 2|q|c /|1 − q| in polynomial time in j and the size of H. Technically, our approximation εq ˆ /(1 − q − ε ˆ) is another algebraic number. For this reason, our algorithm ap- proximates εq ˆ /(1 − q − ε ˆ) by a rational number α (with additive −j erroratmost2|q|c / |q − 1|) and uses this rational number as our approximation of α. The overall error that we make is then −j |α − α|≤ 4|q|c / |1 − q|. In view of Corollary 6.5,wehave d(α) ≤ d(q)d(γ) ≤ d(q)d(γ ), wherewehaveusedthat γ ∈ Q(γ ) and, thus, d(γ) ≤ d(γ ). More- 2 2 over, Corollary 6.5 yields 2d(q)d(γ) m+1/2 nh(q)+mh(γ) H(α) ≤ 2 e . Since h(γ)= h((γ − 1) − 1) ≤ ρ(1 + h(γ )) by Lemma 6.4,our al- 2 2 gorithm can compute a rational number D with D > 1such q,γ q,γ 2 2 ρ size(H) that H(α) ≤ D . The only non-trivial step of this computa- q,γ tion is upper bounding h(q)and h(γ ) in terms of the degrees and 2 cc Approximating the complex Potts model Page 65 of 94 2 usual heights of q and γ as in (6.1). Let d = d(q)d(γ )= O(1) 2 2 ρ size(H) and U = D .Let b be as in Lemma 6.6.Then we have q,γ 2dρ size(H) 2 = O(D ), so b = O(ρ size(H)). By choosing j appro- q,γ priately, we can use the algorithm that we have developed in this −b proof to find a rational approximation α with |α − α|≤ 2 /(12d). As we have argued, this takes polynomial time in b and size(H). Since b = O(ρ size(H)), we conclude that the computation of α runs in polynomial time in ρ and size(H). Once we have com- puted this approximation, our algorithm invokes the algorithm given in Lemma 6.6 to determine the minimal polynomial of α in time O(d (d +log U )) = O(ρ size(H)). Finally, it remains to compute an interval of the real line where α is the only root of its minimal polynomial. Since α is a real algebraic number and we know its minimal polynomial, our algorithm can use Sturm se- quences to isolate the real roots of this minimal polynomial. Then, by approximating α it decides which one of the computed intervals corresponds to α. Finally, note that our algorithm also works for arbitrary graphs (not-necessarily planar) as long as our oracle provides us with re- liable answers for any graph. Lemma 6.18. Let q, γ and γ be real algebraic numbers such that 1 2 q> 1, γ ∈ (−2, −1) and γ > 0. Let us assume that we have access 1 2 to an oracle for the problem Sign-PlanarTutte(q, γ ,γ ).Then 1 2 there exists an algorithm that takes as input a positive integer ρ and a planar graph H along with two distinct connected vertices s and t of H, and, for γ =(γ +1) − 1, this algorithm computes a representation of the algebraic number Z (H; q, γ)/Z (H; q, γ) s|t st in polynomial time in ρ and the size of H . Moreover, if we have access to the more powerful oracle Sign-Tutte(q, γ ,γ ),then we 1 2 can remove the constraint that H is planar. Proof. The algorithm is exactly the same one of Lemma 6.13. The proof is analogous too. The only difference is in the interval- shrinking technique, where we split (ε ,ε ) into 4 intervals instead of 10 (so p = 4 in the proof), but this has been discussed at the beginning of this section.  2 Page 66 of 94 Galanis, Goldberg & Herrera-Poyatos cc Lemma 6.19. Let K be arealnumberwith K> 1.Let q, γ and γ be real algebraic numbers such that 0 <q < 1, γ ∈ (−1, 0) 2 1 and γ > 0. Let us assume that we have access to an oracle for Factor-K-NormPlanarTutte(q, γ ,γ ). Then there exists an 1 2 algorithm that takes as input a positive integer ρ and a planar graph H along with two distinct connected vertices s and t of H, and, for γ =(γ +1) − 1, this algorithm computes a represen- tation of the algebraic number Z (H; q, γ)/Z (H; q, γ) in polyno- s|t st mial time in ρ and the size of H. Moreover, if we have access to the more powerful oracle Factor-K-NormTutte(q, γ ,γ ),then we 1 2 can remove the constraint that H is planar. Proof. We claim that the algorithm presented in Lemma 6.13 also works in this setting. Let f (ε; H, γ)= B(H, γ)−εA(H, γ)asin (6.9). As we pointed out in the proof of Lemma 6.13, the algorithm worksaslongas f (0; H, γ)f (1 − q; H, γ) < 0 and the hypothesis of Lemma 6.11 hold. First, since q and γ are positive, equations (6.15) −1 hold. It follows that A(H, γ)= −Z (H; q, γ)−q Z (H; q, γ) =0. st st Hence, the hypothesis of Lemma 6.11 hold. In view of (6.10)and the fact that q ∈ (0, 1) and γ is positive, we have f (0; H, γ) < 0and f (1 − q; H, γ) > 0. We conclude that f (0; H, γ)f (1 − q; H, γ) < 0, as we wanted. This time the interval-stretching technique applied in Lemma 6.13 runs on a subinterval (ε ,ε )of(0, 1 − q), so we only need to implement positive values of ε. For this reason, we can get away with the hypothesis γ ∈ (−1, 0) instead of the hypothesis γ ∈ (−2, −1), as was announced in the proof of Lemma 6.13.Fi- nally, we must indicate how our algorithm implements the numbers ε and ε so that ε ∈ (ε ,ε ) ⊆ (0, 1 − q), as this was only done in Lemma 6.13 for q> 1. The argument that we give here also applies when q< 0. Let y = γ +1, x =1 + q/(y − 1), y = γ +1 and 1 1 1 1 2 2 x =1 + q/(y − 1). We have y ∈ (0, 1), y > 1, q< 1and q =0. 2 2 1 2 Our algorithm first applies the algorithm given in Corollary 4.3 −2r k  −k with y = |1 − 1/q| c /2, k such that |y | < |y | < |y | and 1 1 n = 2r log (c) − min{0, log |1 − 1/q|} +2 .Note that k = O(r) 2 2 and n = O(r). This procedure computes a theta graph and a weight function taking weights in {γ ,γ } that implement a point 1 2 −n −2r (1 + q/(ε − 1),ε ) such that |y − ε |≤ 2 ≤|1 − 1/q|c /4in cc Approximating the complex Potts model Page 67 of 94 2 −2r polynomial time in r = O(size(H)). We obtain |1 − 1/q|c /4 ≤ −2r  ∗ ε ≤ 3|1 − 1/q|c /4, so, by Lemma 6.11, we find that 0 <ε <ε . Next our algorithm invokes again Corollary 4.3, this time with in- −2r k  −k puts y =1 − q − (1 − q)c /2, k such that |y | < |y | < |y | 1 1 and n = 2r log (c) − min{0, log (1 − q)} +2 . This implements 2 2 −2r (1 + q/(ε − 1),ε )with |y − ε |≤ (1 − q)c /4, which gives −2r  −2r 1 − q − 3(1 − q)c /4 ≤ ε ≤ 1 − q +(1 − q)c /4. Again by Lemma 6.11, we find that ε <ε < 1 − q. The interval (ε ,ε )is the starting interval for the interval-shrinking procedure that we needed. Lemma 6.20. Let q, γ and γ be real algebraic numbers such 1 2 that 0 <q < 1, γ ∈ (−1, −0) and γ > 0. Let us assume 1 2 that we have access to an oracle for the computational problem Sign-PlanarTutte(q, γ ,γ ). Then there exists an algorithm 1 2 that takes as input a positive integer ρ and a planar graph H along with two distinct connected vertices s and t of H, and, for γ =(γ +1) − 1, this algorithm computes a representation of the algebraic number Z (H; q, γ)/Z (H; q, γ) in polynomial time in ρ s|t st and the size of H. Moreover, if we have access to the more powerful oracle Sign-Tutte(q, γ ,γ ), then we can remove the constraint 1 2 that H is planar. Proof. The algorithm is exactly the same the one of Lemma 6.19, the only difference being in the interval-stretching technique as we have already explained. Lemma 6.21. Let K be a real number with K> 1.Let q, γ and γ be real algebraic numbers such that q< 0, γ ∈ (−1, 0) 2 1 and γ > 0. Let us assume that we have access to an oracle for Factor-K-NormPlanarTutte(q, γ ,γ ). Then there exists an 1 2 algorithm that takes as input: ◦ a positive integer ρ; ◦ a planar graph H =(V, E) such that, for γ =(γ +1) − 1, we have γ ≥ (8 max{|q|, 1/|q|}) ,where r =max{|V |, |E|}; 2 Page 68 of 94 Galanis, Goldberg & Herrera-Poyatos cc ◦ two distinct connected vertices s and t of H. This algorithm computes a representation of the algebraic number Z (H; q, γ)/Z (H; q, γ) in polynomial time in ρ and the size of H. s|t st Moreover, for such inputs ρ, H and s, t,we have Z (H; q, γ) =0 st and Z (H; q, γ) =0. If we have access to the more powerful Tutte oracle Factor-K-NormTutte(q, γ ,γ ), then we can remove the 1 2 constraint that H is planar. Proof. We claim that the algorithm presented in Lemmas 6.13 and 6.19 also works in this setting. Let n = |V | and m = |E|.Let c =2max{|q|, 1/|q|}γ. We may assume that r ≥ 2. First, let us assume that H is connected. Let f (ε; H, ρ)= B(H, γ) − εA(H, γ) as in (6.9), so B(H, γ)= Z (H; q, γ)(1 − 1/q)and A(H, γ)= s|t −1 −Z (H; q, γ) − q Z (H; q, γ). Recall that we have to prove st s|t that the conditions of Lemma 6.11 hold, as well as the inequal- ity f (0; H, γ)f (1 − q; H, γ) < 0. Let δ =(2max{|q|, 1/|q|}) /γ. Note that 0 <δ ≤ 1/4 because γ ≥ (8 max{|q|, 1/|q|}) .Each one of the (at most 2 ) terms in Z (H; q, γ), other than the term with st m−1 n−1 all edges in A, has absolute value at most γ |q| max{|q|, 1} ≤ −m m δ2 γ |q|.Since H is connected, the term with all edges in A is qγ . Thus, we have the inequalities m m m m (6.22) γ q − δγ |q|≤ Z (H; q, γ) ≤ γ q + δγ |q| < 0. st In particular, Z (H; q, γ) = 0. It also follows that st m m −r |Z (H; q, γ)|≥ γ |q|(1 − δ) ≥ γ |q|3/4 ≥ c , st which is one of the conditions of Lemma 6.11. Recall that an (s, t)- cut of H is a subset A of edges of H such that any path from s to t in H has an edge in A. The size of this (s, t)-cut is the cardinality of A. Let k be the size of a minimum cardinality (s, t)-cut in H,and let C k(A) |A| be the number of (s, t)-cuts of size k. We study the terms q γ appearing in Z (H; q, γ), so A is a subset of E such that s and t s|t are not connected in (V, A). Note that such an A is the complement of an (s, t)-cut and, hence, |A|≤ m − k.Moreover, if A is not the complement of an (s, t)-cut of size k, then the absolute value of cc Approximating the complex Potts model Page 69 of 94 2 k(A) |A| m−k−1 2 n−2 −m m−k 2 q γ is at most γ q max{1, |q|} ≤ δ2 γ q .Thus, we have the inequalities m−k 2 m−k 2 0 <Cγ q − δγ q ≤ Z (H; q, γ) s|t (6.23) m−k 2 m−k 2 ≤ Cγ q + δγ q . The inequalities (6.22)and (6.23) have been previously given in the proof of (Goldberg & Jerrum 2014, Lemma 2). As a consequence, we find that m−k 2 m−k 2 m−k 2 −r Z (H; q, γ) ≥ Cγ q (1−δ) ≥ Cγ q 3/4 ≥ γ q 3/4 ≥ c , s|t which is another one of the conditions of Lemma 6.11.In view of (6.10) and the facts that q< 0 and we know the signs of Z (H; q, γ)and Z (H; q, γ), it follows that f (0; H, γ) > 0and s|t st f (1 − q; H, γ) < 0. Hence, we find that f (0; H, γ)f (1 − q; H, γ) < 0, as we wanted. Note that A(H, γ) has to be non-zero because f (−; H, γ) is non-constant as f (0; H, γ)f (1 − q; H, γ) < 0. This is the last condition of Lemma 6.11 that we had to check. We conclude that we can apply the algorithm given in the proof of Lemma 6.19 to compute Z (H; q, γ)/Z (H; q, γ) in polynomial st s|t time in ρ and the size of H. Finally, we show that Z (H; q, γ) = Tutte 0. This is not needed for the algorithm of Lemma 6.19, but is part of the statement of the current lemma. In light of (6.22)and (6.23), we have |Z (H; q, γ)|≥ γ |q|(1 − δ)and Z (H; q, γ) ≤ st s|t m−k 2 Cγ q (1 + δ). Note that 3 5 m m m−k 2 m−k 2 γ |q|(1 − δ) ≥ γ |q| > Cγ q ≥ γ q (1 + δ), 4 4 r m whereweusedthat γ ≥ (8 max{|q|, 1/|q|}) ≥ 8 · 2 |q| > 5C|q| since r ≥ 2. Therefore, we find that |Z (H; q, γ)| > Z (H; q, γ) . st s|t We conclude that Z (H; q, γ)= Z (H; q, γ)+ Z (H; q, γ) < 0. Tutte st s|t It remains to consider the case where H is not connected. Let H ,...,H be the connected components of H, and let us assume 1 l 2 Page 70 of 94 Galanis, Goldberg & Herrera-Poyatos cc that the vertices s and t are in H without loss of generality. We have Z (H; q, γ)= Z (H ; q, γ) Z (H ; q, γ) ··· Z (H ; q, γ); st st 1 Tutte 2 Tutte l Z (H; q, γ)= Z (H ; q, γ) Z (H ; q, γ) ··· Z (H ; q, γ); 1 Tutte 2 Tutte l s|t s|t Z (H; q, γ)= Z (H ; q, γ) Z (H ; q, γ) ··· Z (H ; q, γ) . Tutte Tutte 1 Tutte 2 Tutte l We have already shown that the quantities Z (H ; q, γ), Z (H ; q, γ) st 1 st 1 and Z (H ; q, γ) are non-zero for all j. Hence, we obtain Tutte j Z (H; q, γ)/Z (H; q, γ)= Z (H ; q, γ)/Z (H ; q, γ), and we can s|t st s|t 1 st 1 apply our algorithm to H instead of H . Moreover, we have Z (H; q, γ) =0 and Z (H; q, γ) = 0 as we wanted. This fin- st Tutte ishes the proof. Lemma 6.24. Let q, γ and γ be real algebraic numbers such that 1 2 q< 0, γ ∈ (−1, 0) and γ > 0. Let us assume that we have access 1 2 to an oracle for Sign-PlanarTutte(q, γ ,γ ). Then there exists 1 2 an algorithm that takes as input: ◦ a positive integer ρ ; ◦ a planar graph H =(V, E) such that, for γ =(γ +1) − 1, we have γ ≥ (8 max{|q|, 1/|q|}) ,where r =max{|V |, |E|}; ◦ two distinct connected vertices s and t of H. This algorithm computes a representation of the algebraic number Z (H; q, γ)/Z (H; q, γ) in polynomial time in ρ and the size of H. s|t st Moreover, for such inputs ρ, H and s, t,we have Z (H; q, γ) =0 st and Z (H; q, γ) =0. If we have access to the more powerful Tutte oracle Sign-Tutte(q, γ ,γ ), then we can remove the constraint 1 2 that H is planar. Proof. The algorithm is the same one as that of Lemma 6.21, the only difference being in the interval-stretching technique, as we have already explained. Now we deal with the last part of our reduction, where we reduce the computation of Z (G; q, γ) to the computation of Tutte Z (H; q, γ)/Z (H; q, γ) on the subgraphs H of G.First, let us s|t st introduce some notation. cc Approximating the complex Potts model Page 71 of 94 2 Definition 6.25. We say that a pair (q, γ) of algebraic numbers is zero-free for a graph G if q =0 and, for every subgraph H of G and every pair of distinct vertices s and t in the same connected component of H, the quantities Z (H, q, γ) and Z (H, q, γ) are st Tutte non-zero. Note that if (q, γ) is zero-free for G,then (q, γ) is also zero-free for any subgraph of H. We consider the following computational problems. Name: RatioTutte(q, γ). Instance: A (multi)graph G =(V, E) such that (q, γ) is zero-free for G and two distinct vertices s and t in the same connected component of G. Output: A representation of the algebraic number Z (G; q, γ)/Z (G; q, γ). s|t st Name: ZeroFreeTutte(q, γ). Instance: A (multi)graph G =(V, E) such that (q, γ) is zero-free for G. Output: A representation of the algebraic number Z (G; q, γ). Tutte We also consider the planar versions of these problems, RatioPlanarTutte(q, γ)and ZeroFreePlanarTutte(q, γ). Then we can express the last part of our reduction as a reduction between these two computational problems. Lemma 6.26. Let q and γ be algebraic numbers with q =0.Then we have the reductions ZeroFreePlanarTutte(q, γ) ≤ RatioPlanarTutte(q, γ), ZeroFreeTutte(q, γ) ≤ RatioTutte(q, γ). Proof. First, we show that ZeroFreePlanarTutte(q, γ)re- duces to RatioPlanarTutte(q, γ). Let G be the input of the problem ZeroFreePlanarTutte(q, γ). The reduction computes a representation of Z (G; q, γ) as follows. We assume that G is Tutte not a tree since it is known how to compute the Tutte polynomial of a tree in polynomial time (Sokal 2005, Example 2.1). Then we 2 Page 72 of 94 Galanis, Goldberg & Herrera-Poyatos cc can find an edge e =(s, t)of G that is not a bridge. We are go- ingtouse theoraclefor RatioPlanarTutte(q, γ) to reduce the computation of Z (G; q, γ)tothatof Z (G \ e; q, γ), where Tutte Tutte G \ e is formed from G by deleting e.Note that if G is planar, then G \ e is also planar. Since (q, γ) is zero-free for G,we have Z (G; q, γ) =0. Let α = Z (G; q, γ)/Z (G; q, γ). First, note that st s|t st Z (G; q, γ)= Z (G; q, γ)+ Z (G; q, γ)= Z (G; q, γ)(1 + α) . Tutte st s|t st By calling the oracle the algorithm obtains a representation of the factor 1 + α.Since e is not a bridge, s and t are connected in G \ e, so, by calling the oracle again, the algorithm has access to a representation of the algebraic number β = Z (G \ e; q, γ)/Z (G \ s|t st e; q, γ). We have −1 Z (G; q, γ)= Z (G \ e; q, γ)(1 + γ)+ γq Z (G \ e; q, γ) st st s|t 1+ γ β −1 = Z (G \ e; q, γ) + γq , Tutte 1+ β 1+ β where we multiplied and divided by Z (G \ e; q, γ)= Z (G \ Tutte st e; q, γ)(1 + β), which is non-zero since (q, γ) is zero-free for G.Note that the fact that Z (G \ e; q, γ) = 0 is equivalent to β = −1. Tutte We obtain 1+ α −1 Z (G; q, γ)= Z (G \ e; q, γ) 1+ γ + γq β . Tutte Tutte 1+ β The algorithm then computes a representation of Z (G \ e; q, γ) Tutte recursively. Note that this reduction also works between the non- planar versions of the problems. In the rest of this section we put our reduction together. There is one result for each one of the cases q> 1, 0 <q < 1and q< 0 (see Lemmas 6.27, 6.28 and 6.31). Lemma 6.27. Let K be arealnumberwith K> 1.Let q, γ and γ be real algebraic numbers such that q> 1, γ ∈ (−2, −1) and 2 1 γ > 0. Then we have the following reductions: PlanarTutte(q, γ ) ≤ 2 T Factor-K-NormPlanarTutte(q, γ ,γ ), 1 2 PlanarTutte(q, γ ) ≤ Sign-PlanarTutte(q, γ ,γ ), 2 T 1 2 cc Approximating the complex Potts model Page 73 of 94 2 where ≤ denotes a Turing reduction. Moreover, these reductions also hold for the analogous non-planar problems. Proof. We claim that the problems PlanarTutte(q, γ )and ZeroFreePlanarTutte(q, γ ) are equivalent. This follows from the fact that (q, γ ) is zero-free for every graph G. Lemma 6.26 gives us a reduction from ZeroFreePlanarTutte(q, γ )to RatioPlanarTutte(q, γ ). Recall that we have q> 0, γ ∈ 2 1 (−2, −1) and γ > 0. Thus, we can apply Lemma 6.13 with ρ =1 to obtain a reduction from the problem RatioPlanarTutte(q, γ ) to the problem Factor-K-NormPlanarTutte(q, γ ,γ ), which 1 2 gives the first reduction of the statement. The second reduction is derived analogously, but this time we apply Lemma 6.18 instead of Lemma 6.13. Finally, note that our reductions also hold for the non-planar version of the problems since the algorithms given in Lemma 6.13 and Lemma 6.18 work for arbitrary graphs (non- necessarily planar) as long as the oracle does. Lemma 6.28. Let K be arealnumberwith K> 1.Let q, γ and γ be real algebraic numbers such that 0 <q < 1, γ ∈ (−1, 0) and 2 1 γ > 0. Then we have the following reductions: PlanarTutte(q, γ ) ≤ Sign-PlanarTutte(q, γ ,γ ), 2 T 1 2 PlanarTutte(q, γ ) ≤ 2 T Factor-K-NormPlanarTutte(q, γ ,γ ). 1 2 Moreover, these reductions also hold for the analogous non-planar problems. Proof. The proof is analogous to that of Lemma 6.27;now,we instead combine Lemmas 6.26, 6.19 and 6.20. So far we have obtained reductions when q> 1or0 <q < 1. To obtain a similar result when q< 0 we have to introduce the following variant of Tutte(q, γ), where q is an algebraic number and γ is a positive real algebraic number. 2 Page 74 of 94 Galanis, Goldberg & Herrera-Poyatos cc Name: ThickenedTutte(q, γ). Instance: A (multi)graph G =(V, E). Output: A representation of the algebraic number Z (G; q, (γ+ Tutte ρ(G) 1) − 1), where ρ(G) is the smallest positive integer such ρ(G) r that (γ +1) − 1 >M (G) for M (G) = (8 max{|q|, 1/|q|}) and r =max{|V |, |E|}. We also consider the planar version of this problem, ThickenedPlanarTutte(q, γ), where the input graph is promised to be planar. Lemma 6.29. Let q be an algebraic number and let γ be a real al- gebraic number with γ> 0.Then ThickenedPlanarTutte(q, γ) is #P-hard unless q ∈{1, 2},and ThickenedTutte(q, γ) is #P- hard unless q =1. Proof. We are going to reduce the problem PlanarTutte(q, 2) to ThickenedPlanarTutte(q, γ). The result then follows from the #P-hardness of PlanarTutte(q, 2), cf. Theorem 6.8. Let G be an m-edge instance of PlanarTutte(q, 2). For j =1,...,m,let G be the graph obtained from G by j-thickening max{n,jm} each of its edges. We have M (G ) = (8 max{|q|, 1/|q|}) so M (G ), and therefore ρ(G ), are non-decreasing in j.Let γ = j j j jρ(G ) ρ(G ) j j (γ +1) − 1 and note that Z (G ; q, (γ +1) − 1) = Tutte j Z (G; q, γ ). Note that the points γ ,...,γ are distinct be- Tutte j 1 m cause jρ(G ) ≤ jρ(G ) < (j +1)ρ(G ) for every j.Moreover, j j+1 j+1 their representation is polynomial in the size of G, and hence so is the representation of Z (G; q, γ ). Tutte j The reduction constructs G ,...,G and computes 1 m Z (G; q, γ ) using the oracle for ThickenedPlanarTutte(q, γ) Tutte j with input G . By interpolation, we then recover the polynomial Z (G; q, x), whose degree is m when q is viewed as a constant, in Tutte time polynomial in the size of G. The reduction is then completed by evaluating Z (G; q, x)at x =2. Tutte Finally note that this reduction also works from Tutte(q, 2) to ThickenedTutte(q, γ). The only difference is that Tutte(q, 2) is also #P-hard for q = 2 (see Theorem 6.7), so we also get #P- hardness in this case.  cc Approximating the complex Potts model Page 75 of 94 2 We are going to reduce ThickenedPlanarTutte(q, γ )to Factor-K-NormPlanarTutte(q, γ ,γ ) for appropriate γ and 1 2 1 γ . In order to do so, we need to adapt Lemma 6.26 to this con- text. For this purpose, we consider the following computational problems. Name: RatioThickenedTutte(q, γ). Instance: A (multi)graph G =(V, E), two distinct connected ver- tices s and t of G, and a positive integer ρ such that, for γ =(γ +1) − 1, (q, γ ) is zero-free for G and γ >M (G), ρ ρ ρ where M (G) = (8 max{|q|, 1/|q|}) and r =max{|V |, |E|}. Output: A representation of the algebraic number Z (G; q, γ )/Z (G; q, γ ). ρ st ρ s|t Name: ZeroFreeThickenedTutte(q, γ). Instance: A (multi)graph G =(V, E) and a positive integer ρ such that, for γ =(γ +1) − 1, (q, γ ) is zero-free for G ρ ρ and γ >M (G), where M (G) = (8 max{|q|, 1/|q|}) and r =max{|V |, |E|}. Output: A representation of the algebraic number Z (G; q, γ ). Tutte ρ We also consider the planar versions of these problems, RatioThickenedPlanarTutte(q, γ)and ZeroFreeThickenedPlanarTutte(q, γ). Lemma 6.30. Let q and γ be algebraic numbers with q =0.Then we have the reductions ZeroFreeThickenedPlanarTutte(q, γ) ≤ RatioThickenedPlanarTutte(q, γ), ZeroFreeThickenedTutte(q, γ) ≤ RatioThickenedTutte(q, γ). Proof. The reduction is almost exactly the one explained in Lemma 6.26. The only difference is that, for an input (G, ρ), each call to the oracle has as parameters a subgraph H of G, two vertices s and t determined in the reduction, and the same positive integer ρ.  2 Page 76 of 94 Galanis, Goldberg & Herrera-Poyatos cc Lemma 6.31. Let K be arealnumberwith K> 1.Let q, γ and γ be real algebraic numbers such that q< 0, γ ∈ (−1, 0) and 2 1 γ > 0. Then we have the following reductions: ThickenedPlanarTutte(q, γ ) ≤ 2 T Sign-PlanarTutte(q, γ ,γ ), 1 2 ThickenedPlanarTutte(q, γ ) ≤ 2 T Factor-K-NormPlanarTutte(q, γ ,γ ). 1 2 Moreover, these reductions also hold for the analogous non-planar problems. Proof. Let G and ρ be the inputs of the problem ThickenedPlanarTutte(q, γ ). Let H be a subgraph of G and let s and t be two distinct connected vertices of H.By applying Lemma 6.21 we find that Z (H; q, (γ +1) − 1) and st 2 ρ ρ Z (H; q, (γ +1) − 1) are non-zero. Hence, (q, (γ +1) − 1) is Tutte 2 2 zero-free for G. This shows that ThickenedPlanarTutte(q, γ ) reduces to ZeroFreeThickenedPlanarTutte(q, γ ). Lemma 6.30 gives us a reduction from the problem ZeroFreeThickenedPlanarTutte(q, γ )to RatioThickenedPlanarTutte(q, γ ). Recall that we have q< 0, γ ∈ (−1, 0) and γ > 0. Thus, Lemma 6.21 gives a reduction 1 2 from RatioThickenedPlanarTutte(q, γ )to Factor-K-NormPlanarTutte(q, γ ,γ ), which completes the 1 2 proof for the first reduction of the statement. The second reduc- tion is analogous, but this time we apply Lemma 6.24 instead of Lemma 6.21. Finally, note that our reductions also hold for the analogous non-planar problems since the algorithms given in Lemma 6.21 and Lemma 6.24 work for arbitrary graphs (non- necessarily planar) as long as the oracle does. 6.6. The connection between approximate shifts and re- ductions. In this section we show how a polynomial-time ap- proximate shift from (q, γ )to(q, γ ) may allow us to reduce the 1 2 problems of approximating the norm of the Tutte polynomial at (q, γ ) to the same problem at (q, γ ) (see Lemma 2.4). We also de- 2 1 rive a similar result for the problem Distance-ρ-ArgTutte(q, γ) in Lemma 6.34. cc Approximating the complex Potts model Page 77 of 94 2 Lemma 6.32. Let q, γ and γ be algebraic numbers with q =0 1 2 such that there is a polynomial-time series–parallel approximate shift from (q, γ ) to (q, γ ). Then there is an algorithm that has as 1 2 input a graph G and a positive integer k and computes, in polyno- mial time in k and the size of G, a graph H and a representation of an algebraic number D with D =0 such that Z (H; q, γ ) Tutte 1 −k Z (G; q, γ ) − ≤ 2 . Tutte 2 Moreover, if the graph G is planar, then the graph H is also planar, and if q and γ are real, then D is also real. Proof. Let G =(V, E)and k be the inputs of the algorithm. Let n = |V | and m = |E|. By the definition of series–parallel polynomial-time approximate shifts, for any positive integer j,one can compute, in polynomial time in j, a series–parallel graph J −j that γ -implements γ ˆ with |γ − γ ˆ|≤ 2 for terminals s and t.By 1 2 definition of implementations, we have γ ˆ = qZ (J ; q, γ )/Z (J ; q, st j 1 s|t j γ )and Z (J ; q, γ ) = 0. We construct a graph G that is a copy 1 s|t j 1 j of G where every edge f in G has been replaced by a copy of J as in Lemma 3.2, identifying the endpoints of f with s and t.In light of Lemma 3.2,wehave Z (J ; q, γ ) s|t j 1 Z (G ; q, γ )= Z (G; q, γ ˆ) . Tutte j 1 Tutte We can compute a representation of D = Z (J ; q, γ ) /q in poly- j s|t j 1 nomial time in the size of J because J is a series–parallel graph. j j However, note that this hypothesis is not essential as long as there while constructing is some way to compute a representation of D −j J .Note that |γ ˆ|≤|γ | +2 ,so |Z (G; q, γ ) − Z (G; q, γ ˆ)| j 2 Tutte 2 Tutte is upper bounded by |A|−1 k(A) |A| k(A) |A|−1−t |A| t |q| γ −γ ˆ  ≤ |q| |γ − γ ˆ| γ γ ˆ 2 2 t=0 A⊆E A⊆E |A|−1 k(A) ≤ |q| |γ −γ ˆ| (|A|−1) |γ |+s 2 2 A⊆E m−1 ≤|γ − γ ˆ||q| 2 (m − 1) |γ | + . 2 2 2 2 Page 78 of 94 Galanis, Goldberg & Herrera-Poyatos cc −j n m m−1 −k Hence, for j such that 2 |q| 2 (m − 1)(|γ | +1/2) ≤ 2 , which can be achieved for j = O(size(G)+ k), we obtain Z (G ; q, γ ) Tutte j 1 Z (G; q, γ ) −  = Tutte 2 −k |Z (G; q, γ ) − Z (G; q, γ ˆ)|≤ 2 . Tutte 2 Tutte The algorithm returns H = G and D = D =0. Note that if G is planar, then H = G is also planar by construction. If q and γ j 1 2 m are real, then the number D =(Z (J ; q, γ )/q ) is clearly real s|t j 1 too. In the rest of this section we use Lemma 6.32 to translate in- formation about the function Z (−; q, γ ) for certain graphs to Tutte 1 information about Z (G; q, γ ). This leads to the reductions Tutte 2 given in Lemmas 2.4 and 6.34. These results are stated for polyno- mial series–parallel approximate shifts, but they would also hold even if the shifts are not series–parallel as long as, in the proof of Lemma 6.32, the graphs J are planar and we can compute D = Z (J ; q, γ ) /q in polynomial time in the size of J . j s|t j 1 j We are now ready to prove Lemma 2.4, which was stated in the Proof Outline, and which we restate here for convenience. Lemma 2.4. Let q =0, γ and γ =0 be algebraic numbers, and 1 2 K> 1.For j ∈{1, 2},let y = γ +1 and x =1+ q/γ .If there is j j j j a polynomial-time series–parallel approximate shift from (x ,y ) to 1 1 (x ,y ), then we have a reduction from Factor-K-NormTutte 2 2 (q, γ ) to Factor-K-NormTutte(q, γ ). This reduction also 2 1 holds for the planar version of the problem. Proof. We are going to solve the problem Factor-4K-NonZero-NormTutte(q, γ ) in polynomial time with the help of an oracle for Factor-K-NormTutte(q, γ ). Re- call that hardness of these problems does not depend on K (see Sec- tion 1.1). Let C > 1 be the constant computed in Corollary 6.3 q,γ for the algebraic numbers q and γ = γ ; so, for any graph G,either −size(G) Z (G; q, γ )=0or |Z (G; q, γ )|≥ C .Let G =(V, E) Tutte 2 Tutte 2 q,γ be the input of Factor-4K-NonZero-NormTutte(q, γ ). We 2 cc Approximating the complex Potts model Page 79 of 94 2 assume that Z (G; q, γ ) = 0 since otherwise we can output any- Tutte 2 −size(G) −k thing. Let k be the smallest integer such that 2 ≤ C /2. q,γ The reduction uses the algorithm given in Lemma 6.32 to compute agraph H and a representation of an algebraic number D with D =0 such that Z (H; q, γ ) Tutte 1 −k Z (G; q, γ ) − ≤ 2 Tutte 2 −size(G) q,γ (6.33) |Z (G; q, γ )| Tutte 2 ≤ . Therefore, we have 1 |Z (H; q, γ )| 3 Tutte 1 ≤ ≤ . 2 D |Z (G; q, γ )| 2 Tutte 2 By invoking the oracle for Factor-K-NormTutte(q, γ ), the reduction computes a rational number N such that we have N/K ≤ |Z (H; q, γ )|≤ KN . The reduction also computes a non-zero Tutte 1 ˆ ˆ ˆ ˆ rational number D such that 1/2 ≤ D/D ≤ 2. Then N = N/D satisfies ≤|Z (G; q, γ )|≤ 4KN, Tutte 2 4K so the reduction outputs N as solution of the computational prob- lem Factor-4K-NonZero-NormTutte(q, γ ). Note that this reduction analogously applies to the planar case since the graph H is planar when G is planar (see Lemma 6.32). We next give the analogue of Lemma 2.4 for the argument. Lemma 6.34. Let q, γ and γ be algebraic numbers with q =0. 1 2 If there is a polynomial-time series–parallel approximate shift from (q, γ ) to (q, γ ),then Distance-5π/12-ArgTutte(q, γ ) reduces 1 2 2 to Distance-π/3-ArgTutte(q, γ ). This reduction also holds for the planar version of the problem. 2 Page 80 of 94 Galanis, Goldberg & Herrera-Poyatos cc Proof. Let C be the constant computed in Corollary 6.3 for q,γ γ = γ .Let G =(V, E) be the input of the problem Distance-π/2-ArgTutte(q, γ ). We assume that Z (G; q, γ ) 2 Tutte 2 = 0 since otherwise we can output anything. The reduction pro- ceeds again similarly to that of Lemma 2.4. First, it applies Lemma 6.32 for appropriate k as in (6.33) to compute a graph H and a representation of a real algebraic number D with D =0 such that Z (H; q, γ ) Tutte 1 −k−2 Z (G; q, γ ) − ≤ 2 Tutte 2 −size(G) q,γ (6.35) |Z (G; q, γ )| Tutte 2 ≤ . Let α = Z (G; q, γ )and β = Z (H; q, γ )/D,so (6.35) Tutte 2 Tutte 1 can be rewritten as |α − β|≤|α| /8. We claim that |Arg(α) − Arg(β)|≤ π/24. Since β is in the disc of centre α and radius |α|/8, by basic geometry, we have π/2 |α|/8 so sin(θ)=1/8, where θ is the angle between 0, α and the inter- section of the circle of radius |α|/8 and center α with the tangent line that goes through 0. Since sin(π/24) > 1/8, we conclude that |Arg(α) − Arg(β)|≤ θ ≤ π/24 as we claimed. By invoking the ora- cle for Distance-π/3-ArgTutte(q, γ ), the reduction computes a rational number A such that, for some a ∈ arg(Z (H; q, γ )), 1 1 Tutte 1 we have |a − A |≤ π/3. Since the reduction has at its dis- 1 1 posal a representation of the algebraic number D,it can com- pute (in polynomial time in the length of this representation) a |α| cc Approximating the complex Potts model Page 81 of 94 2 rational number A such that, for some a ∈ arg(D), we have 2 2 ˆ ˆ ˆ ˆ |a − A |≤ π/24. The reduction outputs A = A − A .We 2 2 1 2 claim that there is an argument a of α such that |a − A|≤ 5π/12. Note that b = a − a is an argument of β. By the triangle in- 1 2 ˆ ˆ ˆ equality, we have |b − A|≤|a − A | + |A − a |≤ 9π/24. Let 1 1 2 2 a =Arg(α)+(b−Arg(β)), which is an argument of α. We conclude that ˆ ˆ ˆ |a − A|≤|b − A| + |a − b| = |b − A| + |Arg(α) − Arg(β)|≤ 5π/12. This reduction analogously applies to the planar case since the graph H is planar when G is planar (see Lemma 6.32). One could actually change the angles ρ =5π/12 and ρ = π/3 2 1 in the statement of Lemma 6.34 as long as ρ <ρ , but ρ =5π/12 1 2 2 and ρ = π/3 will suffice for our purposes. 6.7. Hardness for the Tutte polynomial. In this section we use the reductions of Section 6.5 to obtain intermediate hardness results that will be used to obtain our main theorems in the upcom- ing sections. We start with the following corollary which strength- enspreviousresults of Goldberg & Jerrum (2014) (that applied to general graphs rather than planar). Corollary 6.36. Let K> 1 be a real number. Let q =0, 2,and γ ,γ be real algebraic numbers with γ ∈ (−∞, −2) ∪ (0, ∞) and 1 2 2 either ◦ q> 1, γ ∈ (−2, −1),or ◦ q< 1, γ ∈ (−1, 0). Then, the problems Factor-K-NormPlanarTutte(q, γ ,γ ) 1 2 and Sign-PlanarTutte(q, γ ,γ ) are #P-hard. 1 2 Proof. We consider first the case when γ > 0. For q, γ ,γ as 2 1 2 in the first item, the conclusion follows from Theorem 6.8 and the reductions given in Lemma 6.27. For the second item: when q ∈ (0, 1), the result follows from the reductions given in Lemma 6.28 and Theorem 6.8, while for q< 0, the result follows from Lem- mas 6.29 and 6.31. 2 Page 82 of 94 Galanis, Goldberg & Herrera-Poyatos cc The other case is when γ < −2. Then, we can γ -implement 2 2 (γ +1) − 1 > 0 with a 2-thickening and proceed as in the previous case. Lemma 6.37. Let K be arealnumberwith K> 1.Let x, y be a real algebraic numbers such that (x, y) =(−1, −1), min{x, y}≤ −1 and max{x, y} < 0.Let q =(x − 1)(y − 1) and γ = y − 1. Then the problems Factor-K-NormPlanarTutte(q, γ) and Sign-PlanarTutte(q, γ) are #P-hard. Proof. Note that q> 2. We claim that we can (x, y)-implement (x ,y )with y ∈ (−1, 0), and (x ,y )with |y | > 1 using planar (in 1 2 1 2 2 2 fact, series–parallel) graphs. The result then follows by invoking Corollary 6.36 with γ = y − 1and γ = y − 1. 1 1 2 2 The case min{x, y} < −1 is treated in (Goldberg & Jerrum 2014, Lemmas 8–11). Hence, we may assume that −1 ≤ x< 0and −1 ≤ y< 0. Since (x, y) =(−1, −1) by hypothesis, there are two cases: ◦ x = −1and −1 <y < 0. As pointed out in (Goldberg & Jerrum 2014, Corollary 26), a 3-thickening from (x, y)imple- ments the point (x ,y )= 1 − ,y with x < −1and 1+y+y y ∈ (−1, 0), so the point (x ,y ) has already been studied in this proof. ◦−1 <x< 0and y = −1. This time we perform a 3-stretching from (x, y) to implement a point (x ,y )with x ∈ (−1, 0) and y < −1. Lemma 6.38. Let K> 1 be arealnumberand q, x, y be real al- gebraic numbers with max{|x|, |y|} < 1 and q =(x − 1)(y − 1) > 32/27. Then, for γ = y−1, Factor-K-NormPlanarTutte(q, γ) and Sign-PlanarTutte(q, γ) are #P-hard, unless q =2. Proof. In view of (Goldberg & Jerrum 2014, Lemmas 12 and 15), we can (x, y)-implement points (x ,y )and (x ,y )with y ∈ 1 1 2 2 1 (−1, 0) and y > 1. These implementations only use series–parallel graphs. Hence, we can apply (the first item of) Corollary 6.36 with γ = y − 1and γ = y − 1 to finish the proof. 1 1 2 2 cc Approximating the complex Potts model Page 83 of 94 2 6.8. Proofs of our main theorems. In this section we show how our main Theorems 1.2, 1.3, 1.4 and 1.5 follow from the #P- hardness results of Section 6.7. We start with Theorem 1.5. Theorem 1.5. Let q> 2 be a real, γ ∈ C\R be an algebraic num- ber, and K> 1. Then, Factor-K-NormPlanarTutte(q, γ) and Distance-π/3-ArgPlanarTutte(q, γ) are #P-hard, 2πi/3 4πi/3 unless q =3 and γ +1 ∈{e ,e } when both problems can be solved exactly in polynomial time. Proof. Let (x, y) ∈H be such that y = γ + 1. Consider the point (x ,y ) ∈ H with y = −1/2and x =1 + q/(y − 1). 2 2 q 2 2 2 Note that x =1 − 2q/3 ≤ 1 − 4/3 < 0. There are two cases. Either x ≤−1and thepoint (x ,y ) satisfies the hypothesis 2 2 2 of Lemma 6.37,or −1 <x < 0and thepoint (x ,y )satis- 2 2 2 fies the hypothesis of Lemma 6.38. In any case, we conclude that the computational problems Sign-PlanarTutte(q, γ )and Factor-K-NormPlanarTutte(q, γ ) are #P-hard for γ = y − 2 2 2 1when q> 2. By Lemma 2.4 (for γ = γ and γ = γ ), we see that the problem 1 2 2 Factor-K-NormPlanarTutte(q, γ ) reduces to the problem Factor-K-NormPlanarTutte(q, γ), proving that the latter is #P-hard too. The proof for Distance-π/3-ArgPlanarTutte (q, γ) is analogous: first observe that since q, γ are real and 5π/12 < π/2, the problem Sign-PlanarTutte(q, γ ) reduces (trivially) to Distance-5π/12-ArgPlanarTutte(q, γ ). Moreover, apply- ing Theorem 2.1 with x and y as above, y = y ∈ (−1, 0) and x = x , we have a polynomial-time series–parallel approximate shift from (x, y)to(x ,y ) or, equivalently, from (q, γ)to(q, γ ). Using Lemma 6.34 with γ = γ and γ = γ , we conclude that 1 2 2 the problem Distance-5π/12-ArgPlanarTutte(q, γ ) reduces to Distance-π/3-ArgPlanarTutte(q, γ), proving that the lat- ter is #P-hard, as wanted. Theorem 1.4. Let y ∈ C\R be an algebraic number, and K> 1. Then, Factor-K-NormIsing(y) and Distance-π/3-ArgIsing(y) are #P-hard, unless y = ±i when both problems can be solved ex- actly in polynomial time. 2 Page 84 of 94 Galanis, Goldberg & Herrera-Poyatos cc Proof. Let q =2, γ = y − 1, y = −1/2, γ = y − 1. From the 2 2 2 result of Goldberg and Guo Goldberg & Guo (2017), the problems Factor-K-NormIsing(y )and Distance-π/3-ArgIsing(y )are 2 2 #P-hard, hence the problems Factor-K-NormPlanarTutte (q, γ )and Distance-π/3-ArgPlanarTutte(q, γ ) are #P-hard 2 2 as well, using that Z (G; y )= Z (G;2,γ ). Ising 2 Tutte 2 By applying Lemma 2.4 and Theorem 2.1 analogously to the proof of Theorem 1.5, we conclude that the problems Factor-K-NormPlanarTutte(q, γ)and Distance-π/3 -ArgPlanarTutte(q, γ) are #P-hard, and hence Factor-K-NormIsing(y)and Distance-π/3-ArgIsing(y), us- ing that Z (G; y)= Z (G;2,γ). Ising Tutte Theorem 1.2. Let q ≥ 3 be an integer, y ∈ C\R be an algebraic number, and K> 1. Then, Factor-K-NormPlanarPotts(q, y) and Distance-π/3-ArgPlanarPotts(q, y) are #P-hard, unless 2πi/3 4πi/3 q =3 and y ∈{e ,e } when both problems can be solved exactly in polynomial time. Proof. Just apply Theorem 1.5 to the integer q, and use the equality Z (G; q, y)= Z (G; q, y − 1). Potts Tutte Theorem 1.3. Let q ≥ 3 be an integer, y ∈ (−q +1, 0) be a real algebraic number, and K> 1. Then the computational prob- lems Factor-K-NormPlanarPotts(q, y) and Distance-π/3 -ArgPlanarPotts(q, y) are #P-hard, unless we are in the case (q, y)=(4, −1) when both problems can be solved exactly in poly- nomial time. Proof. Let y ∈ (−q +1, 0). The point (x, y)with x =1 + q/(y − 1) satisfies x ∈ (1 − q, 0), (x, y) =(−1, −1) and y< 0. If x ≤−1or y ≤−1, #P-hardness follows from Lemma 6.37. Otherwise, we have q ≥ 3and x, y ∈ (−1, 0), so hardness follows from Lemma 6.38.  cc Approximating the complex Potts model Page 85 of 94 2 7. Further consequences of our results In this final section, we discuss some further consequences of our techniques, as mentioned in Section 1.2. First, in Section 7.1, we explain how our results can be used to obtain hardness for the computational problems Sign-PlanarTutte(q, γ)and Factor-K-NormPlanarTutte(q, γ) (and the non-planar ver- sion of these problems) at other parameters than the ones studied in Section 6.7, building on work of Goldberg & Jerrum (2014). Secondly, in Section 7.2, we apply our results to the problem of approximating the Jones polynomial of an alternating link, which is connected to the quantum complexity class BQP as explained in (Bordewich et al. 2005). 7.1. Hardness results for real algebraic parameters in the Tutte plane. The regions studied in Lemmas 6.37 and 6.38 have been studied by Goldberg & Jerrum (2014), where they showed #P-hardness of SignPlanarTutte(q, γ) at several regions of the real algebraic plane. As we explained in Section 6.7,we obtain hardness at a point (q, γ)aslongaswecan γ-implement algebraic numbers γ and γ as in Corollary 6.36. Goldberg and Jerrum came 1 2 up with multiple implementations that achieve the conditions of Corollary 6.36. By applying their implementations, we obtain #P- hardness for Factor-K-NormTutte(q, y−1) in the same regions where they obtained #P-hardness of SignPlanarTutte(q, γ) in (Goldberg & Jerrum 2014, Theorem 1). Some of the implementations developed in (Goldberg & Jer- rum 2014) consist of planar graphs (as those used in Lemmas 6.37 and 6.38), so we can extend their results to the planar version of the problems for some of the previous regions. Theorem 7.1. Let q and γ be real algebraic numbers with q = 0, 1, 2.Let y = γ +1 and x =1 + q/(y − 1). The computational problems Sign-PlanarTutte(q, γ) and Factor-K-NormPlanarTutte(q, γ) are #P-hard when x, y are real algebraic numbers satisfying one of the following: (i) min(x, y) ≤−1, max(x, y) < 0 and (x, y) =(−1, −1), 2 Page 86 of 94 Galanis, Goldberg & Herrera-Poyatos cc (ii) |x| > 1, |y| > 1 and xy < 0, (iii) max(|x|, |y|) < 1 and q> 32/27, (iv) max(|x|, |y|) < 1, q ≤ 32/27 and x< −2y − 1, (v) max(|x|, |y|) < 1, q ≤ 32/27 and y< −2x − 1. Proof. The proof follows from the following results of Goldberg & Jerrum (2014), which show how to implement γ and γ with a 1 2 planar (actually series–parallel) graph as in Corollary 6.36 for each of the regions in the statement. Item i follows from Lemma 6.37.For Item ii,note that q< 0, so we have to implement γ ∈ (−1, 0) and γ ∈ [−2, 0]. We choose 1 2 γ = y − 1and γ as implemented in (Goldberg & Jerrum 2014, 2 1 Lemma 16). Item iii follows from Lemma 6.37.For Item iv,we implement γ ∈ (−1, 0) and γ ∈ [−2, 0]; the implementations are 1 2 as in (Goldberg & Jerrum 2014, Lemmas 14 and 15). For Item v, we implement γ ∈ (−1, 0) and γ ∈ [−2, 0]; the implementations 1 2 areasin(Goldberg & Jerrum 2014, Lemmas 13 and 15). The complexity of approximating the Tutte polynomial of a planar graph has previously been studied in (Goldberg & Jerrum 2012b)and (Kuperberg 2015). Our result on this matter (The- orem 7.1) strengthens the results of (Goldberg & Jerrum 2012b) in three directions. First, we also study the complexity of deter- mining the sign of the Tutte polynomial. Secondly, we find new regions where the approximation problem is hard. These regions are 3, 4 and 5, as well as the points in region 1 such that q ≤ 5 and q = 3. Finally, we prove #P-hardness, whereas in (Goldberg & Jerrum 2012b) hardness was obtained under the hypothesis that RP = NP. For q ∈ Z ,let P (G; q) count the number of proper q-colourings of a graph G.The chromatic polynomial of G is the only polyno- mial that agrees with P (G; q) on positive integers. It is well known that P (G; q)= Z (G; q, −1), see for instance (Sokal 2005). The Tutte value q =32/27 appearing in Theorem 7.1 is,in some sense,a phase transition for the complexity of computing the sign of P (G, q): this sign depends upon G in an essentially trivial way for q< 32/27 cc Approximating the complex Potts model Page 87 of 94 2 (Jackson 1993, Theorem 5) and its computation is #P-hard for q> 32/27, see (Goldberg & Jerrum 2014) for an in detail discus- sion of the relevance of the phase transition q =32/27. 7.2. Hardness results for the Jones polynomial. We briefly review some relevant facts about links and the Jones polynomial that relate it to the Tutte polynomial on graphs, see (Welsh 1993) for their definitions. Let V (T ) denote the Jones polynomial of a link L. By a result of Thistlethwaite, when L is an alternat- ing link with associated planar graph G(L), we have V (t)= −1 f (t)T (G(L); −t, −t ), where f (t) is an easily computable factor L L that is plus or minus a half integer power of t,and T (G; x, y)isthe Tutte polynomial of G in the (x, y)-parametrisation (Thistleth- waite 1987; Welsh 1993). Moreover, every planar graph is the graph of an alternating link (Welsh 1993, Chapter 2). Hence, we can translate our results on the complexity of approximating the Tutte polynomial of a planar graph to the complexity of approx- imating the Jones polynomial of an alternating link, and obtain #P-hardness results for approximating V (t). More formally, we consider the following problems. Name: Factor-K-NormJones(t). Instance: A link L. Output: If V (t) = 0, the algorithm may output any rational ˆ ˆ number. Otherwise, it must output N ∈ Q such that N/K ≤ |V (t)|≤ KN . Name: Distance-ρ-ArgJones(q, γ). Instance: A link L. Output: If V (t) = 0, the algorithm may output any rational number. Otherwise, it must output A ∈ Q such that, for some a ∈ arg(V (t)), we have |A − a|≤ ρ. Corollary 7.2. Let K be a real number with K> 1.Let t be an algebraic number with Re(t) > 0.Then Factor-K-NormJones(t) and Distance-π/3-ArgJones(t) are #P-hard unless t ∈ 2πi/3 4πi/3 {1, −e , −e } when both problems can be solved exactly. 2 Page 88 of 94 Galanis, Goldberg & Herrera-Poyatos cc −1 Proof. Letusconsiderthe point(x, y)=(−t, −t )inthe 2πi/3 4πi/3 Tutte plane. Note that t ∈{1, −e , −e } if andonlyif(x, y) 4πi/3 2πi/3 2πi/3 4πi/3 is one of the special points (−1,−1), (e ,e )and (e ,e ), where the Jones polynomial of a link can be exactly evaluated in polynomial time in the size of the link (Jaeger et al. 1990). Let us assume that t is not one of these three values. We have −1 q =(−t−1)(−t −1) = 2+2Re(t) > 2. When t is non-real, in view of Theorem 1.5, Factor-K-NormPlanarTutte(q, y − 1) and Distance-π/3-ArgPlanarTutte(q, y −1) are #P-hard and the result follows. When t is real, note that y< 0, x< 0and q> 2. Thus, either (x, y) is such that max{|x|, |y|} ≥ 1and (x, y) =(−1, −1), so hardness is covered in region 1 of Theo- rem 7.1,ormax{|x|, |y|} < 1, so hardness is coveredinregion3of Theorem 7.1. 2πi/5 The case t = e of Corollary 7.2 is particularly relevant due to its connection with quantum computation. This connection between approximate counting and the quantum complexity class BQP was explored by Bordewich, Freedman, Lov´ asz and Welsh in (Bordewich et al. 2005), where they posed the question of de- termining the complexity of the following problem: Name: Sign-Real-PlanarTutte(q, γ) Instance: A planar (multi)graph G. Output: Determine whether Re(Z (G; q, γ)) ≥ 0 Tutte or Re(Z (G; q, γ)) ≤ 0. Tutte The non-planar version of Sign-Real-PlanarTutte(q, γ)has been studied in (Goldberg & Guo 2017, Section 5), where it was shown that determining the sign of the real part of the Tutte poly- 2πi/5 nomial is #P-hard in certain cases that include t = e . Our results on the complexity of Sign-PlanarTutte(q, γ) allow us to adapt the argument in (Goldberg & Guo 2017) to answer the question asked in (Bordewich et al. 2005). Corollary 7.3. Consider (x, y)=(exp(−aπi/b), exp(aπi/b)), where a and b are positive integers such that 1/2 <a/b < 3/2 and a = b.Let q =(x − 1)(y − 1) and γ = y − 1.Then q ∈ (2, 4) and Sign-Real-PlanarTutte(q, γ) is #P-hard. cc Approximating the complex Potts model Page 89 of 94 2 Proof. The proof is essentially the same one as that of (Gold- berg & Guo 2017, Theorem 1.7). First, note that q =(x − 1)(y − 1) = 2 − x − y =2 − exp(−aπi/b) − exp(aπi/b)=2 − 2cos(aπ/b), which is real. Since 1/2 <a/b < 3/2and a = b,we have q ∈ (2, 4). A b-thickening allows us to (x, y)-implement (1 − q/2, −1). Since Sign-PlanarTutte(q, −2) is #P-hard (see Theorem 7.1), we conclude that Sign-Real-PlanarTutte(q, γ)is#P-hard. Corollary 7.3 includes the case where a =3 and b =5. In this case, we have x =exp(−aπi/b)= − exp(πi) exp(−3πi/5) = −1 −1 − exp(2πi/5) and y = x . That is, (x, y)=(−t, −t ) for t = exp(2πi/5), which is the point of interest in (Bordewich et al. 2005). Acknowledgements We thank Ben Green, Joel Ouaknine and Oliver Riordan for use- ful discussions on Section 6.1. We also thank Miriam Backens for useful conversations and suggestions about this work. A short preliminary version without proofs has appeared on the proceed- ings of MFCS 2020. The third author is supported by an Oxford- DeepMind Graduate Scholarship and a EPSRC Doctoral Training Partnership. Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, dis- tribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If ma- terial is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or 2 Page 90 of 94 Galanis, Goldberg & Herrera-Poyatos cc exceeds the permitted use, you will need to obtain permission di- rectly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/. Funding Open Access funding enabled and organized by Projekt DEAL Publisher’s Note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. References A. Barvinok (2017). Combinatorics and Complexity of Partition Func- tions. Algorithms and Combinatorics. Springer International Publish- ing. A. Barvinok & G. Regts (2019). Weighted counting of solutions to sparse systems of equations. Combinatorics, Probability and Computing 28(5), 696–719. I. Bena, M. Droz & A. Lipowski (2005). Statistical mechanics of equilibrium and nonequilibrium phase transitions: the Yang–Lee for- malism. International Journal of Modern Physics B 19(29), 4269–4329. ´ ´ ˇ I. Bezakova, A. Galanis, L. A. Goldberg & D. Stefankovic (2020). Inapproximability of the independent set polynomial in the complex plane. SIAM Journal on Computing 49(5), STOC18– 395–STOC18–448. ISSN 0097-5397. URL https://doi.org/10.1137/ 18M1184485. ´ ´ ˇ I. Bezakova, A. Galanis, L. A. Goldberg & D. Stefankovic (2021). The complexity of approximating the matching polynomial in the complex plane. ACM Transactions on Computation Theory 13(2), Art. 13, 37. ISSN 1942-3454. URL https://doi.org/10.1145/ M. Bordewich, M. Freedman, L. Lovasz & D. Welsh (2005). Ap- proximate counting and quantum computation. Combinatorics, Proba- bility and Computing 14(5-6), 737–754. cc Approximating the complex Potts model Page 91 of 94 2 R. J. Bradford & J. H. Davenport (1989). Effective tests for cy- clotomic polynomials. In Symbolic and algebraic computation,volume 358 of Lecture Notes in Comput. Sci., 244–251. Springer, Berlin. A. Brandstadt ¨ , V. B. Le & J. P. Spinrad (1999). Graph classes: a survey. SIAM Monographs on Discrete Mathematics and Applications. Society for Industrial and Applied Mathematics (SIAM), Philadelphia, PA. M. Brin & G. Stuck (2002). Introduction to Dynamical Systems. Cambridge University Press. J. I. Brown, C. Hickman, A. D. Sokal & D. G. Wagner (2001). On the chromatic roots of generalized theta graphs. Journal of Combi- natorial Theory. Series B 83(2), 272–297. I. Z. Emiris, B. Mourrain & E. P. Tsigaridas (2008). Real alge- braic numbers: Complexity Analysis and Experimentation. In Reliable Implementation of Real Number Algorithms: Theory and Practice,57– 82. Springer. L. A. Goldberg & H. Guo (2017). The complexity of approximat- ing complex-valued Ising and Tutte partition functions. Computational Complexity 26(4), 765–833. L. A. Goldberg & M. Jerrum (2008). Inapproximability of the Tutte polynomial. Information and Computation 206(7), 908–929. L. A. Goldberg & M. Jerrum (2012a). Approximating the partition function of the ferromagnetic Potts model. Journal of the ACM 59(5), Art. 25, 31. L. A. Goldberg & M. Jerrum (2012b). Inapproximability of the Tutte polynomial of a planar graph. Computational Complexity 21(4), 605–642. L. A. Goldberg & M. Jerrum (2014). The complexity of computing the sign of the Tutte polynomial. SIAM Journal on Computing 43(6), 1921–1952. L. A. Goldberg & M. Jerrum (2019). Approximating Pairwise Cor- relations in the Ising Model. ACM Transactions on Computation Theory 11(4), 23. 2 Page 92 of 94 Galanis, Goldberg & Herrera-Poyatos cc H. Guo, C. Liao, P. Lu & C. Zhang (2021). Zeros of Holant problems: locations and algorithms. ACM Transactions on Algorithms 17(1), Art. 4, 25. ISSN 1549-6325. URL https://doi.org/10.1145/ H. Guo, J. Liu & P. Lu (2020). Zeros of Ferromagnetic 2-Spin Sys- tems. In Proceedings of the Thirty-First Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’20, 181–192. USA. A. Harrow, S. Mehraban & M. Soleimanifar (2020). Classical algorithms, correlation decay, and complex zeros of partition functions of quantum many-body systems. In Proceedings of the 52nd Annual ACM SIGACT Symposium on Theory of Computing, 378–386. O. J. Heilmann & E. H. Lieb (1972). Theory of monomer-dimer systems. Communications in Mathematical Physics 25(3), 190–232. Bill Jackson (1993). A zero-free interval for chromatic polynomials of graphs. Combinatorics, Probability and Computing 2(3), 325–336. ISSN 0963-5483. URL https://doi.org/10.1017/S0963548300000705. F. Jaeger, D. L. Vertigan & D. J. A. Welsh (1990). On the computational complexity of the Jones and Tutte polynomials. Math- ematical Proceedings of the Cambridge Philosophical Society 108(1), 35–53. M. Jerrum & A. Sinclair (1993). Polynomial-time approximation algorithms for the Ising model. SIAM Journal on Computing 22(5), 1087–1116. R. Kannan, A. K. Lenstra & L. Lovasz ´ (1988). Polynomial factor- ization and nonrandomness of bits of algebraic and some transcendental numbers. Mathematics of Computation 50(181), 235–250. K.-I Ko (1991). Complexity theory of real functions. Progress in The- oretical Computer Science. Birkh¨ auser Boston, Inc., Boston, MA. G. Kuperberg (2015). How hard is it to approximate the Jones poly- nomial? Theory of Computing 11, 183–219. E. H. Lieb & A. D. Sokal (1981). A general Lee-Yang theorem for one-component and multicomponent ferromagnets. Communications in Mathematical Physics 80(2), 153–179. cc Approximating the complex Potts model Page 93 of 94 2 J. Liu, A. Sinclair & P. Srivastava (2019). A Deterministic Algo- rithm for Counting Colorings with 2-Delta Colors. In IEEE 60th Annual Symposium on Foundations of Computer Science (FOCS 2019), 1380– J. Liu, A. Sinclair & P. Srivastava (2019a). Fisher zeros and cor- relation decay in the Ising model. Journal of Mathematical Physics 60(10), 103 304. J. Liu, A. Sinclair & P. Srivastava (2019b). The Ising partition function: Zeros and deterministic approximation. Journal of Statistical Physics 174(2), 287–315. V. Patel & G. Regts (2017). Deterministic Polynomial-Time Ap- proximation Algorithms for Partition Functions and Graph Polynomi- als. SIAM Journal on Computing 46(6), 1893–1919. H. Peters & G. Regts (2018). Location of zeros for the partition function of the Ising model on bounded degree graphs. Journal of the London Mathematical Society . H. Peters & G. Regts (2019). On a Conjecture of Sokal Concerning Roots of the Independence Polynomial. Michigan Mathematical Journal 68(1), 33–55. R. B. Potts (1952). Some generalized order-disorder transformations. Proceedings of the Cambridge Philosophical Society 48, 106–109. J. S. Provan & M. O. Ball (1983). The complexity of counting cuts and of computing the probability that a graph is connected. SIAM Journal on Computing 12(4), 777–788. A. D. Sokal (2005). The multivariate Tutte polynomial (alias Potts model) for graphs and matroids. In Surveys in combinatorics 2005,vol- ume 327 of London Math. Soc. Lecture Note Ser., 173–226. Cambridge Univ. Press, Cambridge. E. M. Stein & R. Shakarchi (2010). Complex analysis,volume 2. Princeton University Press. I. Stewart (2004). Galois Theory. Chapman & Hall/CRC Mathemat- ics. Chapman & Hall/CRC, Boca Raton, FL, 3rd edition. 2 Page 94 of 94 Galanis, Goldberg & Herrera-Poyatos cc A. W. Strzebonski (1997). Computing in the field of complex alge- braic numbers. Journal of Symbolic Computation 24(6), 647–656. M. B. Thistlethwaite (1987). A spanning tree expansion of the Jones polynomial. Topology 26(3), 297–309. D. Vertigan (2005). The computational complexity of Tutte invariants for planar graphs. SIAM Journal on Computing 35(3), 690–712. M. Waldschmidt (2000). Diophantine approximation on linear al- gebraic groups, volume 326 of Grundlehren der Mathematischen Wissenschaften [Fundamental Principles of Mathematical Sciences]. Springer-Verlag, Berlin. Transcendence properties of the exponential function in several variables. D. J. A. Welsh (1993). Complexity: knots, colourings and counting, volume 186 of London Mathematical Society Lecture Note Series. Cam- bridge University Press, Cambridge. C.-N. Yang & T.-D. Lee (1952). Statistical theory of equations of state and phase transitions. I. Theory of condensation. Physical Review 87(3), 404. C. K. Yap (2000). Fundamental problems of algorithmic algebra. Ox- ford University Press, New York. Manuscript received 20 July 2020 Andreas Galanis Leslie Ann Goldberg andreas.galanis@cs.ox.ac.uk leslie.goldberg@cs.ox.ac.uk Andres ´ Herrera-Poyatos Department of Computer Science University of Oxford Wolfson Building, Oxford, OX1 3QD, UK andres.herrerapoyatos@balliol.ox.ac.uk

Journal

computational complexitySpringer Journals

Published: Jun 1, 2022

Keywords: Counting Complexity; Potts model; Ising model; Tutte polynomial; Approximate Counting; 68Q17 Computational difficulty of problems

There are no references for this article.