Approximating permanents and hafnians

We prove that the logarithm of the permanent of an nxn real matrix A and the logarithm of the hafnian of a 2nx2n real symmetric matrix A can be approximated within an additive error 1>epsilon>0 by a polynomial p in the entries of A of degree O(ln n - ln epsilon) provided the entries a_ij of A satisfy delta0, fixed in advance. Moreover, the polynomial p can be computed in n^{O(ln n - ln epsilon)} time. We also improve bounds for approximating ln per A, ln haf A and logarithms of multi-dimensional permanents for complex matrices and tensors A.


Main results: permanents
We discuss analytic methods of efficient approximation of permanents and hafnians of real and complex matrices as well as of their multi-dimensional versions, objects of considerable interest in connection with problems in combinatorics [27], [32], quantum physics [1], [22], [23] and computational complexity [37], [21].

Permanent
Let A = (a i j ) be an n × n real or complex matrix. The permanent of A is defined as where S n is the symmetric group of permutations of the set {1, . . . , n}. It is a #P-hard problem to compute the permanent of a given 0-1 matrix A exactly [37], although a fully polynomial randomized approximation scheme is constructed for non-negative matrices [21]. The permanent of an n × n nonnegative matrix A can be approximated within a factor of e n in deterministic polynomial time [26] and the factor was improved to 2 n in [18] (with a conjectured improvement to 2 n/2 ). If one assumes that δ ≤ a i j ≤ 1 for all i, j (1.1.1) and some 0 < δ ≤ 1 fixed in advance, then the polynomial algorithm of [26] actually results in an approximation factor of n O (1) , where the implied constant in the "O" notation depends on δ , see also [6]. Apart from that, deterministic polynomial time algorithms are known for special classes of matrices. For example, in [16], for any ε > 0, fixed in advance, a polynomial time algorithm is constructed to approximate per A within a factor of (1 + ε) n if A is the adjacency matrix of a constant degree expander. We also note that in [14] a simple randomized algorithm is shown to approximate per A within a subexponential in n factor provided (1.1.1) holds with some 0 < δ ≤ 1, fixed in advance.
In this paper, we present a quasi-polynomial deterministic algorithm, which, given an n × n matrix A = (a i j ) satisfying (1.1.1) with some 0 < δ ≤ 1, fixed in advance, and an ε > 0 approximates per A within a relative error ε in n O(ln n−ln ε) time. The implied constant in the "O" notation depends on δ .
More precisely, we prove the following result.
Theorem 1.1 For any 0 < δ ≤ 1 there exists γ = γ(δ ) > 0 such that for any positive integer n and any 0 < ε < 1 there exists a polynomial p = p n,δ ,ε in the entries a i j of an n × n matrix A such that deg p ≤ γ (ln n − ln ε) and |ln per A − p(A)| ≤ ε for all n × n real matrices A = (a i j ) satisfying δ ≤ a i j ≤ 1 for all i, j.
We show that the polynomial p can be computed in quasi-polynomial time n O(ln n−ln ε) , where the implied constant in the "O" notation depends on δ alone. Our approach continues a line of work started in [5] and continued in [4], [7] and [34]. The main idea is to relate approximability of a polynomial with its complex zeros. For a complex number z = a + ib, we denote by ℜ z = a and ℑ z = b, the real and imaginary parts of z correspondingly. In what follows, we always choose the standard branch of arcsin x, arccos x and arctan x for real x, so that We deduce Theorem 1.1 from the following result. Let Z = (z i j ) be an n × n complex matrix such that 1 − ℜ z i j ≤ η and ℑ z i j ≤ τ for all 1 ≤ i, j ≤ n.
There is an interest in computing permanents of complex matrices [1], [23], [22]. Ryser's algorithm, see for example Chapter 7 of [32], computes the permanent of an n × n matrix A over an arbitrary field exactly in O(n2 n ) time. Exact polynomial time algorithms are known for rather restricted classes of matrices, such as matrices of a fixed rank [2] or matrices for which the support of non-zero entries is a graph of a fixed tree-width [12]. In [15], a randomized polynomial time algorithm is constructed which computes the permanent of a complex matrix within a (properly defined) relative error ε > 0 in O 3 n/2 ε −2 time. In [17], a randomized algorithm is constructed which approximates per A for a complex n × n matrix A within an additive error ε A n , where A is the operator norm of A, in time polynomial in n and 1/ε, see also [1] for an exposition.
In this paper, we prove the following results.
Theorem 1.3 Let Z = (z i j ) be an n × n complex matrix such that 1 − z i j ≤ 0.5 for all 1 ≤ i, j ≤ n.
Since per Z = 0, we can choose a branch of ln per Z when the conditions of Theorem 1.3 are satisfied (for convenience, we always choose the branch for which ln per Z is real if Z is a real matrix). We deduce from Theorem 1.3 the following approximation result. Theorem 1.4 For every 0 ≤ η < 0.5 there exists a constant γ = γ(η) > 0 such that for every positive integer n and every real 0 < ε < 1 there exists a polynomial p = p n,η,ε in the entries of an n × n complex matrix A = (a i j ) such that deg p ≤ γ (ln n − ln ε) and Moreover, the polynomial p can be computed in n O(ln n−ln ε) time, where the implied constant in the "O" notation depends on η alone.
A version of Theorem 1.3 with a weaker bound of 0.195 instead of 0.5 and a more complicated proof was obtained in [5]. Theorem 1.4 is also implicit in [5]. We present its proof here since it serves as a stepping stone for the proof of Theorem 1.1.
It is not known whether the bound 0.5 in Theorems 1.3 and 1.4 can be increased, although one can show (see Section 4) that it cannot be increased to √ 2/2 ≈ 0.707. Theorems 1.3 and 1.4 state, roughly, that the permanent behaves nicely as long as the matrix is not too far in the ∞ -distance from from the matrix J of all 1s. Applied to an arbitrary n × n positive matrix A, Theorem 1.4 implies that per A can be approximated deterministically within a relative error 0 < ε < 1 in quasi-polynomial time n O(ln n−ln ε) as long as the entries of A are within some multiplicative factor γ < 3, fixed in advance, of each other.
Let A be an n×n complex matrix such that the ∞ -distance from A to the complex hypersurface of n×n matrices Z satisfying per Z = 0 is at least δ 0 > 0. It follows from our proof that for any 0 < δ < δ 0 and any 0 < ε < 1 there exists a polynomial p A in the entries of an n × n matrix such that |ln per B − p A (B)| ≤ ε for any matrix B within distance δ in the ∞ -distance from A and deg p A = O(ln n − ln ε), where the implied constant in the "O" notation depends only on δ and δ 0 . However, for a general A = J, finding the polynomial p A may be computationally hard. Theorems 1.1 and 1.2 are of a different nature: there we allow the entries a i j to be arbitrarily close to 0 but insist that the imaginary part of a i j get smaller as a i j approach 0. Theorem 1.1 implies that for a positive n × n matrix A, the value per A can be approximated deterministically within a relative error 0 < ε < 1 in quasi-polynomial time n O(ln n−ln ε) as long as the entries of A are within some multiplicative factor γ ≥ 1, arbitrarily large, but fixed in advance, of each other. It follows from our proofs that a similar to Theorem 1.1 approximation result holds for complex matrices A = (a i j ) with δ ≤ ℜ a i j ≤ 1 and ℑa i j ≤ τ 0 for some fixed τ 0 = τ 0 (δ ) > 0.
So far, we approximated permanents of real or complex matrices that are close to the matrix J of all 1s in the ∞ -distance. Next, we consider matrices that are close to J in the maximum 1 -distance over all rows and columns. Then per Z = 0.
Since per Z = 0, we can choose a branch of ln per Z when the conditions of Theorem 1.5 are satisfied. We obtain the following result. Theorem 1.6 For every 0 ≤ η < α/4, where α ≈ 0.278 is the constant in Theorem 1.5, there exists a constant γ = γ(η) > 0 such that for every positive integer n and every real 0 < ε < 1 there exists a polynomial p = p n,η,ε in the entries of an n × n matrix A = (a i j ) such that deg p ≤ γ(ln n − ln ε) and  1 − a i j ≤ ηn for j = 1, . . . , n.
Again, the polynomial p n,η,ε can be constructed in n O(ln n−ln ε) time, where the implied constant in the "O" notation depends on η only. Note that Theorem 1.6 is applicable to 0-1 matrices having not too many (not more than 7%) zeros in every row and column as well as to real matrices with some positive and some negative entries. It is not known whether the bound in Theorems 1.5 and 1.6 are optimal.
2 Main results: hafnians Some of our results immediately extend from permanents to hafnians.

