Fact-checked by Grok 2 weeks ago

co-NP

In , co-NP is the complexity class consisting of all decision problems whose complements are in NP; formally, a L is in co-NP if its complement \overline{L} is in NP. This means that for problems in co-NP, negative instances ("no" answers) can be verified efficiently in polynomial time using a short , analogous to how positive instances in NP have succinct proofs. Equivalently, membership in co-NP can be characterized using a universal quantifier: there exists a polynomial-time verifier such that an input x is in L if and only if for all witness strings w of polynomial length, the verifier accepts (x, w). The class co-NP plays a central role in understanding the structure of polynomial-time solvable problems and beyond. It is known that the deterministic polynomial-time class is contained in the intersection NP ∩ co-NP, since problems in P have efficient decision procedures that provide both "yes" and "no" certificates trivially. Notable examples of problems in NP ∩ co-NP include PRIMES (the set of prime numbers), which admits both succinct primality certificates and compositeness certificates verifiable in polynomial time, as shown by Pratt's theorem. In contrast, canonical problems like UNSAT (the set of unsatisfiable Boolean formulas, complement of SAT) and TAUT (the set of Boolean tautologies) are complete for co-NP under polynomial-time reductions, meaning they are among the hardest problems in the class and every co-NP problem reduces to them efficiently. A major open question in is whether NP = co-NP, as it would mean every problem in NP has both efficient "yes" and "no" verifiers. The class co-NP is the second level (\Pi_1^p) in the , and its completeness captures challenges in and logic, where proving unsatisfiability or universality is crucial. Unlike NP-complete problems, which are believed to be intractable, co-NP-complete problems share similar hardness properties but focus on universal rather than .

Definition and Fundamentals

Formal Definition

co-NP is the complexity class consisting of all formal languages L \subseteq \{0,1\}^* whose complements \overline{L} = \{ x \in \{0,1\}^* \mid x \notin L \} belong to . A language L is in co-NP if there exists a deterministic polynomial-time verifier V and a p such that:
  • for every no-instance x \notin L, there is a y \in \{0,1\}^{p(|x|)} with V(x,y)=1;
  • for every yes-instance x \in L, V(x,y)=0 for all y \in \{0,1\}^{p(|x|)}.
    This characterization means co-NP problems have short certificates verifiable in time that prove no-instances, analogous to how uses certificates for yes-instances.
In contrast to NP, where polynomial-time verifiers certify membership (yes-instances), co-NP focuses on certifying non-membership (no-instances) via similar mechanisms. co-NP contains the class (or equivalently co-P, as is closed under complementation) since \subseteq , and co-NP is contained in since \subseteq and is closed under complementation.

Relationship to NP

The class co-NP is defined as the collection of all languages whose complements are in NP, formally expressed as \text{co-NP} = \{ \overline{L} \mid L \in \text{NP} \}, where \overline{L} denotes the complement of language L. This structural relationship highlights the symmetry between NP and co-NP: while NP consists of decision problems with efficiently verifiable "yes" instances via nondeterministic polynomial-time computations, co-NP encompasses problems where "no" instances can be similarly verified by checking the corresponding "yes" instances in the complement language. In terms of machine models, co-NP corresponds to the class of languages accepted by co-nondeterministic Turing machines running in polynomial time, where acceptance occurs only if all computation paths accept the input, contrasting with the existential acceptance condition in standard nondeterministic machines for NP. The formalization of co-NP emerged in the early 1970s alongside the development of theory. introduced the class in his seminal 1971 paper, implicitly laying the groundwork for considering complements by demonstrating that satisfiability problems have polynomial-time verifiable solutions, which naturally extends to unsatisfiability in the complementary class. Richard Karp built on this in 1972 by establishing reducibility among numerous combinatorial problems, further solidifying the framework where co-NP arises as the dual class under complementation. This historical context underscores co-NP's role in exploring the boundaries of efficient verification and proof systems within . A central open question in is whether NP equals co-NP. It is known that if P = NP, then NP = co-NP, since P is closed under complementation, implying that NP would inherit this property. However, the converse—whether NP = co-NP implies P = NP—remains unresolved, though most experts that NP ≠ co-NP. Resolving NP = co-NP in the affirmative would mean that for every problem in NP, both yes and no instances have short certificates verifiable in polynomial time, enabling efficient algorithms with proofs for a wide range of hard problems and potentially collapsing levels of the . This equality, if true, would have profound implications for proving and optimization, but it is widely regarded as one of the deepest unsolved problems in the field, separate from yet intertwined with the P versus NP question.

Key Examples

Unsatisfiability

