题目
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.
STINGY SAT 指的是:给定一组子句(每个子句都是文字的析取)和整数k,如果存在,求一个最多有 k 个变量为 true 的满足赋值。证明 STINGY SAT 是 NP 完全问题。
证明
∵ 可以在多项式是件内验证一组赋值是否能令 STINGY SAT 为真
∴ STINGY SAT 属于 NP 问题
∵ 将 SAT 问题的实例变量设为 k 个,即为 STINGY SAT
∴ STINGY SAT 是一个 NP 完全问题