Hafnian
Let A = (a i j ) be a 2n × 2n symmetric real or complex matrix. The hafnian of A is defined as where the sum is taken over (2n)!/2 n n! unordered partitions of the set {1, . . . , 2n} into n pairwise disjoint unordered pairs {i 1 , j 1 }, . . . , {i n , j n }, see for example, Section 8.2 of [32]. Just as the permanent of the biadjacency matrix of a bipartite graph enumerates the perfect matchings in the graph, the hafnian of the adjacency matrix of a graph enumerates the perfect matchings in the graph. In fact, for any n × n matrix A we have and hence computing the permanent of an n × n matrix reduces to computing the hafnian of a symmetric 2n × 2n matrix. Computationally, the hafnian appears to be a more complicated object than the permanent. No fully polynomial (randomized or deterministic) approximation scheme is known to compute the hafnian of a non-negative symmetric matrix and no deterministic polynomial time algorithm to approximate the hafnian of a 2n × 2n non-negative matrix within an exponential factor of c n for some absolute constant c > 1 is known (though there is a randomized polynomial time algorithm achieving such an approximation [3], see also [35] for cases when the algorithm approximates within a subexponential factor). On the other hand, if the entries a i j of the matrix A = (a i j ) satisfy (1.1.1) for some δ > 0, fixed in advance, there is a polynomial time algorithm approximating haf A within a factor of n O(1) , where the implied constant in the "O" notation depends on δ [6].
In this paper, we prove the following versions of Theorem 1.1 and 1.2.
Theorem 2.1 For any 0 < δ ≤ 1 there exists γ = γ(δ ) > 0 such that for any positive integer n and any 0 < ε < 1 there exists a polynomial p = p n,δ ,ε in the entries a i j of a 2n × 2n symmetric matrix A such that deg p ≤ γ(ln n − ln ε) and |ln haf A − p(A)| ≤ ε for all 2n × 2n real symmetric matrices A = (a i j ) satisfying δ ≤ a i j ≤ 1 for all i, j.
The polynomial p n,δ ,ε can be computed in n O(ln n−ln ε) time, where the implied constant in the "O" notation depends on δ alone. Consequently, we obtain a deterministic quasi-polynomial algorithm to approximate the hafnian of a positive matrix A = (a i j ) satisfying (1.1.1) within any given relative error ε > 0.
As is the case with permanents, we deduce Theorem 2.1 from a result on the complex zeros of the hafnian.
Theorem 2.2 Let us fix a real 0 ≤ η < 1 and and let Let Z = (z i j ) be an 2n × 2n symmetric complex matrix such that Then haf Z = 0.
We also obtain the following versions of Theorems 1.3 and 1.4. Then haf Z = 0.
As before, for matrices Z satisfying the condition of Theorem 2.3, we choose a branch of ln haf Z in such a way so that ln haf Z is real if Z is a real matrix. We obtain the following result.
Theorem 2.4 For any 0 ≤ η < 0.5 there exists γ = γ(η) > 0 and for any positive integer n and real 0 < ε < 1 there exists a polynomial p = p n,η,ε in the entries of 2n × 2n complex symmetric matrix A = (a i j ) such that deg p ≤ γ(ln n − ln ε) and As before, the polynomial p n,η,ε can be computed in n O(ln n−ln ε) time, where the implied constant in the "O" notation depends on η alone.
Our approach can be extended to a variety of partition functions [4], [7]. In Section 3, we show how to extend it to multi-dimensional permanents of tensors.
3 Main results: multi-dimensional permanents . . × n array (tensor) filled with n d real or complex matrices. We define the permanent of A by In particular, if d = 2 then A is an n × n matrix and PER A = per A. If d ≥ 3 it is an NP-complete problem to tell PER A from 0 if A is a tensor with 0-1 entries, since the problem reduces to finding whether a given d-partite hypergraph has a perfect matching.
We define a slice of A as the array of n d−1 entries of A with one of the indices i 1 , . . . , i d fixed to a particular value and the remaining (d − 1) indices varying arbitrarily. Hence A has altogether nd slices. If d = 2 and A is a matrix then a slice is a row or a column.
We note that for d > 2 there are several different notions of the permanent of a tensor, cf., for example, [25].
We obtain the following extension of Theorem 1.3.
Since PER Z = 0, we can choose a branch of ln PER Z when the conditions of Theorem 3.1 are satisfied (as before, we choose the branch for which ln PER Z is real if Z is a real tensor). As a corollary, we obtain the following approximation result.
Then there exists γ = γ(d, η) > 0 and for every integer n and real 0 < ε < 1 there exists a polynomial p = p d,η,ε,n in the entries of a d-dimensional n × . . . × n complex tensor A = (a i 1 . The polynomial p d,η,ε,n can be computed in n O(ln n−ln ε) time, where the implied constant in the "O" notation depends only on d and η.
While we were unable to obtain exact equivalents of Theorems 1.1 and 2.1, our approach produces the following approximation result for multi-dimensional permanents.
and for any positive integer n and real 0 < ε < 1 there is a polynomial p = p d,η,ε,n is the entries of a d-dimensional n × · · · × n tensor such that deg p ≤ γ(ln n − ln ε) and |ln Again, the polynomial p d,η,ε,n can be computed in n O(ln n−ln ε) time, where the implied constant in the "O" notation depends only on d and η. For example, for n × n × n tensors A with positive real entries, we obtain a quasi-polynomial algorithm to approximate PER A if the entries of A are within a factor γ < √ 2 + 1 ≈ 2.414 of each other. Note that Theorem 3.2 for n × n × n tensors A with positive real entries guarantees the existences of a quasi-polynomial algorithm to approximate PER A if the entries of A are within a factor of (1 + √ 6/9)/(1 − √ 6/9) ≈ 1.748 of each other. As before, the proof is based on the absence of zeros of PER A in a particular domain. Namely, we deduce Theorem 3.3 from the following result.
Finally, we obtain multi-dimensional versions of Theorems 1.5 and 1.6.
In other words, PER Z = 0 if each slice of Z is sufficiently close to the array of 1s in the 1 -distance. While for each fixed d, the allowed distance is of the order of n d−1 , it decreases exponentially with d, unlike the allowed ∞ -distance in Theorem 3.1, which decreases as 1/d.
We obtain the following corollary.
Theorem 3.6 For every integer d ≥ 2 and every 0 ≤ η < η d , where η d is the constant of Theorem 3.5, there exists a constant γ = γ(d, η) > 0 such that for any positive integer n and real 0 < ε < 1 there is a polynomial p = p d,η,ε,n in the entries of a d-dimensional n × . . . × n tensor such that deg p ≤ γ(ln n − ln ε) and Again, the polynomial p d,η,ε,n can be computed in n O(ln n−ln ε) time, where the implied constant in the "O" notation depends on d and η alone. Theorem 3.6 is applicable to 0-1 tensors A, which contain a small (and exponentially decreasing with d) fraction of 0s in each slice.

Proofs of Theorems 1.3, 2.3 and 3.1
We start with a simple geometric argument regarding angles between non-zero complex numbers. We identify C = R 2 , thus identifying complex numbers with vectors in the plane. We denote by ·, · the standard inner product in R 2 , so that a, b = ℜ ab for a, b ∈ C and by | · | the corresponding Euclidean norm (the modulus of a complex number).
Lemma 4.1 Let 0 ≤ θ < 2π/3 be real and let u 1 , . . . , u n ∈ C be non-zero complex numbers such that the angle between any two u i and u j does not exceed θ . Let 2. Let α 1 , . . . , α n and β 1 , . . . , β n be complex numbers such that Then v = 0, w = 0 and the angle between v and w does not exceed 2 arcsin η cos(θ /2) .
Proof. Part (1) and its proof is due to Boris Bukh [10]. If 0 is in the convex hull of u 1 , . . . , u n then, by the Carathéodory Theorem, we conclude that 0 is in the convex hull of some three vectors u i , u j and u k and hence the angle between some two vectors u i and u j is at least 2π/3, which is a contradiction. Therefore, 0 is not in the convex hull of u 1 , . . . , u n and hence the vectors u 1 , . . . , u n lie in a cone K ⊂ C of measure at most θ with vertex at 0. Let us consider the orthogonal projection of each vector u j onto the bisector of K. Then the length of the projection of u j is at least |u j | cos(θ /2) and hence the length of the orthogonal projection of u onto the bisector of K is at least Since the length of u is at least as large as the length of its orthogonal projection, the proof of Part (1) follows.
To prove Part (2), we note that From Part (1), we conclude that |v − u| < |u|. Therefore, v = (v − u) + u = 0 and the angle between v and u does not exceed Similarly, w = (w − u) + u = 0 and the angle between w and u does not exceed Therefore, the angle between v and w does not exceed 2 arcsin η cos(θ /2) and the proof of Part (2) follows.

Proof of Theorem 1.3
For a positive integer n, let U n be the set of n × n complex matrices Z = (z i j ) such that We prove by induction on n the following statement: For any Z ∈ U n we have per Z = 0 and, moreover, if A, B ∈ U n are two matrices that differ in one row (or in one column) only then the angle between non-zero complex numbers per A and per B does not exceed π/2.
The statement obviously holds for n = 1. Assuming that the statement holds for matrices in U n−1 with n ≥ 2, let us consider two matrices A, B ∈ U n that differ in one row or in one column only. Since the permanent of a matrix does not change when the rows or columns of the matrix are permuted or when the matrix is transposed, without loss of generality we assume that B is obtained from A by replacing the entries a 1 j of the first row by complex numbers b 1 j for j = 1, . . . , n. Let A j be the (n − 1) × (n − 1) matrix obtained from A by crossing out the first row and the j-th column. Then We observe that A j ∈ U n−1 for j = 1, . . . , n and, moreover, any two matrices A j 1 and A j 2 after a suitable permutation of columns differ in one column only. Hence by the induction hypothesis, we have per A j = 0 for j = 1, . . . , n and the angle between any two non-zero complex numbers per A j 1 and per A j 2 does not exceed π/2. Applying Part (2) of Lemma 4.1 with we conclude that per A = 0, per B = 0 and the angle between non-zero complex numbers per A and per B does not exceed 2 arcsin 0.5 cos(π/4) = 2 arcsin which concludes the induction step. One can observe that η = 0.5 is the largest value of η for which the equation has a solution θ < 2π/3 and hence the induction in Section 4.1 can proceed. It is not known whether the constant 0.5 in Theorem 1.3 can be increased. Since where A is a matrix as above, m is odd and J m is an m × m matrix filled with 1s.
The proof is very similar to that of Section 4.1. For a positive integer n, we define U n as the set of 2n × 2n symmetric complex matrices Z = (z i j ) satisfying (4.1.1) and prove by induction on n that for any Z ∈ U n we have haf Z = 0 and if A, B ∈ U n are two matrices that differ only in the k-th row and in the k-th column for some unique k then the angle between non-zero complex numbers haf A and haf B does not exceed π/2. The statement obviously holds for n = 1. Suppose that n > 1. Since the hafnian of the matrix does not change under a simultaneous permutation of rows and columns, without loss of generality we may assume that A and B differ in the first row and first column only. Instead of the Laplace expansion (4.1.2), we use the recurrence where A j is the (2n − 2) × (2n − 2) matrix obtained from A by crossing out the first row and the first column and the j-th row and the j-th column. We observe that, up to a simultaneous permutation of rows and columns, any two matrices A j 1 and A j 2 differ only in the k-th row and k-th column for some k and the induction proceeds as in Section 4.1.

Proof of Theorem 3.1
By and large, the proof proceeds as in Section 4.1. For a positive integer n, we define U n as the set of n × . . . × n complex arrays Z = (z i 1 ...i d ) such that We prove by induction on n the following statement: For any Z ∈ U n we have PER Z = 0 and, moreover, if A, B ∈ U n are two tensors that differ in one slice only, then the angle between non-zero complex numbers PER A and PER B does not exceed θ . As in Section 4, we start with a simple geometric lemma.
Lemma 5.1 Let u 1 , . . . , u n ∈ C be non-zero complex numbers such that the angle between any two u i and u j does not exceed π/2. Let v = n ∑ j=1 α j u j and w = n ∑ j=1 β j u j for some complex numbers α 1 , . . . , α n and β 1 , . . . , β n .
Proof. Since u i , u j ≥ 0 for all i, j, in Part (1) we obtain and the proof of Part (1) follows.
It follows that v = 0, w = 0 and that the angle between v and w is arccos v, w |v||w| .

We have
so that |v||w| ≤ |u| 2 + |x| 2 with the equality attained when |v| 2 = |w| 2 = |u| 2 + |x| 2 and x is orthogonal to u. Hence for given |u| and |x| the largest angle of arccos |u| 2 − |x| 2 |u| 2 + |x| 2 between v and w is attained when x is orthogonal to u and is equal to 2 arctan |x| |u| ≤ 2 arctan η, which completes the proof of Part (2).
By Part (2), v = 0, w = 0 and the angle between v and w does not exceed θ = 2 arctan η. Since Since 0 ≤ τ < 1 − η, we have v = v + iv = 0, w = w + iw = 0 and the angle between v and v and the angle between w and w do not exceed Therefore the angle between v and w does not exceed θ + 2ω and the proof of Part (3) follows.

Proof of Theorem 1.2
For a positive integer n, let U n be the set of n × n complex matrices Z = (z i j ) such that 1 − ℜ z i j ≤ η and ℑ z i j ≤ τ for all i, j. We prove by induction on n the following statement: For any Z ∈ U n we have per Z = 0 and, moreover, if A, B ∈ U n are two matrices that differ in one row (or in one column) only, then the angle between non-zero complex numbers per A and per B does not exceed π/2.
Since τ < 1 − η, the statement holds for n = 1. Assuming that the statement holds for matrices in U n−1 with n ≥ 2, let us consider two matrices A, B ∈ U n that differ in one row or in one column only. As in Section 4.1, without loss of generality we assume that B is obtained from A by replacing the entries a 1 j of the first row by complex numbers b 1 j for j = 1, . . . , n. Let A j be the (n − 1) × (n − 1) matrix obtained from A by crossing out the first row and the j-th column. We observe that A j ∈ U n−1 for j = 1, . . . , n and, moreover, any two matrices A j 1 and A j 2 after a suitable permutation of columns differ in one column only. Hence by the induction hypothesis, we have per A j = 0 for j = 1, . . . , n and the angle between any two non-zero complex numbers per A j 1 and per A j 2 does not exceed π/2. Using the Laplace expansion (4.1.2) and applying Part (3) of Lemma 5.1 with u j = per A j , α j = a 1 j and β j = b 1 j for j = 1, . . . , n, we conclude that per A = 0, per B = 0 and that the angle between non-zero complex numbers per A and per B does not exceed 2 arctan η + 2 arcsin which completes the induction.

Proof of Theorem 2.2
The proof is very similar to that of Section 5.1. For a positive integer n, we define U n as the set of 2n × 2n symmetric complex matrices Z = (z i j ) satisfying (5.1.1) and prove by induction on n that for any Z ∈ U n we have haf Z = 0 and if A, B ∈ U n are two matrices that differ only in the k-th row and in the k-th column for some unique k then the angle between non-zero complex numbers haf A and haf B does not exceed π/2. Since τ < 1 − η, the statement holds for n = 1. Suppose that n > 1. As in Section 4.2, without loss of generality we assume that A and B differ in the first row and column only. Let A j be the (2n − 2) × (2n − 2) matrix obtained from A by crossing out the first row and the first column and the j-th row and the j-th column. As in Section 4.2, we observe that, up to a simultaneous permutation of rows and columns (which does not change the hafnian), any two matrices A j 1 and A j 2 differ only in the k-th row and k-th column for some k. Using the expansion (4.2.1), we complete the induction as in Section 5.1.

Proof of Theorem 3.4
By and large, the proof proceeds as in Section 5.1. For a positive integer n, we define U n as the set of n × . . . × n complex arrays Z = (z i 1 ...i d ) such that |1 − ℜ z i 1 ...i d | ≤ η and |ℑ z i 1 ...i d | ≤ τ for all 1 ≤ i 1 , . . . , i d ≤ n. We prove by induction on n the following statement: For any Z ∈ U n we have PER Z = 0 and, moreover, if A, B ∈ U n are two tensors that differ in one slice only, then the angle between non-zero complex numbers PER A and PER B does not exceed π 2(d−1) .
Since τ < 1 − η, the statement holds for n = 1. Assuming that n ≥ 2, let us consider two tensors A, B ∈ U n that differ in one slice only. As in Section 4.3, we assume that B is obtained from A by replacing the top slice numbers a 1i 2 ...i d with numbers b 1i 2 ...i d and define the (n − 1) × . . . × (n − 1) tensor A i 2 ...i d as the tensor obtained from A by crossing out the d slices obtained by fixing the first index to 1, the second index to i 2 , . . ., the last index to i d . As in Section 4.3, any two tensors A i 2 ...i d and A i 2 ...i d differ in at most d − 1 slices, and hence by the induction hypothesis we have PER A i 2 ...i d = 0, PER A i 2 ...i d = 0 and the angle between the two non-zero complex numbers does not exceed π/2. Using the d-dimensional version which completes the induction.
6 Proofs of Theorems 1.5 and 3.5 Since Theorem 1.5 is a particular case of Theorem 3.5 for d = 2, we prove the latter theorem. We use a combinatorial interpretation of the multi-dimensional permanent in terms of matchings in a hypergraph.

The matching polynomial of a hypergraph
Let us fix an integer d ≥ 2. Let V be a finite set and let E ⊂ V d be a family of d-subsets of V . The pair H = (V, E) is called a d-hypergraph with set V of vertices and set E of edges. An unordered set e 1 , . . . , e k of pairwise disjoint edges of H is called a matching (we agree that the empty set of edges is a matching). Given a map w : E −→ C that assigns complex weights w(e) to the edges e ∈ E of H, we define the weight of a matching e 1 , . . . , e k as the the product w(e 1 ) · · · w(e k ) of weights of the edges of the matching. We agree that the weight of the empty matching is 1. We define the matching polynomial as the sum of weights of all matchings (including the empty one) in H: P H (w) = ∑ e 1 ,...,e k is a matching w(e 1 ) · · · w(e k ).
Proof. For a set S ⊂ V of vertices, we denote by H − S the hypergraph with set V \ S of vertices and set E ⊂ E of edges that do not contain vertices from S. Abusing notation, we denote the restriction of weights w : E −→ C onto E also by w. We prove by induction on the number |V | of vertices that P H (w) = 0 and, moreover, for every vertex v ∈ V we have By the induction hypothesis, each ratio in the right hand side of (6.1.4) does not exceed d/(d − 1) in the absolute value, and hence P H−e (w) Therefore, from (6.1.3) we obtain The bound of Lemma 6.1 and to some extent its proof agrees with those of [20] for the roots of the matching polynomial of a graph.
Next, we need a weaker version on an estimate from [38]. Then p n (z) = 0 provided |z| ≤ αn.

Proof of Theorem 3.5
Let H be the complete d-partite hypergraph with set V of nd vertices, split into d parts and vertices in each part numbered 1 through n. Each edge of H consist of exactly one vertex from each part and we let the weight of edge (i 1 , . . . , i d ) equal to w i 1 ...i d = z i 1 ...i d − 1. For k = 1, . . . , n, let W k be the total weight of all matchings in H consisting of exactly k edges. We write Let us define a univariate polynomial Then f (z) is the value of the matching polynomial P H on the scaled weights zw i 1 ...i d and from Lemma 6.1 we conclude that f (z) = 0 provided |z| ≤ 1 (αn) d−1 . (6.2.1) Let p n be the polynomial of Lemma 6.2. Applying Lemma 6.2 and Theorem 6.1 to the Schur product h = f * p n * · · · * p n of f and d − 1 polynomials p n , we conclude from (6.2.1) that In particular, h(1) = 0 and hence PER Z = 0. We need the following simple result first obtained in [5]. For completeness, we give its proof here.
Lemma 7.1 Let g : C −→ C be a polynomial and let β > 1 be real such that g(z) = 0 for all |z| ≤ β . Let us choose a branch of f (z) = ln g(z) for |z| ≤ β and let be the Taylor polynomial of f (z) of degree m computed at z = 0. Then Proof. Without loss of generality, we assume that n = deg g > 0. Let z 1 , . . . , z n ∈ C be the roots of g, each root is listed with its multiplicity. Hence we can write Using the Taylor series expansion for the logarithm, we obtain the proof follows. It follows from Lemma 7.1 that as long as the roots of a polynomial g(z) stay at distance at least β away from 0 for some fixed β > 1, then to approximate ln g(1) within an additive error ε, we can use the Taylor polynomial of f (z) = ln g(z) at z = 0 of degree m = O(ln deg g − ln ε), where the implied constant in the "O" notation depends on β only.
Note that computing f (k) (0) from g (k) (0) is akin to computing cumulants of a distribution from its moments.
Let J = J n be the n × n matrix filled with 1s and let A = (a i j ) be an n × n complex matrix satisfying the conditions of the theorem. We define a univariate polynomial so that deg g ≤ n, g(0) = per J = n! and g(1) = per A.
Moreover, by Theorem 1.3 we have Let us choose the branch of f (z) = ln g(z) for |z| ≤ β so that f (0) is real and let be the Taylor polynomial of degree m computed at z = 0. It follows from Lemma 7.1 that for some constant γ = γ(η) > 0 and integer m ≤ γ(ln n − ln ε) we have It remains to show that T m (1) is a polynomial p in the entries a i j of the matrix A of degree at most m. In view of Section 7.1 and the fact that g(0) = n!, it suffices to check that g (k) (0) is a polynomial in the entries a i j of the matrix A of degree at most k which can be computed in n O(k) time, where the implied constant in the "O" notation is absolute. We have where the last sum is taken over all ordered sets (i 1 , . . . , i k ) of distinct numbers between 1 and n. By symmetry, we can further write where the last sum is taken over all (n!/(n − k)!) 2 ≤ n 2k pairs of ordered sets (i 1 , . . . , i k ) and ( j 1 , . . . , j k ) of distinct numbers between 1 and n.
It follows that the polynomial p of Theorem 1.4 can be computed in time n O(ln n−ln ε) , where the implied constant in the "O" notation depends on η alone.
The proof is very similar to that of Section 7.2. Let J = J 2n be the 2n × 2n matrix filled with 1s and let A = (a i j ) be a 2n × 2n symmetric complex matrix satisfying the conditions of theorem. We define a univariate polynomial g(z) = haf J + z(A − J) for z ∈ C, so that deg g ≤ n, Moreover, by Theorem 2.3, we have We write where the sum is taken over all (2n)!/2 n n! unordered partitions of the set {1, 2, . . . , 2n} into n pairwise disjoint unordered pairs {i 1 , j 1 }, . . . , {i n , j n }. Hence for k > 0 we have where the sum is taken over all unordered collections {i 1 , j 1 }, . . . , {i k , j k } of pairwise disjoint unordered pairs. The proof then proceeds as in Section 7.2. It follows that the polynomial p of Theorem 2.4 can be computed in time n O(ln n−ln ε) , where the implied constant in the "O" notation depends on η alone.

Proof of Theorem 3.2
Let J = J n,d be the d-dimensional n × . . . × n tensor filled with 1s and let A be the tensor satisfying the conditions of the theorem. We introduce a univariate polynomial Moreover, by Theorem 3.1, We write and for k > 0, where the last sum is taken over all ordered k-tuples (i 1 , . . . , i k ) of distinct indices 1 ≤ i j ≤ n. By symmetry we can write where the last sum is taken over all (n!/(n − k)!) d ≤ n kd collections of d ordered k-tuples i 1 j , . . . , i k j for j = 1, . . . , d of distinct indices 1 ≤ i 1 j , . . . , i k j ≤ n. The proof then proceeds as in Section 7.2. The polynomial p can be computed in n O(ln n−ln ε) time, where the implied constant in the "O" notation depends on η and d only.
7.5 Proof of Theorems 1.6 and 3.6 As Theorem 1.6 is a particular case of Theorem 3.6, we prove the latter theorem only. As in Section 7.4, we define the univariate polynomial (7.4.1). By Theorem 3.5, we have and the proof follows as in Section 7.4.
8 Proofs of Theorems 1.1, 2.1 and 3.3 Lemma 7.1 allows us to approximate the value of ln g(1) by a low degree Taylor polynomial of ln g(z) at z = 0 provided the polynomial g(z) does not have zeros in a disc of radius β > 1 centered at z = 0. In view of Theorems 1.2, 2.2 and 3.4, we would like to construct a similar approximation under a weaker assumption that g(z) = 0 for z in some neighborhood of the interval [0, 1] in the complex plane. To achieve that, we first construct a polynomial φ such that φ (0) = 0, φ (1) = 1 and such that φ maps the disc |z| ≤ β for some β > 1 inside the neighborhood. We then apply Lemma 7.1 to the composition g(φ (z)). The following lemma provides an explicit construction of such a polynomial φ .
Let us define f (z) = ln g(z) for |z| ≤ β , where we chose the branch of the logarithm such that f (0) = ln n! is real. Let T m (z) be the Taylor polynomial of f (z) of degree m computed at z = 0. By Lemma 7.1, we have for some m ≤ γ(ln n − ln ε) where γ = γ(δ ) > 0 is a constant depending on δ alone. It remains to show that T m (1) is a polynomial in the entries of A of degree not exceeding m. For a univariate polynomial p(z), let p [m] be the polynomial obtained from p by discarding all monomials of degree higher than m. Since φ (0) = 0, the constant term of of φ is 0 and therefore In words: to compute the polynomial g [m] obtained from g by discarding the monomials of degree higher than m, it suffices to compute the polynomials r [m] and φ [m] obtained from r and φ respectively by discarding the monomials of degree higher than m, and then discard the monomials of degree higher than m in the composition r [m] (φ [m] ). From Section 7.2, it follows that r (k) (0) is a polynomial of degree k in the entries of the matrix A. It follows then that g (k) (0) is a polynomial in the entries of A of degree at most k that can be computed in n O(k) time (the implied constant in the "O" notation is absolute). From Section 7.1 it follows then that f (k) (0) is a polynomial in the entries of A of degree at most k, which completes the proof.

Proof of Theorem 2.1
Given a 2n × 2n real symmetric matrix A satisfying the conditions of the theorem, we define the univariate polynomial r(z) by r(z) = haf J + z(A − J) , where J = J 2n is the 2n × 2n matrix filled with 1s and the proof then proceeds as in Section 8.1, only that the reference to Theorem 1.2 is replaced by the reference to Theorem 2.2 and the reference to Section 7.2 is replaced by the reference to Section 7.3.

Approximation of general polynomials
Lemmas 7.1 and 8.1 suggest the following general way of approximating combinatorially interesting polynomials. Suppose that p(z) is a univariate polynomial such that deg p ≤ n. Suppose further we want to approximate p(1) whereas p(0) is easily computable and the derivatives p (k) (0) can be computed in n O(k) time. We can approximate p(1) within a relative error ε > 0 in quasi-polynomial time n O(ln n−ln ε) provided we can find a "sleeve" S ⊂ C in the complex plane such that 0 ∈ S, 1 ∈ S and p(z) = 0 for all z ∈ S. The sleeve S should be wide enough, meaning that it contains a number N, fixed in advance, of discs D 1 , . . . , D N of equal radii such that D i contains the center of D i−1 for i = 2, . . . , N with D 1 centered at 0 and D N centered at 1. An example of such a sleeve is provided by the strip −δ ≤ ℜ z ≤ 1 + δ and |ℑ z| ≤ τ for some δ > 0 and τ > 0, fixed in advance for the polynomial r(z) = per (J + z(A − J)) of Section 8.1.
As another example, we consider the independence polynomial of graph. Let G = (V, E) be a graph (undirected, without loops or multiple edges) with set V of vertices and set E of edges. A set S ⊂ V is called independent if no two vertices in S span an edge of G (the empty set S = / 0 is considered independent). The independence polynomial of G is defined as (the number of independent k-sets in V ) z k .
Then p G (1) is the number of all independent sets in G, a quantity of considerable combinatorial interest. On the other hand, the value of the derivative p Suppose we know that p G (z) = 0 provided |z| ≤ β for some β > 0 (for example, β can be the Dobrushin bound, see [36] and [13]). Lemma 7.1 then implies that for any 0 ≤ λ < 1, fixed in advance, the value of p G (z) can be approximated within a relative error 0 < ε < 1 in quasi-polynomial time |V | O(ln |V |−ln ε) provided |z| ≤ λ β , see [34] for many examples of this nature and also [39] and [19] for algorithms based on the "correlation decay" idea.
If, additionally, the zeros of p G (z) are known to be confined to a particular region of the complex plane C, we can hope to do better by constructing a sleeve S ⊂ C where p G (z) is not zero and interpolating p G (z) there. In an extreme case, when G is claw-free, the roots of p G (z) are known to be negative real [11], which leads to a quasi-polynomial algorithm for approximating p G (z) provided |π − arg z| > λ −1 (so that z stays away from the negative real axis) and |z| ≤ λ β where λ > 0 is arbitrarily large, fixed in advance, see also [8] for an algorithm based on the correlation decay approach.
On the other hand, for a general graph G there cannot be such a sleeve S unless NP-complete problems admit a quasi-polynomial time algorithm. Indeed, generally, it is an NP-hard problem to approximate p G (z) for a real z > λ β , where λ > 0 is some absolute constant and β is the Dobrushin lower bound on the absolute value of the roots of p G (z) [28]. This means that for a general graph G one can expect the complex roots of p G (z) to "surround" the origin, so that there is no possibility to squeeze a sleeve between them to connect 0 and 1.
Since the first version of this paper appeared as a preprint, this general direction was pursued further in [33].

Approximating multi-dimensional permanents better
It would be interesting to extend the class of polynomials for which a version of Theorems 1.1 and 2.1 can be obtained. While we failed to obtain such a version for the multi-dimensional permanent (see Section 3), there does not seem to be a computational complexity obstacle for such an extension to exist. In [6] it is shown that the d-dimensional permanent of a n × . . . × n tensor with positive entries between an arbitrarily small δ > 0, fixed in advance, and 1 can be approximated within an n O(1) factor in polynomial time, where the implicit constant in the "O" notation depends only on d and δ , which can be viewed as an indirect evidence that Theorem 1.1 can indeed be extended to multi-dimensional permanents.