A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

co-NP

College Depth 84 in the knowledge graph I know this Set as goal
18topics build on this
485prerequisites beneath it
See this on the map →
NP and Polynomial-Time VerificationCo-NP and Complementary Complexity ClassesThe Complexity Class Hierarchy
complexity co-NP complexity-classes

Core Idea

co-NP is the class of decision problems whose complements are in NP — equivalently, problems for which "no" answers have short, efficiently verifiable proofs (certificates). The canonical co-NP-complete problem is TAUTOLOGY: given a Boolean formula, is it true under every assignment? While NP captures problems with easily verified "yes" certificates, co-NP captures problems with easily verified "no" certificates. Whether NP equals co-NP is a major open question; if they differ, then no NP-complete problem is in co-NP and no co-NP-complete problem is in NP.

How It's Best Learned

Start from a familiar NP problem (SAT) and construct its complement (UNSAT / TAUTOLOGY). Observe that verifying a "yes" instance of TAUTOLOGY seems to require checking all assignments, whereas verifying a "no" instance just requires one falsifying assignment. This asymmetry between "yes" and "no" certificates is the essence of NP vs co-NP.

Common Misconceptions

Explainer

Start from what you already know about NP: a problem is in NP if "yes" answers have short, efficiently checkable certificates. For SAT, a satisfying assignment is the certificate — hand it to a verifier and it can confirm in polynomial time that the assignment makes the formula true. The difficulty is in *finding* such an assignment, not in checking it. NP is the class where yes-answers are easy to verify even if they are hard to find.

co-NP is the mirror image. A language L is in co-NP if and only if its complement — the language of all strings *not* in L — is in NP. Equivalently, co-NP is the class of problems where *"no" answers have short, efficiently checkable certificates*. The canonical example is TAUTOLOGY: given a propositional formula, is it true under every possible truth assignment? A "no" certificate for TAUTOLOGY is a single falsifying assignment — you can verify it in polynomial time by evaluating the formula. But a "yes" certificate would require confirming that *no* falsifying assignment exists, which seems to require checking all of them. This asymmetry between yes-certificates and no-certificates is exactly the content of the NP vs. co-NP distinction.

Note carefully what co-NP is *not*. It is not the complement of NP as a set of languages. Both NP and co-NP contain all of P — they overlap substantially. The complement of the set NP would exclude P, which is clearly wrong. Rather, co-NP is defined *language-by-language*: for each language L, L is in co-NP iff the complement language {x : x ∉ L} is in NP. So TAUTOLOGY is in co-NP because SAT (its complement) is in NP.

The deepest open question here is whether NP = co-NP. If they are equal, then every problem with efficiently verifiable yes-certificates also has efficiently verifiable no-certificates — a dramatic structural symmetry. We have strong intuition that NP ≠ co-NP (the asymmetry between SAT and TAUTOLOGY feels real), but we cannot prove it. We do know that if P = NP, then NP = co-NP, because P is closed under complement. The converse fails: NP = co-NP is consistent with P ≠ NP. This one-way implication means NP ≠ co-NP would immediately imply P ≠ NP, making NP vs. co-NP a potentially more approachable stepping stone in the P vs. NP program — though no one has cracked either.

Practice Questions 5 questions

Prerequisite Chain

Understanding ZeroThe Number ZeroCounting to FiveCounting to 10Counting to 20Counting a Set of Objects Up to 20Cardinality: The Last Number CountedMatching Numerals to QuantitiesSubitizing Small QuantitiesAddition Within 10Number Bonds to 10Addition Within 20Doubles and Near DoublesDoubles Facts Within 10Near Doubles Facts Within 20Mental Math Strategies for AdditionMental Math: Adding and Subtracting TensAddition Within 100Repeated Addition as MultiplicationMultiplication as Equal GroupsMultiplication: ArraysBasic Multiplication Facts (0s, 1s, 2s, 5s, 10s)Multiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Multiplication and Division Fact FamiliesRelationship Between Multiplication and DivisionDivision Facts as Inverse of MultiplicationRemainders and Quotients in DivisionDivision Word ProblemsMulti-Step Word ProblemsSolving Multi-Step Word ProblemsMultiplication Word ProblemsDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueIntegers and the Number LineComparing and Ordering IntegersAbsolute ValueAdding IntegersSubtracting IntegersMultiplying IntegersDividing IntegersUnit RatesProportionsPercent ConceptConverting Between Fractions, Decimals, and PercentsOperations with Rational NumbersTwo-Step EquationsSolving Multi-Step EquationsEquations with Variables on Both SidesLiteral EquationsSlope-Intercept FormPoint-Slope FormWriting Linear EquationsParallel and Perpendicular Line SlopesGraphing Linear EquationsPiecewise FunctionsStep FunctionsComposition of FunctionsInverse FunctionsRadical Functions and GraphsRational ExponentsExponential Functions and GraphsLogarithms IntroductionBig-O Notation and Asymptotic AnalysisBreadth-First Search (BFS)Shortest Paths in Unweighted GraphsDijkstra's Shortest Path AlgorithmAlgorithm Analysis and Big-O NotationTuring MachinesTime Complexity and the Class PNondeterministic Turing MachinesNP and Polynomial-Time Verificationco-NP

Longest path: 85 steps · 485 total prerequisite topics

Prerequisites (1)

Leads To (2)