The unsatisfiability problem, commonly denoted as UNSAT, asks whether a given \phi in (CNF) has no satisfying assignment, i.e., no variable valuation that evaluates \phi to true. Formally, the input is a CNF \phi = \bigwedge_{i=1}^m C_i, where each C_i is a disjunction of literals, and the is to determine if \phi is unsatisfiable. This problem serves as a example in co-NP because verifying unsatisfiability directly is challenging, but its complement——admits efficient verification. UNSAT resides in co-NP since a "no" instance (a satisfiable \phi) can be certified by providing a satisfying , which has length in the input size and can be checked in time: substitute the assignment into \phi and confirm that every evaluates to true. This verifier aligns with the general co-NP definition, where "no" instances have short proofs. Equivalently, UNSAT is the complement of the (SAT), and since SAT belongs to —as established by its -time verifiable satisfying assignments—UNSAT is in co-NP by the closure of NP under complementation. In practice, UNSAT plays a pivotal role in and logic, where refutation procedures like reduce a set of to the empty clause if unsatisfiable, thereby proving theorems by . For instance, -based systems derive unsatisfiability certificates from CNF encodings of logical axioms, enabling machine-assisted proofs in domains such as program verification. Despite these advances, no polynomial-time algorithm is known for UNSAT, underscoring its computational hardness and the broader open question of whether co-NP problems can be solved efficiently.

Tautology Problem

The TAUT problem, or tautology problem, is a that takes as input a φ in propositional and determines whether φ is a , i.e., whether it evaluates to true for every possible truth assignment to its variables. This distinguishes TAUT from existential problems like , as it requires confirming the formula's truth across the entire 2^n assignment space for n variables. TAUT belongs to co-NP because instances where φ is not a tautology admit a short certificate: a falsifying that renders φ false. This can be verified in polynomial time by substituting the assignment into φ and evaluating the , which is feasible given the polynomial size of typical representations like . In contrast to problems, where certificates prove membership (yes-instances), co-NP leverages certificates for non-membership (no-instances), highlighting TAUT's role in verifying universal properties. In propositional logic, TAUT directly corresponds to the validity problem, checking if a holds logically true regardless of interpretations, unlike which seeks at least one supporting assignment. Computationally, TAUT is intractable in general, often demanding exponential resources to exhaustively validate assignments, though specialized algorithms handle restricted classes efficiently. It underpins applications in AI planning, where ensuring plans satisfy universal constraints aids goal achievement, and in , where checks confirm properties in models.

co-NP-Completeness

Definition of Completeness

A language L \subseteq \{0,1\}^* is if L \in \text{co-NP} and every language L' \in \text{co-NP} is polynomial-time many-one reducible to L, meaning there exists a polynomial-time f such that for all x \in \{0,1\}^*, x \in L' f(x) \in L. This dual requirement ensures that L is both a member of the class and sufficiently hard to capture the difficulty of the entire class under efficient reductions. The reductions used are polynomial-time many-one reductions, commonly referred to as Karp reductions in this context, which map instances while preserving membership in the co-NP languages. For co-NP problems, these reductions effectively preserve the no-instances of the corresponding NP complement problems: if x is a no-instance for the source problem's NP complement (i.e., x \notin \overline{L'}), then f(x) is a no-instance for the target problem's NP complement (i.e., f(x) \notin \overline{L}). This preservation aligns with the structure of co-NP, where short certificates verify no-instances for the original decision problems. The concept of co-NP-completeness extends the foundational Cook-Levin theorem for to the complementary setting. Specifically, a L is if and only if its complement \overline{L} is NP-complete, as established by the symmetry between and co-NP under complementation; this directly follows from the Cook-Levin theorem proving the problem (SAT) NP-complete, implying that its complement, unsatisfiability (UNSAT), is . co-NP-complete problems are the hardest within co-NP under polynomial-time many-one reductions, serving as benchmarks for the class's computational limits. If any co-NP-complete problem admits a polynomial-time , then co-NP \subseteq P, implying P = co-NP and providing evidence toward resolving the P versus NP question.

Tautology Reduction

