{\huge Modulating the Permanent}

When does it become hard to compute?

\vspace{.2in}

Thomas Muir coined the term ``permanent'' as a noun in his treatise on determinants in 1882. He took it from Augustin Cauchy's distinction in 1815 between symmetric functions that alternate when rows of a matrix are interchanged versus ones that ``stay permanent.'' To emphasize that all terms of the permanent have positive sign, he modified the contemporary notation $latex {\left| A \right|}&fg=000000$ for the determinant of a matrix $latex {A}&fg=000000$ into

$latex \displaystyle \overset{+}{|} A \overset{+}{|} &fg=000000$

for the permanent. Perhaps we should be glad that this notation did not become permanent.

Today Ken and I wish to highlight some interesting results on computing the permanent modulo some integer value.

Recall the permanent of a square matrix $latex {A}&fg=000000$ is the function defined as follows by summing over all permutations of $latex {\{1,\dots,n\}}&fg=000000$, that is, over all members of the symmetric group $latex {S_n}&fg=000000$:

$latex \displaystyle \mathrm{perm}(A)=\sum_{\sigma\in S_n}\prod_{i=1}^n a_{i,\sigma(i)}. &fg=000000$

It looks simpler than the determinant formula,

$latex \displaystyle \det(A) = \sum_{\sigma \in S_n} \mathrm{sgn}(\sigma) \prod_{i=1}^n a_{i,\sigma_i}, &fg=000000$

