您的位置:首页 > 其它

算法设计期末作业01-8.3

2017-07-11 15:56 405 查看

题目

STINGY SAT is the following problem: given a set of clauses(each a disjunction of literals) ans 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 的解在多项式时间内是可以验证的。接下来只需要证明NP-complete SAT是归约到STINGY SAT的即可,即x是f的解当且仅当x是(f,k)的解。

对于充分性方向,

因为x是f的解,所以最多有k个变量为true,则x对于(f,k)也为真,所以充分性得证。

对于必要性方向,

因为x是(f,k)的解,x也是f的解。故必要性得证。

综上所述,STINGY SAT是NP-complete问题
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: