Complete problems for the counting classes #
Since the Cook–Levin reduction is parsimonious (CookLevin.SharpSAT_sharpPHard), each counting
class defined by a condition on a function in #P has a complete problem defined by the same
condition on the number of satisfying assignments of a formula (SharpSAT), under
polynomial-time many-one reductions Valiant. The classes are the verifier-based
ones of this library, following Fortnow, Section 4.
ParitySAT, an odd number of satisfying assignments, is⊕P-complete Papadimitriou and Zachos;USAT, exactly one satisfying assignment (SharpSAT.mem_USAT_iff), isUS-complete Blass and Gurevich;ModSAT k, a number of satisfying assignments not divisible byk, isModP k-complete, and its complement iscoModP k-complete, for every modulusk; the modular classes are those of Cai and Hemachandra and Beigel, Gill and Hertrampf;SharpSATAtLeast, the pairs(φ, m)of a formula and a number in binary such thatφhas at leastmsatisfying assignments, isPP-complete; it is a threshold variant of the majority problemMAJSAT, the formulas satisfied by strictly more than half of the truth assignments to their occurring variables, which is alsoPP-complete Gill, Simon, Papadimitriou, Chapter 11;SharpSATExact, the pairs(φ, m)such thatφhas exactlymsatisfying assignments, isC=P-complete, and its complement iscoC=P-complete;C=Pand complete problems for it were introduced by Wagner.
The first four follow one pattern (polyTimeComplete_sharpSAT): a problem in the class is
{a | Q (f a)} for some f ∈ #P, and the parsimonious reduction r for f reduces it to
{φ | Q (SharpSAT φ)}. For PP, the characterization of PP through #P
(mem_PP_iff_exists_SharpP) gives a ∈ A ↔ 2 ^ q(n) < 2 f(a); the reduction to
SharpSATAtLeast maps a to the formula for 2 f with the threshold 2 ^ q(n) + 1, and the
reduction to MAJSAT pads that formula (padMajority) with q(n) even-numbered dummy variables
and a selector variable 0 so that the padded formula has 1 + q(n) + k occurring variables and
2 f(a) + 2 ^ (q(n) + k) - 2 ^ q(n) satisfying assignments. For C=P, a problem in the class is
{a | f₁ a = f₂ a} for f₁, f₂ ∈ #P, with f₂ ≤ 2 ^ p(n) and 2 ^ p(n) - f₂ ∈ #P
(SharpP.exists_two_pow_sub_mem); the reduction maps a to the formula for f₁ + (2 ^ p(n) - f₂)
with the count 2 ^ p(n). In the pair problems the number m is computed in polynomial time in
binary.
Main definitions #
Cslib.Complexity.ParitySAT,Cslib.Complexity.ModSAT,Cslib.Complexity.MAJSAT,Cslib.Complexity.SharpSATTarget,Cslib.Complexity.encSharpSATTarget,Cslib.Complexity.SharpSATAtLeast,Cslib.Complexity.SharpSATExact.Cslib.Complexity.shiftOdd,Cslib.Complexity.dummyClauses,Cslib.Complexity.padMajority: padding a formula to a majority instance.
Main results #
Cslib.Complexity.ParitySAT_parityPComplete:⊕SATis⊕P-complete.Cslib.Complexity.USAT_usComplete:USATisUS-complete.Cslib.Complexity.ModSAT_modPComplete,Cslib.Complexity.compl_ModSAT_coModPComplete.Cslib.Complexity.ModSAT_two,Cslib.Complexity.ModSAT_zero:ModSAT 2isParitySATandModSAT 0isSAT.Cslib.Complexity.SharpSATAtLeast_ppComplete: counting threshold isPP-complete.Cslib.Complexity.card_vars_padMajority,Cslib.Complexity.sharpSAT_padMajority,Cslib.Complexity.padMajority_mem_MAJSAT_iff: variable count and model count of a padded majority formula.Cslib.Complexity.MAJSAT_mem_PP,Cslib.Complexity.MAJSAT_ppHard,Cslib.Complexity.MAJSAT_ppComplete: majority satisfiability isPP-complete.Cslib.Complexity.SharpSATExact_ceqPComplete,Cslib.Complexity.compl_SharpSATExact_coCeqPComplete.
References #
- L. Valiant, The complexity of computing the permanent
- C. H. Papadimitriou, S. Zachos, Two remarks on the power of counting
- A. Blass, Y. Gurevich, On the unique satisfiability problem
- J. Gill, Computational complexity of probabilistic Turing machines
- J. Simon, On Some Central Problems in Computational Complexity
- J.-Y. Cai, L. A. Hemachandra, On the power of parity polynomial time
- R. Beigel, J. Gill, U. Hertrampf, Counting classes: thresholds, parity, mods, and fewness
- K. W. Wagner, The complexity of combinatorial problems with succinct input representation
- L. Fortnow, Counting Complexity
- C. H. Papadimitriou, Computational Complexity
The problems #
⊕SAT: the formulas with an odd number of satisfying assignments.
Mod_k SAT: the formulas whose number of satisfying assignments is not divisible by k.
An instance of a counting threshold or exact-count problem: a Boolean formula in conjunctive normal form paired with a target count of satisfying assignments.
- formula : Logic.PL.CNF ℕ
The formula in conjunctive normal form.
- target : ℕ
The target number of satisfying assignments.
Instances For
Pairs of a formula and a target count, encoded as encCNF paired with binary encNat.
The tuple of the fields of encSharpSATTarget.
Instances x : SharpSATTarget such that x.formula has at least x.target satisfying
assignments (encSharpSATTarget).
Instances x : SharpSATTarget such that x.formula has exactly x.target satisfying
assignments (encSharpSATTarget).
Modulo two, a nonzero residue is oddness.
Completeness through the parsimonious reduction #
Complete problems from conditions on counts. If the problems of a class C are, for
every encoding, the sets {a | Q (f a)} for functions f in #P, then
{φ | Q (SharpSAT φ)} is C-complete.
⊕SAT is ⊕P-complete.
USAT is US-complete: unique satisfiability is complete for the class of problems
defined by a function in #P equal to one.
Mod_k SAT is ModP k-complete, for every modulus k.
The complement of Mod_k SAT is coModP k-complete, for every modulus k.
Thresholds and exact counts #
Counting threshold is PP-complete: whether a formula has at least target satisfying
assignments, for target given in binary.
Exact counting is C=P-complete: whether a formula has exactly target satisfying
assignments, for target given in binary.
The complement of exact counting is coC=P-complete.
Majority satisfiability #
Relabel the variables of φ to the odd numbers 2 v + 1.
Clauses forcing the Q positive even dummy variables 2, 4, …, 2 Q to false when the
selector variable 0 is false.
Pad φ with Q even dummy variables 2, 4, …, 2 Q and a selector variable 0 so that the
resulting formula has 1 + Q + φ.vars.toFinset.card occurring variables and
SharpSAT φ + (2 ^ (Q + φ.vars.toFinset.card) - 2 ^ Q) satisfying assignments.
Padding a formula to a majority instance is computable in polynomial time, with Q in unary.
Variable count of padMajority: the padded formula has 1 + Q + φ.vars.toFinset.card
distinct occurring variables.
Model count of padMajority: the padded formula has
SharpSAT φ + (2 ^ (Q + φ.vars.toFinset.card) - 2 ^ Q) satisfying assignments.
Threshold equivalence of padMajority: the padded formula belongs to MAJSAT if and only
if φ has strictly more than 2 ^ Q satisfying assignments.
MAJSAT is PP-hard.