Description
8.3 STINGY SAT is the following problem: given a set of clauses (each a disjunction of literals) and an integer k, find a satisfying assignment in which at most k variables a true, if such an assignment exists. Prove that STINGY SAT is NP-complete.
Proof
若要证明 STINGY SAT 是 NP-完全问题,就要:
- 证明 STINGY SAT 是 NP 问题;
- 把 SAT 问题归约到 STINGY SAT 问题。
这样就能证明 STINGY SAT 问题是 NP-完全问题。
证:
- 易知,STINGY SAT 问题是 NP 问题。因为 STING SAT 问题是 SAT 问题的一个变种,任何一个解都可以在多项式时间内验证;
- 若把 STINGY SAT 问题中的变量k设置为所有变量的总数,那就完成了把 SAT 问题归约到 STINGY SAT 问题。归约的时间复杂度为O(1),是多项式复杂度。
因为 SAT 问题是 NP 完全问题,故 STINGY SAT 也是 NP 完全问题。