The class EXPTIME
consists of all decision problems solvable by a deterministic Turing machine in time O(2nc)
for some constant c > 0
, where n
is the input size.
Formally, EXPTIME = ⋃c≥1 DTIME(2nc)
.
A definitive reference
Having explored the landscape of NP-completeness and the foundational P vs. NP question, we now venture beyond these boundaries into the rich terrain of advanced complexity theory. This module examines computational models and complexity classes that extend our understanding of algorithmic efficiency, verification, and computational limitations.
We will investigate classes beyond polynomial time, explore the power of randomness and quantum computation, delve into interactive proof systems, analyze circuit complexity, and survey cutting-edge research directions in the field. Throughout this journey, we'll encounter surprising connections, powerful techniques, and fundamental barriers that shape our understanding of computation.
The concepts in this module represent the frontiers of theoretical computer science, with profound implications for cryptography, algorithm design, artificial intelligence, and our fundamental understanding of what can be efficiently computed. By exploring these advanced topics, we gain a more nuanced view of the computational universe and the intricate hierarchy of problem complexity.
While the P vs. NP question remains central to complexity theory, the broader landscape offers additional perspectives on computation, introducing alternative resources like randomness and quantum effects, exploring the power of interaction and verification, and establishing structural barriers that help explain why certain questions have remained resistant to resolution.
While polynomial time has served as our primary boundary between efficient and inefficient computation, many natural problems require exponential or even greater computational resources. Understanding these higher complexity classes helps us categorize the hardness of problems beyond NP.
The class EXPTIME
consists of all decision problems solvable by a deterministic Turing machine in time O(2nc)
for some constant c > 0
, where n
is the input size.
Formally, EXPTIME = ⋃c≥1 DTIME(2nc)
.
The class NEXPTIME
consists of all decision problems solvable by a nondeterministic Turing machine in time O(2nc)
for some constant c > 0
.
Formally, NEXPTIME = ⋃c≥1 NTIME(2nc)
.
The class EXPSPACE
consists of all decision problems solvable by a deterministic Turing machine using space O(2nc)
for some constant c > 0
.
Formally, EXPSPACE = ⋃c≥1 DSPACE(2nc)
.
The following containments hold:
EXPTIME ⊆ NEXPTIME ⊆ EXPSPACE
Furthermore, by the Time Hierarchy Theorem, we know that:
P ⊊ EXPTIME
And by the Space Hierarchy Theorem:
PSPACE ⊊ EXPSPACE
Even exponential complexity is insufficient to capture all decidable problems. Some problems require computational resources that grow far more rapidly, pushing the boundaries of what we can conceptualize as feasible computation.
The class of primitive recursive functions is defined inductively:
Z(n) = 0
is primitive recursive.S(n) = n + 1
is primitive recursive.Pin(x1,...,xn) = xi
is primitive recursive.f
and g1,...,gm
are primitive recursive, so is the compositionh(x1,...,xn) = f(g1(x1,...,xn),...,gm(x1,...,xn))
.f
and g
are primitive recursive, so is the function h
defined by:h(0, x1,...,xn) = f(x1,...,xn)
h(k+1, x1,...,xn) = g(k, h(k, x1,...,xn), x1,...,xn)
The class of elementary functions consists of functions that can be expressed in terms of:
More formally, elementary functions are closed under the formation of bounded sums and bounded products.
For any time-constructible functions f(n)
and g(n)
whereg(n) = o(f(n) · log f(n))
:
DTIME(g(n)) ⊊ DTIME(f(n))
This theorem holds for all ranges of functions, not just polynomial or exponential functions.
While complexity theory classifies problems across the entire spectrum of computational difficulty, it's worth noting that even "small" exponential algorithms quickly become impractical as input sizes grow.
For example, an algorithm with time complexity 2n
becomes infeasible around n = 60 on modern hardware, while an algorithm with complexity n!
becomes infeasible around n = 20. Functions like the Ackermann function grow so rapidly that they exceed any primitive recursive bound.
These observations remind us that the gap between theoretical computability and practical feasibility is significant. Problems that are solvable in theory may remain forever beyond our computational reach in practice.
Randomized algorithms use random choices during their execution to achieve efficiency, simplicity, or functionality that might be difficult to attain with deterministic approaches. These algorithms introduce a new resource—randomness—into our computational model.
A probabilistic Turing machine (PTM) is a Turing machine with access to a random bit generator. Formally, it can be defined as a nondeterministic Turing machine where:
For an input x
, the computation of a PTM can be viewed as a probability distribution over computation paths. We define:
Pr[M(x) = 1]
as the probability that M
accepts input x
Pr[M(x) = 0]
as the probability that M
rejects input x
Before the discovery of the AKS deterministic polynomial-time primality test in 2002, the most efficient way to test whether a number was prime was through randomized algorithms:
These randomized tests could determine primality with overwhelming probability in time O(k log³ n) for k repetitions, while the best known deterministic algorithm at the time required exponential time. This demonstrates how randomization can provide significant practical efficiency improvements.
For a probabilistic algorithm deciding a language L
, we define two types of error:
x ∉ L
, the algorithm incorrectly accepts x
with some probability.x ∈ L
, the algorithm incorrectly rejects x
with some probability.Based on these error types, we define algorithm classes:
Just as we defined complexity classes for deterministic and nondeterministic computation, we can define classes that capture the power of probabilistic algorithms with different error characteristics.
A language L
is in BPP
if there exists a probabilistic polynomial-time Turing machine M
such that for all inputs x
:
x ∈ L
, then Pr[M(x) = 1] ≥ 2/3
x ∉ L
, then Pr[M(x) = 0] ≥ 2/3
The error bound 2/3 can be replaced by any constant between 1/2 and 1, as the error probability can be reduced exponentially by running the algorithm multiple times and taking a majority vote.
A language L
is in RP
if there exists a probabilistic polynomial-time Turing machine M
such that for all inputs x
:
x ∈ L
, then Pr[M(x) = 1] ≥ 1/2
x ∉ L
, then Pr[M(x) = 0] = 1
In other words, M
may err only on inputs in L
, and the error probability is bounded by 1/2.
The success probability can be amplified: if L ∈ RP
, then for any polynomial p(n)
, there exists a probabilistic polynomial-time TM with error probability at most 2-p(n)
.
A language L
is in ZPP
if there exists a probabilistic polynomial-time Turing machine M
such that for all inputs x
:
M
always outputs either the correct answer or a special symbol "?"Pr[M(x) = ?] ≤ 1/2
M
on any input x
is polynomial in |x|
Alternatively, ZPP
can be defined as the class of languages that have Las Vegas algorithms with expected polynomial running time.
A language L
is in ZPP
if and only if L ∈ RP
and L ∈ co-RP
.
(⇒) Suppose L ∈ ZPP
. Then there exists a probabilistic TM M
that always gives the correct answer when it terminates, and terminates in expected polynomial time.
We can construct an RP algorithm M1
for L
as follows: Run M
for twice its expected time. If M
outputs 1, output 1. Otherwise, output 0.
By Markov's inequality, M
terminates within twice its expected time with probability at least 1/2. Therefore, if x ∈ L
, M1
outputs 1 with probability at least 1/2. If x ∉ L
,M1
always outputs 0. Thus, L ∈ RP
.
Similarly, we can construct a co-RP algorithm M2
for L
, showing that L ∈ co-RP
.
(⇐) Suppose L ∈ RP
and L ∈ co-RP
. Then there exist probabilistic polynomial-time TMs M1
and M2
such that:
x ∈ L
, then Pr[M1(x) = 1] ≥ 1/2
and Pr[M2(x) = 0] = 1
x ∉ L
, then Pr[M1(x) = 0] = 1
and Pr[M2(x) = 1] ≥ 1/2
We can construct a ZPP algorithm M
for L
as follows:
M1
and M2
on input x
M1(x) = 1
and M2(x) = 0
, output 1M1(x) = 0
and M2(x) = 1
, output 0The probability of terminating in each iteration is at least 1/4, so the expected number of iterations is at most 4. When M
terminates, it always gives the correct answer. Therefore, L ∈ ZPP
.
The following containments hold:
P ⊆ ZPP ⊆ RP ⊆ BPP
RP ⊆ NP
It is not known whether any of these containments are strict, though it is widely conjectured that P = BPP
.
Known containments between major complexity classes. Green indicates probabilistic classes.
A central question in the study of randomized algorithms is whether randomness actually enhances computational power. Derandomization techniques attempt to convert randomized algorithms into deterministic ones with comparable efficiency.
A pseudorandom generator (PRG) is a function G : {0,1}s → {0,1}n
that stretches a short random seed of length s
into a longer string of length n > s
that "looks random" to certain observers.
For complexity theory, we define a PRG as follows: a function G : {0,1}s → {0,1}n
is a (T, ε)
-pseudorandom generator if for any circuit C
of size at most T
:
|Pr[C(Un) = 1] - Pr[C(G(Us)) = 1]| < ε
where Uk
denotes the uniform distribution over {0,1}k
.
If there exists a problem in E = DTIME(2O(n))
that requires circuits of size 2Ω(n)
, then P = BPP
.
The Impagliazzo-Wigderson theorem exemplifies a deep principle in complexity theory: hardness can be converted into pseudorandomness. This creates a fascinating tradeoff:
This connection explains why many complexity theorists believe P = BPP: the existence of hard problems seems more plausible than a fundamental gap between deterministic and randomized computation.
Several methods exist for derandomizing specific algorithms:
A concrete example is the derandomization of a randomized MAX-CUT approximation algorithm:
Most complexity theorists believe that P = BPP for several reasons:
Nevertheless, a rigorous proof of P = BPP remains elusive, and the question stands as one of the important open problems in complexity theory, albeit less prominent than P vs. NP.
Quantum computation harnesses the principles of quantum mechanics to process information. This model offers potentially exponential speedups for certain problems by exploiting quantum phenomena like superposition and entanglement.
A qubit is the quantum analog of a classical bit. Mathematically, a qubit's state is represented as a unit vector in a two-dimensional complex vector space:
|ψ⟩ = α|0⟩ + β|1⟩
where |0⟩
and |1⟩
form an orthonormal basis for the space, and α, β ∈ ℂ
with |α|² + |β|² = 1
.
A system of n
qubits is represented by a unit vector in a 2n
-dimensional complex vector space:
|ψ⟩ = ∑x∈{0,1}n αx|x⟩
where ∑x∈{0,1}n |αx|² = 1
.
Quantum operations (excluding measurement) are represented by unitary matrices acting on the state vector. A unitary matrix U
satisfies U†U = I
, where U†
is the conjugate transpose of U
.
Some important single-qubit gates include:
H = 1/√2 * [1 1; 1 -1]
X = [0 1; 1 0]
(quantum NOT)Z = [1 0; 0 -1]
(phase flip)Multi-qubit operations include:
CNOT = [1 0 0 0; 0 1 0 0; 0 0 0 1; 0 0 1 0]
Measurement is a non-unitary operation that collapses a quantum state to a classical state. When measuring a qubit |ψ⟩ = α|0⟩ + β|1⟩
in the standard basis:
|α|²
, and the state collapses to |0⟩
|β|²
, and the state collapses to |1⟩
For a multi-qubit system |ψ⟩ = ∑x∈{0,1}n αx|x⟩
, measuring all qubits yields outcome x
with probability |αx|²
.
Quantum probability differs fundamentally from classical probability in how amplitudes combine:
Interference example: Consider applying a Hadamard gate to |0⟩, giving (|0⟩ + |1⟩)/√2
, and then applying another Hadamard gate:
The amplitudes for |1⟩ interfere destructively and cancel out, while the amplitudes for |0⟩ interfere constructively and reinforce each other. This interference has no classical analog and is a key source of quantum computational power.
Just as classical complexity theory categorizes problems based on resource requirements for classical computers, quantum complexity theory defines classes that capture the power of quantum computation.
A language L
is in BQP
if there exists a polynomial-time uniform family of quantum circuits Qn
such that for all inputs x
:
x ∈ L
, then Pr[Q|x|(x) = 1] ≥ 2/3
x ∉ L
, then Pr[Q|x|(x) = 0] ≥ 2/3
Here, Qn(x)
represents the result of measuring the first qubit of the quantum circuit Qn
applied to input x
.
A language L
is in QMA
if there exists a polynomial-time quantum verifierV
and a polynomial p(n)
such that for all inputs x
:
x ∈ L
, then there exists a quantum state |ψ⟩
on p(|x|)
qubits such that Pr[V(x, |ψ⟩) = 1] ≥ 2/3
x ∉ L
, then for all quantum states |ψ⟩
on p(|x|)
qubits,Pr[V(x, |ψ⟩) = 0] ≥ 2/3
A language L
is in PostBQP
if there exists a polynomial-time quantum algorithm A
such that for all inputs x
:
A
outputs a qubit q1
and a postselection qubit q2
Pr[q2 = 1] > 0
(the postselection succeeds with non-zero probability)x ∈ L
, then Pr[q1 = 1 | q2 = 1] ≥ 2/3
x ∉ L
, then Pr[q1 = 0 | q2 = 1] ≥ 2/3
The complexity class PostBQP
equals the complexity class PP
.
The following containments are known:
P ⊆ BPP ⊆ BQP ⊆ PP = PostBQP
NP ⊆ QMA ⊆ PP
It is not known whether BQP ⊆ NP
or NP ⊆ BQP
, though most complexity theorists believe that neither inclusion holds.
Known containments between quantum and classical complexity classes. Purple indicates quantum classes.
The theoretical promise of quantum computing lies in algorithms that offer significant speedups over classical approaches for specific problems. These algorithms leverage quantum phenomena to achieve results that seem to violate classical computational limits.
Problem: Given a black-box function f: {0, 1}n → {0, 1} that is promised to be either constant (always returns the same value) or balanced (returns 0 for exactly half of the inputs and 1 for the other half), determine which type f is.
Classical solution: In the worst case, we need to evaluate f on 2n-1+1 different inputs to be certain of the answer.
Quantum solution: The Deutsch-Jozsa algorithm solves this with just one query to f:
This algorithm demonstrates an exponential quantum speedup for a specific problem, though the problem itself is somewhat artificial. It illustrates the potential of quantum parallelism and interference to extract global properties with fewer queries than classically possible.
Problem: Given a black-box function f: {0, 1}n → {0, 1} that returns 1 for exactly one input x0 and 0 for all other inputs, find x0.
Classical solution: Requires O(2n) evaluations of f on average.
Quantum solution: Grover's algorithm finds x0 with high probability using O(√2n) evaluations:
Grover's algorithm provides a quadratic speedup for unstructured search problems. This speedup is provably optimal - no quantum algorithm can solve this problem with fewer than Ω(√2n) evaluations.
The algorithm has applications beyond simple search, including approximating the mean of a set of values, finding minimum elements, and solving NP-complete problems with a quadratic speedup over brute force.
Problem: Given a large integer N, find its prime factors.
Classical solution: The best known classical algorithms run in sub-exponential time, approximately eO(n1/3 log2/3 n) for n-bit integers.
Quantum solution: Shor's algorithm can factor N in polynomial time, approximately O(n2 log n log log n):
Shor's algorithm represents the most significant known quantum speedup for a practical problem. Its existence threatens the security of widely-used RSA encryption, which relies on the presumed difficulty of factoring large numbers.
The algorithm demonstrates the power of the quantum Fourier transform for finding periodicities, a task at which quantum computers excel compared to classical computers.
The existence of Shor's algorithm has profound implications for cryptography:
Lattice-based cryptography and LWE hardness assumptions: Many post-quantum cryptosystems rely on the Learning With Errors (LWE) problem, which involves finding a secret vector given noisy linear combinations of its elements. This problem is believed to be hard even for quantum computers, as the best known quantum algorithms still require exponential time to solve it.
The development of quantum-resistant cryptography has become a priority for security researchers and standards bodies, with NIST currently evaluating candidates for standardization.
Quantum algorithms offer different degrees of speedup for different problem types:
Limitations: Not all problems admit quantum speedups:
Quantum computing appears to offer computational advantages in a specific "middle ground" - problems with mathematical structure that can be exploited by quantum algorithms, but which aren't easily solvable by classical polynomial-time algorithms.
Interactive proof systems extend the notion of efficient verification by allowing a dialogue between a verifier and a prover. This interaction can be more powerful than static verification, enabling the efficient verification of problems beyond NP.
An interactive proof system for a language L
consists of:
V
P
V
and P
exchange a sequence of messages, after which V
decides whether to accept or reject. The system satisfies:
x ∈ L
, then Pr[(V ↔ P)(x) = 1] ≥ 2/3
x ∉ L
, then for all provers P*
,Pr[(V ↔ P*)(x) = 1] ≤ 1/3
Here, (V ↔ P)(x)
denotes the output of the verifier after interacting with the prover on input x
.
Problem: Given two graphs G1 and G2, determine if they are non-isomorphic (i.e., there is no mapping of vertices that preserves edges).
This problem is in co-NP (easy to verify that graphs ARE isomorphic), but not known to be in NP. However, it has a simple interactive proof:
Completeness: If G1 and G2 are non-isomorphic, the prover can always determine which graph H came from, so the verifier accepts with probability 1.
Soundness: If G1 and G2 are isomorphic, the prover cannot distinguish between a permutation of G1 and a permutation of G2, so the prover's success probability is at most 1/2.
By repeating the protocol multiple times, the gap between completeness and soundness can be amplified to achieve any desired error probability.
The class IP
consists of all languages that have interactive proof systems. More formally, L ∈ IP
if there exists a probabilistic polynomial-time verifier V
such that:
x ∈ L
, there exists a prover P
such thatPr[(V ↔ P)(x) = 1] ≥ 2/3
x ∉ L
, then for all provers P*
,Pr[(V ↔ P*)(x) = 1] ≤ 1/3
The number of messages exchanged can be polynomial in the input length.
A language L
is in IP
if and only if L ∈ PSPACE
.
The proof that IP = PSPACE has two directions:
IP ⊆ PSPACE: This direction is relatively straightforward. Given an interactive proof system, a PSPACE algorithm can simulate all possible interactions between the verifier and any prover, calculating the maximum acceptance probability. This simulation requires polynomial space because we only need to keep track of the current state of the interaction.
PSPACE ⊆ IP: This direction is more complex and involves arithmetization of PSPACE problems. The key steps are:
The sum-check protocol allows the verifier to efficiently check expressions of the form Σx₁∈{0, 1}...Σxₙ∈{0, 1} P(x₁,...,xₙ) for multivariate polynomials P. This is a key technique that enables the verifier to "outsource" complex computations to the prover while still being able to verify the results with high probability.
Extensions of the interactive proof model include systems with multiple provers and proofs that can be verified by checking just a few random locations. These powerful models have connections to hardness of approximation and quantum computing.
A multi-prover interactive proof system involves a verifier V
and multiple provers P1, P2, ..., Pk
who cannot communicate with each other during the protocol. The system satisfies:
x ∈ L
, there exist provers such thatPr[(V ↔ P1, P2, ..., Pk)(x) = 1] ≥ 2/3
x ∉ L
, then for all sets of provers,Pr[(V ↔ P1*, P2*, ..., Pk*)(x) = 1] ≤ 1/3
The class MIP
consists of all languages that have multi-prover interactive proof systems.
A language L
is in MIP
if and only if L ∈ NEXP
(nondeterministic exponential time).
A probabilistically checkable proof system for a language L
consists of a probabilistic polynomial-time verifier V
that has random access to a proof string π
. The system satisfies:
x ∈ L
, there exists a proof π
such thatPr[Vπ(x) = 1] = 1
x ∉ L
, then for all proofs π
,Pr[Vπ(x) = 1] ≤ 1/2
The class PCP[r(n), q(n)]
consists of languages with PCP systems where the verifier uses O(r(n))
random bits and queries O(q(n))
bits of the proof.
The class PCP
is typically identified with PCP[log n, 1]
, the class of languages with PCPs that use logarithmic randomness and a constant number of queries.
NP = PCP[log n, 1]
One of the most significant applications of the PCP Theorem is in proving the hardness of approximating optimization problems:
Key connection: The PCP Theorem can be reformulated as a statement about the hardness of approximating the MAX-SAT problem. Specifically, it implies that there exists a constant ε > 0 such that it is NP-hard to distinguish between satisfiable 3-SAT instances and instances where at most (1-ε) fraction of the clauses can be satisfied.
This connection has led to a plethora of inapproximability results:
These results establish fundamental limits on how well we can approximate certain optimization problems, providing a theoretical explanation for why many approximation algorithms cannot be substantially improved.
Zero-knowledge proofs represent a paradoxical-sounding capability: proving a statement is true without revealing any information beyond the validity of the statement itself. This powerful concept has applications in cryptography, privacy, and secure computation.
An interactive proof system (P, V)
for a language L
is perfect zero-knowledgeif for every probabilistic polynomial-time verifier V*
, there exists a probabilistic polynomial-time simulator S
such that for all x ∈ L
:
viewV*(P ↔ V*, x) ≡ S(x)
where viewV*(P ↔ V*, x)
represents the distribution of the verifier's view during the interaction, including its random coins and all messages received, and ≡
denotes identical distributions.
Weaker notions include statistical zero-knowledge (distributions are statistically close) and computational zero-knowledge (distributions are computationally indistinguishable).
The simulation paradigm formalizes the intuition that an interactive protocol reveals no knowledge if a simulator can produce a transcript that is indistinguishable from a real interaction, without having access to the prover's secrets.
For a zero-knowledge proof of a statement x ∈ L
, the simulator S
must produce a distribution of transcripts such that:
S
runs in expected polynomial timeS
has no access to the witness or secret information that the prover hasS(x)
is indistinguishable (perfectly, statistically, or computationally) from the distribution of transcripts in real interactions between the prover and verifierProblem: Prove that a graph G is 3-colorable without revealing a valid coloring.
Protocol:
Completeness: If G is 3-colorable, the prover can always reveal different colors for adjacent vertices.
Soundness: If G is not 3-colorable, at least one edge must have the same color on both endpoints in any attempted coloring, so the verifier will catch this with probability at least 1/|E| in each round.
Zero-knowledge: The simulator can generate a transcript by:
Since the verifier only sees the colors of two adjacent vertices in each round (which are always different), and the coloring is randomly permuted each time, the verifier learns nothing about the overall coloring.
Zero-knowledge proofs have numerous practical applications:
Blockchain applications:
Recent advances in practical zero-knowledge proof systems, such as zk-SNARKs (Zero-Knowledge Succinct Non-Interactive Arguments of Knowledge) and zk-STARKs (Zero-Knowledge Scalable Transparent Arguments of Knowledge), have dramatically improved efficiency, making zero-knowledge technology viable for real-world applications.
In zero-knowledge, the verifier cannot distinguish between real interactions and simulated ones, proving they learn nothing beyond the statement's truth.
Circuit complexity studies the resources required to compute functions using Boolean circuits, providing a different perspective on computational complexity that focuses on the size and depth of circuits rather than time or space usage.
A Boolean circuit is a directed acyclic graph where:
x1, x2, ..., xn
or constants 0, 1The size of a circuit is the number of gates it contains.
The depth of a circuit is the length of the longest path from any input node to any output node.
For a Boolean function f: {0,1}n → {0,1}
:
f
, denoted size(f)
, is the size of the smallest circuit computing f
.f
, denoted depth(f)
, is the depth of the smallest circuit computing f
.For a sequence of Boolean functions fn: {0,1}n → {0,1}
, we define:
f ∈ SIZE(s(n))
if size(fn) ≤ s(n)
for all sufficiently large n
.f ∈ DEPTH(d(n))
if depth(fn) ≤ d(n)
for all sufficiently large n
.A circuit family is a sequence of circuits C = {C₁, C₂, ...}
where each Cn
has n
inputs.
A circuit family is uniform if there exists a deterministic Turing machine M
that, on input 1n
, outputs a description of Cn
in time polynomial in n
.
A circuit family is non-uniform if there is no such efficient Turing machine. Non-uniform circuit families can implement different strategies for different input lengths.
A language L
is in P
if and only if L
is decided by a uniform family of circuits {Cn}
with size(Cn) ≤ p(n)
for some polynomial p
.
The Circuit Evaluation Problem asks: given a description of a Boolean circuit C and an input x, compute C(x) - the output of the circuit on input x.
This problem has several interesting properties:
This problem illustrates the relationship between circuits as objects we analyze (in circuit complexity) and circuits as computational problems we solve (in traditional complexity theory).
Various classes of circuit families capture different computational capabilities, based on constraints on size, depth, gate types, and uniformity.
AC0
is the class of languages decidable by a family of circuits {Cₙ}
such that:
Cn
has constant depth (independent of n
)Cn
has polynomial size (O(nk)
for some constant k
)Cn
uses AND, OR, and NOT gates, where AND and OR gates can have unbounded fan-in (any number of inputs)uniform-AC0
additionally requires that the circuit family is uniform.
NCi
is the class of languages decidable by a family of circuits {Cn}
such that:
Cn
has depth O(logi n)
Cn
has polynomial sizeCn
uses AND, OR, and NOT gates with at most 2 inputs per gate (bounded fan-in)NC = ⋃i≥1 NCi
is the union of all these classes.
uniform-NC
additionally requires that the circuit family is uniform.
P/poly
is the class of languages decidable by a family of polynomial-size circuits{Cn}
.
Equivalently, P/poly
can be defined as the class of languages L
for which there exists a polynomial-time Turing machine M
and a sequence of "advice strings"{an}
such that:
an
is bounded by a polynomial in n
x
of length n
, x ∈ L
if and only ifM(x, a|x|) = 1
The advice string an
depends only on the length n
, not on the specific input x
.
If NP ⊆ P/poly
, then the polynomial hierarchy collapses to the second level:PH = Σ2P
.
This suggests that NP ⊈ P/poly
, providing evidence that NP-complete problems require superpolynomial-size circuits.
Known containments between major circuit complexity classes. Each class is contained in the ones above it.
Proving that certain functions require large circuits is a central challenge in complexity theory. Several techniques have been developed to establish such lower bounds, particularly for restricted circuit classes.
Theorem: The PARITY function, which outputs 1 if the input has an odd number of 1s, cannot be computed by any constant-depth, polynomial-size circuit with unbounded fan-in AND, OR, and NOT gates.
Proof Idea: The proof uses a technique called the switching lemma, which shows that random restrictions of input variables tend to simplify AC0 circuits drastically:
Consequence: This result shows that PARITY requires circuits of depth at least log(n)/log(log(n)) to compute, providing an exponential lower bound on the size of constant-depth circuits.
This was one of the first major unconditional lower bounds in circuit complexity and demonstrates that even simple functions can be provably hard for certain computational models.
The Razborov-Smolensky method extends lower bound techniques to circuits with modular counting gates (MODp), particularly for prime p.
The key idea is to approximate the circuit using low-degree polynomials over ℤp
:
logO(d) s
, where s is the circuit sizeA natural proof of a circuit lower bound has the following properties:
The Natural Proofs Barrier (Razborov-Rudich) states that any natural proof of a circuit lower bound against P/poly would yield an efficient algorithm for breaking pseudorandom function generators, contradicting widely believed cryptographic assumptions.
Despite decades of research, circuit lower bounds remain challenging to establish:
Recent approaches to making progress include:
Despite the challenges, circuit complexity remains a vibrant area of research with the potential to shed light on fundamental questions about computation.
Fine-grained complexity goes beyond the coarse distinctions of polynomial versus exponential time, focusing on the precise exponents and conditional relationships between problems based on plausible conjectures.
The Strong Exponential Time Hypothesis (SETH) states that for every ε > 0
, there exists a k
such that k-SAT cannot be solved in time O(2(1-ε)n)
, where n
is the number of variables.
In other words, SETH states that SAT requires time very close to 2n
, with the constant in the exponent approaching 1 as the clause width increases.
SETH reductions establish conditional lower bounds by showing that faster algorithms for certain problems would violate SETH. Here's how they work:
n
variables and m
clausesN
O(Nc-ε)
for some constant c, then CNF-SAT can be solved in time O(2(1-δ)n)
for some δ > 0
, violating SETHExample problems with SETH-based lower bounds:
These reductions establish a web of relationships between problems, showing that significant improvements over the best known algorithms would have far-reaching consequences.
Fine-grained complexity has established a rich landscape of conditional lower bounds based on various hardness assumptions:
These conditional lower bounds are valuable because:
This approach has led to a more nuanced understanding of computational hardness than the traditional P vs. NP dichotomy, providing insights into the precise complexity of polynomial-time problems.
Several fundamental barriers have been identified that explain why traditional proof techniques fail to resolve major questions in complexity theory. These barriers guide researchers toward more promising approaches.
A proof technique relativizes if it remains valid when both complexity classes in question are given access to the same oracle.
The Baker-Gill-Solovay relativization barrier shows that relativizing techniques cannot resolve the P vs. NP question by demonstrating that:
A
such that PA = NPA
B
such that PB ≠ NPB
This barrier applies to most techniques in computability theory and early complexity theory.
The natural proofs barrier shows that any "natural" proof technique for circuit lower bounds would yield an efficient algorithm for breaking pseudorandom functions, contradicting widely believed cryptographic assumptions.
A proof is natural if it defines a property Γ of Boolean functions such that:
This barrier applies to many circuit lower bound techniques and explains why provingP ≠ NP
via circuit complexity is challenging.
The algebrization barrier extends the relativization barrier to account for non-relativizing techniques that use algebraic methods, such as those in interactive proofs.
A proof technique algebrizes if it remains valid when:
A
Ã
of A
Aaronson and Wigderson showed that many major complexity questions cannot be resolved by algebrizing techniques by proving that:
P = NP
but NPA ⊈ PÃ
P ≠ NP
but NPA ⊆ PÃ
These barriers have profoundly shaped complexity theory research by:
These barriers don't imply that questions like P vs. NP are unsolvable, but they do indicate that resolution will require innovative techniques that go beyond traditional approaches. Recent breakthroughs in areas like the Sum-of-Squares method, fine-grained complexity, and quantum complexity theory suggest that such techniques may eventually emerge.
Cryptography and complexity theory are deeply intertwined, with cryptographic security often relying on computational hardness assumptions. Understanding these connections provides insights into both fields.
A function f: {0, 1}* → {0, 1}*
is a one-way function if:
f
can be computed in polynomial timeA
, for sufficiently large n
, and for x
chosen uniformly from {0, 1}n
:Pr[f(A(f(x), 1n)) = f(x)] < 1/p(n)
p
In other words, f
is easy to compute but hard to invert on average.
The following relationships hold between cryptographic primitives and complexity classes:
P ≠ NP ∩ co-NP
NP ⊈ BPP
P = NP
, then no secure encryption schemes, pseudorandom generators, digital signatures, or zero-knowledge proofs for non-trivial languages can existModern cryptography relies on various hardness assumptions, each corresponding to conjectured computational difficulties:
These assumptions vary in strength and resilience to quantum attacks:
These assumptions illustrate how specific computational hardness conjectures, often more fine-grained than P ≠ NP, form the foundation of practical cryptographic security.
While traditional complexity theory focuses on worst-case analysis, average-case complexity examines the typical difficulty of problems under natural input distributions. This perspective is particularly relevant for cryptography and algorithm design.
A distributional problem is a pair (L, D)
where:
L
is a language (decision problem)D = {Dₙ}
is a family of distributions, where Dn
is a distribution over strings of length nThe goal is to decide whether x ∈ L with high probability when x is drawn from Dn
.
The class AvgP
consists of distributional problems (L, D)
for which there exists a polynomial-time algorithm A
such that:
A
always outputs the correct answer (whether x ∈ L
)A
on inputs drawn from Dn
is bounded by a polynomial in nThe class DistNP
consists of distributional problems (L, D)
where:
L ∈ NP
D
is a polynomial-time samplable distributionA powerful technique in average-case complexity is the worst-case to average-case reduction, which shows that solving certain problems on random inputs is as hard as solving them in the worst case:
Definition: A worst-case to average-case reduction for a problem L shows that if we can solve L efficiently on a random input (drawn from distribution D), then we can also solve L efficiently for any input.
Implications: Problems with such reductions have the remarkable property that their average-case and worst-case complexities coincide. This is particularly useful for cryptography, where we want problems that are consistently hard.
Examples of problems with worst-case to average-case reductions:
These reductions provide stronger foundations for cryptographic systems than traditional worst-case hardness assumptions, as they guarantee that the problem remains hard even for typical instances.
Several problems are conjectured or proven to be hard in the average case:
These problems are significant because their average-case hardness can be leveraged for cryptography, pseudorandomness, and hardness of approximation results. They also provide insight into the typical difficulty of problems rather than just their behavior on adversarially chosen inputs.
Beyond P vs. NP, complexity theory encompasses numerous important conjectures that shape our understanding of computation and guide research directions.
Conjecture: P ≠ PSPACE
Statement: Problems solvable in polynomial time are strictly less powerful than problems solvable using polynomial space.
Evidence:
Significance: This conjecture is stronger than P ≠ NP, as it implies P ≠ NP (since NP ⊆ PSPACE). It captures the intuition that unlimited backtracking (which requires polynomial space) is more powerful than polynomial-time computation.
Conjecture: There is no algorithm that solves 3-SAT in time 2o(n), where n is the number of variables.
Statement: 3-SAT requires exponential time in the worst case. This is stronger than P ≠ NP, which only states that 3-SAT cannot be solved in polynomial time.
Evidence:
Significance: ETH provides a more precise hardness assumption than P ≠ NP, allowing for finer-grained lower bounds on a wide range of problems through reductions.
Conjecture: L = RL
Statement: Every problem solvable in randomized logarithmic space can also be solved in deterministic logarithmic space.
Evidence:
Significance: This conjecture addresses the power of randomness in the context of space-bounded computation, where derandomization results have been more successful than in the time-bounded setting.
Conjecture: BQP ≠ NP and NP ⊈ BQP
Statement: Quantum computers cannot efficiently solve NP-complete problems. More precisely, there are problems in NP that cannot be solved in polynomial time by quantum computers, and there are problems solvable by quantum computers that are not in NP.
Evidence:
Significance: This conjecture defines the limits of quantum computation with respect to classical nondeterministic computation, suggesting that quantum computers offer a different kind of computational advantage rather than a strict improvement over classical computers.
Conjecture | Informal Statement | Current Status |
---|---|---|
P ≠ NP | Efficient verification doesn't imply efficient solution | Open; widely believed true |
NP ≠ co-NP | Verification and refutation are not equally easy | Open; implied by P ≠ NP |
P = BPP | Randomness doesn't enhance polynomial-time computation | Open; widely believed true |
PH ≠ PSPACE | Bounded alternation is weaker than unbounded alternation | Open; widely believed true |
L = RL | Randomness doesn't enhance logspace computation | Open; progress with Reingold's theorem |
NP ⊈ BQP | Quantum computers cannot efficiently solve all NP problems | Open; widely believed true |
P ≠ NC | Not all polynomial-time problems are highly parallelizable | Open; believed true |
ETH | 3-SAT requires exponential time (2Ω(n)) | Open; stronger than P ≠ NP |
Complexity theory has deep connections to various areas of mathematics, computer science, and even physics. These interdisciplinary links enrich both complexity theory and the fields it connects with.
Complexity theory and cryptography are intimately linked:
This connection works both ways: cryptographic techniques like pseudorandomness have been used to develop new complexity-theoretic results, while complexity-theoretic insights have led to new cryptographic constructions.
Complexity theory provides a theoretical foundation for understanding the capabilities and limitations of machine learning:
As machine learning continues to advance, complexity theory helps us understand fundamental questions about what can and cannot be learned efficiently, and what computational resources are necessary for learning tasks.
Quantum complexity theory has significant connections to quantum physics:
These connections allow insights from physics to inform computational models, while complexity-theoretic results help physicists understand fundamental limits on what can be efficiently computed or simulated in quantum systems.
Complexity theory and distributed computing intersect in several ways:
These connections help establish fundamental limits on distributed algorithms and protocols, showing what can and cannot be efficiently computed when computation is spread across multiple parties with limited communication.
Although complexity theory is often viewed as a theoretical discipline, its results and insights have significant practical implications across computer science and beyond.
Complexity theory guides practical algorithm design in several ways:
These insights help practitioners allocate resources effectively and choose appropriate algorithmic approaches based on the inherent difficulty of the problems they face.
Complexity theory provides the theoretical foundation for security guarantees:
These applications ensure that security systems are built on solid theoretical foundations, with clear understanding of the computational assumptions underlying their security.
Complexity-theoretic concepts directly inform verification technologies:
These applications demonstrate how abstract complexity-theoretic concepts can evolve into practical technologies for ensuring correctness and security in computing systems.
Complexity theory establishes fundamental limits on what can be automated efficiently:
These insights help AI and system designers understand the theoretical limits of what their systems can achieve, guiding resource allocation and setting appropriate expectations for automated systems.
Emerging applications of complexity theory include:
As technology continues to advance, complexity theory will provide the theoretical foundations to understand what is efficiently computable and what fundamental limitations exist, guiding the development of next-generation computing technologies.