In computational complexity theory, coNP is a complexity class. A problem is a member of coNP if and only if its complement is in the complexity class NP. In simple terms, coNP is the class of problems for which efficiently verifiable proofs of no instances, sometimes called counterexamples, exist.
An example of an NPcomplete problem is the subset sum problem: given a finite set of integers is there a nonempty subset which sums to zero? To give a proof of a "yes" instance, one must specify a nonempty subset which does sum to zero. The complementary problem is in coNP and asks: "given a finite set of integers, does every nonempty subset have a nonzero sum?" To give a proof of a "no" instance one must specify a nonempty subset which does sum to zero, which is easily verified.
P, the class of polynomial time solvable problems, is a subset of both NP and coNP. P is thought to be a strict subset in both cases (and demonstrably cannot be strict in one case but not the other). NP and coNP are also thought to be unequal. If so, then no NPcomplete problem can be in coNP and no coNPcomplete problem can be in NP.
This can be shown as follows. Assume that there is an NPcomplete problem that is in coNP. Since all problems in NP can be reduced to this problem it follows that for all problems in NP we can construct a nondeterministic Turing machine that decides the complement of the problem in polynomial time, i.e., NP is a subset of coNP. From this it follows that the set of complements of the problems in NP is a subset of the set of complements of the problems in coNP, i.e., coNP is a subset of NP. Since we already knew that NP is a subset of coNP it follows that they are the same. The proof for the fact that no coNPcomplete problem can be in NP is symmetrical.
If a problem can be shown to be in both NP and coNP, that is generally accepted as strong evidence that the problem is probably not NPcomplete (since otherwise NP = coNP).
An example of a problem which is known to be in NP and in coNP is integer factorization: given positive integers m and n determine if m has a factor less than n and greater than one. Membership in NP is clear; if m does have such a factor then the factor itself is a certificate. Membership in coNP is more subtle; one must list the prime factors of m and provide a primality certificate for each one.
Integer factorization is often confused with the closely related primality problem. Both primality testing and factorization have long been known to be NP and coNP problems. The AKS primality test, published in 2002, proves that primality testing also lies in P, while factorization may or may not have a polynomialtime algorithm.^{[1]}
References
External links
Full article ▸
