------------------------------------------------ COMP SCI 731 - Lecture 5 - Tuesday, Nov 13, 2000 ------------------------------------------------ Today: o P and NP o Definitions of reductions and NP-completeness o Another reduction: HC < TSP Announcemnt: quiz next Tuesday P and NP -------- Make a broad distinction: "efficient" verses "inefficient" corresponding to P and not P. Describe NP informally. Go through example problems: CONNECTIVITY 3SAT CLIQUE SUBSET SUM PRIMES Which are in P and which are in NP? Formally define P and NP. P = { L: L is a language and there exists a TM M s.t. * x in L ==> M(x) says YES * x not in L ==> M(x) says NO * For some polynomial poly, for all x, #steps_M(x) <= poly(|x|) NP = { L: L is a language and there exists a TM V (the "verifier") such that * x in L ==> there is some c ("the certificate") s.t. M(x,c)=YES * x not in L ==> for all c M(x,c)=NO * For some polynomial poly, for all x, #steps_M(x,c) <= poly(|x|) } Reductions ---------- Turing-reductions: Let A and B be problems. We say that A \redt B if there is a polynomial time algorithm M, having oracle access to B, that solves A. Many-one poly-time reductions. Let A and B be languages (decision questions). We say that A \redp B if there is a polynomial-time computable f such that x in A iff f(x) in B. We will use the latter type of reduction. * Prove transitivity of \redp Definition [Cook-Levin] ------------------------------------ A language A is NP-complete if (1) A is in NP (2) If L is in NP then L \redp A ------------------------------------ Strategy for showing A is NP-complete (1) Show that A is in NP. (2) Show that, for some NP-complete problem L, L\redp A. Explain why this works. Let us SUPPOSE that 3SAT is NP-complete. Then we can CONCLUDE that CLIQUE is NP-Complete, because we've show that 3SAT redp CLIQUE. A reduction ----------- HC < TSP