算法概论 第八章课后题8.3

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 are true, if such an assignment exists. Prove that STINGY SAT is NP-complete.

答:
设f为SAT一个有k个变量的实例,(f,k)为STINGY SAT的一个实例,x为一组赋值。易知x是可在多项式时间内验证是否可以使(f,k)为真,所以STINGY SAT是NP问题
目标:SAT规约到STINGY SAT,即x是f的解当且仅当x是(f,k)的解;
充分性:假设x是f的解,则至多有k个变量为真,x赋给(f,k)也为真,所以x是(f,k)的解;
必要性:假设x是(f,k)的解,显然x也是f的解;
∴ STINGY SAT也是一个NPC问题。

点赞