04.09.2013 Views

Algorithm Design

Algorithm Design

Algorithm Design

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

472<br />

Chapter 8 NP and Computation!! Intractability<br />

values at all nodes in K (as we did in the example of Figure 8.4). This set of<br />

values clearly satisfies the SAT instance we constructed.<br />

To argue the other direction, we suppose that the SAT instance we constmcted<br />

is satisfiable. Consider a satisfying assignment for this instance, and<br />

look at the values of the variables corresponding to the circuit K’s inputs. We<br />

claim that these values constitute a satisfying assignment for the circuit K. To<br />

see this, simply note that the SAT clauses ensure that the values assigned to<br />

all nodes of K are the same as what the circuit computes for these nodes. In<br />

particular, a value of 1 wil! be assigned to the output, and so the assignment<br />

to inputs satisfies K.<br />

Thus we have shown how to create a SAT instance that is equivalent to<br />

the Circuit Satisfiability Problem. But we are not quite done, since our goal<br />

was to create an instance of o-SK , which requires that all clauses have length<br />

exactly B--in the instance we constructed, some clauses have lengths of 1 or 2.<br />

So to finish the proof, we need to convert this instance of SAT to an equivalent<br />

instance in which each clause has exactly three variables.<br />

To do this, we create four new variables: zl, z2, z3, z4. The idea is to ensure<br />

that in any satisfying assignment, we have z 1 = z2 = 0, and we do this by adding<br />

the clauses (~ v z3 v z4), ~ V ~ V Z4), (~ V Z 3 V Z~ 4 , and (~ v ~ v ~ for each<br />

of i = 1 and i = 2. Note that there is no way to satisfy all these claus6s unless<br />

we set z 1 = z2 = 0.<br />

Now consider a clause in the SAT instance we constructed that has a single<br />

term t (where the term t can be either a variable or the negation of a variable).<br />

We replace each such term by the clause (t v zl v z~). Similarly, we replace<br />

each clause that has two terms, say, (t v t’), with the clause (t v t’ v z 0. The<br />

resulting 3-SAT formula is clearly equivalent to the SAT formula with at most<br />

three variables in each clause, and this finishes the proof. []<br />

Using this NP-completeness result, and the sequence of reductions -<br />

~ ~-SK T

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!