Request:The input set is a set of clauses, each of which is a disjunction of exactly four literals,and such that each variable occurs at most in each clause.Prove that the exact 4SAT problem is NP-complete.
Solution:
Reduction from 3-SAT to exact 4-SAT problem.
Given an instance I of 3SAT,suppose to be any clause with exactly three literals,
(a1∨a2∨a3)(a4∨a5∨a6)...(a3k−2∨a3k−1∨a3k)
.
First:
如果一个子句中有两个重复的变量,去掉重复的变量,literal变为两个。如果同时出现一个变量和它的非,去掉这个子句。然后把这些子句转换成4SAT的形式。
(1)
(a1∨a2∨a3)
可以变成
(a1∨a2∨a3∨y1)(a1∨a2∨a3∨y1¯)
因为要保证原来3SAT的
(a1∨a2∨a3)
为真,在4SAT里也要为真。而4SAT中,
y1
和
y1¯
肯定有一个为假,那么这就迫使
(a1∨a2∨a3)
为真。
(2)假设去掉一个重复的变量后,新的子句变成了
(a1∨a2)
。
(a1∨a2∨x∨w)(a1∨a2∨x∨w¯)(a1∨a2∨x¯∨w)(a1∨a2∨x¯∨w¯)
因为要保证原来3SAT的
(a1∨a2)
为真,
(x∨w¯)
和
(x¯∨w)
和
(x∨w)
和
(x¯∨w¯)
肯定有一个为假那么就能保证
(a1∨a2)
为真。
因此,可实现从3SAT 到 4SAT的归约。