Runtime transfers and polynomial-time bounded-width CNF counting compilations #
This module connects the six bounded-width CNF counting encodings to polynomial-time machine certificates and conditional exponential/subexponential runtime transfers:
- General conditional runtime transfer (
CountingTransfer.transfer_declaredCounter,CountingTransfer.declaredCounter_of_modelCounter): any declaredk-CNF counter (or plain(max k 2)-CNF model counter via tautology variable paddingCNF.padDeclaredVars) running in time2 ^ E N * poly(|x|)and polynomial space transfers along any polynomial-time compilationg : α → DeclaredCNFsatisfying(g x).numVars ≤ C * μ x + Dunder a polynomial-time guard. - Polynomial-time bounded one-hot CSP compilation
(
CSP.computableInPolyTime_toOneHotDeclaredCNF_of_forall,CSP.computableInPolyTime_toOneHotDeclaredCNF_of_finite): compiles a finite-domain CSP overFin qof arity≤ konNdeclared variables into an equivalent CNF formula onq * Nvariables of clause width≤ max q (max k 2)(Cslib.Complexity.CSP.toOneHotDeclaredCNF). - Explicit assignment bijection for constant-locality Boolean maps
(
LocalMap.preimageDeclaredEquiv): pairsLocalMap.toDeclaredCNFwith an explicit bijection between declared-range satisfying assignments andn-bit preimages. - Six conditional counting runtime transfers:
independent sets (
width = 2, parameter|V|), properq-colourings (width = max q 2, parameter|V|), general-graph perfect matchings (width = 3, parameter|V| + |E|), fixed-arity finite-domain#CSPvia one-hot encoding (width = max q (max k 2), parameterN),#k-SetSplitting(width = k, parameter|U|), and constant-locality Boolean map preimage counting (width = k, parameternumVars).
Main definitions #
Cslib.Logic.PL.CNF.padDeclaredVars: width-2tautology padding fixingnumVars = N.Cslib.Complexity.CSP.toOneHotDeclaredCNF: declared-variable one-hot CNF compilationDeclaredCSP Rel → DeclaredCNF.Cslib.Complexity.LocalMap.preimageDeclaredEquiv: explicit preimage bijection forLocalMap.toDeclaredCNF.
Main results #
Cslib.Complexity.CountingTransfer.transfer_declaredCounter,Cslib.Complexity.CountingTransfer.declaredCounter_of_modelCounter: general conditional counting runtime and polynomial-space transfers.Cslib.Complexity.CSP.computableInPolyTime_toOneHotDeclaredCNF_of_forall,Cslib.Complexity.CSP.computableInPolyTime_toOneHotDeclaredCNF_of_finite: polynomial-time one-hot CSP compilation.Cslib.Complexity.CountingTransfer.exists_indepSetCounter_of_declaredCounter,Cslib.Complexity.CountingTransfer.exists_coloringCounter_of_declaredCounter,Cslib.Complexity.CountingTransfer.exists_perfectMatchingCounter_of_declaredCounter,Cslib.Complexity.CountingTransfer.exists_oneHotCSPCounter_of_declaredCounter,Cslib.Complexity.CountingTransfer.exists_setSplittingCounter_of_declaredCounter,Cslib.Complexity.CountingTransfer.exists_localMapPreimageCounter_of_declaredCounter: conditional runtime transfers for all six counting encodings.
References #
Tautology variable padding for declared-variable CNF formulas #
Row 6 explicit assignment bijection #
Explicit bijection between declared-range satisfying assignments of LocalMap.toDeclaredCNF k q
and n-bit preimages of q.2 under q.1 when q.1.Valid k = true.
Row 4 polynomial-time one-hot CSP compilation #
Declared-variable one-hot CNF compilation ⟨x.numVars * q, toOneHotCNFBounded ...⟩.
Compiling x : DeclaredCSP Rel to toOneHotDeclaredCNF q k sem x is polynomial-time whenever
fun R => sem R ts is polynomial-time on tuples of length ≤ k.
Over a finite relation alphabet Rel, toOneHotDeclaredCNF q k sem is polynomial-time.
General conditional counting runtime transfers #
Convert any plain (max k 2)-CNF model counter on encCNF running in time
2 ^ E φ.numVars * (|φ| + 1) ^ e₀ and polynomial space into a declared k-CNF counter on
encDeclaredCNF running in time 2 ^ E p.numVars * (|p| + 1) ^ e and polynomial space.
General conditional counting runtime transfer: any declared k-CNF counter running in time
2 ^ E N * (|p| + 1) ^ e₀ and polynomial space with monotone E transfers across any
polynomial-time compilation g : α → DeclaredCNF and guard valid : α → Bool satisfying
(g x).numVars ≤ C * μ x + D under valid x = true.
Conditional runtime transfers for the six CNF counting encodings #
Row 1 conditional transfer (#IndependentSet, width 2, n = |V|): any declared 2-CNF
counter with monotone exponent E yields an independent-set counter in time
2 ^ E G.vertices.toFinset.card * (|G| + 1) ^ e and polynomial space.
Row 2 conditional transfer (#q-Coloring, width max q 2, n = q * |V|): any declared
(max q 2)-CNF counter with monotone exponent E yields a proper q-colouring counter in time
2 ^ E (q * G.vertices.toFinset.card) * (|G| + 1) ^ e and polynomial space.
Declared wire count |E| + gates of Graph.toPerfectMatchingCNF is polynomial-time in
unary.
Row 3 conditional transfer (#PerfectMatching, width 3, n ≤ 7 * (|V| + |E|) + 1):
any declared 3-CNF counter with monotone exponent E yields an exact perfect-matching counter on
general graphs in time 2 ^ E (7 * (|V| + |E|) + 1) * (|G| + 1) ^ e and polynomial space.
Row 4 conditional transfer (one-hot #CSP over Fin q, width max q (max k 2),
n = q * N): any declared (max q (max k 2))-CNF counter with monotone exponent E transfers
to finite-domain #CSP in time 2 ^ E (q * N) * (|x| + 1) ^ e and polynomial space.
Row 5 conditional transfer (#k-SetSplitting, width k, n = |U|): any declared k-CNF
counter with monotone exponent E counts ordered splitting bipartitions on valid instances of set
size ≤ k in time 2 ^ E x.ground.toFinset.card * (|x| + 1) ^ e and polynomial space.
Row 6 conditional transfer (constant-locality Boolean map preimage counting, width k,
n = G.numVars): any declared k-CNF counter with monotone exponent E counts preimages of
k-local Boolean maps in time 2 ^ E q.1.numVars * (|q| + 1) ^ e and polynomial space.