{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

NP Completeness

NP Completeness - CS180 Fall 2009 Discussion 5...

Info icon This 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
Image of page 1

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

View Full Document Right 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
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern