# Computing permanents of complex diagonally dominant matrices and tensors

We prove that for any λ > 1, fixed in advance, the permanent of an n × n complex matrix, where the absolute value of each diagonal entry is at least λ times bigger than the sum of the absolute values of all other entries in the same row, can be approximated within any relative error 0 < ϵ < 1 in quasi-polynomial n^O( n - ϵ) time. We extend this result to multidimensional permanents of tensors and discuss its application to weighted counting of perfect matchings in hypergraphs.

08/03/2020

### The Largest Entry in the Inverse of a Vandermonde Matrix

We investigate the size of the largest entry (in absolute value) in the ...
06/13/2018

### Stability and complexity of mixed discriminants

We show that the mixed discriminant of n positive semidefinite n × n rea...
04/21/2021

### On the rank of Z_2-matrices with free entries on the diagonal

For an n × n matrix M with entries in ℤ_2 denote by R(M) the minimal ran...
10/12/2020

### On lattice point counting in Δ-modular polyhedra

Let a polyhedron P be defined by one of the following ways: (i) P = {x...
05/22/2020

### More on zeros and approximation of the Ising partition function

We consider the problem of computing ∑_x e^f(x), where f(x)=∑_ij a_ijξ_i...
04/12/2021

### ST-SVD Factorization and s-Diagonal Tensors

A third order real tensor is mapped to a special f-diagonal tensor by go...
09/07/2019

### Perfect Matchings, Rank of Connection Tensors and Graph Homomorphisms

We develop a theory of graph algebras over general fields. This is model...

## 1. Introduction and main results

In this paper, we continue the line of research started in [Ba16a] and continued, in particular, in [Ba17], [PR17a], [Ba16b], [PR17b], [L+17], [BR17] and [EM17], on constructing efficient algorithms for computing (approximating) combinatorially defined quantities (partition functions) by exploiting the information on their complex zeros. A typical application of the method consists of a) proving that the function in question does not have zeros in some interesting domain in

and

b) constructing a low-degree polynomial approximation for the logarithm of the function in a slightly smaller domain. Usually, part a) is where the main work is done: since there is no general method to establish that a multivariate polynomial (typically having many monomials) is non-zero in a domain in , some quite clever arguments are being sought and found, cf. [PR17b], [EM17], see also Section 2.5 of [Ba16b] for the very few general results in this respect. Once part a) is accomplished, part b) produces a quasi-polynomial approximation algorithm in a quite straightforward way, see Section 2.2 of [Ba16b]. However, if one wants to improve the complexity from quasi-polynomial to genuine polynomial time, a considerable effort can be required, see [PR17a] and [L+17].

In this paper, we contribute a new method to accomplish part a) and demonstrate it by producing a quasi-polynomial algorithm to approximate permanents of complex matrices and tensors from a reasonably wide and interesting class (the hard work of sharpening our algorithms to genuine polynomial time under further restrictions on the matrices and tensors is done in [PR17a], see also [BR17]). While computing permanents of complex matrices is of interest to quantum computations and boson sampling, see [EM17], our main contribution is to the computation of multi-dimensional permanents of (complex) tensors, which results in an efficient algorithm to count perfect matchings, weighted by their Hamming distance to one given perfect matching, in an arbitrary hypergraph. In general, the algorithm is quasi-polynomial, it becomes genuinely polynomial on hypergraphs with degrees of the vertices bounded in advance. We discuss this in Section 1.7. We hope that the method of this paper will find other applications, in particular to count solutions, weighted by their Hamming distance to one given solution, of other NP-complete problems.

We start with a popular example of the permanent of a square matrix.

### (1.1) Permanents

Let be complex matrix and let

 perA=∑σ∈Snn∏i=1aiσ(i)

be its permanent. Here is the symmetric group of all permutations of the set . First, we prove the following result.

###### (1.2) Theorem

Let be complex matrix such that

 n∑j=1|aij| < 1fori=1,…,n.

Then

 per(I+A)≠0,

where is the identity matrix.

In [Br59], Brenner obtains a family of inequalities satisfied by (determinantal) minors of a diagonally dominant matrix, mentions as a corollary (Corollary 5 from [Br59]), that the determinant of such a matrix is necessarily non-zero, and concludes the paper with the following sentence: “The referee remarked that since the permanent of matrix can be expanded by minors, corresponding theorems holds for permanents.” The permanental version of Corollary 5 of [Br59] is equivalent to our Theorem 1.2.

In this paper, we provide a different proof of Theorem 1.2, which easily extends to multi-dimensional permanents of tensors (Theorem 1.5 below) and, more, generally, can be useful for establishing a zero-free region for an arbitrary multi-affine polynomial.

We also note that is Hermitian then , being a diagonally dominant matrix, is necessarily positive definite and hence is positive real [MN62].

Let be a matrix satisfying the conditions of Theorem 1.2. Then we can choose a continuous branch of the function . Applying the methods developed in [Ba16b] and [Ba17], we obtain the following result.

###### (1.3) Theorem

Let us fix a real . Then for any positive integer and for any there exists a polynomial in the entries of an complex matrix such that and

 |lnper(I+A)−p(A)| ≤ ϵ

