{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

21-nphard - Algorithms Lecture 21 NP-Hard Problems The...

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

View Full Document Right Arrow Icon
Algorithms Lecture 21: NP-Hard Problems The wonderful thing about standards is that there are so many of them to choose from. — Real Admiral Grace Murray Hopper If a problem has no solution, it may not be a problem, but a fact — not to be solved, but to be coped with over time. — Shimon Peres 21 NP-Hard Problems 21.1 ‘Efficient’ Problems A generally-accepted minimum requirement for an algorithm to be considered ‘efficient’ is that its running time is polynomial: O ( n c ) for some constant c , where n is the size of the input. 1 Researchers recognized early on that not all problems can be solved this quickly, but we had a hard time figuring out exactly which ones could and which ones couldn’t. there are several so-called NP-hard problems, which most people believe cannot be solved in polynomial time, even though nobody can prove a super-polynomial lower bound. Circuit satisfiability is a good example of a problem that we don’t know how to solve in polynomial time. In this problem, the input is a boolean circuit : a collection of A ND , O R , and N OT gates connected by wires. We will assume that there are no loops in the circuit (so no delay lines or flip-flops). The input to the circuit is a set of m boolean (T RUE / F ALSE ) values x 1 ,..., x m . The output is a single boolean value. Given specific input values, we can calculate the output of the circuit in polynomial (actually, linear ) time using depth-first-search, since we can compute the output of a k -input gate in O ( k ) time. x y x y x y x y x x An And gate, an Or gate, and a Not gate. x 1 x 2 x 3 x 4 x 5 A boolean circuit. inputs enter from the left, and the output leaves to the right. The circuit satisfiability problem asks, given a circuit, whether there is an input that makes the circuit output T RUE , or conversely, whether the circuit always outputs F ALSE . Nobody knows how to solve this problem faster than just trying all 2 m possible inputs to the circuit, but this requires exponential time. On the other hand, nobody has ever proved that this is the best we can do; maybe there’s a clever algorithm that nobody has discovered yet! 1 This notion of efficiency was independently formalized by Alan Cobham (The intrinsic computational difficulty of functions. Logic, Methodology, and Philosophy of Science (Proc. Int. Congress) , 24–30, 1965), Jack Edmonds (Paths, trees, and flowers. Canadian Journal of Mathematics 17:449–467, 1965), and Michael Rabin (Mathematical theory of automata. Proceedings of the 19th ACM Symposium in Applied Mathematics , 153–175, 1966), although similar notions were considered more than a decade earlier by Kurt Gödel and John von Neumann. 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
Algorithms Lecture 21: NP-Hard Problems 21.2 P, NP, and co-NP A decision problem is a problem whose output is a single boolean value: Y ES or N O .
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