18.04.2013 Views

The.Algorithm.Design.Manual.Springer-Verlag.1998

The.Algorithm.Design.Manual.Springer-Verlag.1998

The.Algorithm.Design.Manual.Springer-Verlag.1998

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

War Story: Hard Against the Clock<br />

It took me a few minutes worth of scratching before I found the right program. I assumed that I had<br />

access to constants for and , which seemed reasonable, in the sense that it shouldn't make the<br />

problem algorithmically harder. Once my proof worked, I could later worry about removing the extra<br />

assumption if desired.<br />

``Great. Now I have a way to evaluate the truth of each clause. I can do the same thing to evaluate<br />

whether all the clauses are satisfied.''<br />

Now the back of the classroom was getting excited. <strong>The</strong>y were starting to see a ray of hope that they<br />

would get to leave on time. <strong>The</strong>re were two minutes left in class.<br />

``Great. So now we have a program that can evaluate to be true if and only if there is a way to assign the<br />

variables so as to satisfy the set of clauses. We need a second program to finish the job. What about<br />

? Yes, that is all we need. Our language problem asks whether the two programs always<br />

output the same thing, regardless of the possible variable assignments. If the clauses are satisfiable, that<br />

means that there must be an assignment of the variables such that the long program would output true.<br />

Testing whether the programs are equivalent is exactly the same as asking if the clauses are satisfiable.''<br />

I lifted my arms in triumph. ``And so, the problem is neat, sweet, and NP-complete.'' I got the last word<br />

out just before the bell rang.<br />

This exercise was so much fun that I repeated it the next time I taught the course, using a different<br />

randomly selected problem. <strong>The</strong> audio from my ultimately successful attempt to prove hardness is<br />

accessible from the CD-ROM, if you want to hear what the creation of an NP-completeness proof sounds<br />

file:///E|/BOOK/BOOK3/NODE118.HTM (3 of 4) [19/1/2003 1:29:56]

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

Saved successfully!

Ooh no, something went wrong!