University of Virginia, Department of Computer Science CS200: Computer Science, Spring 2004

Notes: Wednesday 21 April 2004

• Monday, 26 April (last day of class): PS8
• Friday, 30 April, 4:55pm: Final Exam (handed out 26 April)

Notes

What is the difference between a tractable and intractable problem?

What does it mean for a problem to be NP-complete?

What are the characteristics of NP-complete problems?

Problem Classification Arguments
To show a problem is decidable/in NP/in P, you need to show it is easy enough to be solved with a procedure in that class:
• Decidable: it is easy enough to be solved by some procedure that always terminates
• NP: it is easy enough to be solved by a procedure that tries an exponential number of guesses, but takes only P-time to check one if correct
• P: it is easy enough to be solved by a polynomial time procedure (that is, a procedure that is O(nk).)

To show a problem is undecidable or NP-complete, you need to show it is as hard as a problem you already know is in that class:

• Undecidable: if you had a terminating procedure that solves this problem, you could use it to solve a known undecidable problem (e.g., the halting problem).
• NP-Complete: if you had a procedure that solves this problem, you could use it to solve a known NP-Complete problem (e.g., 3SAT). Subtlety: the transformation of the problem and answer must be in P.
How would you convince someone the smiley puzzle is NP-complete?

How would it impact medicine if you discovered a Θ(n7) procedure that solves the smiley puzzle?

How would it impact electronic commerce if you discovered a Θ(n7) procedure that solves the smiley puzzle?

How would it impact electronic commerce if you discovered a Θ(5n) procedure that solves the smiley puzzle?

Is the smiley puzzle harder than the Cracker Barrel Peg Board puzzle?