NP Completeness

NP Completeness - CS180 Fall 2009 Discussion 5:...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CS180 Fall 2009 Discussion 5: NP-Completeness Intuitively, what constitutes a hard problem? It is possible to solve. When you see the answer, you are able to recognize it quickly. No one seems to know how to solve it efficiently. Let’s have some definitions. NP is a set of problems in Computer Science. In other classes, you were given a problem and asked to solve it. Now I’m going to give you a problem and the solution, and I want you to write a function that verifies that my answer is correct. If you can verify my solution efficiently (that is, in polynomial time), the problem is in NP , even if you have no idea how to come up with the answer in the first place. Maybe it was a “lucky guess” on my part. NP -Complete are the “hardest” of these. Not only are they in NP , but we can prove something about their solutions. If you can solve it efficiently – not just verify a solution, but produce one – then you can solve every other problem in NP efficiently. In 1971, Cook and Levin proved that there is such a thing as an NP -Complete problem. The proof is very elaborate and outside the scope of this class. The key benefit of Cook’s proof is that it makes it easier for you to show that other problems are NP -Complete. To show a problem Y is NP -Complete, do the following three steps: 1. Y NP . 2. Choose a problem X that is known to be NP -Complete. 3. Prove that X p Y . 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
A note about decision and optimization Most NP -Complete problems we discuss here are written as boolean problems: they are asked to make a decision, yes or no, as to whether a problem is solvable in a given way. As such, they are
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

NP Completeness - CS180 Fall 2009 Discussion 5:...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online