问题描述
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.
解决
首先我们看一个有k个变量的sat问题,那么:
1. 如果对于该sat问题,则最多k个变量为真,此时stingy sat也为真
2. 显然,stingy sat的解也是sat问题的解
同时,容易看出他们之间的转化是多项式时间的,因此得证,stingy sat是一个NP问题。