♯P-completeness of 01-permanent

Last updated

The #P-completeness of 01-permanent, sometimes known as Valiant's theorem, [1] is a mathematical proof about the permanent of matrices, considered a seminal result in computational complexity theory. [2] [3] In a 1979 scholarly paper, Leslie Valiant proved that the computational problem of computing the permanent of a matrix is #P-hard, even if the matrix is restricted to have entries that are all 0 or 1. [4] In this restricted case, computing the permanent is even #P-complete, because it corresponds to the #P problem of counting the number of permutation matrices one can get by changing ones into zeroes.

Contents

Valiant's 1979 paper also introduced #P as a complexity class. [5]

Valiant's definition of completeness, and his proof of completeness of 01-permanent, both used polynomial-time Turing reductions. In this kind of reduction, a single hard instance of some other problem in #P is reduced to computing the permanent of a sequence of multiple graphs, each of which could potentially depend on the results of previous permanent computations. A later simplification by Ben-Dor & Halevi (1993) showed that it is possible to use a weaker notion of reduction, a polynomial-time counting reduction, that translates the other problem into a single instance of the permanent problem.

Significance

One reason for interest in the computational complexity of the permanent is that it provides an example of a problem where constructing a single solution can be done efficiently but where counting all solutions is hard. [6] As Papadimitriou writes in his book Computational Complexity:

The most impressive and interesting #P-complete problems are those for which the corresponding search problem can be solved in polynomial time. The PERMANENT problem for 0–1 matrices, which is equivalent to the problem of counting perfect matchings in a bipartite graph [...] is the classic example here. [1]

