This preview shows pages 1–9. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: NPCompletenessNPCompletenessLimits of ComputationClayton JohnsonEdna ReiterLimits of Computation by Johnson & Reiter2Two definitions for NPDefinition 6.1: A decision problem P is in NPif there is a Nondeterministic Turing Machine that runs in time bounded by a polynomial.Definition 6.2: A decision problem is in NPif and only if it has a polynomial verifier Verifier = Turing machine that checks ifa proposed solution C is truly a solutionLimits of Computation by Johnson & Reiter3Examples of verifiersGiven a graph G, the sequence of nodes 1,4,2,9,8 (the certificate) is a path from node 1 to node 8The boolean expression (x ∨z) ⋀(¬y ∨z) ⋀(x ∨¬y) ⋀( ¬y) is true for (x,y,z) = (1,0,1) = certificateGiven an array A, the number M is the maximum value in the array. (M is the certificate)Given integer N and integers n1, …nm, there are k of them that sum to NLimits of Computation by Johnson & Reiter4Examples of verifiersPath 1,4,2,9,8: Check that there are edges 14, 42, 29, and 98Boolean: (x V z) ⋀(¬y V z) ⋀(x V ¬y) ⋀( ¬y) = (1∨1) ⋀(1∨1) (⋀10) (∨ ⋀1) which is trueA has max M: check ai<= M for all i in the arrayVerify each is polynomial!!!Limits of Computation by Johnson & Reiter5Nondeterministic PolyTimeTheorem :A language L is in NP if and only ifL can be decided by a polytime nondeterministic TM;That is, definitions 6.1 and 6.2 are equivalent.Proof: Let A∈NPhave an O(nk) time verifier V. A polytime NTM can guess the O(nk) certificate c for x∈A and check that it is a certificate.Let N be the O(nk) time nondeterministic decider for B. The path to the accept state is a certificate, and is polynomial. The verifier only needs to show that this path does lead to the accept state.Limits of Computation by Johnson & Reiter6Nondeterministic PolyTimeCorollary: Let NTIME(t(n)) be the class of languages decidable by a O(t(n)) nondeterministic Turing machine. Theni,...2,1kk)n(NTIME==NPAside: Most of the time, the certificate/verifierway of looking at NP problems gives morerelevant information.Note that only proofs for x∈A are required,not for the complement x∉A.Limits of Computation by Johnson & Reiter7Boolean Formulas and SATA Boolean variablex can be TRUE or FALSE,which is also denoted by “1” or “0”.Standard Boolean operationsare AND (x∧y),OR (x∨y), and NOT (¬x or also x ).Typical Boolean formula: φ(x,y) = (¬x∨y) ∧(x∨¬y).This φis satisfiable (by the assignmentsx=y=TRUE and x=y=FALSE).SAT = {<φ>  φis a satisfiable Boolean formula}Limits of Computation by Johnson & Reiter8Conjunctive Normal FormLiteral= Boolean variable (x) or its negation (¬x).Clause= A set of ORed literals, like (x ∨¬y ∨z)A formula φis in conjunctive normal form(CNF),if it is the AND of clauses. For example:A 3CNFformula has only clauses with 3 literals:)yyz()z()yx()z,y,x(∨∨∧∧∨=φ)yyz()zzz()zyx()z,y,x(∨∨∧∨∨∧∨∨=φ3SAT = {<φ>  φis a satisfiable 3CNF formula}Limits of Computation by Johnson & Reiter...
View
Full
Document
This note was uploaded on 07/11/2011 for the course CSUEB cs 6260 taught by Professor Eddie during the Spring '11 term at CSU East Bay.
 Spring '11
 eddie

Click to edit the document details