The tautology problem, denoted TAUT, is established as co-NP-complete through a polynomial-time many-one reduction from the unsatisfiability problem, UNSAT, which is the canonical co-NP-complete problem as the complement of the NP-complete satisfiability problem SAT. Given an instance of UNSAT, a conjunctive normal form (CNF) formula \phi = \bigwedge_{i=1}^m C_i where each clause C_i = \bigvee_{j=1}^{k_i} l_{ij} and l_{ij} are literals, construct the negated formula \psi = \neg \phi = \bigvee_{i=1}^m \left( \bigwedge_{j=1}^{k_i} \neg l_{ij} \right). This \psi is a disjunctive normal form (DNF) formula obtained by applying De Morgan's laws to each clause, resulting in a structure with exactly m disjuncts, each being the conjunction of the negated literals from the corresponding original clause. The size of \psi is polynomial in the size of \phi, as it involves only negating literals and reorganizing the connectives without introducing new variables or exponential growth, and the construction itself runs in polynomial time via straightforward syntactic transformation. This reduction preserves the answer: \phi is unsatisfiable if and only if \psi is a tautology, since no variable assignment satisfies \phi precisely when every assignment satisfies \psi. The co-NP-completeness of TAUT was shown by in 1971 using Turing reductions in his seminal work, which mirrored the proof of SAT's NP-completeness and introduced the framework for completeness in complement classes. As a result, TAUT serves as a fundamental benchmark for demonstrating co-NP-hardness, influencing the study of proof systems, , and the broader .

Connections to Other Complexity Classes

With P and NP

The class is contained in co-NP because is closed under complementation: for any language L \in \mathsf{P}, its complement \overline{L} is also decidable in polynomial time by a deterministic that simply flips the output of the machine for L. This closure implies \mathsf{P} = \mathsf{co\text{-}P}, and thus \mathsf{P} \subseteq \mathsf{co\text{-}NP} since \mathsf{P} \subseteq \mathsf{NP} by definition, with the complement property extending the inclusion. The relationship between NP and co-NP remains a central open question in : NP \subseteq co-NP if and only if NP = co-NP. This equality would imply that the (PH) collapses to its second level, meaning \Delta_2^\mathsf{P} = \Sigma_2^\mathsf{P} = \Pi_2^\mathsf{P} = \mathsf{PH}, as co-NP \subseteq NP would place the second-level classes \Sigma_2^\mathsf{P} = \mathsf{NP}^\mathsf{NP} and \Pi_2^\mathsf{P} = \mathsf{co\text{-}NP}^\mathsf{NP} into coincidence under relativization to NP oracles. Such a collapse is widely believed unlikely, as it would resolve many alternating quantifier separations in PH to the \Sigma_2^\mathsf{P} level. co-NP is known to be contained in the class IP of languages with interactive proof systems, where a computationally unbounded prover convinces a probabilistic polynomial-time verifier of membership via a polynomial-length interaction. This inclusion follows from the equality = , which encompasses co-NP as PSPACE contains complements of problems through its closure properties. However, co-NP is not known to be contained in BPP, the class of languages decidable by probabilistic polynomial-time algorithms with bounded error; placing co-NP in BPP would similarly collapse to its second level by implying efficient derandomization of alternating computations. Relativization techniques provide evidence for the inequality NP \neq co-NP. In particular, , , and Solovay constructed oracles relative to which NP \neq co-NP, demonstrating that there exist relativized worlds where languages in NP lack short certificates for their complements. These oracle separations show that any proof of NP = co-NP cannot relativize, highlighting the limitations of diagonalization-based methods for resolving the question.

Integer Factorization

The decision version of the problem, known as FACT, asks: given positive integers n > 1 and k \geq 2, does n have a prime at most k? This formulation places FACT in NP, as a "yes" consists of a d with $2 \leq d \leq k such that d divides n, verifiable in polynomial time by and a on d. FACT is also in co-NP, since a "no" certificate for an instance (n, k) is the complete prime of n into distinct primes all exceeding k; verification involves multiplying the factors to recover n and confirming each factor's primality, both doable in time. The primality tests rely on the AKS , which determines whether an integer is prime in deterministic time. Consequently, the language PRIME (recognizing prime numbers) lies in P, implying its complement co-PRIME (recognizing composite numbers) is in co-P, a subclass of co-NP. Although FACT belongs to ∩ co-NP, it is not known to be in , nor is it believed to be NP-complete, as the latter would NP to co-NP—a consequence widely considered unlikely. This positioning suggests FACT may represent an intermediate complexity problem under the assumption P ≠ , neither solvable efficiently in the worst case nor as hard as the hardest problems in . On quantum computers, factors integers in polynomial time, providing a subexponential over the best known classical methods and highlighting the problem's vulnerability to quantum advances, though its classical remains unresolved.

