Computational Complexity

Hardness.
Made clear.

A field guide to the resources that bound computation: time, memory, randomness, proofs, communication, and quantum coherence.

PSPACE PH NP BQP P P ⊆ BPP ⊆ BQP ⊆ PP ⊆ PSPACE
Founded
1965
Resources
Time · Space · Qubits
Known classes
≈ 545
Frontier
BQP ? PH
Foundations

It is not about what computers can do. It is about what they can do efficiently.

Computability asks whether an algorithm exists. Complexity asks how expensive that algorithm must be.

A class is a resource budget.
$\mathrm{DTIME}(f(n)) = \{L : L \text{ is decided in } O(f(n)) \text{ time}\}$

A complexity class fixes a computational model and a resource bound, then collects exactly the languages solvable within it. Change the model from deterministic to randomized or quantum, and the universe moves.

Resources

time, space, randomness, advice, queries, communication, qubits

Verdicts

decide, output, approximate, sample, verify, interact

Models

Turing machines, circuits, proof systems, randomized algorithms, quantum circuits

Question

Can the resource be removed, simulated, amplified, or proven necessary?

Class Zoo

A map of the computational universe.

The famous inclusions are known. The famous separations are mostly not.

EXPTIME PSPACE = IP = QIP PH NP BQP BPP P easy undecidable beyond the edge
PDeterministic polynomial time. The usual meaning of efficient.
NPSolutions verified in polynomial time. SAT is complete.
BPPRandomized polynomial time with bounded error.
BQPQuantum polynomial time. Contains factoring and discrete log.
QMAQuantum proofs checked by a quantum verifier.
PPProbabilistic majority. Contains BQP and equals PostBQP.
Toolkit

How hardness gets proven.

Diagonalization

$\exists L \in \mathrm{TIME}(f) \setminus \mathrm{TIME}(g)$

Construct a machine that disagrees with every smaller machine on at least one input. It gives hierarchy theorems, but hits the relativization barrier for $P$ vs. $NP$.

HartmanisStearns

Reductions

$A \le_p B$

Translate one problem into another in polynomial time. If $B$ is easy, so is $A$; if $A$ is hard, $B$ inherits the burden.

CookKarp

Circuit bounds

$\mathrm{size}(C) \ge n^{\omega(1)}$

A super-polynomial circuit lower bound would separate a problem from $P/\mathrm{poly}$, and therefore from $P$.

RazborovHåstad

Probabilistic proofs

$\mathrm{PCP}[O(\log n), O(1)]$

A verifier can be convinced by reading a constant number of proof bits. This became the engine for hardness of approximation.

PCPDinur
2ⁿ

One more bit can double the work.

The dividing line in complexity is the gulf between polynomial and exponential growth. At realistic input sizes, the difference is not academic; it is the difference between computation and impossibility.

n^log n 2ⁿ input size n log time
Reductions

The currency of hardness.

A reduction turns one problem into another. This is how local difficulty becomes a global map.

SAT is NP-complete.

$L \in NP \implies L \le_p \mathrm{SAT}$

Every $NP$ computation can be encoded as a Boolean formula whose satisfying assignments are accepting executions. SAT became the first complete problem for $NP$.

Cook-Levin1971

Karp's 21 problems.

$\mathrm{SAT} \le_p \mathrm{3SAT} \le_p \mathrm{CLIQUE} \le \ldots$

3-Coloring, Hamiltonian Cycle, Subset Sum, Travelling Salesman, Vertex Cover: reductions made hardness portable.

Karp1972

NP-intermediate exists.

$P \ne NP \Rightarrow \exists L \in NP \setminus (P \cup NPC)$

If $P \ne NP$, not every problem in $NP$ is easy or complete. Factoring and graph isomorphism are conjectured to live in this middle terrain.

Ladner1975

Hardness, amplified.

$\mathrm{gap\text{-}3SAT}_{\varepsilon} \text{ is NP-hard}$

The PCP theorem shows that even approximating certain problems can be hard. Dinur's proof made the amplification beautifully combinatorial.

PCP2007
Quantum Complexity

A second kind of computer.

A quantum computer is not faster because it has a higher clock speed. It is different because probabilities are replaced by amplitudes: complex numbers that can cancel and reinforce.

|q0⟩
H
Rz
M
|q1⟩
H
QFT
M
|q2⟩
T
M

BQP

Decision problems solved by polynomial-size quantum circuits with bounded error. Contains $P$, $BPP$, factoring, and discrete log.

$P \subseteq BPP \subseteq BQP \subseteq PP$

QMA

