{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

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

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.

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

View Full Document
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.
3 Polynomial vs. Exponential Time n f(n) = n f(n) = n 2 f(n) = 2 n f(n) = n! 10 0.01 ms 0.1 ms 1 ms 3.63 sec 20 0.02 ms 0.4 ms 1 sec 8x10 4 yrs 30 0.03 ms 0.9 ms 18.3 min 40 0.04 ms 1.6 ms 13 days 50 0.05 ms 2.5 ms 36.5 yrs 100 0.1 ms 10 ms 4x10 16 yrs 1000 1 ms 1 sec Lets take f(1) = 1 μ s ; how do functions grow?

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• 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.

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

• 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.

Dana University of Pennsylvania ‘17, Course Hero Intern

• 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.

Jill Tulane University ‘16, Course Hero Intern