SAT

Given a CNF formula with variables and clauses:

  • SAT: Can we satisfy all clauses ?
  • Almost SAT: Can we satisfy exactly clauses ?

Reduction

  • Let the instance of SAT have the variables
  • Want to create an instance of Almost SAT such that
    • (i) All clauses of SAT are satisfied all but one clause of Almost-SAT are satisfied.
    • (i) All clauses of SAT are satisfied all but one clause of Almost-SAT are satisfied.
  • Hint: For any variable , exactly one of the clauses or is satisfiable!
  • Let be an instance of SAT and we can build an instance of Almost-SAT such that:
  • No matter what truth assignment is picked for only one of them is satisfied.
  • So, the reduction clearly works in polytime