week-13 - Decision vs. Optimization In studying...

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

View Full Document Right Arrow Icon
1 Decision vs. Optimization In studying NP-Completeness and intractable problems, our job will be easier if we can limit ourselves to the decision versions of these problems. This will be equivalent, as long as any solution found is also accompanied by a “certificate” that can be used to verify the answer. Certainly it is easier to reduce one yes/no problem into another, but is it really true that if one version is intractable, so will the other? The Conversions If we know the answer to the optimization version of s problem, it is trivial to convert it to the decision version. We simply compare the optimal answer the restriction that we are being asked to make the decision on. The other direction is a bit tougher. We can always do this by calling the decision problem a polynomial number of times. In fact, the most calls that will be made is equal to the log of the number of possible restrictions that we can ask in the decision problem. Example: Minimum Vertex Cover In the Vertex Cover Decision Problem, we ask if a vertex cover is possible using exactly k vertices, and the certificate returns an example cover. To find the minimum vertex cover, we can use the brute force technique of simply running it n times on all possible cover sizes, and then taking the minimal one. Even better, we can use a binary search, and only run it on log n times.
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 The Theory of NP-Completeness NP-Complete refers to a class of problems where we can’t find a fast solution, but we also can’t prove that no fast algorithm exists! So, what’s an algorithmist to do? By the early ’70s, hundreds of problems were stuck in this limbo. The theory of NP-Completeness, developed by Stephen Cook and Richard Karp, provided tools to show that all of these problems were really the same problem. P vs. NP The precise distinction between P and NP is rather technical, requiring formal language theory and Turing machines to state correctly. However, intuitively a problem is in P , (i.e., it is referred to as Polynomial) if it can be solved in time polynomial in the size of the input. A problem is in NP (Non-deterministically Polynomial) if, given a detailed answer, it is possible to verify its correctness within time polynomial in the size of the input. Examples of P and NP Example P - What is the minimal path from x to y in G ? Example NP - Is there a TSP tour in G of length less than k ? Given the tour, it is easy to add up the costs and convince me it is correct. Example not NP - How many TSP tours are there in G of length less than k . Since there can be an exponential number of them, we can prove that we cannot count them all in polynomial time.
Background image of page 2
3 Polynomial vs. Exponential Time n f(n) = n f(n) = n 2 f(n) = 2 n f(n) = n! 10
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/25/2008 for the course CSE 830 taught by Professor Ofria during the Spring '08 term at Michigan State University.

Page1 / 13

week-13 - Decision vs. Optimization In studying...

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

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