DOC PREVIEW
SJSU CS 146 - Lecture

This preview shows page 1-2-3-24-25-26-27-48-49-50 out of 50 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 50 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 50 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 50 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 50 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 50 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 50 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 50 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 50 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 50 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 50 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 50 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

NP-complete ProblemsPowerPoint PresentationSlide 3Slide 4Slide 5Slide 6Slide 7Slide 8Slide 9Slide 10Slide 11Slide 12Slide 13Slide 14Slide 15Slide 16Slide 17Slide 18Slide 19Slide 20Slide 21Slide 22Slide 23Slide 24Slide 25Slide 26Slide 27Slide 28Slide 29Slide 30Slide 31Slide 32Slide 33Slide 34Slide 35Slide 36Slide 37Slide 38Slide 39Slide 40Slide 41Slide 42Slide 43Slide 44Slide 45Slide 46Slide 47Slide 48Slide 49Slide 50NP-complete ProblemsProf. Sin-Min LeeDepartment of Computer ScienceDecision Problems To keep things simple, we will mainly concern ourselves with decision problems. These problems only require a single bit output: ``yes'' and ``no''. How would you solve the following decision problems? Is this directed graph acyclic? Is there a spanning tree of this undirected graph with total weight less than w? Does this bipartite graph have a perfect (all nodes matched) matching? Does the pattern p appear as a substring in text t?P P is the set of decision problems that can be solved in worst-case polynomial time: If the input is of size n, the running time must be O(nk). Note that k can depend on the problem class, but not the particular instance. All the decision problems mentioned above are in P. P: Polynomial algorithms - These include all the sorting algorithms we've seen, with running times on the order of nlgn and n2. Running times like n3 and 4, though considerably slower, are also polynomial time.NP Technically speaking: A problem is in NP if it has a short accepting certificate. An accepting certificate is something that we can use to quickly show that the answer is ``yes'' (if it is yes). Quickly means in polynomial time. Short means polynomial size. This means that all problems in P are in NP (since we don't evenneed a certificate to quickly show the answer is ``yes''). But other problems in NP may not be in P. Given an integer x, is it composite? How do we know this is in NP?Good Guessing Another way of thinking of NP is it is the set of problems that can solved efficiently by a really good guesser. The guesser essentially picks the accepting certificate out of the air(Non-deterministic Polynomial time). It can then convince itself that it is correct using a polynomialtime algorithm. (Like a right-brain, left-brain sort of thing.) Clearly this isn't a practically useful characterization: how could we build such a machine?Exponential Upperbound Another useful property of the class NP is that all NP problems canbe solved in exponential time (EXP). This is because we can always list out all short certificates in exponential time and check all O(2nk) of them. Thus, P is in NP, and NP is in EXP. Although we know that P isnot equal to EXP, it is possible that NP = P, or EXP, or neither. Frustrating! NP-hardness As we will see, some problems are at least as hard to solve as any problem in NP. We call such problems NP-hard. How might we argue that problem X is at least as hard (to within a polynomial factor) as problem Y?If X is at least as hard as Y, how would we expect an algorithm that is able to solve X to behave? NP-CompletenessBasically, computer scientists have used computer theory to prove that some of the problems we want to solve are members of a group of problems called NP-Complete. A problem can be included in this group by proving its similarity to other problems in the group. By similarity, we mean that if one member of the group can be solved in polynomial time, we can translate the solution appropriately to solve any other problem in the group in polynomial time. So, this is a very important group. A solution for any of these problems that is polynomial proves that P=NP (not just P-NP-complete.)Cook's TheoremThe Satisfiability problem x = ((A+B)C)((ABC')+C)(ABC')Can you assign boolean (true or false) values to each of A, B, and C so that x is true? If so, we say that the circuit is 'satisfiable.' This circuit (which could also be drawn with AND/OR/NOT gates) is unsatisfiable. (Make sure you review how to draw an AND/OR/NOT circuit from a boolean equation. You've usually seen the equations written with x, y, and z instead of A, B, and C.)Implications of NP-CompletenessMost people don't believe that P=NP, because so many computer scientists have tried to solve so many of the problems in the NP-Complete group of problems that it's unlikely that they all weren't capable. So, once you prove that a problem is NP-Complete, conventional wisdom tells you to stop trying to solve the


View Full Document

SJSU CS 146 - Lecture

Download Lecture
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?