Specifically, computing the permanent (shown to be difficult by Valiant's results) is closely connected with finding a perfect matching in a bipartite graph, which is solvable in polynomial time by the Hopcroft–Karp algorithm. [7] [8] For a bipartite graph with 2n vertices partitioned into two parts with n vertices each, the number of perfect matchings equals the permanent of its biadjacency matrix and the square of the number of perfect matchings is equal to the permanent of its adjacency matrix. [9] Since any 0–1 matrix is the biadjacency matrix of some bipartite graph, Valiant's theorem implies [9] that the problem of counting the number of perfect matchings in a bipartite graph is #P-complete, and in conjunction with Toda's theorem this implies that it is hard for the entire polynomial hierarchy. [10] [11]

The computational complexity of the permanent also has some significance in other aspects of complexity theory: it is not known whether NC equals P (informally, whether every polynomially-solvable problem can be solved by a polylogarithmic-time parallel algorithm) and Ketan Mulmuley has suggested an approach to resolving this question that relies on writing the permanent as the determinant of a matrix. [12]

Hartmann [13] proved a generalization of Valiant's theorem concerning the complexity of computing immanants of matrices that generalize both the determinant and the permanent.

Ben-Dor and Halevi's proof

Below, the proof that computing the permanent of a 01-matrix is #P-complete is described. It mainly follows the proof by Ben-Dor & Halevi (1993). [14]

Overview

Any square matrix can be viewed as the adjacency matrix of a directed graph, with representing the weight of the edge from vertex to vertex . Then, the permanent of is equal to the sum of the weights of all cycle-covers of the graph; this is a graph-theoretic interpretation of the permanent.

#SAT, a function problem related to the Boolean satisfiability problem, is the problem of counting the number of satisfying assignments of a given Boolean formula. It is a #P-complete problem (by definition), as any NP machine can be encoded into a Boolean formula by a process similar to that in Cook's theorem, such that the number of satisfying assignments of the Boolean formula is equal to the number of accepting paths of the NP machine. Any formula in SAT can be rewritten as a formula in 3-CNF form preserving the number of satisfying assignments, and so #SAT and #3SAT are equivalent and #3SAT is #P-complete as well.

In order to prove that 01-Permanent is #P-hard, it is therefore sufficient to show that the number of satisfying assignments for a 3-CNF formula can be expressed succinctly as a function of the permanent of a matrix that contains only the values 0 and 1. This is usually accomplished in two steps:

  1. Given a 3-CNF formula , construct a directed integer-weighted graph , such that the sum of the weights of cycle covers of (or equivalently, the permanent of its adjacency matrix) is equal to the number of satisfying assignments of . This establishes that Permanent is #P-hard.
  2. Through a series of reductions, reduce Permanent to 01-Permanent, the problem of computing the permanent of a matrix all entries 0 or 1. This establishes that 01-permanent is #P-hard as well.

Constructing the integer graph

Given a 3CNF-formula with clauses and variables, one can construct a weighted, directed graph such that

  1. each satisfying assignment for will have a corresponding set of cycle covers in where the sum of the weights of cycle covers in this set will be  ; and
  2. all other cycle covers in will have weights summing to 0.

Thus if is the number of satisfying assignments for , the permanent of this graph will be . (Valiant's original proof constructs a graph with entries in whose permanent is where is "twice the number of occurrences of literals in " – .)

The graph construction makes use of a component that is treated as a "black box." To keep the explanation simple, the properties of this component are given without actually defining the structure of the component.

To specify , one first constructs a variable node in for each of the variables in . Additionally, for each of the clauses in , one constructs a clause component in that functions as a sort of "black box." All that needs to be noted about is that it has three input edges and three output edges. The input edges come either from variable nodes or from previous clause components (e.g., for some ) and the output edges go either to variable nodes or to later clause components (e.g., for some ). The first input and output edges correspond with the first variable of the clause , and so on. Thus far, all of the nodes that will appear in the graph have been specified.

Next, one would consider the edges. For each variable of , one makes a true cycle (T-cycle) and a false cycle (F-cycle) in . To create the T-cycle, one starts at the variable node for and draw an edge to the clause component that corresponds to the first clause in which appears. If is the first variable in the clause of corresponding to , this edge will be the first input edge of , and so on. Thence, draw an edge to the next clause component corresponding to the next clause of in which appears, connecting it from the appropriate output edge of to the appropriate input edge of the next clause component, and so on. After the last clause in which appears, we connect the appropriate output edge of the corresponding clause component back to 's variable node. Of course, this completes the cycle. To create the F-cycle, one would follow the same procedure, but connect 's variable node to those clause components in which ~ appears, and finally back to 's variable node. All of these edges outside the clause components are termed external edges, all of which have weight 1. Inside the clause components, the edges are termed internal edges. Every external edge is part of a T-cycle or an F-cycle (but not both—that would force inconsistency).

Note that the graph is of size linear in , so the construction can be done in polytime (assuming that the clause components do not cause trouble).

Notable properties of the graph

A useful property of is that its cycle covers correspond to variable assignments for . For a cycle cover of , one can say that induces an assignment of values for the variables in just in case contains all of the external edges in 's T-cycle and none of the external edges in 's F-cycle for all variables that the assignment makes true, and vice versa for all variables that the assignment makes false. Although any given cycle cover need not induce an assignment for , any one that does induces exactly one assignment, and the same assignment induced depends only on the external edges of . The term is considered an incomplete cycle cover at this stage, because one talks only about its external edges, . In the section below, one considers -completions to show that one has a set of cycle covers corresponding to each that have the necessary properties.

The sort of covers that do not induce assignments are the ones with cycles that "jump" inside the clause components. That is, if for every , at least one of 's input edges is in , and every output edge of the clause components is in when the corresponding input edge is in , then is proper with respect to each clause component, and will produce a satisfying assignment for . This is because proper covers contain either the complete T-cycle or the complete F-cycle of every variable in as well as each including edges going into and coming out of each clause component. Thus, these covers assign either true or false (but never both) to each and ensure that each clause is satisfied. Further, the sets of cycle covers corresponding to all such have weight , and any other has weight . The reasons for this depend on the construction of the clause components, and are outlined below.

The clause component

To understand the relevant properties of the clause components , one needs the notion of an M-completion. A cycle cover induces a satisfying assignment just in case its external edges satisfy certain properties. For any cycle cover of , consider only its external edges, the subset . Let be a set of external edges. A set of internal edges is an -completion just in case is a cycle cover of . Further, denote the set of all -completions by and the set of all resulting cycle covers of by .

Recall that construction of was such that each external edge had weight 1, so the weight of , the cycle covers resulting from any , depends only on the internal edges involved. We add here the premise that the construction of the clause components is such that the sum over possible -completions of the weight of the internal edges in each clause component, where is proper relative to the clause component, is 12. Otherwise the weight of the internal edges is 0. Since there are clause components, and the selection of sets of internal edges, , within each clause component is independent of the selection of sets of internal edges in other clause components, so one can multiply everything to get the weight of . So, the weight of each , where induces a satisfying assignment, is . Further, where does not induce a satisfying assignment, is not proper with respect to some , so the product of the weights of internal edges in will be .

The clause component is a weighted, directed graph with 7 nodes with edges weighted and nodes arranged to yield the properties specified above, and is given in Appendix A of Ben-Dor and Halevi (1993). Note that the internal edges here have weights drawn from the set ; not all edges have 0–1 weights.

Finally, since the sum of weights of all the sets of cycle covers inducing any particular satisfying assignment is , and the sum of weights of all other sets of cycle covers is 0, one has . The following section reduces computing to the permanent of a 01 matrix.

01-Matrix

The above section has shown that Permanent is #P-hard. Through a series of reductions, any permanent can be reduced to the permanent of a matrix with entries only 0 or 1. This will prove that 01-Permanent is #P-hard as well.

Reduction to a non-negative matrix

Using modular arithmetic, convert an integer matrix into an equivalent non-negative matrix so that the permanent of can be computed easily from the permanent of , as follows:

Let be an integer matrix where no entry has a magnitude larger than .

  • Compute . The choice of is due to the fact that
  • Compute
  • Compute
  • If then Perm(A) = P. Otherwise

The transformation of into is polynomial in and , since the number of bits required to represent is polynomial in and

An example of the transformation and why it works is given below.

Here, , , and , so . Thus

Note how the elements are non-negative because of the modular arithmetic. It is simple to compute the permanent

so . Then , so

Reduction to powers of 2

Figure 1: Construction of 2Power from NonNeg Permanent-Nonneg2Powers.png
Figure 1: Construction of 2Power from NonNeg

Note that any number can be decomposed into a sum of powers of 2. For example,

This fact is used to convert a non-negative matrix into an equivalent matrix whose entries are all powers of 2. The reduction can be expressed in terms of graphs equivalent to the matrices.

Let be a -node weighted directed graph with non-negative weights, where largest weight is . Every edge with weight is converted into an equivalent edge with weights in powers of 2 as follows:

,

This can be seen graphically in the Figure 1. The subgraph that replaces the existing edge contains nodes and edges.

To prove that this produces an equivalent graph that has the same permanent as the original, one must show the correspondence between the cycle covers of and .

Consider some cycle-cover in .

  • If an edge is not in , then to cover all the nodes in the new sub graph, one must use the self-loops. Since all self-loops have a weight of 1, the weight of cycle-covers in and match.
  • If is in , then in all the corresponding cycle-covers in , there must be a path from to , where and are the nodes of edge . From the construction, one can see that there are different paths and sum of all these paths equal to the weight of the edge in the original graph . So the weight of corresponding cycle-covers in and match.

Note that the size of is polynomial in and .

Reduction to 0–1

Figure 2: Construction of a 01-matrix from 2Power Permanent-2powers01.png
Figure 2: Construction of a 01-matrix from 2Power

The objective here is to reduce a matrix whose entries are powers of 2 into an equivalent matrix containing only zeros and ones (i.e. a directed graph where each edge has a weight of 1).

Let be a -node directed graph where all the weights on edges are powers of two. Construct a graph, , where the weight of each edge is 1 and . The size of this new graph, , is polynomial in and where the maximal weight of any edge in graph is .

This reduction is done locally at each edge in that has a weight larger than 1. Let be an edge in with a weight . It is replaced by a subgraph that is made up of nodes and edges as seen in Figure 2. Each edge in has a weight of 1. Thus, the resulting graph contains only edges with a weight of 1.

Consider some cycle-cover in .

  • If an original edge from graph is not in , one cannot create a path through the new subgraph . The only way to form a cycle cover over in such a case is for each node in the subgraph to take its self-loop. As each edge has a weight of one, the weight of the resulting cycle cover is equal to that of the original cycle cover.
  • However, if the edge in is a part of the cycle cover then in any cycle cover of there must be a path from to in the subgraph. At each step down the subgraph there are two choices one can make to form such a path. One must make this choice times, resulting in possible paths from to . Thus, there are possible cycle covers and since each path has a weight of 1, the sum of the weights of all these cycle covers equals the weight of the original cycle cover.

Aaronson's proof

In 2011, quantum computer scientist Scott Aaronson proved that the permanent is #P-hard using quantum methods. [15]

Related Research Articles

<span class="mw-page-title-main">Graph theory</span> Area of discrete mathematics

In mathematics, graph theory is the study of graphs, which are mathematical structures used to model pairwise relations between objects. A graph in this context is made up of vertices which are connected by edges. A distinction is made between undirected graphs, where edges link two vertices symmetrically, and directed graphs, where edges link two vertices asymmetrically. Graphs are one of the principal objects of study in discrete mathematics.

<span class="mw-page-title-main">Minimum spanning tree</span> Least-weight tree connecting graph vertices

A minimum spanning tree (MST) or minimum weight spanning tree is a subset of the edges of a connected, edge-weighted undirected graph that connects all the vertices together, without any cycles and with the minimum possible total edge weight. That is, it is a spanning tree whose sum of edge weights is as small as possible. More generally, any edge-weighted undirected graph has a minimum spanning forest, which is a union of the minimum spanning trees for its connected components.

<span class="mw-page-title-main">Assignment problem</span> Combinatorial optimization problem

The assignment problem is a fundamental combinatorial optimization problem. In its most general form, the problem is as follows:

In linear algebra, the permanent of a square matrix is a function of the matrix similar to the determinant. The permanent, as well as the determinant, is a polynomial in the entries of the matrix. Both are special cases of a more general function of a matrix called the immanant.

<span class="mw-page-title-main">Hypergraph</span> Generalization of graph theory

In mathematics, a hypergraph is a generalization of a graph in which an edge can join any number of vertices. In contrast, in an ordinary graph, an edge connects exactly two vertices.

<span class="mw-page-title-main">Graph (discrete mathematics)</span> Vertices connected in pairs by edges

In discrete mathematics, particularly in graph theory, a graph is a structure consisting of a set of objects where some pairs of the objects are in some sense "related". The objects are represented by abstractions called vertices and each of the related pairs of vertices is called an edge. Typically, a graph is depicted in diagrammatic form as a set of dots or circles for the vertices, joined by lines or curves for the edges.

In graph theory, the resistance distance between two vertices of a simple, connected graph, G, is equal to the resistance between two equivalent points on an electrical network, constructed so as to correspond to G, with each edge being replaced by a resistance of one ohm. It is a metric on graphs.

In computer science, a topological sort or topological ordering of a directed graph is a linear ordering of its vertices such that for every directed edge (u,v) from vertex u to vertex v, u comes before v in the ordering. For instance, the vertices of the graph may represent tasks to be performed, and the edges may represent constraints that one task must be performed before another; in this application, a topological ordering is just a valid sequence for the tasks. Precisely, a topological sort is a graph traversal in which each node v is visited only after all its dependencies are visited. A topological ordering is possible if and only if the graph has no directed cycles, that is, if it is a directed acyclic graph (DAG). Any DAG has at least one topological ordering, and algorithms are known for constructing a topological ordering of any DAG in linear time. Topological sorting has many applications, especially in ranking problems such as feedback arc set. Topological sorting is possible even when the DAG has disconnected components.

<span class="mw-page-title-main">Markov random field</span> Set of random variables

In the domain of physics and probability, a Markov random field (MRF), Markov network or undirected graphical model is a set of random variables having a Markov property described by an undirected graph. In other words, a random field is said to be a Markov random field if it satisfies Markov properties. The concept originates from the Sherrington–Kirkpatrick model.

In mathematics, the discrete Laplace operator is an analog of the continuous Laplace operator, defined so that it has meaning on a graph or a discrete grid. For the case of a finite-dimensional graph, the discrete Laplace operator is more commonly called the Laplacian matrix.

The Pólya enumeration theorem, also known as the Redfield–Pólya theorem and Pólya counting, is a theorem in combinatorics that both follows from and ultimately generalizes Burnside's lemma on the number of orbits of a group action on a set. The theorem was first published by J. Howard Redfield in 1927. In 1937 it was independently rediscovered by George Pólya, who then greatly popularized the result by applying it to many counting problems, in particular to the enumeration of chemical compounds.

In graph theory, a nowhere-zero flow or NZ flow is a network flow that is nowhere zero. It is intimately connected to coloring planar graphs.

<span class="mw-page-title-main">Conductance (graph theory)</span> A mixing property of Markov chains and graphs

In theoretical computer science, graph theory, and mathematics, the conductance is a parameter of a Markov chain that is closely tied to its mixing time, that is, how rapidly the chain converges to its stationary distribution, should it exist. Equivalently, the conductance can be viewed as a parameter of a directed graph, in which case it can be used to analyze how quickly random walks in the graph converge.

The image segmentation problem is concerned with partitioning an image into multiple regions according to some homogeneity criterion. This article is primarily concerned with graph theoretic approaches to image segmentation applying graph partitioning via minimum cut or maximum cut. Segmentation-based object categorization can be viewed as a specific case of spectral clustering applied to image segmentation.

In mathematics, the Butcher group, named after the New Zealand mathematician John C. Butcher by Hairer & Wanner (1974), is an infinite-dimensional Lie group first introduced in numerical analysis to study solutions of non-linear ordinary differential equations by the Runge–Kutta method. It arose from an algebraic formalism involving rooted trees that provides formal power series solutions of the differential equation modeling the flow of a vector field. It was Cayley (1857), prompted by the work of Sylvester on change of variables in differential calculus, who first noted that the derivatives of a composition of functions can be conveniently expressed in terms of rooted trees and their combinatorics.

<span class="mw-page-title-main">Reeb graph</span>

A Reeb graph is a mathematical object reflecting the evolution of the level sets of a real-valued function on a manifold. According to a similar concept was introduced by G.M. Adelson-Velskii and A.S. Kronrod and applied to analysis of Hilbert's thirteenth problem. Proposed by G. Reeb as a tool in Morse theory, Reeb graphs are the natural tool to study multivalued functional relationships between 2D scalar fields , , and arising from the conditions and , because these relationships are single-valued when restricted to a region associated with an individual edge of the Reeb graph. This general principle was first used to study neutral surfaces in oceanography.

Congestion games (CG) are a class of games in game theory. They represent situations which commonly occur in roads, communication networks, oligopoly markets and natural habitats. There is a set of resources ; there are several players who need resources ; each player chooses a subset of these resources ; the delay in each resource is determined by the number of players choosing a subset that contains this resource. The cost of each player is the sum of delays among all resources he chooses. Naturally, each player wants to minimize his own delay; however, each player's choices impose a negative externality on the other players, which may lead to inefficient outcomes.

In graph theory, the graph bandwidth problem is to label the n vertices vi of a graph G with distinct integers so that the quantity is minimized . The problem may be visualized as placing the vertices of a graph at distinct integer points along the x-axis so that the length of the longest edge is minimized. Such placement is called linear graph arrangement, linear graph layout or linear graph placement.

In machine learning, automatic basis function construction is the mathematical method of looking for a set of task-independent basis functions that map the state space to a lower-dimensional embedding, while still representing the value function accurately. Automatic basis construction is independent of prior knowledge of the domain, which allows it to perform well where expert-constructed basis functions are difficult or impossible to create.

A graph neural network (GNN) belongs to a class of artificial neural networks for processing data that can be represented as graphs.

References

  1. 1 2 Christos H. Papadimitriou. Computational Complexity. Addison-Wesley, 1994. ISBN   0-201-53082-1. Page 443
  2. Allen Kent, James G. Williams, Rosalind Kent and Carolyn M. Hall (editors). Encyclopedia of microcomputers. Marcel Dekker, 1999. ISBN   978-0-8247-2722-2; p. 34
  3. Jin-Yi Cai, A. Pavan and D. Sivakumar, On the Hardness of Permanent. In: STACS, '99: 16th Annual Symposium on Theoretical Aspects of Computer Science, Trier, Germany, March 4–6, 1999 Proceedings. pp. 90–99. Springer-Verlag, New York, LLC Pub. Date: October 2007. ISBN   978-3-540-65691-3; p. 90.
  4. Leslie G. Valiant (1979). "The Complexity of Computing the Permanent". Theoretical Computer Science. 8 (2). Elsevier: 189–201. doi:10.1016/0304-3975(79)90044-6.
  5. Lance Fortnow. My Favorite Ten Complexity Theorems of the Past Decade. Foundations of Software Technology and Theoretical Computer Science: Proceedings of the 14th Conference, Madras, India, December 15–17, 1994. P. S. Thiagarajan (editor), pp. 256–275, Springer-Verlag, New York, 2007. ISBN   978-3-540-58715-6; p. 265
  6. Bürgisser, Peter (2000). Completeness and reduction in algebraic complexity theory. Algorithms and Computation in Mathematics. Vol. 7. Berlin: Springer-Verlag. p. 2. ISBN   978-3-540-66752-0. Zbl   0948.68082.
  7. John E. Hopcroft, Richard M. Karp: An Algorithm for Maximum Matchings in Bipartite Graphs. SIAM J. Comput. 2(4), 225–231 (1973)
  8. Cormen, Thomas H.; Leiserson, Charles E.; Rivest, Ronald L.; Stein, Clifford (2001) [1990]. "26.5: The relabel-to-front algorithm". Introduction to Algorithms (2nd ed.). MIT Press and McGraw-Hill. pp. 696–697. ISBN   0-262-03293-7.
  9. 1 2 Dexter Kozen. The Design and Analysis of Algorithms. Springer-Verlag, New York, 1991. ISBN   978-0-387-97687-7; pp. 141–142
  10. Seinosuke Toda. PP is as Hard as the Polynomial-Time Hierarchy. SIAM Journal on Computing, Volume 20 (1991), Issue 5, pp. 865877.
  11. "1998 Gödel Prize. Seinosuke Toda". Archived from the original on 2014-01-08. Retrieved 2016-07-06.
  12. Ketan Mulmuley. Lower Bounds in a Parallel Model without Bit Operations. SIAM Journal on Computing, Volume 28 (1999), Issue 4, pp. 14601509.
  13. W. Hartmann. On the complexity of immanants. Linear and Multilinear Algebra 18 (1985), no. 2, pp. 127–140.
  14. Ben-Dor, Amir; Halevi, Shai (1993). "Zero-one permanent is #P-complete, a simpler proof". Proceedings of the 2nd Israel Symposium on the Theory and Computing Systems (PDF). pp. 108–117.
  15. S. Aaronson, A Linear-Optical Proof that the Permanent is #P-Hard