CSCI 2670 Introduction to Theory of Computing December 1, 2004
2 Agenda Yesterday –The Class NP –Value is exponential in length Today –More on the class NP –Quiz
December 1, Announcement
December 1, The class NP Definition: A verifier for a language A is an algorithm V, where A={w|V accepts for some string c} The string c is called a certificate of membership in A. Definition: NP is the class of languages that have polynomial-time verifiers.
December 1, Is NP closed under complementation? For example, can we verify in polynomial time that a graph cannot be 3-colored? –Not obviously –It seems we need to check many 3- colorings before we can conclude that none exist The 3-coloring problem is in coNP
December 1, Who wants $1,000,000? In May, 2000, the Clay Mathematics Institute named seven open problems in mathematics the Millennium Problems –Anyone who solves any of these problems will receive $1,000,000 –Proving whether or not P equals NP is one of these problems
December 1, What we know NP PcoNP
December 1, What we don’t know NP PcoNP Are there any problems here?
December 1, Solving NP problems The best-known methods for solving problems in NP that are not known to be in P take exponential time –Brute force search We don’t know if NP is actually in a smaller complexity class
December 1, NP-completeness A problem C is NP-complete if finding a polynomial-time solution for C would imply P=NP
December 1, An NP-complete problem A formula is Boolean if each of its variables can be assigned the values TRUE (1) or FALSE (0) A Boolean formula is satisfiable if there is some assignment of values that results in the formula evaluating to TRUE SAT: Is a given Boolean formula satisfiable? SAT is NP-complete
December 1, Examples (x y) ( x y) –Satisfiable – e.g., x = y = 1 ((x y) ( x z)) (( x y) ( y z)) –Satisfiable – e.g., x = 0, y = z = 1 ((x y) ( x z)) ((x y) ( y z)) –Unsatisfiable
December 1, Proving a problem is NP-complete A problem C is NP-complete if finding a polynomial-time solution for C would imply P=NP If a polynomial-time solution is found for C, then that solution can be used to find a polynomial-time solution for any other problem in NP –What does this remind you of? –Reductions!
December 1, Reductions and NP-completeness If we can prove an NP-complete problem C can be polynomially reduced to a problem A, then we’ve shown A is NP-complete –A polynomial-time solution to A would provide a polynomial-time solution to C, which would imply P=NP
December 1, Polynomial functions Definition: A function f:Σ * Σ * is a polynomial time computable function if some polynomial time Turing machine M exists that halts with just f(w) on its tape, when started on any input w.
December 1, Polynomial reductions Definition: Language A is polynomial- time reducible to language B, written A ≤ P B, if a polynomial time computable function f:Σ * Σ * exists, where for every w w A iff f(w) B f f