#k-SAT exponents, #ETH, and #SETH #
This module develops the exact-counting rate theory for #k-SAT, measuring counters with the
function-time notions Cslib.Complexity.ComputableInExpTime and ComputableInSubexpTime of
CslibFrontier.Computability.Complexity.FineGrained.FunctionRates:
Cslib.Complexity.SharpKSAT kcounts the satisfying assignments of width-≤ kformulas and returns0outside that syntax (SharpKSAT 3 = SharpThreeSAT).Cslib.Complexity.sharpSatExponent kis the counting exponents^#_k: the infimum of theδ ≥ 0for whichSharpKSAT kis computable within time2 ^ (δ * n)times a polynomial inL.Cslib.Complexity.SharpETH(#ETH) andCslib.Complexity.SharpSETH(#SETH) are the counting analogues ofETHandSETH[CFK+15].
Because SharpKSAT k φ ≤ 2 ^ φ.numVars, its binary output has length linear in L, so any
polynomial-time predicate on the count transfers a counting rate δ to a decision rate δ without
exponent loss (DecidableInExpTime.of_computableInExpTime_polyBounded,
DecidableInExpTime.KSAT_of_SharpKSAT). Hence satExponent k ≤ sharpSatExponent k ≤ 1 for every
k, SharpETH ↔ 0 < sharpSatExponent 3, SharpSETH ↔ Tendsto sharpSatExponent atTop (𝓝 1), and
clause-measured counting rates transfer to variable-measured counting rates through disjoint
counting sparsification (exists_computableInExpTime_SharpKSAT_numVars_of_length,
SharpETH_iff_not_computableInSubexpTime_length). In addition, SETH → ETH (SETH.eth) follows
unconditionally via toThreeSAT clause-splitting and 3-SAT sparsification, and
unrestrictedSatExponent distinguishes unbounded-width SAT from fixed-width
⨆ k, satExponent k.
Main definitions #
Cslib.Complexity.SharpKSAT,Cslib.Complexity.sharpSatExponent,Cslib.Complexity.unrestrictedSatExponent:#k-SAT, its exponent, and the unrestrictedSATexponent.Cslib.Complexity.SharpETH,Cslib.Complexity.SharpSETH: the counting exponential time hypotheses.
Main results #
Cslib.Complexity.DecidableInExpTime.KSAT_of_SharpKSAT: exact-rate decision from counting.Cslib.Complexity.SharpSAT_computableInExpTime_one,Cslib.Complexity.SharpKSAT_computableInExpTime_one: exhaustive counting in time2 ^ n · poly.Cslib.Complexity.sharpSatExponent_nonneg,Cslib.Complexity.sharpSatExponent_le_one,Cslib.Complexity.sharpSatExponent_mono,Cslib.Complexity.satExponent_le_sharpSatExponent:0 ≤ s_k ≤ s^#_k ≤ 1and monotonicity ink.Cslib.Complexity.SETH_iff_iSup_ge_three_eq_one,Cslib.Complexity.SharpSETH_iff_iSup_ge_three_eq_one,Cslib.Complexity.SETH.eth: finite-prefix suprema andSETH → ETH.Cslib.Complexity.SharpETH_iff_sharpSatExponent_pos,Cslib.Complexity.SharpSETH_iff_tendsto,Cslib.Complexity.SharpETH_iff_not_computableInSubexpTime_length: exponent and clause-rate characterizations.
References #
#k-SAT and exhaustive model counting #
#k-SAT: the number of satisfying assignments of φ on its occurring variables when every
clause of φ has length at most k, and 0 otherwise.
At width 3, SharpKSAT 3 is SharpThreeSAT.
SharpKSAT k never exceeds SharpSAT.
SharpKSAT k φ is at most 2 ^ φ.numVars.
On width-≤ k formulas, SharpKSAT k φ equals φ.modelCount.
Outside clause width k, SharpKSAT k φ returns 0.
Guarding a #k'-SAT count by the width test of k ≤ k' gives the #k-SAT count.
The binary encoding of SharpSAT φ has length bounded linearly in (encCNF φ).length.
The binary encoding of SharpKSAT k φ has length bounded linearly in (encCNF φ).length.
State of exhaustive model counting over the 2 ^ |distinctVars| numbered assignments.
- formula : Logic.PL.CNF ℕ
Input formula being counted.
Cached duplicate-free list of occurring variables (
formula.distinctVars).- index : ℕ
Current assignment index in
0, …, 2 ^ |varsList|. - acc : ℕ
Running count of satisfying assignments among indices
< index.
Instances For
Framed encoding of BruteForceCount.State.
Initial state before testing any numbered assignment.
Total number of assignments 2 ^ φ.distinctVars.length to inspect.
Exhaustive model counter returning the accumulated count after rounds φ steps.
Exhaustive enumeration of bitsAssignment φ.distinctVars computes φ.modelCount.
#SAT by exhaustive counting: SharpSAT (for arbitrary unbounded clause width) is
computable within time 2 ^ n times a polynomial in the encoded formula length, where
n = φ.numVars.
#k-SAT by exhaustive counting: for every width k, SharpKSAT k is computable within
time 2 ^ n times a polynomial in the encoded formula length.
Decision-from-counting and width transfers #
Any #k-SAT counter at exponential rate δ ≥ 0 decides k-SAT at the exact same rate δ.
Subexponential #k-SAT counting gives subexponential k-SAT decision.
A counter for #k'-SAT gives a counter for #k-SAT whenever k ≤ k'.
The #k-SAT exponent sharpSatExponent, SharpETH, and SharpSETH #
The counting exponent s^#_k of #k-SAT: the infimum (Cslib.rateExponent) of the δ ≥ 0 for
which SharpKSAT k is computable within time 2 ^ (δ * n) times a polynomial in the encoded
formula length, where n = φ.numVars.
#ETH (the counting exponential time hypothesis): for some δ > 0, #3-SAT
(SharpThreeSAT) is not computable within time 2 ^ (δ * n) times any polynomial in the encoded
formula length.
#SETH (the strong counting exponential time hypothesis): for every ε > 0 there is a
width k such that #k-SAT (SharpKSAT k) is not computable within time 2 ^ ((1 - ε) * n)
times any polynomial in the encoded formula length.
The counting exponent of #k-SAT is nonnegative.
Exhaustive counting bound: sharpSatExponent k ≤ 1 for every k.
sharpSatExponent k is at most every attainable counting rate δ ≥ 0.
Below sharpSatExponent k there is no #k-SAT counter.
An unattainable rate δ bounds sharpSatExponent k from below.
sharpSatExponent is monotone in the clause width k.
Decision vs. counting exponent: satExponent k ≤ sharpSatExponent k for every k.
#ETH holds iff #3-SAT is not computable in subexponential time in numVars.
#ETH in terms of the counting exponent: SharpETH ↔ 0 < sharpSatExponent 3.
sharpSatExponent k = 0 iff SharpKSAT k is computable in subexponential time.
#SETH in terms of the counting exponents: SharpSETH ↔ sharpSatExponent k → 1.
Decision hardness implies counting hardness (ETH → SharpETH); note both hypotheses are
refuted in this library, while the contrapositive transfer DecidableInSubexpTime.KSAT_of_SharpKSAT
is unconditional.
Strong decision hardness implies strong counting hardness (SETH → SharpSETH); the underlying
fixed-width transfer DecidableInExpTime.KSAT_of_SharpKSAT is unconditional.
Finite-prefix suprema, SETH → ETH, and unrestricted SAT #
Dropping any finite prefix k < K leaves ⨆ k, satExponent k unchanged.
SETH holds iff ⨆ k : ℕ, satExponent k = 1.
Dropping any finite prefix k < K leaves ⨆ k, sharpSatExponent k unchanged.
SharpSETH holds iff ⨆ k : ℕ, sharpSatExponent k = 1.
SharpSETH holds iff ⨆ k ≥ 3, sharpSatExponent k = 1.
Clause-splitting reduction (toThreeSAT) transfers subexponential clause-count decidability of
ThreeSAT to KSAT k for every fixed width k (each width-≤ k clause splits into at most
max 1 k width-≤ 3 clauses).
Strong ETH implies ETH (SETH → ETH) via clause-splitting (toThreeSAT) and IPZ
sparsification (DecidableInSubexpTime.numVars_of_length), without invoking the native counting
refutation: if ThreeSAT is decidable in subexponential time in variables, then it is decidable in
subexponential time in clauses, hence every fixed-width KSAT k is decidable in subexponential
time in clauses and (by sparsification) in variables, contradicting SETH.
Unrestricted SAT exponent: infimum of δ ≥ 0 such that SAT (with unbounded clause
width) is decidable within time 2 ^ (δ * n) * poly(L). Unlike SETH, which takes ⨆ k, s_k over
fixed clause widths, unrestrictedSatExponent requires a single machine per δ handling arbitrary
clause widths simultaneously.
Every fixed-width exponent satExponent k is bounded above by unrestrictedSatExponent.
⨆ k, satExponent k ≤ unrestrictedSatExponent.
Clause-measured vs. variable-measured counting rates (counting sparsification) #
From variables to clauses for #k-SAT. Because a width-≤ k formula with m clauses has
at most k * m variables, a #k-SAT counter at variable rate δ ≥ 0 runs at clause rate
k * δ.
Subexponential #k-SAT counting in numVars gives subexponential counting in length.
From clauses to variables via disjoint counting sparsification. For every width k and
every ε > 0, there is a constant c such that any #k-SAT counter within time
2 ^ (δ * m) · poly(L) (δ ≥ 0, m = φ.length) yields a #k-SAT counter within time
2 ^ ((ε + c * δ) * n) · poly(L) (n = φ.numVars).
Subexponential #k-SAT counting in clause count length gives subexponential counting in
variable count numVars.
#ETH in terms of clauses: SharpETH holds iff #3-SAT is not computable in
subexponential time in the number of clauses.