but soon acquired a reputation as being `strangely unfriendly' compared to the determinant. We owe to Les Valiant the brilliant explanation that computing the permanent exactly, even restricted to matrices with all entries 0 or 1, is likely to be very hard.

Muir is known for rigorizing a lemma by Arthur Cayley involving another matrix polynomial that at first looks hard to compute but turns out to be easy. The Pffafian of a $latex {2n \times 2n}&fg=000000$ matrix $latex {A}&fg=000000$ is defined by

$latex \displaystyle \mathrm{pf}(A)= \frac{1}{2^n n!}\sum_{\sigma\in S_{2n}} \mathrm{sgn}(\sigma) \prod_{i=1}^n a_{\sigma(2i-1),\sigma(2i)}. &fg=000000$

This vanishes unless $latex {A}&fg=000000$ is skew-symmetric, meaning $latex {A^T = -A}&fg=000000$, whereupon Muir following Cayley proved the relation

$latex \displaystyle \mathrm{pf}^2(A) = \det(A). &fg=000000$

The Pfaffian, and its use in the FKT algorithm for counting matchings in planar graphs, figures large in Valiant's 2006 discovery that some generally-hard computations become easy modulo certain primes. All this is background to our query about which matrices might have easy permanent computations modulo which primes.

Permanent Computations

Herbert Ryser found an inclusion-exclusion method to compute the permanent in $latex {O(2^{n}n)}&fg=000000$ operations:

$latex \displaystyle \mathrm{perm} (A) = (-1)^n \sum_{S\subseteq\{1,\dots,n\}} (-1)^{|S|} \prod_{i=1}^n \sum_{j\in S} a_{ij} &fg=000000$

This was found in 1963 and still stands as the best exact method. Note it is exponential but is still better than the naive method which would sum $latex {n!}&fg=000000$ terms. David Glynn recently found a different formula giving the same order of performance.

Mark Jerrum, Alistair Sinclair, and Eric Vigoda found an approximation method for non-negative matrices that runs in probabilistic polynomial time. This award-winning result is based on delicate analysis of certain random walks. It fails for a matrix with even one negative term, since they show that such matrices can have permanents that are NP-hard to approximate.

Modulo 2, of course, the determinant and permanent of integer matrices are the same. It seems to be less well known that the permanent is easy modulo any power of 2. Modulo $latex {2^k}&fg=000000$, the known time is $latex {O(n^{4k-3})}&fg=000000$, and this too was proved in Valiant's famous paper. However, subsequent to that paper, computing the permanent modulo any other integer was shown to be NP-hard under randomized reductions.

But wait. There are some special cases modulo $latex {3}&fg=000000$ that we would like to point out that actually are easy to compute---that take only polynomial time.

Permanent Modulo 3

Grigory Kogan wrote a paper in FOCS 1996 that addresses this issue. It is titled ``Computing Permanents over Fields of Characteristic 3: Where and Why It Becomes Difficult.'' His main positive result was the following:

Theorem 1 Let $latex {F}&fg=000000$ be a field of characteristic $latex {3}&fg=000000$. Let $latex {U}&fg=000000$ be a $latex {n \times n}&fg=000000$ matrix over $latex {F}&fg=000000$ such that $latex {UU^{T}=I_{n}}&fg=000000$. Then $latex {\mathrm{perm}(U)}&fg=000000$ can be computed in time $latex {O(n^{4})}&fg=000000$.

Further, he gave a slightly worse polynomial time for computing $latex {\mathrm{perm}(U)}&fg=000000$ when $latex {UU^{T} - I_{n}}&fg=000000$ is a matrix of rank one. When $latex {UU^{T} - I_{n}}&fg=000000$ has rank two, however, computing the permanent mod 3 remains randomly hard for NP, indeed complete for $latex {\mathsf{Mod3P}}&fg=000000$.

The details in the full version involve using mod 3 to regard certain matrices as skew-symmetric and hence work with their Pfaffians. The proof also uses extension fields in which $latex {\sqrt{2} = \sqrt{-1}}&fg=000000$ exists, and the theorem holds over any such field.

We wonder what similar tricks might be available modulo other primes. One advantage of working modulo $latex {p}&fg=000000$ is that the permanent becomes randomly self-reducible with no loss in numerical accuracy.

Possible Ideas

Let's look at using this idea to answer questions about the permanent of the famous Hadamard matrices. As we have remarked before, the original ones of order $latex {n = 2^k}&fg=000000$ were previously defined by Joseph Sylvester:

$latex \displaystyle H_1 = \begin{bmatrix} 1 \end{bmatrix}, &fg=000000$

$latex \displaystyle H_2 = \begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}, &fg=000000$

$latex \displaystyle H_{2^k} = \begin{bmatrix} H_{2^{k-1}} & H_{2^{k-1}}\\ H_{2^{k-1}} & -H_{2^{k-1}}\end{bmatrix}. &fg=000000$

Jacques Hadamard gave the functional equation for any matrix bearing his name,

$latex \displaystyle HH^T = nI, &fg=000000$

which for $latex {n \geq 4}&fg=000000$ is known to require $latex {n}&fg=000000$ to be a multiple of $latex {4}&fg=000000$. Put $latex {n = 2^k m}&fg=000000$ with $latex {m}&fg=000000$ odd and $latex {k \geq 2}&fg=000000$. Whether such matrices exist is known when $latex {m^2 < 2^k}&fg=000000$, when $latex {n - 1}&fg=000000$ is a prime power, or when $latex {k=2}&fg=000000$ and $latex {2m - 1}&fg=000000$ is a prime power. The case $latex {n = 668 = 4\cdot 167}&fg=000000$ avoids these since $latex {667 = 23\cdot 29}&fg=000000$ and $latex {333 = 9 \cdot 37}&fg=000000$, and remains unknown.

If $latex {n \equiv 1 \bmod{3}}&fg=000000$ then $latex {H}&fg=000000$ satisfies Kogan's theorem. If $latex {n \equiv 2}&fg=000000$ then it appears we can still leverage the proof by working with $latex {U = \sqrt{-1} H}&fg=000000$ instead. However---and this is by way of caution---if $latex {n}&fg=000000$ is a multiple of 3 then every $latex {H}&fg=000000$ is nilpotent mod 3, and it follows that $latex {\mathrm{perm}(A) \equiv 0 \bmod{3}}&fg=000000$. Nevertheless, all this means that we can compute the permanent of any Hadamard-type matrix modulo $latex {3}&fg=000000$ in polynomial time.

A further open question is whether there exists a Hadamard matrix $latex {H}&fg=000000$ with $latex {\mathrm{perm}(H) = 0}&fg=000000$. This is open even for Sylvester's matrices. This is known to need $latex {n \geq 32}&fg=000000$. Of course, to vanish, it must vanish mod 3. We wonder how far gaining knowledge about behavior modulo 3 and other primes might help with these problems.

Some of these papers treat related questions for other matrices of entries $latex {\pm 1}&fg=000000$, perhaps with some $latex {0}&fg=000000$'s and/or a normalizing constant factor. Greater reasons for interest in questions about permanents has come recently from boson sampling, for which we also recommend these online notes scribed by Ernesto Galv\~{a}o of lectures given by Scott Aaronson in Rio de Janeiro a year ago. A main issue is whether the randomized equivalence of worst and average case for permanents mod $latex {p}&fg=000000$ can be carried over to the kinds of real-or-complex matrices that arise.

Open Problems

Can we do better? Can we compute the permanent for a larger class of orthogonal matrices?