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 Verification→→Co-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 Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Dividing Integers → Unit Rates → Proportions → Percent Concept → Converting Between Fractions, Decimals, and Percents → Operations with Rational Numbers → Two-Step Equations → Solving Multi-Step Equations → Equations with Variables on Both Sides → Literal Equations → Slope-Intercept Form → Point-Slope Form → Writing Linear Equations → Parallel and Perpendicular Line Slopes → Graphing Linear Equations → Piecewise Functions → Step Functions → Composition of Functions → Inverse Functions → Radical Functions and Graphs → Rational Exponents → Exponential Functions and Graphs → Logarithms Introduction → Big-O Notation and Asymptotic Analysis → Breadth-First Search (BFS) → Shortest Paths in Unweighted Graphs → Dijkstra's Shortest Path Algorithm → Algorithm Analysis and Big-O Notation → Turing Machines → Time Complexity and the Class P → Nondeterministic Turing Machines → NP and Polynomial-Time Verification → co-NP

Longest path: 85 steps · 485 total prerequisite topics

Prerequisites (1)

Leads To (2)