Weighted #CSP by tensor contraction #
For every fixed arity bound k and weight bound W, one native machine computes the partition
function F.partitionFunction wt of every weighted Boolean CSP instance F : CSP Rel ℕ whose
constraints have between one and k variables, in time 2 ^ (A (N + 1) / √⌊log₂ (n + 2)⌋) times
a polynomial in the encoding length, and in polynomial space, where N is the number of variable
occurrences and n the number of variables
(ContractionPartitionFunction.exists_partitionFunctionCounter). The weights wt R w at patterns
of length at most k must be at most W and polynomial-time in the relation symbol R; both hold
over a finite relation alphabet
(ContractionPartitionFunction.exists_partitionFunctionCounter_of_finite).
On instances in which every variable occurs at most Δ times, N ≤ Δ n, so the time is
2 ^ O_{k,W,Δ}(n / √log n) times a polynomial
(ContractionPartitionFunction.exists_partitionFunctionCounter_boundedDegree). Weighted counting
problems on bounded-degree graphs, such as independent sets and the hard-core model
(ContractionPartitionFunction.exists_hardCoreCounter), or perfect matchings with one Boolean
variable per edge, are such instances.
The machine is that of ContractionCounting.exists_modelCounter with weighted tables: it writes
out the constraint network of the instance
(Cslib.Circuits.Frontier.ClauseNetwork.cspNetwork), whose contraction is the partition function,
and contracts it modulo 2 ^ ((W + 1) 3 N), which exceeds the partition function, with the
contraction algorithm of Theorem D.1 of [OAI26k]
(CountingSimulation.fastContractionAlgorithm). The network has s = 3 N edges, at most 3 N
vertices and degree at most max k 4, so it is admissible at size s. The empty instance is
answered directly.
Constraints with an empty scope are excluded: arbitrarily many of them would break the bound on the number of vertices that admissibility requires. The rate is that of Theorem D.1; no claim of novelty is made for the application.
Main results #
Cslib.Complexity.ContractionPartitionFunction.exists_partitionFunctionCounter: the counter, with exponentA (N + 1) / √⌊log₂ (n + 2)⌋.Cslib.Complexity.ContractionPartitionFunction.exists_partitionFunctionCounter_boundedDegree: for each occurrence boundΔ, exponentA (n + 1) / √⌊log₂ (n + 2)⌋.Cslib.Complexity.ContractionPartitionFunction.exists_partitionFunctionCounter_of_finite: the counter over a finite relation alphabet.Cslib.Complexity.ContractionPartitionFunction.exists_hardCoreCounter: the weighted count of independent sets of bounded-degree graphs (the hard-core model with integer fugacity).
References #
- OpenAI, The Exponential Time Hypothesis is False, Appendix D.2 (p. 54) and Theorem D.1 (p. 53).
The instances handed to the contraction algorithm: nonempty, with every constraint of between
one and k variables.
The precision of the contraction, (W + 1) 3 N for N variable occurrences.
The input of the contraction algorithm: the precision and the constraint network.
The answer off the guard: one for the empty instance, zero otherwise.
The value computed by the machine.
The machine: the guard, then the contraction algorithm on the constraint network or the direct answer.
Correctness #
The machine computes the partition function of every instance whose constraints have
between one and k variables, when the weights at patterns of length at most k are at most
W.
Resources #
Admissibility: the constraint network of a guarded instance with N variable occurrences
is admissible at size 3 N, its number of edges, with constant k + 4.
Weighted #CSP by tensor contraction. For each arity bound k and weight bound W, one
machine computes F.partitionFunction wt on every instance F whose constraints have between one
and k variables, in time 2 ^ (A (N + 1) / √⌊log₂ (n + 2)⌋) times a polynomial in the encoding
length and in polynomial space, where N is the number of variable occurrences and n the number
of variables. The weights at patterns of length at most k are at most W and polynomial-time in
the relation symbol.
Weighted #CSP on bounded-degree instances. For each arity bound k and weight bound
W, one machine computes F.partitionFunction wt on every instance F whose constraints have
between one and k variables, in polynomial space, and for each occurrence bound Δ its time on
instances in which every variable occurs at most Δ times is
2 ^ (A (n + 1) / √⌊log₂ (n + 2)⌋) times a polynomial in the encoding length, for n
variables. The machine, its time and space functions and the degree e of the polynomial are
fixed before Δ; only A depends on Δ.
Weighted #CSP by tensor contraction over a finite relation alphabet: the weights at
patterns of length at most k are then bounded and polynomial-time in the relation symbol.
Independent sets of bounded-degree graphs. For each fugacity t, one machine computes, on
the encoded hard-core instance CSP.hardCore n E of a graph on the vertices 0, …, n - 1 with
edge list E, the sum of t ^ |I| over the independent sets I of the graph (for t = 1, their
number), in polynomial space, and for each degree bound Δ in time
2 ^ (A (n + 1) / √⌊log₂ (n + 2)⌋) times a polynomial in the encoding length on graphs whose
vertices have at most Δ incident edges.