Classification of computational problems
Pavel Pudlák
Mathematical Institute, Academy of Sciences, Prague
FJFI, 9.4.2014
Overview
1. Computational resources
2. The basic classes
3. Randomized computations
4. Quantum computations
5. What if P = NP?
6. What if we had quantum computers?
7. Proof complexity
Computational Resources
◮
time (= number of steps)
◮
space (= size of the memory)
◮
parallelism
◮
random bits
◮
quantum bits
◮
nondeterministic bits
◮
interaction
What do we compute?
F :X →Y
X ↔ {0, 1}∗ , Y ↔ {0, 1}∗
Usually it suffices to study F : {0, 1}∗ → {0, 1}, or equivalently sets
A ⊆ {0, 1}∗ (a.k.a. languages).
Asymptotic growth
We are interested on the dependence of the complexity on the input size.
Example
Define Time(t) as all sets for which there exists an algorithm which
computes F (x) in time ≤ t(|x|).
Complexity Classes
Definition (polynomial time)
P=
S
p
Time(p),
where p are polynomials
Definition (nondeterministic polynomial time)
NP =
S
p
NTime(p),
where p are polynomials
Complexity Classes
Definition (polynomial time)
P=
S
p
Time(p),
where p are polynomials
Definition (nondeterministic polynomial time)
NP =
S
p
NTime(p),
where p are polynomials
P – we can compute in polynomial time if a problem has solution
NP – we can check in polynomial a solution of the problem if we are
given the solution
Example
Decide if a set of linear equations has a solution (say, over a finite field).
- in P
Example
Decide if a set of quadratic equations has a solution (say, over a finite
field).
- in NP, conjectured not to be in P
Definition (polynomial space)
PSPACE =
S
p
Space(p),
where p are polynomials
Definition (nondeterministic polynomial time)
EXP =
S
p
Time(2p ),
where p are polynomials
Definition (polynomial space)
PSPACE =
S
p
Space(p),
where p are polynomials
Definition (nondeterministic polynomial time)
EXP =
S
p
Time(2p ),
where p are polynomials
P ⊆ NP ⊆ PSPACE ⊆ EXP
We only know
P 6= EXP
Hence at least one inclusion above is strict.
EXPEXPTIME
EXPSPACE
NEXPTIME
EXPTIME
PSPACE
NP
P
Probabilistic Algorithms
Definition
Let A ⊆ {0, 1}∗ be a language and let M be a Turing machine that uses
random bits. We say that M accepts A with bounded error if for all
x ∈ {0, 1}∗
◮
x ∈A
⇒
Pr [M accepts x] ≥ 0.99,
◮
x ∈A
⇒
Pr [M accepts x] ≥ 0.01.
Probabilistic Algorithms
Definition
Let A ⊆ {0, 1}∗ be a language and let M be a Turing machine that uses
random bits. We say that M accepts A with bounded error if for all
x ∈ {0, 1}∗
◮
x ∈A
⇒
Pr [M accepts x] ≥ 0.99,
◮
x ∈A
⇒
Pr [M accepts x] ≥ 0.01.
Definition (bounded error polynomial time)
A ∈ BPP if there exists a Turing machine that
◮
runs in polynomial time
◮
accepts A with bounded error.
Example Polynomial identity testing.
Suppose we are given φ(x1 , . . . , xn ) and ψ(x1 , . . . , xn ), two arithmetical
formulas over the ring Z. Do φ and ψ define the same polynomials?
We can test φ(x1 , . . . , xn ) = ψ(x1 , . . . , xn ) by substituting random values
for x1 . . . xn .
Example Polynomial identity testing.
Suppose we are given φ(x1 , . . . , xn ) and ψ(x1 , . . . , xn ), two arithmetical
formulas over the ring Z. Do φ and ψ define the same polynomials?
We can test φ(x1 , . . . , xn ) = ψ(x1 , . . . , xn ) by substituting random values
for x1 . . . xn .
Trivially P ⊆ BPP.
Conjecture
P = BPP
More precisely, experts believe that randomness does help, but not
essentially.
Quantum Computations
Quantum bit
α|0i + β|1i ∈ C2
Quantum circuit
1. given input x ∈ {0, 1}n
2. start with an m-tuple of nonentagled quantum bits x ′ , where x is an
initial segment of x ′ and the rest are 0s
3. apply successively unitary operations to single quantum bits of x ′ or
to pairs of quantum bits
4. measure the first quantum bit and output the value
Quantum Computations
Quantum bit
α|0i + β|1i ∈ C2
Quantum circuit
1. given input x ∈ {0, 1}n
2. start with an m-tuple of nonentagled quantum bits x ′ , where x is an
initial segment of x ′ and the rest are 0s
3. apply successively unitary operations to single quantum bits of x ′ or
to pairs of quantum bits
4. measure the first quantum bit and output the value
Note:
m
◮
x ′ ∈ C2 ,
◮
the quantum bits of x ′ get entangled during the computation,
◮
the output is 0 or 1 with some probabilities p and 1 − p.
A circuit for the quantum Fourier transform
H
x4
S3
x3
H
y1
y2
S1
S2
x2
S1
S2
H
y3
S1
x1
H
y4
H=
1
√
2
1
√
2
1
√
2
1
√
− 2
!
1
0
Sk =
0
0
0
1
0
0
0
1
0
0
0
0
0
e i π/2
k
Definition (bounded error quantum polynomial time)
A ∈ BQP if there exist quantum circuits for every input length such that
◮
they runs in polynomial time
◮
accept A with bounded error.
Definition (bounded error quantum polynomial time)
A ∈ BQP if there exist quantum circuits for every input length such that
◮
they runs in polynomial time
◮
accept A with bounded error.
Example
Given an exponentially large group G (e.g., Z∗n ) and a ∈ G , find the order
of a in G .
– can be done in BQP [P. Shor, 1997]
This can be used to factor large integers.
We know that
BPP ⊆ BQP ⊆ PSPACE
Conjecture
BQP 6= P, BPP, NP, PSPACE
What if P = NP?
For this, it suffices to find just one polynomial time algorithm for any of
the many well-known NP-complete problems.
1
See L. Fortnow, The Golden Ticket.
What if P = NP?
For this, it suffices to find just one polynomial time algorithm for any of
the many well-known NP-complete problems.
1. Positive consequences
◮
we will be able to optimize design of products and schedules for
production etc.
◮
solve problems, such as factor large numbers, solve polynomial and
differential equations etc.
◮
effectively find optimal algorithms for given problems1
1
See L. Fortnow, The Golden Ticket.
What if P = NP?
For this, it suffices to find just one polynomial time algorithm for any of
the many well-known NP-complete problems.
1. Positive consequences
◮
we will be able to optimize design of products and schedules for
production etc.
◮
solve problems, such as factor large numbers, solve polynomial and
differential equations etc.
◮
effectively find optimal algorithms for given problems1
2. Negative consequences
◮
no public key cryptosystem will be secure,
◮
but also for private cryptosystems we will need large keys.
1
See L. Fortnow, The Golden Ticket.
What if we prove P 6= NP?
What if we prove P 6= NP?
◮
public key systems still may be not secure
◮
we will still not know answers to other questions
(NP = PSPACE?, PSPACE = EXP?, Do one-way functions
exist?, etc.)
What if we have quantum computers?
What if we have quantum computers?
Negative
◮
currently used public key systems (such as RSA) will be not secure
but there may be other systems that cannot be broken by quantum
computers and we may be able to use quantum cryptography more
efficiently
What if we have quantum computers?
Negative
◮
currently used public key systems (such as RSA) will be not secure
but there may be other systems that cannot be broken by quantum
computers and we may be able to use quantum cryptography more
efficiently
Positive
◮
we will be able to solve some specific problems (e.g., finding the
order of an element in a group)
◮
quadratic speed up for NP problems (provided that quantum
computers are as fast as classical)
◮
we will be able to efficiently simulate quantum physical systems
Proof Complexity
computational complexity: How difficult is to solve a problem?
resources are time, space, etc.
Proof Complexity
computational complexity: How difficult is to solve a problem?
resources are time, space, etc.
proof complexity: How difficult is to prove a theorem?
resources are the length of proofs and the strength of the axioms used
Example: Ramsey Theorem
Theorem (Ramsey 1930, Erdős-Szekeres 1935)
For every k, there exists n such that for all f : [n]2 → [2], there exists a
set K ⊆ [n] such that |K | = k and f (x, y ) is the same for all x < y ,
x, y ∈ X .
The least n is the Ramsey number R(k).
Eg. R(3) = 6, R(4) = 18, 102 ≤ R(6) ≤ 165; for k > 4 the values are
not known.
Two problems in combinatorics
Problem (1) (Erdős, $ 250)
Determine the value
1
lim R(k) k
n→∞
if it exists.
√
If it exists, it is between 2 and 4.
Problem (2) (Erdős, $ 100)
Give a constructive proof of R(k) ≥ (1 + ε)k for some ε > 0, i.e., give an
explicit construction of a sequence of graphs on n vertices without a
monochromatic set of size k > c log n for some c.
Two problems in computational complexity
Problem (1’)
How difficult is to compute R(k), i.e., what is the computational
complexity of this function?
Problem (2’)
How difficult is to construct graphs from Problem 2, i.e., what is the
computational complexity of sequences of graphs on n vertices without
monochromatic sets of size k > C log n for some constant C ?
Two problems in proof complexity
Problem (1”)
Roughly: How difficult is it to prove that R(k) ≤ n?
More precisely: How difficult is it to prove a formalization of the Ramsey
theorem for particular parameters?
Problem (2”)
Roughly: How difficult is it to prove R(k) ≥ n?
More precisely: How difficult is it to prove that a given graph G on n
vertices does not have a monochromatic sets of size > C log n for some
constant C ?
computational complexity
complexity classes
elementary operations
computations with bounded resources
the P vs. NP problem
circuits
proof complexity
theories
basic axioms
induction restricted to a class of formulas
the T20 vs. T21 problem
propositional proofs
Thank You
When will be P vs. NP solved?
L. Fortnow: “in 50, 200 or 500 years”
O. Goldreich: “I am 99.99% sure it will not be in our life time”
© Copyright 2026 Paperzz