provided is a complex matrix such that

 n∑j=1∣∣aij∣∣ < λfori=1,…,n.

Moreover, given and , the polynomial can be computed in (the implied constant in the “” notation depends only on ).

We note that the value of for a matrix satisfying the conditions of Theorem 1.3 can vary in an exponentially wide range in , even when is required to have zero diagonal: choosing to be block-diagonal with blocks

 (0ab0),

we can make as large as and as small as .

If is a strongly diagonally dominant complex matrix such that

 λ|bii| ≥ ∑j: j≠i|bij|fori=1,…,n

then

 perB=(n∏i=1bii)perC,

where is obtained from by a row scaling

 cij=b−1iibijfor alli,j.

We have , where satisfies the conditions of Theorem 1.3. Hence our algorithm can be applied to approximate the permanents of complex strongly diagonally dominant matrices.

If the matrix in Theorem 1.3 is Hermitian, then , being diagonally dominant, is positive definite. A polynomial time algorithm approximating permanents of positive semidefinite matrices within a simply exponential factor of (with ) is constructed in [A+17]. Other interesting classes of complex matrices where efficient permanent approximation algorithms are known are some random matrices [EM17] and matrices not very far from the matrix filled with 1s [Ba17]. Famously, there is a randomized polynomial time algorithm to approximate if is non-negative real [J+04]. The best known deterministic polynomial time algorithm approximates the permanent of an non-negative real matrix within an exponential factor of and is conjectured to approximate it within a factor of [GS14].

### (1.4) Multidimensional permanents

For , let be a cubical array (tensor) of complex numbers (so that for we obtain an square matrix). We define the permanent of by

 PERA=∑σ2,…,σd∈Snn∏i=1aiσ2(i)…σd(i).

Clearly, our definition agrees with that of Section 1.1 for the permanent of a matrix. Just as the permanent of a matrix counts perfect matchings in the underlying weighted bipartite graph, the permanent of a tensor counts perfect matchings in the underlying weighted -partite hypergraph, see, for example, Section 4.4 of [Ba16b].

We define the diagonal of a tensor as the set of entries . We prove the following extension of Theorem 1.2.

###### (1.5) Theorem

Let be a -dimensional complex tensor with such that

 ∑1≤i2,…,id≤n∣∣aii2…id∣∣ < 1fori=1,…,n.

Then

 PER(I+A)≠0,

where is the -dimensional tensor with diagonal entries equal to 1 and all other entries equal to 0.

Similarly to Theorem 1.3, we deduce from Theorem 1.5 the following result:

###### (1.6) Theorem

Let us fix a positive integer and a real . Then for any positive integer and any there exists a polynomial in the entries of a -dimensional tensor such that and

 |lnPER(I+A)−p(A)| ≤ ϵ

for any -dimensional tensor such that

 ∑1≤i2,…,id≤n∣∣aii2…id∣∣ < λfori=1,…,n.

Moreover, given , , and , the polynomial can be computed in time (so that the implied constant in the “” notation depends only on and ).

### (1.7) Weighted counting of perfect matchings in hypergraphs

