Sunteți pe pagina 1din 2

One in Three SAT (1in3SAT) Problem

Zhiyuan Zhan
S hool of Ele tri al Engineering and Computer S ien e
Washington State University
zzhanee s.wsu.edu

1 1in3SAT Problem De nition


Given: A olle tion of lauses, 1 ; 2 ; :::; m , ea h is a disjun tion of at most three
literals.
Question: Is there a through assignment, whi h set exa tly one literal to true in ea h
lause, that makes the onjun tion of those lauses, 1 2 ::: m , true? ^ ^ ^
2 Claim and Proof
Claim: This problem, 1in3SAT, is NP- omplete.
Proof:
Assumption: 3SAT problem is NP- omplete.

1. Let's rst prove 1in3SAT NP. 2


We an easily prove this by showing that there is an algorithm A, whi h will run
in polynomial time of the input (a given assignment) and output whether this as-
signment satis es the requirements of the question or not.
Let's simply all this kind of algorithm the grading algorithm (GA).
2
Sin e 3SAT is NP- omplete, 3SAT NP. Suppose A is the GA for 3SAT, we add
one additional he k per lause to A in order to verify that exa tly one literal is set
to true. Be ause A runs in polynomial time of the input assignment, this \new" A
will run in polynomial time, too. So this \new" A will serve as the GA for 1in3SAT
problem be ause 1in3SAT has the same des ription as 3SAT, ex ept that a sat-
isfying truth assignment must set exa tly one literal to true in ea h lause, whi h
will be he ked in the \new" A.

2. Let's then prove 1in3SAT is NP-hard.


We prove this by redu ing 3SAT into 1in3SAT.
f g
The transformation is: for ea h of the i = xi1 ; xi2 ; xi3 , we add 4 new variables,
ai ; bi ; i ; di and produ e three new lauses:

f g, f
xi1 ; ai ; bi xi2 ; bi ; i g, f 
xi3 ; i ; di g
^ ^ ^ has
Suppose the original 1 2 ::: m n variables and k lauses, our transforma-

tion will produ e an instan e of n +4k variables and 3k lauses. This transformation
is obivously arried out in polynomial time.
2 Zhiyuan Zhan

Then, we need to prove that our transformed instan e will have a solution (truth
assignment) under 1in3SAT ondition i the original instan e does under 3SAT
ondition.

)
(= ) Firstly, suppose our transformed instan e has a solution, whi h means ex-
a tly one literal per lause is set to true, we want to show that the original instan e
will have a solution, too.
Suppose in the original instan e lause i , xi1 , xi2 , xi3 are all set to false. This
means that in the se ond lause we produ e, either bi or i (but not both) must be
true, otherwise it's a ontradi tion to exa tly one literal has to be true. So either in
the rst or the third transformed lause, there will be at least two variables set to
true (either xi1 and bi or xi3 and i , but not both). This is a ontradi tion to our
1in3SAT ondition. So in the original lause i , at least one of three literals has to
be true. Therefore the original instan e must have a solution under 3SAT ondition.

( ^ ^ ^
( =) Se ondly, suppose the original instan e 1 2 ::: m has a solution, there
must be at least one literal set to be true in ea h lause.

Suppose in lause i ,
(a) xi2 is set to true, we an set bi and i to false in the se ond transformed lause
and set ai = xi1 and di = xi3 .
(b) xi2 is set to false and both xi1 and xi3 are set to true, we an set ai to true, bi
to false, i to true and di to false.
( ) only xi1 is set to true, we an set bi to true, and ai , i and di false.
(d) only xi3 is set to true, we an set di to true, and ai , bi and i false.

In all these ases, the three transformed lauses orresponding to i will have ex-
a tly one literal set to true in ea h lause. Therefore, the transformed instan e will
have a solution under 1in3SAT ondition.

Now we have that 1in3SAT is in NP, and 3SAT ould be redu ed to 1in3SAT via a
mapping whi h learly osts polynomial time. Hen e 1in3SAT is NP- omplete.

End of Proof

S-ar putea să vă placă și