Permanents and perfect matchings of bounded degree by tensor contraction #
For each d, one machine computes the permanent of an n × n 0/1 matrix with at most d
nonzero entries in each row and each column
(ContractionMatching.exists_permanentCounter), and one machine computes the number of perfect
matchings of a graph on n vertices of maximum degree d
(ContractionMatching.exists_perfectMatchingCounter). Both run, on every input, in time
2 ^ (A (n + 1) / √⌊log₂ (n + 2)⌋) times a polynomial in the encoding length, and in polynomial
space, with constants depending only on d. The inputs are standard encodings: a matrix is a list
of rows (encList encBits, read by Cslib.Complexity.boolTableMatrix), and a graph is a vertex and
edge list (Cslib.Complexity.encGraph, read as Cslib.Complexity.Graph.induced).
Both problems are Holant problems: one Boolean variable per edge of a graph, and one exactly-one
constraint per vertex on its incident edges. A polynomial-time reduction builds this instance:
Cslib.Logic.PL.CSP.permanentInstance for matrices, and
Cslib.Complexity.Graph.perfectMatchingInstance for graphs, whose certificate
Cslib.Complexity.Graph.computableInPolyTime_perfectMatchingInstance sits beside the graph API.
In the instance every variable occurs twice, and every scope has at most d variables. Its
exactly-one partition function is the permanent
(Cslib.Logic.PL.CSP.partitionFunction_permanentInstance) or the number of perfect matchings
(Cslib.Complexity.Graph.partitionFunction_perfectMatchingInstance). The counter of
ContractionPartitionFunction.exists_partitionFunctionCounter_of_finite, which applies
Theorem D.1 of [OAI26k], then computes it. That counter excludes empty scopes, so an
instance with an empty or overlong scope is first replaced by ContractionMatching.zeroInstance
(ContractionMatching.guarded). Under the degree promise this happens only when a vertex has no
edge, and then the count is zero. The time bound transfers from the instance's variables to n by
Nat.mul_succ_div_sqrt_log_two_le, and through the reduction by
Turing.MultiTapeTM.ComputableInO.comp_polyTime.
Source relation #
No novelty is claimed. Corollary 1.3 of [OAI26k] (p. 2, proved on p. 3) counts perfect
matchings in time 2 ^ o(v + e) through a circuit-to-3-CNF encoding with O(v + e) variables and
clauses, and the fixed-density case of its Theorem 1.1 (p. 2, proved in Appendix D.2, p. 54) gives
the rate 2 ^ O(n / √log n) for such formulas. At maximum degree d this is the rate here. The
bounded-degree permanent is also Theorem 6.1 of [OD26] (p. 13), with the
weaker exponent n (log log n) ^ 2 / √log n and by a different route. The formalization uses the
Holant encoding with exactly-one tables instead of the 3-CNF encoding.
Main definitions #
Cslib.Complexity.ContractionMatching.zeroInstance,Cslib.Complexity.ContractionMatching.guarded: the instance answered in place of one with an empty or overlong scope.Cslib.Complexity.ContractionMatching.rowEntry: entry(i, j)of a list of rows, read by the permanent instance;ContractionMatching.boolTableMatrix_eq_rowEntryrelates it to the shared0/1matrixCslib.Complexity.boolTableMatrix.
Main results #
Cslib.Complexity.ContractionMatching.exists_exactlyOneCounter: exactly-one counting on instances in which every variable occurs at most twice, after a polynomial-time reduction.Cslib.Complexity.ContractionMatching.exists_permanentCounter: the0/1permanent with at mostdnonzero entries per row and column.Cslib.Complexity.ContractionMatching.exists_perfectMatchingCounter: perfect matchings of graphs of maximum degreed.Cslib.Complexity.ContractionMatching.computableInPolyTime_permanentInstance: the permanent reduction is polynomial-time.
References #
- OpenAI, The Exponential Time Hypothesis is False, Theorem 1.1 and Corollary 1.3 (pp. 2–3), Theorem D.1 (p. 53) and Appendix D.2 (p. 54).
- R. O'Donnell, Some exposition of "The Exponential Time Hypothesis Is False", Theorem 6.1 (p. 13).
Exactly-one instances in which every variable occurs at most twice #
The instance answered in place of an instance with an empty or overlong scope: one exactly-one constraint on a repeated variable, whose partition function is zero.
The instance handed to the counter: F itself when each of its constraints has between one
and d variables, and zeroInstance otherwise.
No assignment makes exactly one of the two copies of the variable 0 true.
Guarding preserves the partition function of an instance whose constraints have at most
d variables: if one of them has none, both partition functions are zero.
Exactly-one counting on bounded-occurrence instances by tensor contraction. Let inst be
a polynomial-time map to exactly-one instances in which every variable occurs at most twice and
whose number of constraints is at most C * size a + C. For each d, one machine computes the
partition function of inst a whenever its constraints have at most d variables. On every
input it runs in time 2 ^ (A (size a + 1) / √⌊log₂ (size a + 2)⌋) times a polynomial in the
encoding length, and in polynomial space. The machine first replaces an instance with an empty or
overlong scope by zeroInstance (guarded), then runs the counter of
ContractionPartitionFunction.exists_partitionFunctionCounter_of_finite.
Permanents #
Building the permanent instance of the matrix with rows rows is polynomial-time.
The 0/1 permanent with at most d nonzero entries per row and column in time
2 ^ O(n / √log n). For each d, one machine reads a list of rows rows (encoded by
encList encBits) and, when every row and every column of the n × n matrix
boolTableMatrix rows has at most d nonzero entries, outputs its permanent. On every input it
runs in time 2 ^ (A (n + 1) / √⌊log₂ (n + 2)⌋) times a polynomial in the encoding length, and
in polynomial space, for n = rows.length. The constants A, e and b depend only on d.
Perfect matchings #
Perfect matchings of graphs of maximum degree d in time 2 ^ O(n / √log n). For each
d, one machine reads a graph G (encoded by encGraph) and, when every vertex of G.induced
has at most d neighbours, outputs the number of perfect matchings of G.induced. On every
input it runs in time 2 ^ (A (n + 1) / √⌊log₂ (n + 2)⌋) times a polynomial in the encoding
length, and in polynomial space, for n distinct declared vertices. The constants A, e and
b depend only on d.