3SAT #
ThreeSAT is the set of satisfiable formulas in conjunctive normal form whose clauses have at most
three literals Arora and Barak, Section 2.3.1. toThreeSAT maps a formula to an
equisatisfiable one of width three, by splitting its clauses (Cslib.Logic.PL.CNF.to3CNF) and
numbering the variables injectively. Combining CNF.isPolyTime_to3CNF with binary variable
relabelling and the Cook–Levin theorem proves that ThreeSAT is NP-complete.
Main definitions #
Cslib.Complexity.ThreeSAT.Cslib.Complexity.toThreeSAT.Cslib.Complexity.ThreeSAT.verifier: clause-width check combined withSAT.verifier.
Main results #
Cslib.Complexity.mem_ThreeSAT_toThreeSAT_iff:φ ∈ SAT ↔ toThreeSAT φ ∈ ThreeSAT.Cslib.Complexity.computableInPolyTime_toThreeSAT:toThreeSATis polynomial-time.Cslib.Complexity.ThreeSAT.isVerifier,Cslib.Complexity.ThreeSAT.mem_NP:ThreeSAT ∈ NP.Cslib.Complexity.polyTimeReducible_SAT_ThreeSAT,Cslib.Complexity.ThreeSAT_npHard,Cslib.Complexity.ThreeSAT_npComplete:ThreeSATisNP-complete.
References #
The satisfiable formulas whose clauses have at most three literals [Kar72], Arora and Barak, Section 2.3.1.
Instances For
The reduction from SAT to ThreeSAT: split the clauses, then number the variables.
Instances For
Correctness of the reduction: toThreeSAT φ is in ThreeSAT exactly when φ is in
SAT.
Polynomial-time reduction and NP-completeness #
Variable numbering after clause splitting is polynomial-time: original binary variables shift by one bit, and unary fresh-variable pairs are paired and converted to odd binary numbers.
The reduction toThreeSAT is computable in polynomial time under encCNF.
The verifier for ThreeSAT: check that every clause has at most three literals and evaluate
the formula under the certificate assignment.
Instances For
ThreeSAT.verifier verifies ThreeSAT with certificates as long as the encoded formula: it
is SAT.verifier guarded by the clause-width test.
Checking the clause-width bound and evaluating the formula is polynomial-time.
SAT reduces to ThreeSAT in polynomial time via toThreeSAT.
3SAT is NP-complete [Kar72].