The quantum analogue of $NP$: a polynomial-size quantum proof checked by a quantum verifier. Local Hamiltonian is complete.

$NP \subseteq QMA \subseteq PP$

QCMA

A classical proof checked by a quantum machine. Separating it from $QMA$ would show that genuinely quantum proofs carry more power.

$NP \subseteq QCMA \subseteq QMA$

QIP

Quantum interactive proofs. Surprisingly, quantum messages give no more power than classical interaction at this scale.

$QIP = IP = PSPACE$

PostBQP

Allow postselection on exponentially unlikely measurement outcomes, and quantum computation jumps exactly to $PP$.

$\mathrm{PostBQP} = PP$

MIP*

Entangled multi-prover proofs can recognize every computably enumerable language. Complexity touches logic.

$MIP^* = RE$
Shor

Period finding turns factoring and discrete logarithms from sub-exponential classical problems into polynomial-time quantum ones.

Grover

Amplitude amplification searches an unstructured space of size $N$ in $O(\sqrt{N})$ queries, and that gain is optimal.

Simulation

Hamiltonian simulation treats molecules and materials as native quantum data, making chemistry a natural target.

Sampling

Random circuits and boson sampling seek advantage in distributions rather than decision problems.

Error correction

Fault tolerance converts fragile physical qubits into logical qubits. Without it, deep BQP algorithms remain out of reach.

Applications

Where the theory touches the world.

Cryptography

Public-key security rests on conjectured hardness: factoring, discrete log, lattices, codes, and hash functions.

Post-quantum security

Shor breaks RSA and elliptic-curve cryptography on large fault-tolerant machines. Lattice and code systems are built around problems with no known efficient quantum attack.

Approximation

If exact optimization is hard, ask how close efficient algorithms can get. PCPs and Unique Games draw the thresholds.

Machine learning

PAC learning, SQ lower bounds, and cryptographic assumptions explain which learning tasks resist efficient algorithms.

Operations research

Linear programming is in $P$; integer programming is $NP$-hard. Real solvers exploit structure that worst-case theory cannot assume.

Databases

Join optimization, treewidth, and fine-grained complexity explain why some queries scale and others hit conditional lower bounds.

Zero knowledge

Interactive proofs became deployed infrastructure through zk-SNARKs, STARKs, arithmetization, and polynomial commitments.

Quantum simulation

Quantum chemistry and materials science are natural workloads because the state being simulated is already quantum.

Open Problems

Questions no one has answered.

Is $P = NP$?

The central open problem in theoretical computer science. Most believe $P \ne NP$; no proof exists.

$P \stackrel{?}{=} NP$

Can randomness be removed?

The community expects $P = BPP$, but the proof likely requires circuit lower bounds that remain elusive.

$P \stackrel{?}{=} BPP$

Is $BQP$ inside $PH$?

Raz-Tal gave an oracle separation. The unrelativized question remains open and central to quantum advantage.

$BQP \stackrel{?}{\subseteq} PH$

Quantum PCP.

Can approximating local Hamiltonian ground-state energy remain hard at constant precision?

$QMA \stackrel{?}{=} QPCP$

Matrix multiplication.

The exponent is near $2.371$. Whether $\omega = 2$ would reshape numerical algorithms and graph theory.

$\omega \stackrel{?}{=} 2$

NISQ advantage.

Can useful quantum advantage survive realistic noise before full fault tolerance arrives?

$\text{NISQ} \Rightarrow \text{practical speedup?}$
Timeline

Six decades of hardness.

1965

Computational complexity becomes a field.

Hartmanis · Stearns

Time complexity and the first hierarchy theorem formalize the resource view of computation.

1971

SAT is NP-complete.

Cook · Levin

Theorem proving procedures reveal a complete problem for $NP$.

1972

Hardness becomes portable.

Karp

Twenty-one natural problems are shown $NP$-complete by reductions.

1982

Quantum simulation enters the story.

Feynman

Quantum systems may need quantum computers to simulate efficiently.

1985

The universal quantum computer.

Deutsch

Complexity theory gains a second physical model of computation.

1994

Shor's algorithm.

Peter Shor

Factoring is polynomial-time on a quantum computer. Cryptography changes direction.

1996

Grover search.

Lov Grover

Unstructured search receives a provably optimal quadratic speedup.

2020

$MIP^* = RE$.

Ji · Natarajan · Vidick · Wright · Yuen

Entangled multi-prover proofs reach the computably enumerable languages.

2024

Matrix multiplication inches downward.

Williams · Xu · Xu · Zhou

The record reaches $\omega \le 2.371339$, while the lower bound remains stubbornly at $2$.