Presentation is loading. Please wait.

Presentation is loading. Please wait.

Additional Classes: co-NP class Krishna Mahesh Deevela Murali.

Similar presentations


Presentation on theme: "Additional Classes: co-NP class Krishna Mahesh Deevela Murali."— Presentation transcript:

1 Additional Classes: co-NP class Krishna Mahesh Deevela Murali

2 The class P  A language L (equivalently decision problem) is in the class P if there is a polynomial time algorithm A for deciding L;  Given a string x, A correctly decides if x ∈ L and running time of A on x is polynomial in |x|, the length of x.  Given a context-free grammar and a string, can that string be generated by that grammar?

3 The Class NP  Nondeterministic polynomial-time  Language L is in NP if there is a non-deterministic polynomial time algorithm A (Turing Machine) that decides L.  For x ∈ L, A has some non-deterministic choice of moves that will make A accept x  For x ∉ L, no choice of moves will make A accept x  L has an efficient certifier C(.,.)

4 Complement Class  In general, if C is a complexity class  co-C is the complement class, containing all complements of languages in C  L  C implies (  * - L)  co-C  (  * - L)  C implies L  co-C  Given a decision problem X, its complement X is the collection of all instances s such that s ∉ L(X)

5 P is closed under complementation  Decision problem X is in P if and only if X is in P.  If X is in P let A be a polynomial time algorithm for X.  Construct polynomial time algorithm A’ for X as follows: given input x, A’, A runs on x and if A accepts x, A’ rejects x and if A rejects x then A’ accepts x.  Only if direction is essentially the same argument.

6 Co-P = P  Given a polynomial-time TM M for L, we can modify M to accept the complement of L as follows:  Make each accepting state of M a nonaccepting state from which there are no moves. Thus, if M accepts, the new TM (L) will halt without accepting.  Create a new state q, which is the only accepting state in the new TM. For each state-symbol combination that has no move, the new TM enters state q, where upon it accepts and halts.

7 Co-NP  Co-NP is the set of languages whose complements are in NP  Co-NP is the class of all decision problems X such that X ∈ NP.  Ex: UnSAT, No-Hamiltonian-Cycle, No-3-Colorable.  If L is a language in co-NP then that there is a polynomial time certifier/verifier C(.,.) such that:  for s ∉ L there is a proof t of size polynomial in |s| such that C(s,t) correctly says NO  for s ∈ L there is no proof t for which C(s,t) will say NO  co-NP – the collection of languages with succinct certificates of disqualification

8 NP ∩ co-NP  Efficient certifiers for yes-instances  Efficient disqualifiers for no-instances  Consider the decision problem PRIME:  Given a number x, is it prime?  This problem is in co-NP.  ∀ y(y < x → (y = 1 ∨ ¬(div(y, x))))

9 NP ∩ co-NP (Contd..)  Another way of putting this is that Composite is in NP.  Pratt (1976) showed that PRIME is in NP, by exhibiting succinct certificates of primality based on:  A number p > 2 is prime if, and only if, there is a number r, 1 < r < p, such that r p-1 = 1 mod p and r (p − 1/q) ≠ 1 mod p for all prime divisors q of p − 1  This proves there is a class NP ∩ Co-NP NPCo-NPNP ∩ Co-NP

10 NP ∩ co-NP (Contd..)  In 2002, Agrawal, Kayal and Saxena showed that PRIME is in P. Proof is excluded… Now we get doubt that P=Np ∩ Co-NP.. Yes that’s right.  Since every language in P has its complement also in P, this complement is also in NP  None NP complete problems have complements in NP & none NP complete has problems in Co-NP  If P=NP, then all three classes are same

11 Suspected Relationship Between Co-NP and Other Classes of Languages Complements of NP Complete NP Complete There are examples on problems in CO-NP ∩ NP but not ∉ P Ex: Parity games, Stochastic Games, Lattice Problems P Co NP NP

12 Suspected Relationship Between Co-NP and Other Classes of Languages Contd..  Consider the complement of the language SAT, which is a member of co-NP, USAT (unsatisfiable).  The strings in USAT include all those strings that code Boolean expressions that are unsatisfiable  Also in USAT are those strings that do not code valid Boolean expressions, because none of those strings are SAT  USAT is not in NP but there is no proof USAT, Invalid Boolean Exp SAT

13 Suspected Relationship Between Co-NP and Other Classes of Languages Contd..  Tautology Problem is in CoNP but not in NP, TAUT  The set of all coded boolean expressions that are tautologies; i.e., they are true for every truth assignment  Expression E is a tautology if and only if (not E) is unsatisfiable, i.e when E ∈ TAUT, (not E) is in USAT and ViseVersa  USAT also contains strings that do not represent valid expressions, while all strings in TAUT are valid expressions.

14 NP-complete Problems and Co-NP  Assume NP and co-NP equal, but large than P.  The fact that we have not been able to find even one NP- complete problem whose complement is in NP is strong evidence that NP ≠Co-NP P NP & Co-NP

15 NP-complete Problems and Co-NP  Theorem NP=co-NP if and only if the complement of some NP-complete problem is in NP  (Only if): Should NP and Co-NP be the same  Every NP-complete problem L, being in NP, is also in co-NP  The complement of a problem in Co-NP is in NP  the complement of L is in NP  (If)  Let P be an NP-complete problem and P’ is in NP  For each L in NP, there is a polynomial-time reduction of L to P  Similarly polynomial reducible to L ’  P ’ is in NP  P= NP = co-NP  P ≠ NP ∩ co-NP = NP = co-NP  P ≠ NP ∩ co-NP ≠ NP ≠ co-NP

16 References  https://courses.engr.illinois.edu/cs473/sp2011/lectures/24_ notes.pdf https://courses.engr.illinois.edu/cs473/sp2011/lectures/24_ notes.pdf  http://www.cl.cam.ac.uk/teaching/0910/Complexity/lectur e9.pdf http://www.cl.cam.ac.uk/teaching/0910/Complexity/lectur e9.pdf  https://kintali.wordpress.com/2010/06/06/np-intersect- conp/ https://kintali.wordpress.com/2010/06/06/np-intersect- conp/  http://corelab.ntua.gr/courses/grad-algo/old/08- 09/material/conp.pdf http://corelab.ntua.gr/courses/grad-algo/old/08- 09/material/conp.pdf

17


Download ppt "Additional Classes: co-NP class Krishna Mahesh Deevela Murali."

Similar presentations


Ads by Google