References

  1. [1]
    [PDF] The complexity class coNP - West Virginia University
    coNP as related to NP. Definition (coNP). coNP is the complexity class which contains the complements of problems found in NP. Another way of looking at coNP.
  2. [2]
    [PDF] Complexity Classes - Texas A&M University
    The complexity classes are defined in terms of decision problems. The ... The Class co-NP. Definition co-NP “ tL: L P NPu. Example. The language UNSAT of ...
  3. [3]
    [PDF] CS 2401 - Introduction to Complexity Theory 1 Review
    Definition coNP is the set of all languages for which all their complement language are in NP. Notice that coNP is not the complement of NP. coNP = {L ⊆ {0,1}∗ ...
  4. [4]
    [PDF] 1 coNP and good characterizations In these lecture notes we ...
    1 coNP and good characterizations. In these lecture notes we discuss a complexity class called coNP and its relationship to P and NP.
  5. [5]
    [PDF] Computational Complexity: A Modern Approach
    Computational complexity theory has developed rapidly in the past three decades. The list of surprising and fundamental results proved since 1990.
  6. [6]
    [PDF] The Complexity of Theorem-Proving Procedures
    ∗Transliteration of the original 1971 typewritten paper by Tim Rohlfs (rev. 3). I transcripted basically exactly as Cook wrote the text; frequently, I even ...
  7. [7]
    [PDF] Resolution Theorem Proving - Machine Logic
    Resolution is a refutationally complete theorem proving method: a contradiction. (i.e., the empty clause) can be deduced from any unsatisfiable set of clauses.
  8. [8]
    [PDF] The P versus NP problem - Clay Mathematics Institute
    Karp also introduced the now standard notation P and NP and redefined NP-completeness using the polynomial-time analog of many-one reducibility, a definition ...Missing: formalization | Show results with:formalization
  9. [9]
    [PDF] Cook 1971 - Department of Computer Science, University of Toronto
    1971. Summary. The Complexity of Theorem - Proving Procedures. Stephen A. Cook. University of Toronto. It is shown that any recognition problem solved by a ...
  10. [10]
    [PDF] 1 Importance of the Cook-Levin Theorem 2 Viewing NP as a game
    The proof is easy once you realize that TAUT is essentially the same as the comple- ment of SAT. Since SAT is NP-complete, its complement is coNP-complete. ( ...
  11. [11]
    [PDF] Formal verification
    The simplest method of tautology checking is, given a formula with n primitive propositional variables, to try all 2n possible combinations and see if the ...
  12. [12]
    [PDF] Lecture 8: NP Completeness
    Like the NP-complete class, NPC, we can define the Co-NP-complete class, Co-NPC, which represents the hardest problems in Co-NP as follows:
  13. [13]
    [PDF] P, NP, co-NP, Self Reductions - CS 473: Algorithms
    P = co-P. If P = NP then co-NP = co-P = P. Corollary. If NP 6= co-NP then P 6= NP. Importance of corollary: try to prove P 6= NP by proving that. NP 6= co-NP.
  14. [14]
    [PDF] 1 Defining NP, co-NP, #P - CS@Cornell
    For example, NP-complete and coNP-complete problems are equivalent under polynomial- time Turing reductions, but they are believed to be inequivalent under ...
  15. [15]
    [PDF] Lecture 4: More NP-completeness, NP-search, coNP - Washington
    Jan 15, 2016 · We now give a sampler of NP-completeness proofs for other problems. We first observe that NP-completeness immediately follows for CNFSAT and SAT ...
  16. [16]
    [PDF] The Polynomial Hierarchy and Alternations - Duke Computer Science
    5.2 The polynomial hierarchy. The polynomial hierarchy generalizes the definitions of NP,coNP,Σ ... If P = NP then PH = P (i.e., the hierarchy collapses to P).
  17. [17]
    Relativizations of the P = ? NP Question - SIAM Publications Library
    N P Question. Authors: Theodore Baker, John Gill, and Robert SolovayAuthors Info & Affiliations ... NP-sets are Co-NP-immune relative to a random oracle.
  18. [18]
    [PDF] ‣ P vs. NP ‣ NP-complete ‣ co-NP ‣ NP-hard - cs.Princeton
    May 5, 2013 · Most NP problems are known to be either in P or NP-complete. Notable ... [Edmonds 1965] NP ∩ co-NP. ・If problem X is in both NP and co-NP, then:.
  19. [19]
    [PDF] Chapter 9 Some NP-Complete Problems - CIS UPenn
    To show that Integer factorization is in coNP, we can guess a factorization of N into distinct factors all greater than M, check that they are prime using the ...
  20. [20]
    [PDF] PRIMES is in P - Microsoft
    Prime numbers are of fundamental importance in mathematics in general, and number theory in particular. So it is of great interest to study different.<|control11|><|separator|>
  21. [21]
    Problems known to be in both NP and coNP, but not known to be in P
    Jul 14, 2010 · Its containment in NP is due to Hass, Lagarias, and Pippenger and the containment in co-NP has been shown (but not yet written up?) by Agol.