#3SAT and #3SAT-3 are #P-complete #
Counting the satisfying assignments of a formula of width at most three (SharpThreeSAT) is
#P-complete under parsimonious reductions, and so is counting them under the additional bound of
three occurrences per variable (SharpThreeSATThree) Valiant,
Arora and Barak, Section 17.3.
Hardness: #SAT is #P-hard (Cslib.Complexity.CookLevin.SharpSAT_sharpPHard), and the
count-preserving split into OR gates (Cslib.Logic.PL.CNF.toExact3CNF), with the variables
renumbered by Cslib.Complexity.splitVarToNat, is a parsimonious reduction from #SAT to #3SAT.
The existing occurrence compiler Cslib.Complexity.toThreeSATThree then reduces #3SAT to
#3SAT-3. Membership: on inputs passing their syntactic guard both counts equal #SAT, and
otherwise they are zero, which is the count of the formula [[]]; guarding the input is a
parsimonious reduction to #SAT ∈ #P.
Main definitions #
Cslib.Complexity.toSharpThreeSAT: the parsimonious reduction from#SATto#3SAT.
Main results #
Cslib.Complexity.length_le_three_of_mem_toSharpThreeSAT,Cslib.Complexity.modelCount_toSharpThreeSAT,Cslib.Complexity.length_vars_toSharpThreeSAT: the reduction has width three, preserves model counts and at most multiplies the number of literal occurrences by seven.Cslib.Complexity.sharpThreeSAT_toSharpThreeSAT: the reduction preserves counts.Cslib.Complexity.computableInPolyTime_toSharpThreeSAT: it is polynomial-time.Cslib.Complexity.parsimoniousReducible_SharpSAT_SharpThreeSAT:#SATreduces parsimoniously to#3SAT.Cslib.Complexity.SharpThreeSAT_sharpPComplete:#3SATis#P-complete.Cslib.Complexity.SharpThreeSATThree_sharpPComplete:#3SAT-3is#P-complete.
References #
The count-preserving reduction from #SAT to #3SAT: split every clause into OR gates and
number the original and gate variables injectively.
Every clause of toSharpThreeSAT φ has at most three literals.
toSharpThreeSAT preserves the number of satisfying assignments.
toSharpThreeSAT φ has between one and seven times as many literal occurrences as φ.
toSharpThreeSAT has width at most three and the same number of satisfying assignments.
The reduction toSharpThreeSAT is computable in polynomial time under encCNF.
#SAT reduces parsimoniously to #3SAT.
A guarded count reduces parsimoniously to #SAT: replace a rejected input by the
unsatisfiable formula [[]].
#3SAT is #P-complete Valiant.
#3SAT-3 is #P-complete: counting stays #P-complete when every variable occurs at
most three times.