The P vs. NP Problem

Graduate Depth 64 in the knowledge graph I know this Set as goal
Unlocks 102 downstream topics
P-vs-NP open-problem complexity foundations

Core Idea

The P vs. NP problem asks whether every problem whose solution can be verified in polynomial time can also be solved in polynomial time: does P = NP? It is one of the seven Millennium Prize Problems and widely considered the most important open question in computer science. Most researchers believe P ≠ NP — that some problems are intrinsically harder to solve than to verify — but no proof exists. A P = NP proof would imply efficient algorithms for optimization, cryptography, and AI problems; P ≠ NP underpins the security of virtually all modern cryptographic systems.

How It's Best Learned

Study why the question is hard to resolve: both directions require proving a lower bound (that no polynomial algorithm exists) or an algorithm, both of which have resisted all attempts. Examine the philosophical and practical consequences of each outcome.

Common Misconceptions

Explainer

From your study of nondeterministic complexity, you know that the class NP consists of decision problems where a "yes" answer can be *verified* in polynomial time given a suitable certificate. The class P consists of problems that can be *solved* in polynomial time. Every problem in P is also in NP — if you can solve it quickly, you can certainly verify a solution quickly. The P vs. NP question asks whether the reverse is also true: can every efficiently verifiable problem also be efficiently solved?

Consider the Boolean satisfiability problem (SAT): given a logical formula, is there an assignment of true/false to its variables that makes the formula true? If someone hands you a candidate assignment, you can plug in the values and check in polynomial time — so SAT is in NP. But finding a satisfying assignment from scratch seems to require searching through exponentially many possibilities. No one has found a polynomial-time algorithm for SAT, nor has anyone proved that no such algorithm exists. This is the essence of the P vs. NP problem.

The reason the question is so hard to resolve is that it demands something unusual from mathematics. Proving P = NP would require discovering a single clever algorithm — but proving P ≠ NP requires showing that *no possible algorithm*, no matter how ingenious, can solve certain problems in polynomial time. This is a lower bound proof, and lower bounds are notoriously difficult in complexity theory. Decades of attempts have produced barrier results (relativization, natural proofs, algebrization) showing that most known proof techniques are fundamentally incapable of resolving the question.

The practical stakes are enormous. If P = NP, then problems in scheduling, protein folding, circuit design, and artificial intelligence would all have efficient solutions — and modern cryptography, which relies on the assumed hardness of problems like integer factorization and discrete logarithms, would collapse. If P ≠ NP (the consensus belief), it would confirm that verification is fundamentally easier than discovery — a principle that resonates far beyond computer science. It would mean that creativity in finding solutions is genuinely harder than the mechanical task of checking them, providing a formal foundation for the security guarantees that underpin digital commerce, communication, and trust.

Practice Questions 5 questions

Prerequisite Chain

Counting to 10Counting to 20Understanding ZeroThe Number ZeroCounting to FiveOne-to-One CorrespondenceCombining Small Groups Within 5Addition Within 10Addition Within 20Two-Digit Addition Without RegroupingTwo-Digit Addition with RegroupingAddition Within 100Repeated Addition as MultiplicationMultiplication 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 100Two-Digit by One-Digit DivisionDivision with RemaindersRemainders and Quotients in DivisionDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueReading and Writing DecimalsComparing and Ordering DecimalsAdding and Subtracting DecimalsMultiplying DecimalsDividing DecimalsDividing FractionsMixed Number ArithmeticOrder of OperationsInteger Order of OperationsVariable ExpressionsCombining Like TermsOne-Step EquationsTwo-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 IntroductionTime and Space ComplexityTime Complexity Classes: P and EXPTIMENondeterministic Time Complexity and NPThe P vs. NP Problem

Longest path: 65 steps · 353 total prerequisite topics

Prerequisites (1)

Leads To (1)