Lecture 10: The polynomial time hierarchy and

T-79.5103 Computational Complexity Theory
Lecture 10: The Polynomial Time Hierarchy and Alternating Turing
Machines
Aalto University
School of Science
Department of Computer Science
Spring 2016
Agenda
The polynomial time hierarchy
Alternating Turing machines
(C. Papadimitriou: Computational Complexity, Chapters 16 & 17)
T-79.5103 Computational Complexity Theory / Lecture 10
Department of Computer Science
2/16
1. The Polynomial Time Hierarchy
Definition
The polynomial time hierarchy comprises the sequence of classes:
p
p
p
∆0 = Σ0 = Π0 = P
p
p
i ≥ 0 : ∆i+1 = PΣi
p
p
Σi+1 = NPΣi
p
p
Πi+1 = coNPΣi
Cumulative polynomial time hierarchy: PH =
p
i≥0 Σi
S
T-79.5103 Computational Complexity Theory / Lecture 10
Department of Computer Science
3/16
The polynomial time hierarchy—cont’d
Properties:
p
p
p
p
∆1 = PΣ0 = PP = P
p
p
Σ1 = NPΣ0 = NPP = NP
p
p
Π1 = coNPΣ0 = coNP
∆2 = PΣ1 = PNP
p
p
Σ2 = NPΣ1 = NPNP
p
p
Π2 = coNPΣ1 = coNPNP
p
∆i
p
p
Σ
Σ
p
p
⊆ ip ⊆ ∆i+1 ⊆ i+1
⊆ ∆i+2
p
Πi+1
Πi
T-79.5103 Computational Complexity Theory / Lecture 10
Department of Computer Science
4/16
Certificates
Theorem
p
Let L be a language and i ≥ 1. Then L ∈ Σi iff there is a polynomially
p
balanced relation R such that the language {x; y | (x, y) ∈ R} is in Πi−1
and
L = {x | there is a y such that (x, y) ∈ R}.
Corollary
p
Let L be a language and i ≥ 1. Then L ∈ Πi iff there is a polynomially
p
balanced relation R such that the language {x; y | (x, y) ∈ R} is in Σi−1
and
L = {x | for all y with |y| ≤ |x|k , (x, y) ∈ R}.
T-79.5103 Computational Complexity Theory / Lecture 10
Department of Computer Science
5/16
Certificates—cont’d
A relation R ⊆ (Σ∗ )i+1 is said to be polynomially balanced if whenever
(x, y1 , . . . , yi ) ∈ R, it holds that |y1 |, . . . , |yi | ≤ |x|k for some k.
Corollary
p
Let L be a language and i ≥ 1. Then L ∈ Σi iff there is a polynomially
balanced, polynomial-time decidable (i + 1)-ary relation R such that
L = {x | ∃y1 ∀y2 ∃y3 · · · Qyi such that (x, y1 , . . . , yi ) ∈ R}
where Q is ∀ if i is even and ∃ if i is odd.
T-79.5103 Computational Complexity Theory / Lecture 10
Department of Computer Science
6/16
Is PH a proper hierarchy?
Proposition
p
p
p
p
p
p
If Σi = Πi for some i ≥ 1, then ∆j = Σj = Πj = Σi for all j > i.
In this case the polynomial time hierarchy is said to collapse to the ith
level.
If P = NP, or if NP = coNP, then the polynomial time hierarchy
collapses to the first level. (If P = NP, then actually already to the
zeroth level.)
P = NP iff P = PH.
Notice that it can be the case that P 6= NP and NP 6= coNP but
the polynomial time hierarchy collapses to the second level.
(This is not expected to happen, though.)
T-79.5103 Computational Complexity Theory / Lecture 10
Department of Computer Science
7/16
Complete problems
QSATi (quantified satisfiability with i alternations of quantifiers):
Given a Boolean expression φ with the Boolean variables
partitioned into i sets X1 , . . . , Xi , is it true that
there is a partial truth assignment for the variables X1 such that
for all partial truth assignments for X2
there is a partial truth assignment for X3
. . . φ is satisfied by the overall truth assignment?
QSATi : Is the following quantified Boolean expression true
∃X1 ∀X2 ∃X3 · · · QXi φ
where Q is ∀ if i is even and ∃ if i is odd?
Example
∃{p}∀{q}(p ∨ q) ∈ QSAT2 but ∃{p}∀{q}(p ∧ q) 6∈ QSAT2
T-79.5103 Computational Complexity Theory / Lecture 10
Department of Computer Science
8/16
Complete problems
Theorem
p
For all i ≥ 1, QSATi is Σi -complete.
Example
CIRCUIT MINIMISATION: Given a Boolean circuit C and an integer K ,
is there a circuit C0 with at most K gates that computes the same
function as C?
p
CIRCUIT MINIMISATION is Σ2 -complete (Buchfuhrer & Umans 2008).
Example
INTEGER EXPRESSION EQUIVALENCE: Do two integer expressions
E1 and E2 , built out of binary numbers by + and ∪, describe the same
set? (E.g. (001 ∪ 011) + (010) = (011 ∪ 101).)
p
INTEGER EXPRESSION EQUIVALENCE is Π2 -complete
(Stockmeyer 1973).
T-79.5103 Computational Complexity Theory / Lecture 10
Department of Computer Science
9/16
Complete problems—cont’d
Theorem
If there is a PH-complete problem, then the polynomial time hierarchy
collapses to some finite level.
p
Proof. Assume L is PH-complete. Then L ∈ Σi for some i. But then
p
p
p
any L0 ∈ Σi+1 reduces to L. This means that Σi = Σi+1 (all levels are
closed under reductions). 2
T-79.5103 Computational Complexity Theory / Lecture 10
Department of Computer Science
10/16
Complete problems—cont’d
PH ⊆ PSPACE
p
L ∈ PH iff L ∈ Σi for some i iff
L = {x | ∃y1 ∀y2 · · · Qyi s.t. (x, y1 , . . . , yi ) ∈ R} for some i.
It is open whether PH = PSPACE.
If PH = PSPACE, then the polynomial time hierarchy collapses
to some finite level. (There are PSPACE-complete problems.)
If PH does not collapse, problems are strictly harder in an upper
p
level when compared to the lower level: if L is a Σi+1 -complete
p
language and L ∈ Σi , then PH collapses to level i.
Example
p
Consider a Σ2 -complete problem. It cannot be solved with a
polynomial overhead on top of a procedure for a problem in NP
(unless PH collapses to level 1).
T-79.5103 Computational Complexity Theory / Lecture 10
Department of Computer Science
11/16
5. Alternating Turing Machines
Alternation is an important generalisation of nondeterminism.
In a nondeterministic computation each configuration is an
implicit OR of its successor configurations: i.e.
a configuration “leads to acceptance” iff at least one of its
successors does.
The idea is to allow both OR and AND configurations in a tree of
configurations generated by a NTM N computing on input x.
T-79.5103 Computational Complexity Theory / Lecture 10
Department of Computer Science
12/16
Definition
An alternating Turing machine N is a nondeterministic Turing machine
where the set of states K is partitioned into two sets K = KAND ∪ KOR .
Given the tree of configurations of N on input x, the eventually
accepting configurations of N are defined recursively:
1. Any leaf configuration with state “yes” is eventually accepting.
2. A configuration with state in KAND is eventually accepting iff all its
successors are.
3. A configuration with state in KOR is eventually accepting iff at
least one of its successors is.
+ N accepts x iff its initial configuration is eventually accepting.
T-79.5103 Computational Complexity Theory / Lecture 10
Department of Computer Science
13/16
Alternation-based complexity classes
Definition
An alternating Turing machine N decides a language L iff N accepts
all strings x ∈ L and rejects all strings x 6∈ L.
It is straightforward to define ATIME(f (n)) and ASPACE(f (n));
and using them, e.g. AP = ATIME(nk ), AL = ASPACE(log n)
etc.
Roughly speaking, alternating time classes correspond to
deterministic space and alternating space classes correspond to
deterministic time but one exponential higher.
Theorem
AL = P, AP = PSPACE, APSPACE = EXP, . . .
T-79.5103 Computational Complexity Theory / Lecture 10
Department of Computer Science
14/16
Alternation and the polynomial time hierarchy
Denote by Σi P (resp. Πi P), i ≥ 1, the family of languages decided by
polynomially time-bounded alternating Turing machines whose every
computation satisfies the following conditions:
The initial state belongs to KOR (resp. KAND ).
The computation alternates from a state in KOR to a state in
KAND or vice versa at most i − 1 times.
By definition, set also Σ0 P = Π0 P = P.
Theorem
p
p
For every i ≥ 0, Σi P = Σi and Πi P = Πi .
T-79.5103 Computational Complexity Theory / Lecture 10
Department of Computer Science
15/16
Learning Objectives
The concept of the polynomial time hierarchy
Alternating Turing machines and alternation-based complexity
classes
T-79.5103 Computational Complexity Theory / Lecture 10
Department of Computer Science
16/16