We describe an application of Theorem 1.6 to weighted counting of perfect matchings in hypergraphs, cf. [BR17]. Let be a -partite hypergraph with set of vertices equally split among pairwise disjoint parts such that . The set of edges of consists of some -subsets of containing exactly one vertex from each part . We number the vertices in each part by and encode by a -dimensional tensor , where

 ai1…id={1if\ {i1,…,id}∈E,0otherwise.

A perfect matching in is a collection of edges containing each vertex exactly once. As is known, for it is an NP-complete problem to determine whether a given -partite hypergraph contains a perfect matching. Suppose, however, that we are given one perfect matching in . Without loss of generality we assume that consists of the edges , . For a perfect matching in , let be the number of edges in which and differ (the Hamming distance between and ). Let us choose a . It is not hard to see that

 PER(I+λ2(A−I))=∑Mλdist(M,M0),

where the sum is taken over all perfect matchings in . Let us assume now that each vertex of the part is contained in at most edges of . It follows from Theorem 1.6 that (1.7.1) can be efficiently approximated for any , fixed in advance, provided

 λ<√1Δ−1.

This is an improvement compared to [BR17] where we could only afford and also required the degree of every vertex of not to exceed . As is discussed in [BR17], see also [PR17a], for any , fixed in advance, we obtain a polynomial time algorithm approximating (1.7.1).

Generally, knowing one solution in an NP-complete problem does not help one to find out if there are other solutions. Our result shows that some statistics over the set of all solutions can still be computed efficiently.

We prove Theorems 1.2 and 1.5 in Section 2 and deduce Theorems 1.3 and 1.6 from them in Section 3.

## 2. Proofs of Theorems 1.2 and 1.5

###### (2.1) Lemma

Let us fix . Then for any there exist such that

 n∑k=1αkzk=n∑k=1αkz∗k,n∑k=1∣∣z∗k∣∣ ≤ n∑k=1|zk|

and for at most one .

###### Demonstration Proof

Without loss of generality, we assume that for . Given , let us define

 K={(x1,…,xn)∈Cn:n∑k=1αkxk=n∑k=1αkzkandn∑k=1|xk| ≤ n∑k=1|zk|}.

Then is a non-empty compact set and the continuous function

 (x1,…,xn)⟼n∑k=1|xk|

attains its minimum on at some point, say . We claim that all non-zero complex numbers among are positive real multiples of each other.

Suppose that, say and are not positive real multiples of each other and let . Hence . Let

 y′1=v|α1y1|α1(|α1y1|+|α2y2|)andy′2=v|α2y2|α2(|α1y1|+|α2y2|).

Then

 α1y′1+α2y′2=v=α1y1+α2y2

and

 |y′1|+|y′2|=|v||y1||α1y1|+|α2y2|+|v||y2||α1y1|+|α2y2| < |y1|+|y2|.

Hence defining for , we obtain a point with

 n∑k=1∣∣y′k∣∣ < n∑k=1|yk|,

This proves that there is a point where all non-zero complex numbers are positive real multiples of each other, so that

 the ratiosαkyk|αkyk|whenαkyk≠0are all equal.

Next, we successively reduce the number of non-zero coordinates among , while keeping all non-zero numbers positive real multiples of each other.

Suppose that there are two non-zero coordinates, say and . Without loss of generality, we assume that . Now, we let:

 y′1=0andy′2=y2+|α1||y1||α2||y2|y2.

Then

 |y′1|+|y′2|=|y′2|=|y2|+|α1||y1||α2| ≤ |y1|+|y2|.

Moreover,

 α1y′1+α2y′2=α2y2+α2|α1||y1||α2||y2|y2=α2y2+α2y2|α2y2||α1y1|=α2y2+α1y1|α1y1||α1y1|=α2y2+α1y1.

Hence letting for we obtain a point with fewer non-zero coordinates. Moreover, all non-zero numbers

remain positive real multiples of each other. Repeating this process, we obtain the desired vector

. ∎

Now we are ready to prove Theorem 1.2.

### (2.2) Proof of Theorem 1.2

First, we observe that without loss of generality, we may assume that has zero diagonal. Indeed, let be an complex matrix with sums of the absolute values of entries in each row less than 1. Then the diagonal entry in the -th row of the matrix is with absolute value , while the sum of the absolute values of the off-diagonal entries in the -th row of is less than . Consequently, dividing the -row of by for , we obtain the matrix where satisfies the conditions of the theorem and, additionally, has zero diagonal. Moreover,

 per(I+A)=(n∏i=1(1+aii))per(I+A′).

Thus we assume that has zero diagonal.

Let be the set of complex matrices with zero diagonal and sums of absolute values of entries in every row less than 1. We claim for every there exists such that and has at most one non-zero entry in every row. Given , we construct the matrix step by step by modifying row by row in steps. Let be the matrix obtained from by crossing the -th row and the -th column. We have

 per(I+A)=perA11+n∑j=2a1jperA1j.

Applying Lemma 2.1, we find for such that ,

 n∑j=2b1jperA1j=n∑j=2a1jperA1j,n∑j=2∣∣b1j∣∣ < 1

and at most one of the numbers is non-zero. At the first step, we define by replacing by for and note that .

At the end of the -st step, we have a matrix such that and each of the first rows of contains at most one non-zero entry. If , we write

 per(I+B)=perBkk+∑j: j≠kakjperBkj,

where is the matrix obtained from by crossing out the -th row and -th column. Applying Lemma 2.1, we find for such that ,

 ∑j: j≠kbkjperBkj=∑j: j≠kakjperBkj,∑j: j≠k∣∣bkj∣∣ < 1

and at most one of the numbers is non-zero. We modify by replacing with for . We have .

At the end of the -th step, we obtain a matrix containing at most one non-zero entry in each row and such that .

We now have to prove that . Since every row of contains at most one non-zero entry, the total number of non-zero entries in is at most . Therefore, if there is a column of containing more than one non-zero entry, there is a column, say the -th, filled by zeros only. Then , where is the matrix obtained from by crossing out the -th row and column. Hence without loss of generality, we may assume that every row and every column of contains exactly one non-zero entry. Let us consider the bipartite graph on vertices where the -th vertex on one side is connected by an edge to the -th vertex on the other side if and only if the -th entry of is not zero. Then the graph is a disjoint union of some even cycles . Hence

 per(I+B)=m∏k=1⎛⎜ ⎜ ⎜⎝1+∏{i,j}∈Cki≠jbij⎞⎟ ⎟ ⎟⎠

where are the non-zero entries of corresponding to the edges in . Since , we have . ∎

Before we prove Theorem 1.5, we introduce a convenient definition.

### (2.3) Slice expansion of the permanent of a tensor

Let be a -dimensional tensor. Let us fix and . We define the -th slice of as the set of entries with . In particular, if , so is a matrix, the -th slice of is the -th row if and the -th column if . Theorem 1.5 asserts that , if is a complex tensor with sums of the absolute values of the entries in the -th slice less than 1 for .

For a given entry , let be the -dimensional tensor obtained from by crossing out the slices containing . Then, for any and any , we have the -slice expansion of the permanent: