You are on page 1of 204

The Polynomial Hierarchy

Nabil Mustafa

Computational Complexity

1 / 204
Review of Definitions

Definition of NP
A language L is in NP if for any x {0, 1} , TM M and p()

x L u {0, 1}p(|x|) s.t. M(x, u) = 1

2 / 204
Review of Definitions

Definition of NP
A language L is in NP if for any x {0, 1} , TM M and p()

x L u {0, 1}p(|x|) s.t. M(x, u) = 1

Definition of coNP
A language L is in coNP if for any x {0, 1} , TM M and p()

x
/ L u {0, 1}p(|x|) s.t. M(x, u) = 1

3 / 204
Review of Definitions

Definition of NP
A language L is in NP if for any x {0, 1} , TM M and p()

x L u {0, 1}p(|x|) s.t. M(x, u) = 1

Definition of coNP
A language L is in coNP if for any x {0, 1} , TM M and p()

x
/ L u {0, 1}p(|x|) s.t. M(x, u) = 1

An Equivalent Definition of coNP


A language L is in coNP if for any x {0, 1} , TM M and p()

x L u {0, 1}p(|x|) s.t. M(x, u) = 0

4 / 204
Example: INDSET
INDSET
INDSET : Given a graph G = (V , E ) and integer k, does G have an
independent set of size k?
The independent set problem (INDSET ) is in NP

5 / 204
Example: INDSET
INDSET
INDSET : Given a graph G = (V , E ) and integer k, does G have an
independent set of size k?
The independent set problem (INDSET ) is in NP

If G has independent set of size k, then this set is the certificate for it, and
there exists TM M that will verify that.

6 / 204
Example: INDSET
INDSET
INDSET : Given a graph G = (V , E ) and integer k, does G have an
independent set of size k?
The independent set problem (INDSET ) is in NP

If G has independent set of size k, then this set is the certificate for it, and
there exists TM M that will verify that.

INDSET
INDSET: Given a graph G = (V , E ) and integer k, does G have no
independent set of size k?
The co-independent set problem (INDSET) is in coNP

7 / 204
Example: INDSET
INDSET
INDSET : Given a graph G = (V , E ) and integer k, does G have an
independent set of size k?
The independent set problem (INDSET ) is in NP

If G has independent set of size k, then this set is the certificate for it, and
there exists TM M that will verify that.

INDSET
INDSET: Given a graph G = (V , E ) and integer k, does G have no
independent set of size k?
The co-independent set problem (INDSET) is in coNP

If G is not in this language, i.e., it has an independent set of size k, then


there is a certificate and a TM M that will verify that.
Equivalently, if G is in this language, then all small certificates will be
rejected by a TM M.
8 / 204
Acceptance Tree for NP

1 1

0 0 1

0 0

9 / 204
Rejection Tree for NP

0 0

0 0 0

0 0

10 / 204
Acceptance Tree for coNP

0 0

0 0 0

0 0

11 / 204
Rejection Tree for coNP

0 0

0 0 0

1 0

12 / 204
Another Problem: MAX-INDSET

MAX-INDSET
MAX-INDSET : Given a graph G = (V , E ) and integer k, is the maximum
independent set in G of size k?

13 / 204
Another Problem: MAX-INDSET

MAX-INDSET
MAX-INDSET : Given a graph G = (V , E ) and integer k, is the maximum
independent set in G of size k?

Question: Is MAX-INDSET in NP ?

14 / 204
Another Problem: MAX-INDSET

MAX-INDSET
MAX-INDSET : Given a graph G = (V , E ) and integer k, is the maximum
independent set in G of size k?

Question: Is MAX-INDSET in NP ? No certificate known so far.

15 / 204
Another Problem: MAX-INDSET

MAX-INDSET
MAX-INDSET : Given a graph G = (V , E ) and integer k, is the maximum
independent set in G of size k?

Question: Is MAX-INDSET in NP ? No certificate known so far. Question:


Is MAX-INDSET in coNP ?

16 / 204
Another Problem: MAX-INDSET

MAX-INDSET
MAX-INDSET : Given a graph G = (V , E ) and integer k, is the maximum
independent set in G of size k?

Question: Is MAX-INDSET in NP ? No certificate known so far. Question:


Is MAX-INDSET in coNP ?
G has maximum I.S. not k small certificate

17 / 204
Another Problem: MAX-INDSET

MAX-INDSET
MAX-INDSET : Given a graph G = (V , E ) and integer k, is the maximum
independent set in G of size k?

Question: Is MAX-INDSET in NP ? No certificate known so far. Question:


Is MAX-INDSET in coNP ?
G has maximum I.S. not k small certificate
No small certificate known so far

18 / 204
Another Problem: MAX-INDSET

MAX-INDSET
MAX-INDSET : Given a graph G = (V , E ) and integer k, is the maximum
independent set in G of size k?

Question: Is MAX-INDSET in NP ? No certificate known so far. Question:


Is MAX-INDSET in coNP ?
G has maximum I.S. not k small certificate
No small certificate known so far
G MAX-INDSET I.S. of size k and no I.S. of size k + 1

19 / 204
Another Problem: MAX-INDSET

MAX-INDSET
MAX-INDSET : Given a graph G = (V , E ) and integer k, is the maximum
independent set in G of size k?

Question: Is MAX-INDSET in NP ? No certificate known so far. Question:


Is MAX-INDSET in coNP ?
G has maximum I.S. not k small certificate
No small certificate known so far
G MAX-INDSET I.S. of size k and no I.S. of size k + 1
I.S. of size k is in NP

20 / 204
Another Problem: MAX-INDSET

MAX-INDSET
MAX-INDSET : Given a graph G = (V , E ) and integer k, is the maximum
independent set in G of size k?

Question: Is MAX-INDSET in NP ? No certificate known so far. Question:


Is MAX-INDSET in coNP ?
G has maximum I.S. not k small certificate
No small certificate known so far
G MAX-INDSET I.S. of size k and no I.S. of size k + 1
I.S. of size k is in NP
No I.S. of size k + 1 is in coNP

21 / 204
Another Problem: MAX-INDSET

MAX-INDSET
MAX-INDSET : Given a graph G = (V , E ) and integer k, is the maximum
independent set in G of size k?

Question: Is MAX-INDSET in NP ? No certificate known so far. Question:


Is MAX-INDSET in coNP ?
G has maximum I.S. not k small certificate
No small certificate known so far
G MAX-INDSET I.S. of size k and no I.S. of size k + 1
I.S. of size k is in NP
No I.S. of size k + 1 is in coNP
MAX-INDSET seems a combination of NP and coNP problems

22 / 204
Another Problem: MAX-INDSET

MAX-INDSET
MAX-INDSET : Given a graph G = (V , E ) and integer k, is the maximum
independent set in G of size k?

Question: Is MAX-INDSET in NP ? No certificate known so far. Question:


Is MAX-INDSET in coNP ?
G has maximum I.S. not k small certificate
No small certificate known so far
G MAX-INDSET I.S. of size k and no I.S. of size k + 1
I.S. of size k is in NP
No I.S. of size k + 1 is in coNP
MAX-INDSET seems a combination of NP and coNP problems
G MAX-INDSET small certificate of one kind and no small
certificates of another kind

23 / 204
Pp
The Class 2
Pp
Defining 2
P
A language L is in p2 if for any x {0, 1} , TM M and two
polynomials p() and q()

x L u {0, 1}p(|x|) v {0, 1}q(|x|) M(x, u, v ) = 1

24 / 204
Pp
The Class 2
Pp
Defining 2
P
A language L is in p2 if for any x {0, 1} , TM M and two
polynomials p() and q()

x L u {0, 1}p(|x|) v {0, 1}q(|x|) M(x, u, v ) = 1


Pp
Now note that MAX-INDSET 2:

25 / 204
Pp
The Class 2
Pp
Defining 2
P
A language L is in p2 if for any x {0, 1} , TM M and two
polynomials p() and q()

x L u {0, 1}p(|x|) v {0, 1}q(|x|) M(x, u, v ) = 1


Pp
Now note that MAX-INDSET 2:
I u = S is an independent set of size k

26 / 204
Pp
The Class 2
Pp
Defining 2
P
A language L is in p2 if for any x {0, 1} , TM M and two
polynomials p() and q()

x L u {0, 1}p(|x|) v {0, 1}q(|x|) M(x, u, v ) = 1


Pp
Now note that MAX-INDSET 2:
I u = S is an independent set of size k
I v = S 0 is a set of size k + 1

27 / 204
Pp
The Class 2
Pp
Defining 2
P
A language L is in p2 if for any x {0, 1} , TM M and two
polynomials p() and q()

x L u {0, 1}p(|x|) v {0, 1}q(|x|) M(x, u, v ) = 1


Pp
Now note that MAX-INDSET 2:
I u = S is an independent set of size k
I v = S 0 is a set of size k + 1
I TM M verifies that u is an I.S. and v is not an I .S.

28 / 204
Pp
The Class 2
Pp
Defining 2
P
A language L is in p2 if for any x {0, 1} , TM M and two
polynomials p() and q()

x L u {0, 1}p(|x|) v {0, 1}q(|x|) M(x, u, v ) = 1


Pp
Now note that MAX-INDSET 2:
I u = S is an independent set of size k
I v = S 0 is a set of size k + 1
I TM M verifies that u is an I.S. and v is not an I .S.
If G MAX-INDSET , then will find such u

29 / 204
Pp
The Class 2
Pp
Defining 2
P
A language L is in p2 if for any x {0, 1} , TM M and two
polynomials p() and q()

x L u {0, 1}p(|x|) v {0, 1}q(|x|) M(x, u, v ) = 1


Pp
Now note that MAX-INDSET 2:
I u = S is an independent set of size k
I v = S 0 is a set of size k + 1
I TM M verifies that u is an I.S. and v is not an I .S.
If G MAX-INDSET , then will find such u
If G
/ MAX-INDSET , then

30 / 204
Pp
The Class 2
Pp
Defining 2
P
A language L is in p2 if for any x {0, 1} , TM M and two
polynomials p() and q()

x L u {0, 1}p(|x|) v {0, 1}q(|x|) M(x, u, v ) = 1


Pp
Now note that MAX-INDSET 2:
I u = S is an independent set of size k
I v = S 0 is a set of size k + 1
I TM M verifies that u is an I.S. and v is not an I .S.
If G MAX-INDSET , then will find such u
If G
/ MAX-INDSET , then
I If maximum I.S. has size < k, cannot find u

31 / 204
Pp
The Class 2
Pp
Defining 2
P
A language L is in p2 if for any x {0, 1} , TM M and two
polynomials p() and q()

x L u {0, 1}p(|x|) v {0, 1}q(|x|) M(x, u, v ) = 1


Pp
Now note that MAX-INDSET 2:
I u = S is an independent set of size k
I v = S 0 is a set of size k + 1
I TM M verifies that u is an I.S. and v is not an I .S.
If G MAX-INDSET , then will find such u
If G
/ MAX-INDSET , then
I If maximum I.S. has size < k, cannot find u
I If maximum I.S. has size > k, not true for all v

32 / 204
Pp
The Class 2
Pp
Defining 2
P
A language L is in p2 if for any x {0, 1} , TM M and two
polynomials p() and q()

x L u {0, 1}p(|x|) v {0, 1}q(|x|) M(x, u, v ) = 1


Pp
Now note that MAX-INDSET 2:
I u = S is an independent set of size k
I v = S 0 is a set of size k + 1
I TM M verifies that u is an I.S. and v is not an I .S.
If G MAX-INDSET , then will find such u
If G
/ MAX-INDSET , then
I If maximum I.S. has size < k, cannot find u
I If maximum I.S. has size > k, not true for all v
Note: can assume p() = q(), since take the maximum.

33 / 204
Pp
Properties of 2

Claim
Pp
If L NP , then L 2

34 / 204
Pp
Properties of 2

Claim
Pp
If L NP , then L P2
If L coNP , then L p2

35 / 204
Pp
Properties of 2

Claim
Pp
If L NP , then L P2
If L coNP , then L p2

L NP :

36 / 204
Pp
Properties of 2

Claim
Pp
If L NP , then L P2
If L coNP , then L p2

L NP :
I x L u and TM M s.t. M(x, u) = 1

37 / 204
Pp
Properties of 2

Claim
Pp
If L NP , then L P2
If L coNP , then L p2

L NP :
I x L u and TM M s.t. M(x, u) = 1 Pp
I Have to construct the machine M 0 as in the definition for 2

38 / 204
Pp
Properties of 2

Claim
Pp
If L NP , then L P2
If L coNP , then L p2

L NP :
I x L u and TM M s.t. M(x, u) = 1 Pp
I Have to construct the machine M 0 as in the definition for 2
I M 0 = M ignores v and simply works as before on u

39 / 204
Pp
Properties of 2

Claim
Pp
If L NP , then L P2
If L coNP , then L p2

L NP :
I x L u and TM M s.t. M(x, u) = 1 Pp
I Have to construct the machine M 0 as in the definition for 2
I M 0 = M ignores v and simply works as before on u

L coNP :

40 / 204
Pp
Properties of 2

Claim
Pp
If L NP , then L P2
If L coNP , then L p2

L NP :
I x L u and TM M s.t. M(x, u) = 1 Pp
I Have to construct the machine M 0 as in the definition for 2
I M 0 = M ignores v and simply works as before on u

L coNP :
I x L TM M s.t. v , M(x, v ) = 0

41 / 204
Pp
Properties of 2

Claim
Pp
If L NP , then L P2
If L coNP , then L p2

L NP :
I x L u and TM M s.t. M(x, u) = 1 Pp
I Have to construct the machine M 0 as in the definition for 2
I M 0 = M ignores v and simply works as before on u

L coNP :
I x L TM M s.t. v , M(x, v ) = 0 Pp
I Have to construct the machine M 0 as in the definition for 2

42 / 204
Pp
Properties of 2

Claim
Pp
If L NP , then L P2
If L coNP , then L p2

L NP :
I x L u and TM M s.t. M(x, u) = 1 Pp
I Have to construct the machine M 0 as in the definition for 2
I M 0 = M ignores v and simply works as before on u

L coNP :
I x L TM M s.t. v , M(x, v ) = 0 Pp
I Have to construct the machine M 0 as in the definition for 2
I M 0 = M ignores u and simply works as before on v

43 / 204
Pp
Generalizing 2
Pp
Defining i
P
For every i 1, a language L is in pi if there exists a polynomial-time
TM M and a polynomial p() such that:

x L u1 u2 . . . Qi ui M(x, u1 , . . . , ui ) = 1

where ui {0, 1}p(|x|) for all i.

44 / 204
Pp
Generalizing 2
Pp
Defining i
P
For every i 1, a language L is in pi if there exists a polynomial-time
TM M and a polynomial p() such that:

x L u1 u2 . . . Qi ui M(x, u1 , . . . , ui ) = 1

where ui {0, 1}p(|x|) for all i.


Qp
Defining i
Q
For every i 1, a language L is in pi if there exists a polynomial-time
TM M and a polynomial p such that:

x L u1 u2 . . . Qi ui M(x, u1 , . . . , ui ) = 1

where each ui {0, 1}p(|x|)

45 / 204
Pp
Generalizing 2
Pp
Defining i
P
For every i 1, a language L is in pi if there exists a polynomial-time
TM M and a polynomial p() such that:

x L u1 u2 . . . Qi ui M(x, u1 , . . . , ui ) = 1

where ui {0, 1}p(|x|) for all i.


Qp
Defining i
Q
For every i 1, a language L is in pi if there exists a polynomial-time
TM M and a polynomial p such that:

x L u1 u2 . . . Qi ui M(x, u1 , . . . , ui ) = 1

where each ui {0, 1}p(|x|)

Note: Qi denotes or depending on whether i is odd or even.


46 / 204
Defining Polynomial Hierarchy PH

Defining Polynomial Hierarchy PH


[
PH = pi
i

47 / 204
Defining Polynomial Hierarchy PH

Defining Polynomial Hierarchy PH


[
PH = pi
i

Pp
i : x L u1 u2 . . . Qi ui M(x, u1 , . . . , ui ) = 1

48 / 204
Defining Polynomial Hierarchy PH

Defining Polynomial Hierarchy PH


[
PH = pi
i

Pp
i : x L u1 u2 . . . Qi ui M(x, u1 , . . . , ui ) = 1
Qp
i : x L u1 u2 . . . Qi ui M(x, u1 , . . . , ui ) = 1

49 / 204
Defining Polynomial Hierarchy PH

Defining Polynomial Hierarchy PH


[
PH = pi
i

Pp
i : x L u1 u2 . . . Qi ui M(x, u1 , . . . , ui ) = 1
Qp
i : x L u1 u2 . . . Qi ui M(x, u1 , . . . , ui ) = 1

Some immediate observations:


Pp Qp
1 = NP and 1 = coNP

50 / 204
Defining Polynomial Hierarchy PH

Defining Polynomial Hierarchy PH


[
PH = pi
i

Pp
i : x L u1 u2 . . . Qi ui M(x, u1 , . . . , ui ) = 1
Qp
i : x L u1 u2 . . . Qi ui M(x, u1 , . . . , ui ) = 1

Some immediate observations:


Pp Qp
1 = NP and 1 = coNP
Qp Pp Pp
i = co i = {L : L i}

51 / 204
Defining Polynomial Hierarchy PH

Defining Polynomial Hierarchy PH


[
PH = pi
i

Pp
i : x L u1 u2 . . . Qi ui M(x, u1 , . . . , ui ) = 1
Qp
i : x L u1 u2 . . . Qi ui M(x, u1 , . . . , ui ) = 1

Some immediate observations:


Pp Qp
1 = NP and 1 = coNP
Qp Pp Pp
i = co i = {L : L i}
Pp Pp
i i+2

52 / 204
Defining Polynomial Hierarchy PH

Defining Polynomial Hierarchy PH


[
PH = pi
i

Pp
i : x L u1 u2 . . . Qi ui M(x, u1 , . . . , ui ) = 1
Qp
i : x L u1 u2 . . . Qi ui M(x, u1 , . . . , ui ) = 1

Some immediate observations:


Pp Qp
1 = NP and 1 = coNP
Qp Pp Pp
i = co i = {L : L i}
Pp Pp
i+2
Ppi Qp
i i+1

53 / 204
A Collapsing Result
Claim
If P = NP then PH = P (the hierarchy collapses to P )

54 / 204
A Collapsing Result
Claim
If P = NP then PH = P (the hierarchy collapses to P )

P = NP = NP = coNP = P : invert answer of NP

55 / 204
A Collapsing Result
Claim
If P = NP then PH = P (the hierarchy collapses to P )

P = NP = NP = coNP = P : invert answer of NP


P Q
So true for i = 1. Prove by induction: pi , pi P

56 / 204
A Collapsing Result
Claim
If P = NP then PH = P (the hierarchy collapses to P )

P = NP = NP = coNP = P : invert answer of NP


P Q
So true for i = 1. Prove by induction: pi , pi P
P Q
Assume it is true for i 1. Then assume P = pi1 = pi1

57 / 204
A Collapsing Result
Claim
If P = NP then PH = P (the hierarchy collapses to P )

P = NP = NP = coNP = P : invert answer of NP


P Q
So true for i = 1. Prove by induction: pi , pi P
P Q
Assume it is true for i 1. Then assume P = pi1 = pi1
P
Let L pi . Then by definition,

58 / 204
A Collapsing Result
Claim
If P = NP then PH = P (the hierarchy collapses to P )

P = NP = NP = coNP = P : invert answer of NP


P Q
So true for i = 1. Prove by induction: pi , pi P
P Q
Assume it is true for i 1. Then assume P = pi1 = pi1
P
Let L pi . Then by definition,
I x L u1 u2 . . . Qi ui M(x, u1 , . . . , ui ) = 1

59 / 204
A Collapsing Result
Claim
If P = NP then PH = P (the hierarchy collapses to P )

P = NP = NP = coNP = P : invert answer of NP


P Q
So true for i = 1. Prove by induction: pi , pi P
P Q
Assume it is true for i 1. Then assume P = pi1 = pi1
P
Let L pi . Then by definition,
I x L u1 u2 . . . Qi ui M(x, u1 , . . . , ui ) = 1
I Define another L0 by making u1 part of the input

60 / 204
A Collapsing Result
Claim
If P = NP then PH = P (the hierarchy collapses to P )

P = NP = NP = coNP = P : invert answer of NP


P Q
So true for i = 1. Prove by induction: pi , pi P
P Q
Assume it is true for i 1. Then assume P = pi1 = pi1
P
Let L pi . Then by definition,
I x L u1 u2 . . . Qi ui M(x, u1 , . . . , ui ) = 1
I Define another L0 by making u1 part of the input :
x u1 L0 u2 . . . Qi ui M(x, u1 , u2 , . . . , ui ) = 1

61 / 204
A Collapsing Result
Claim
If P = NP then PH = P (the hierarchy collapses to P )

P = NP = NP = coNP = P : invert answer of NP


P Q
So true for i = 1. Prove by induction: pi , pi P
P Q
Assume it is true for i 1. Then assume P = pi1 = pi1
P
Let L pi . Then by definition,
I x L u1 u2 . . . Qi ui M(x, u1 , . . . , ui ) = 1
I Define another L0 by making u1 part of the input :
x u1 L0 u2 . . . Qi ui M(x, u1 , u2 , . . . , ui ) = 1
Qp
I L0 i1 , and by inductive hypothesis, L0 P

62 / 204
A Collapsing Result
Claim
If P = NP then PH = P (the hierarchy collapses to P )

P = NP = NP = coNP = P : invert answer of NP


P Q
So true for i = 1. Prove by induction: pi , pi P
P Q
Assume it is true for i 1. Then assume P = pi1 = pi1
P
Let L pi . Then by definition,
I x L u1 u2 . . . Qi ui M(x, u1 , . . . , ui ) = 1
I Define another L0 by making u1 part of the input :
x u1 L0 u2 . . . Qi ui M(x, u1 , u2 , . . . , ui ) = 1
Qp
I L0 i1 , and by inductive hypothesis, L0 P
= TM M 0 such that M 0 (x, u1 ) = 1 iff x u1 L0

63 / 204
A Collapsing Result
Claim
If P = NP then PH = P (the hierarchy collapses to P )

P = NP = NP = coNP = P : invert answer of NP


P Q
So true for i = 1. Prove by induction: pi , pi P
P Q
Assume it is true for i 1. Then assume P = pi1 = pi1
P
Let L pi . Then by definition,
I x L u1 u2 . . . Qi ui M(x, u1 , . . . , ui ) = 1
I Define another L0 by making u1 part of the input :
x u1 L0 u2 . . . Qi ui M(x, u1 , u2 , . . . , ui ) = 1
Qp
I L0 i1 , and by inductive hypothesis, L0 P
= TM M 0 such that M 0 (x, u1 ) = 1 iff x u1 L0
I But now, x L u1 M 0 (x, u1 ) = 1

64 / 204
A Collapsing Result
Claim
If P = NP then PH = P (the hierarchy collapses to P )

P = NP = NP = coNP = P : invert answer of NP


P Q
So true for i = 1. Prove by induction: pi , pi P
P Q
Assume it is true for i 1. Then assume P = pi1 = pi1
P
Let L pi . Then by definition,
I x L u1 u2 . . . Qi ui M(x, u1 , . . . , ui ) = 1
I Define another L0 by making u1 part of the input :
x u1 L0 u2 . . . Qi ui M(x, u1 , u2 , . . . , ui ) = 1
Qp
I L0 i1 , and by inductive hypothesis, L0 P
= TM M 0 such that M 0 (x, u1 ) = 1 iff x u1 L0
I But now, x L u1 M 0 (x, u1 ) = 1
I But this is exactly the definition of NP

65 / 204
A Collapsing Result
Claim
If P = NP then PH = P (the hierarchy collapses to P )

P = NP = NP = coNP = P : invert answer of NP


P Q
So true for i = 1. Prove by induction: pi , pi P
P Q
Assume it is true for i 1. Then assume P = pi1 = pi1
P
Let L pi . Then by definition,
I x L u1 u2 . . . Qi ui M(x, u1 , . . . , ui ) = 1
I Define another L0 by making u1 part of the input :
x u1 L0 u2 . . . Qi ui M(x, u1 , u2 , . . . , ui ) = 1
Qp
I L0 i1 , and by inductive hypothesis, L0 P
= TM M 0 such that M 0 (x, u1 ) = 1 iff x u1 L0
I But now, x L u1 M 0 (x, u1 ) = 1
I But this is exactly the definition of NP
I By assumption, NP = P , hence L P
66 / 204
Another Collapsing Result
Claim
Pp Qp Pp Qp Pp
If i = i for some i 1, then for any j i, j = j = i

67 / 204
Another Collapsing Result
Claim
Pp Qp Pp Qp Pp
If i = i for some i 1, then for any j i, j = j = i

Again, prove by induction on j. True for j = i.

68 / 204
Another Collapsing Result
Claim
Pp Qp Pp Qp Pp
If i = i for some i 1, then for any j i, j = j = i

Again, prove by induction on j. True for j = i.


P P
Have to show that if L pi+1 , then L pi

69 / 204
Another Collapsing Result
Claim
Pp Qp Pp Qp Pp
If i = i for some i 1, then for any j i, j = j = i

Again, prove by induction on j. True for j = i.


P P
Have to show that if L pi+1 , then L pi
I x L u1 u2 . . . Qi+1 ui+1 M(x, u1 , . . . , ui+1 ) = 1

70 / 204
Another Collapsing Result
Claim
Pp Qp Pp Qp Pp
If i = i for some i 1, then for any j i, j = j = i

Again, prove by induction on j. True for j = i.


P P
Have to show that if L pi+1 , then L pi
I x L u1 u2 . . . Qi+1 ui+1 M(x, u1 , . . . , ui+1 ) = 1
I Define another L0 by making u1 part of the input:
x u1 L0 u2 . . . Qi ui M(x, u1 , u2 , . . . , ui ) = 1

71 / 204
Another Collapsing Result
Claim
Pp Qp Pp Qp Pp
If i = i for some i 1, then for any j i, j = j = i

Again, prove by induction on j. True for j = i.


P P
Have to show that if L pi+1 , then L pi
I x L u1 u2 . . . Qi+1 ui+1 M(x, u1 , . . . , ui+1 ) = 1
I Define another L0 by making u1 part of the input:
x u1 L0 u2 . . . Qi ui M(x, u1 , u2 , . . . , ui ) = 1
Qp Qp Pp
I L0 i . By inductive hypothesis, i = i .

72 / 204
Another Collapsing Result
Claim
Pp Qp Pp Qp Pp
If i = i for some i 1, then for any j i, j = j = i

Again, prove by induction on j. True for j = i.


P P
Have to show that if L pi+1 , then L pi
I x L u1 u2 . . . Qi+1 ui+1 M(x, u1 , . . . , ui+1 ) = 1
I Define another L0 by making u1 part of the input:
x u1 L0 u2 . . . Qi ui M(x, u1 , u2 , . . . , ui ) = 1
Qp Qp Pp
I L0 i . By inductive hypothesis, i = i .
I x u1 L0 u2 . . . Qi ui M 0 (x, u1 , u2 , . . . , ui ) = 1

73 / 204
Another Collapsing Result
Claim
Pp Qp Pp Qp Pp
If i = i for some i 1, then for any j i, j = j = i

Again, prove by induction on j. True for j = i.


P P
Have to show that if L pi+1 , then L pi
I x L u1 u2 . . . Qi+1 ui+1 M(x, u1 , . . . , ui+1 ) = 1
I Define another L0 by making u1 part of the input:
x u1 L0 u2 . . . Qi ui M(x, u1 , u2 , . . . , ui ) = 1
Qp Qp Pp
I L0 i . By inductive hypothesis, i = i .
I x u1 L0 u2 . . . Qi ui M 0 (x, u1 , u2 , . . . , ui ) = 1
I x L u1 u2 . . . Qi ui M 0 (x, u1 , . . . , ui ) = 1

74 / 204
Another Collapsing Result
Claim
Pp Qp Pp Qp Pp
If i = i for some i 1, then for any j i, j = j = i

Again, prove by induction on j. True for j = i.


P P
Have to show that if L pi+1 , then L pi
I x L u1 u2 . . . Qi+1 ui+1 M(x, u1 , . . . , ui+1 ) = 1
I Define another L0 by making u1 part of the input:
x u1 L0 u2 . . . Qi ui M(x, u1 , u2 , . . . , ui ) = 1
Qp Qp Pp
I L0 i . By inductive hypothesis, i = i .
I x u1 L0 u2 . . . Qi ui M 0 (x, u1 , u2 , . . . , ui ) = 1
I x L u1 u2 . . . Qi ui M 0 (x, u1 , . . . , ui ) = 1
I x L (u1 u2 ) . . . Qi ui M 0 (x, u1 u2 , u3, . . . , ui ) = 1

75 / 204
Another Collapsing Result
Claim
Pp Qp Pp Qp Pp
If i = i for some i 1, then for any j i, j = j = i

Again, prove by induction on j. True for j = i.


P P
Have to show that if L pi+1 , then L pi
I x L u1 u2 . . . Qi+1 ui+1 M(x, u1 , . . . , ui+1 ) = 1
I Define another L0 by making u1 part of the input:
x u1 L0 u2 . . . Qi ui M(x, u1 , u2 , . . . , ui ) = 1
Qp Qp Pp
I L0 i . By inductive hypothesis, i = i .
I x u1 L0 u2 . . . Qi ui M 0 (x, u1 , u2 , . . . , ui ) = 1
I x L u1 u2 . . . Qi ui M 0 (x, u1 , . . . , ui ) = 1
I x L (u1 u2 ) . . . Qi ui M 0 (x, u1 u2 , u3, . . . , ui ) = 1
Pp
I But this is exactly the definition of i .
76 / 204
Complete Problems for Levels of PH
What about complete problems for each level of the hierarchy?

77 / 204
Complete Problems for Levels of PH
What about complete problems for each level of the hierarchy?
NP : u = hx1 , . . . , xn i such that (u) satisfiable?

78 / 204
Complete Problems for Levels of PH
What about complete problems for each level of the hierarchy?
NP : u = hx1 , . . . , xn i such that (u) satisfiable?
For NP , complete problem: u such that satisfiable

79 / 204
Complete Problems for Levels of PH
What about complete problems for each level of the hierarchy?
NP : u = hx1 , . . . , xn i such that (u) satisfiable?
For NP , complete problem: u such that satisfiable
Basically can capture the working of the TM step-by-step

80 / 204
Complete Problems for Levels of PH
What about complete problems for each level of the hierarchy?
NP : u = hx1 , . . . , xn i such that (u) satisfiable?
For NP , complete problem: u such that satisfiable
Basically can capture the working of the TM step-by-step
The existence of certificate for NP language becomes existence of
SAT variables

81 / 204
Complete Problems for Levels of PH
What about complete problems for each level of the hierarchy?
NP : u = hx1 , . . . , xn i such that (u) satisfiable?
For NP , complete problem: u such that satisfiable
Basically can capture the working of the TM step-by-step
The existence of certificate for NP language becomes existence of
SAT variables
P
Exactly same way, can construct a pi -complete problem:

i SAT : u1 u2 . . . Qi ui (u1 , . . . , ui ) = 1

82 / 204
Complete Problems for Levels of PH
What about complete problems for each level of the hierarchy?
NP : u = hx1 , . . . , xn i such that (u) satisfiable?
For NP , complete problem: u such that satisfiable
Basically can capture the working of the TM step-by-step
The existence of certificate for NP language becomes existence of
SAT variables
P
Exactly same way, can construct a pi -complete problem:

i SAT : u1 u2 . . . Qi ui (u1 , . . . , ui ) = 1

Note: each ui is a set of boolean variables, n total variables

83 / 204
Complete Problems for Levels of PH
What about complete problems for each level of the hierarchy?
NP : u = hx1 , . . . , xn i such that (u) satisfiable?
For NP , complete problem: u such that satisfiable
Basically can capture the working of the TM step-by-step
The existence of certificate for NP language becomes existence of
SAT variables
P
Exactly same way, can construct a pi -complete problem:

i SAT : u1 u2 . . . Qi ui (u1 , . . . , ui ) = 1

Note: each ui is a set of boolean variables, n total variables


Basically the number of alternations allowed are at most i

84 / 204
Polynomial Hierarchy

85 / 204
Oracle Turing Machine (OTM )
Define an Oracle Turing Machine (OTM ) M O as:

86 / 204
Oracle Turing Machine (OTM )
Define an Oracle Turing Machine (OTM ) M O as:

M is just a Turing Machine with normal computation

87 / 204
Oracle Turing Machine (OTM )
Define an Oracle Turing Machine (OTM ) M O as:

M is just a Turing Machine with normal computation


M also has access to an Oracle, denoted by O.

88 / 204
Oracle Turing Machine (OTM )
Define an Oracle Turing Machine (OTM ) M O as:

M is just a Turing Machine with normal computation


M also has access to an Oracle, denoted by O.
I M can ask any question to O during its computation

89 / 204
Oracle Turing Machine (OTM )
Define an Oracle Turing Machine (OTM ) M O as:

M is just a Turing Machine with normal computation


M also has access to an Oracle, denoted by O.
I M can ask any question to O during its computation
I O always answers correctly and in constant time.

90 / 204
Oracle Turing Machine (OTM )
Define an Oracle Turing Machine (OTM ) M O as:

M is just a Turing Machine with normal computation


M also has access to an Oracle, denoted by O.
I M can ask any question to O during its computation
I O always answers correctly and in constant time.

M O (x): Output of M O on input x

91 / 204
Oracle Turing Machine (OTM )
Define an Oracle Turing Machine (OTM ) M O as:

M is just a Turing Machine with normal computation


M also has access to an Oracle, denoted by O.
I M can ask any question to O during its computation
I O always answers correctly and in constant time.

M O (x): Output of M O on input x

Definition
An Oracle Turing machine M O has
An extra oracle tape, and access to oracle O
Three extra states qquery , qyes , qno .

92 / 204
Oracle Turing Machine (OTM )
Define an Oracle Turing Machine (OTM ) M O as:

M is just a Turing Machine with normal computation


M also has access to an Oracle, denoted by O.
I M can ask any question to O during its computation
I O always answers correctly and in constant time.

M O (x): Output of M O on input x

Definition
An Oracle Turing machine M O has
An extra oracle tape, and access to oracle O
Three extra states qquery , qyes , qno .
When M enters qquery , control goes to state qyes if q O where q is
question on the oracle tape, otherwise state qno .

93 / 204
New Complexity Classes
Claim: If M is a TM , M is a reduction from M O to O

94 / 204
New Complexity Classes
Claim: If M is a TM , M is a reduction from M O to O

Given O as a black-box, can decide strings in M O

95 / 204
New Complexity Classes
Claim: If M is a TM , M is a reduction from M O to O

Given O as a black-box, can decide strings in M O

A New Complexity Class


Define a new complexity class M C , where
M is a TM and C is a complexity class
M decides L given that oracle O C

96 / 204
New Complexity Classes
Claim: If M is a TM , M is a reduction from M O to O

Given O as a black-box, can decide strings in M O

A New Complexity Class


Define a new complexity class M C , where
M is a TM and C is a complexity class
M decides L given that oracle O C

For example, M NP denotes the set of languages decided by a TM M with


an oracle access to languages in NP

97 / 204
New Complexity Classes
Claim: If M is a TM , M is a reduction from M O to O

Given O as a black-box, can decide strings in M O

A New Complexity Class


Define a new complexity class M C , where
M is a TM and C is a complexity class
M decides L given that oracle O C

For example, M NP denotes the set of languages decided by a TM M with


an oracle access to languages in NP

W.l.o.g., can only consider a fixed NP complete language

98 / 204
New Complexity Classes
Claim: If M is a TM , M is a reduction from M O to O

Given O as a black-box, can decide strings in M O

A New Complexity Class


Define a new complexity class M C , where
M is a TM and C is a complexity class
M decides L given that oracle O C

For example, M NP denotes the set of languages decided by a TM M with


an oracle access to languages in NP

W.l.o.g., can only consider a fixed NP complete language

Since can reduce any L NP to any NP complete language in


polynomial time

99 / 204
Some Properties
Define C1C2 : M is a TM that is in complexity class C1

100 / 204
Some Properties
Define C1C2 : M is a TM that is in complexity class C1

NP C : a NTM with access to oracle in class C

101 / 204
Some Properties
Define C1C2 : M is a TM that is in complexity class C1

NP C : a NTM with access to oracle in class C


P P : a deterministic TM with access to oracle in class P

102 / 204
Some Properties
Define C1C2 : M is a TM that is in complexity class C1

NP C : a NTM with access to oracle in class C


P P : a deterministic TM with access to oracle in class P
P
I Note that P = P

103 / 204
Some Properties
Define C1C2 : M is a TM that is in complexity class C1

NP C : a NTM with access to oracle in class C


P P : a deterministic TM with access to oracle in class P
P
I Note that P = P

Is NP = NP NP ?

104 / 204
Some Properties
Define C1C2 : M is a TM that is in complexity class C1

NP C : a NTM with access to oracle in class C


P P : a deterministic TM with access to oracle in class P
P
I Note that P = P

Is NP = NP NP ? No!

105 / 204
Some Properties
Define C1C2 : M is a TM that is in complexity class C1

NP C : a NTM with access to oracle in class C


P P : a deterministic TM with access to oracle in class P
P
I Note that P = P

Is NP = NP NP ? No!
I Clearly NP NP NP

106 / 204
Some Properties
Define C1C2 : M is a TM that is in complexity class C1

NP C : a NTM with access to oracle in class C


P P : a deterministic TM with access to oracle in class P
P
I Note that P = P

Is NP = NP NP ? No!
I Clearly NP NP NP
I So why is NP NP NP false?

107 / 204
Some Properties
Define C1C2 : M is a TM that is in complexity class C1

NP C : a NTM with access to oracle in class C


P P : a deterministic TM with access to oracle in class P
P
I Note that P = P

Is NP = NP NP ? No!
I Clearly NP NP NP
I So why is NP NP NP false?

Claim: SAT P SAT

108 / 204
Some Properties
Define C1C2 : M is a TM that is in complexity class C1

NP C : a NTM with access to oracle in class C


P P : a deterministic TM with access to oracle in class P
P
I Note that P = P

Is NP = NP NP ? No!
I Clearly NP NP NP
I So why is NP NP NP false?

Claim: SAT P SAT

I To decide if formula is unsatisfiable, M asks oracle SAT if SAT


and gives its opposite answer.

109 / 204
Some Properties
Define C1C2 : M is a TM that is in complexity class C1

NP C : a NTM with access to oracle in class C


P P : a deterministic TM with access to oracle in class P
P
I Note that P = P

Is NP = NP NP ? No!
I Clearly NP NP NP
I So why is NP NP NP false?

Claim: SAT P SAT

I To decide if formula is unsatisfiable, M asks oracle SAT if SAT


and gives its opposite answer.

Therefore: coNP P NP and (trivially), NP P NP

110 / 204
Polynomial Hierarchy via OTM
Can now define the polynomial heirarchy another way!

111 / 204
Polynomial Hierarchy via OTM
Can now define the polynomial heirarchy another way!

1 = NP

112 / 204
Polynomial Hierarchy via OTM
Can now define the polynomial heirarchy another way!

1 = NP
Y
= coNP
1

113 / 204
Polynomial Hierarchy via OTM
Can now define the polynomial heirarchy another way!

1 = NP
Y
= coNP
1
NP
2 = NP

114 / 204
Polynomial Hierarchy via OTM
Can now define the polynomial heirarchy another way!

1 = NP
Y
= coNP
1
NP
2 = NP
Y
NP
= coNP
2

115 / 204
Polynomial Hierarchy via OTM
Can now define the polynomial heirarchy another way!

1 = NP
Y
= coNP
1
NP
2 = NP
Y
NP
= coNP
2

pi = NP i 1

116 / 204
Polynomial Hierarchy via OTM
Can now define the polynomial heirarchy another way!

1 = NP
Y
= coNP
1
NP
2 = NP
Y
NP
= coNP
2

pi = NP i 1

Y
p
i 1
= coNP
i

117 / 204
Polynomial Hierarchy via OTM
Can now define the polynomial heirarchy another way!

1 = NP
Y
= coNP
1
NP
2 = NP
Y
NP
= coNP
2

pi = NP i 1

Y
p
i 1
= coNP
i
Claim: The above relations are correct
118 / 204
Defining the hierarchy via Oracle Machines
Theorem
P
For every i 2, pi = NP i 1 , where the latter class denotes the set of
languages decided by the polynomial-time NTM s with access to the
oracle i1 .

119 / 204
Defining the hierarchy via Oracle Machines
Theorem
P
For every i 2, pi = NP i 1 , where the latter class denotes the set of
languages decided by the polynomial-time NTM s with access to the
oracle i1 .

Here we are taking SAT as oracle which is NP -Complete.

120 / 204
Defining the hierarchy via Oracle Machines
Theorem
P
For every i 2, pi = NP i 1 , where the latter class denotes the set of
languages decided by the polynomial-time NTM s with access to the
oracle i1 .

Here we are taking SAT as oracle which is NP -Complete.

We will only prove for p2 = NP SAT

121 / 204
Defining the hierarchy via Oracle Machines
Theorem
P
For every i 2, pi = NP i 1 , where the latter class denotes the set of
languages decided by the polynomial-time NTM s with access to the
oracle i1 .

Here we are taking SAT as oracle which is NP -Complete.

We will only prove for p2 = NP SAT

We have to prove both ways:


L p2 = L NP SAT

L NP SAT
= L p2

122 / 204
First direction

L p2 = L NP SAT

123 / 204
First direction

L p2 = L NP SAT

Consider the TM M deciding the language L p2 :

x L u1 u2 M(x, u1 , u2 ) = 1

124 / 204
First direction

L p2 = L NP SAT

Consider the TM M deciding the language L p2 :

x L u1 u2 M(x, u1 , u2 ) = 1

Fixing u1 , u2 M(x u1 , u2 ) = 1 is in coNP

125 / 204
First direction

L p2 = L NP SAT

Consider the TM M deciding the language L p2 :

x L u1 u2 M(x, u1 , u2 ) = 1

Fixing u1 , u2 M(x u1 , u2 ) = 1 is in coNP

Consider a NTM N with SAT as an oracle.

126 / 204
First direction

L p2 = L NP SAT

Consider the TM M deciding the language L p2 :

x L u1 u2 M(x, u1 , u2 ) = 1

Fixing u1 , u2 M(x u1 , u2 ) = 1 is in coNP

Consider a NTM N with SAT as an oracle.


Guess u1 , and use oracle to decide u2 M(x u1 , u2 ) = 1

127 / 204
First direction

L p2 = L NP SAT

Consider the TM M deciding the language L p2 :

x L u1 u2 M(x, u1 , u2 ) = 1

Fixing u1 , u2 M(x u1 , u2 ) = 1 is in coNP

Consider a NTM N with SAT as an oracle.


Guess u1 , and use oracle to decide u2 M(x u1 , u2 ) = 1
I Ask oracle u2 M(x u1 , u2 ) and output the opposite result.

128 / 204
First direction

L p2 = L NP SAT

Consider the TM M deciding the language L p2 :

x L u1 u2 M(x, u1 , u2 ) = 1

Fixing u1 , u2 M(x u1 , u2 ) = 1 is in coNP

Consider a NTM N with SAT as an oracle.


Guess u1 , and use oracle to decide u2 M(x u1 , u2 ) = 1
I Ask oracle u2 M(x u1 , u2 ) and output the opposite result.

Easy to see that OTM N decides L p2

129 / 204
Other direction

L NP SAT
= L p2

130 / 204
Other direction

L NP SAT
= L p2

Consider a NTM M with SAT as oracle:


I guesses c1 , c2 , c3 , . . . , cn which leads M to accept state.

131 / 204
Other direction

L NP SAT
= L p2

Consider a NTM M with SAT as oracle:


I guesses c1 , c2 , c3 , . . . , cn which leads M to accept state.
I At each step, M could ask SAT a satisfiability question

132 / 204
Other direction

L NP SAT
= L p2

Consider a NTM M with SAT as oracle:


I guesses c1 , c2 , c3 , . . . , cn which leads M to accept state.
I At each step, M could ask SAT a satisfiability question
I If SAT = yes, ui certifiying this fact

133 / 204
Other direction

L NP SAT
= L p2

Consider a NTM M with SAT as oracle:


I guesses c1 , c2 , c3 , . . . , cn which leads M to accept state.
I At each step, M could ask SAT a satisfiability question
I If SAT = yes, ui certifiying this fact
I If SAT = no, ui fail to certify

134 / 204
Other direction

L NP SAT
= L p2

Consider a NTM M with SAT as oracle:


I guesses c1 , c2 , c3 , . . . , cn which leads M to accept state.
I At each step, M could ask SAT a satisfiability question
I If SAT = yes, ui certifiying this fact
I If SAT = no, ui fail to certify
On input x L, M uses the above guesses, together with answers
from the oracle, to reach an accept state.

135 / 204
Other direction

L NP SAT
= L p2

Consider a NTM M with SAT as oracle:


I guesses c1 , c2 , c3 , . . . , cn which leads M to accept state.
I At each step, M could ask SAT a satisfiability question
I If SAT = yes, ui certifiying this fact
I If SAT = no, ui fail to certify
On input x L, M uses the above guesses, together with answers
from the oracle, to reach an accept state.
We can simulate the computation as follows:
I Guess Ms guesses c1 , . . . , cn

136 / 204
Other direction

L NP SAT
= L p2

Consider a NTM M with SAT as oracle:


I guesses c1 , c2 , c3 , . . . , cn which leads M to accept state.
I At each step, M could ask SAT a satisfiability question
I If SAT = yes, ui certifiying this fact
I If SAT = no, ui fail to certify
On input x L, M uses the above guesses, together with answers
from the oracle, to reach an accept state.
We can simulate the computation as follows:
I Guess Ms guesses c1 , . . . , cn
I Guess the result of SAT , say ai , on the i-th call to oracle

137 / 204
Other direction

L NP SAT
= L p2

Consider a NTM M with SAT as oracle:


I guesses c1 , c2 , c3 , . . . , cn which leads M to accept state.
I At each step, M could ask SAT a satisfiability question
I If SAT = yes, ui certifiying this fact
I If SAT = no, ui fail to certify
On input x L, M uses the above guesses, together with answers
from the oracle, to reach an accept state.
We can simulate the computation as follows:
I Guess Ms guesses c1 , . . . , cn
I Guess the result of SAT , say ai , on the i-th call to oracle
I If the guess is yes, guess the certificate

138 / 204
Other direction

L NP SAT
= L p2

Consider a NTM M with SAT as oracle:


I guesses c1 , c2 , c3 , . . . , cn which leads M to accept state.
I At each step, M could ask SAT a satisfiability question
I If SAT = yes, ui certifiying this fact
I If SAT = no, ui fail to certify
On input x L, M uses the above guesses, together with answers
from the oracle, to reach an accept state.
We can simulate the computation as follows:
I Guess Ms guesses c1 , . . . , cn
I Guess the result of SAT , say ai , on the i-th call to oracle
I If the guess is yes, guess the certificate
I If the guess is no, well enumerate all certificates
139 / 204
Final Formula
SAT SAT SAT SAT

a1 = 0 a2 = 1 a3 = 0 ai = 1

C1 C2 C3 Caccept

Guesses: 0 1 0 1

140 / 204
Final Formula
SAT SAT SAT SAT

a1 = 0 a2 = 1 a3 = 0 ai = 1

C1 C2 C3 Caccept

Guesses: 0 1 0 1

Gather all first, and then all the s

141 / 204
Final Formula
SAT SAT SAT SAT

a1 = 0 a2 = 1 a3 = 0 ai = 1

C1 C2 C3 Caccept

Guesses: 0 1 0 1

Gather all first, and then all the s


Now construct a NTM N such that if x L

c1 , . . . , cn , a1 , . . . , ak , u1 , . . . , uk v1 , . . . , vk

N accepts x using choices c1 , . . . , cn and answers a1 , . . . , ak

142 / 204
Final Formula
SAT SAT SAT SAT

a1 = 0 a2 = 1 a3 = 0 ai = 1

C1 C2 C3 Caccept

Guesses: 0 1 0 1

Gather all first, and then all the s


Now construct a NTM N such that if x L

c1 , . . . , cn , a1 , . . . , ak , u1 , . . . , uk v1 , . . . , vk

N accepts x using choices c1 , . . . , cn and answers a1 , . . . , ak


N runs exactly like M except when M calls oracle

143 / 204
Final Formula
SAT SAT SAT SAT

a1 = 0 a2 = 1 a3 = 0 ai = 1

C1 C2 C3 Caccept

Guesses: 0 1 0 1

Gather all first, and then all the s


Now construct a NTM N such that if x L

c1 , . . . , cn , a1 , . . . , ak , u1 , . . . , uk v1 , . . . , vk

N accepts x using choices c1 , . . . , cn and answers a1 , . . . , ak


N runs exactly like M except when M calls oracle
If ai = 1 for M, N verifies ui is a certificate

144 / 204
Final Formula
SAT SAT SAT SAT

a1 = 0 a2 = 1 a3 = 0 ai = 1

C1 C2 C3 Caccept

Guesses: 0 1 0 1

Gather all first, and then all the s


Now construct a NTM N such that if x L

c1 , . . . , cn , a1 , . . . , ak , u1 , . . . , uk v1 , . . . , vk

N accepts x using choices c1 , . . . , cn and answers a1 , . . . , ak


N runs exactly like M except when M calls oracle
If ai = 1 for M, N verifies ui is a certificate
If ai = 0 for M, N verifies vi is not a certificate
145 / 204
Alternating Turing Machines
NTM : Graph of computation G . Input accepted iff there exists a
path ending in an accepting state.

146 / 204
Alternating Turing Machines
NTM : Graph of computation G . Input accepted iff there exists a
path ending in an accepting state.
I There is an equivalent way to recursively formulate it

147 / 204
Alternating Turing Machines
NTM : Graph of computation G . Input accepted iff there exists a
path ending in an accepting state.
I There is an equivalent way to recursively formulate it
I v G returns 1 to parent if an accepting path from v

148 / 204
Alternating Turing Machines
NTM : Graph of computation G . Input accepted iff there exists a
path ending in an accepting state.
I There is an equivalent way to recursively formulate it
I v G returns 1 to parent if an accepting path from v
NTM returns 1 iff the root returns 1

149 / 204
Alternating Turing Machines
NTM : Graph of computation G . Input accepted iff there exists a
path ending in an accepting state.
I There is an equivalent way to recursively formulate it
I v G returns 1 to parent if an accepting path from v
NTM returns 1 iff the root returns 1
I If root returns 1, one of children return 1

150 / 204
Alternating Turing Machines
NTM : Graph of computation G . Input accepted iff there exists a
path ending in an accepting state.
I There is an equivalent way to recursively formulate it
I v G returns 1 to parent if an accepting path from v
NTM returns 1 iff the root returns 1
I If root returns 1, one of children return 1
I So trace this path till we reach the accepting state node

151 / 204
Alternating Turing Machines
NTM : Graph of computation G . Input accepted iff there exists a
path ending in an accepting state.
I There is an equivalent way to recursively formulate it
I v G returns 1 to parent if an accepting path from v
NTM returns 1 iff the root returns 1
I If root returns 1, one of children return 1
I So trace this path till we reach the accepting state node
Define Alternating Turing Machine (ATM ) such that

152 / 204
Alternating Turing Machines
NTM : Graph of computation G . Input accepted iff there exists a
path ending in an accepting state.
I There is an equivalent way to recursively formulate it
I v G returns 1 to parent if an accepting path from v
NTM returns 1 iff the root returns 1
I If root returns 1, one of children return 1
I So trace this path till we reach the accepting state node
Define Alternating Turing Machine (ATM ) such that
I Each configuration node v labelled with either or

153 / 204
Alternating Turing Machines
NTM : Graph of computation G . Input accepted iff there exists a
path ending in an accepting state.
I There is an equivalent way to recursively formulate it
I v G returns 1 to parent if an accepting path from v
NTM returns 1 iff the root returns 1
I If root returns 1, one of children return 1
I So trace this path till we reach the accepting state node
Define Alternating Turing Machine (ATM ) such that
I Each configuration node v labelled with either or
I -type node: returns 1 iff both its children return 1

154 / 204
Alternating Turing Machines
NTM : Graph of computation G . Input accepted iff there exists a
path ending in an accepting state.
I There is an equivalent way to recursively formulate it
I v G returns 1 to parent if an accepting path from v
NTM returns 1 iff the root returns 1
I If root returns 1, one of children return 1
I So trace this path till we reach the accepting state node
Define Alternating Turing Machine (ATM ) such that
I Each configuration node v labelled with either or
I -type node: returns 1 iff both its children return 1
I -type node: returns 1 iff one of its children returns 1

155 / 204
Alternating Turing Machines
NTM : Graph of computation G . Input accepted iff there exists a
path ending in an accepting state.
I There is an equivalent way to recursively formulate it
I v G returns 1 to parent if an accepting path from v
NTM returns 1 iff the root returns 1
I If root returns 1, one of children return 1
I So trace this path till we reach the accepting state node
Define Alternating Turing Machine (ATM ) such that
I Each configuration node v labelled with either or
I -type node: returns 1 iff both its children return 1
I -type node: returns 1 iff one of its children returns 1

Bounding Alternations
P
L i TIME (T (n)) : ATM M on which every input and sequence of
choices leads M to change at most (i 1) times from states with one label
to another.
156 / 204
Examples of ATM
V

W
V

W
W

1 1

W
0 0 1

0 0

157 / 204
Examples of ATM
V

W
V

W
W

1 1

W
0 0 1

0 0

Accept.
158 / 204
Examples of ATM
V

W
V

W
W

1 0

W
0 1 1

0 0

159 / 204
Examples of ATM
V

W
V

W
W

1 0

W
0 1 1

0 0

Reject.
160 / 204
Equivalence of the two definitions

Similar to certificate and NTM definitions of NP , we have:

An Equivalence
Pp S P
i = c i TIME (nc )
Qp S Q
i = c i TIME (nc )

161 / 204
Equivalence of the two definitions

Similar to certificate and NTM definitions of NP , we have:

An Equivalence
Pp S P
i = c i TIME (nc )
Qp S Q
i = c i TIME (nc )

Note: If no limit on number of alternations, get

162 / 204
Equivalence of the two definitions

Similar to certificate and NTM definitions of NP , we have:

An Equivalence
Pp S P
i = c i TIME (nc )
Qp S Q
i = c i TIME (nc )

Note: If no limit on number of alternations, get PSPACE

163 / 204
Summary So Far

Studied time & space complexity, and polynomial hierarchy

164 / 204
Summary So Far

Studied time & space complexity, and polynomial hierarchy

What we do know is that:

165 / 204
Summary So Far

Studied time & space complexity, and polynomial hierarchy

What we do know is that:


I Time: SPACE (o(log log n)) = SPACE (O(1))

166 / 204
Summary So Far

Studied time & space complexity, and polynomial hierarchy

What we do know is that:


I Time: SPACE (o(log log n)) = SPACE (O(1))
I Space: NL = coNL , NSPACE (s(n)) =
coNSPACE(s(n)), NPSPACE = PSPACE

167 / 204
Summary So Far

Studied time & space complexity, and polynomial hierarchy

What we do know is that:


I Time: SPACE (o(log log n)) = SPACE (O(1))
I Space: NL = coNL , NSPACE (s(n)) =
coNSPACE(s(n)), NPSPACE = PSPACE

What we suspect to be true, but dont know:

168 / 204
Summary So Far

Studied time & space complexity, and polynomial hierarchy

What we do know is that:


I Time: SPACE (o(log log n)) = SPACE (O(1))
I Space: NL = coNL , NSPACE (s(n)) =
coNSPACE(s(n)), NPSPACE = PSPACE

What we suspect to be true, but dont know:


I Time: NP 6= P , NP 6= coNP , i 6= i+1

169 / 204
Summary So Far

Studied time & space complexity, and polynomial hierarchy

What we do know is that:


I Time: SPACE (o(log log n)) = SPACE (O(1))
I Space: NL = coNL , NSPACE (s(n)) =
coNSPACE(s(n)), NPSPACE = PSPACE

What we suspect to be true, but dont know:


I Time: NP 6= P , NP 6= coNP , i 6= i+1
I Space: NL = L , DTIME (t(n)) 6= SPACE (t(n)), SPACE (s(n)) 6=
NSPACE (s(n))

170 / 204
Summary So Far

Studied time & space complexity, and polynomial hierarchy

What we do know is that:


I Time: SPACE (o(log log n)) = SPACE (O(1))
I Space: NL = coNL , NSPACE (s(n)) =
coNSPACE(s(n)), NPSPACE = PSPACE

What we suspect to be true, but dont know:


I Time: NP 6= P , NP 6= coNP , i 6= i+1
I Space: NL = L , DTIME (t(n)) 6= SPACE (t(n)), SPACE (s(n)) 6=
NSPACE (s(n))

SAT : Dont know if SAT


/ P or SAT
/L

171 / 204
Defining the class TISP
Claim
There does not exist an algorithm for SAT that uses n1.1 time and n0.1
space.

172 / 204
Defining the class TISP
Claim
There does not exist an algorithm for SAT that uses n1.1 time and n0.1
space.

No algorithm for SAT that is in DTIME (n) and L

173 / 204
Defining the class TISP
Claim
There does not exist an algorithm for SAT that uses n1.1 time and n0.1
space.

No algorithm for SAT that is in DTIME (n) and L


Actually prove a more general statement

174 / 204
Defining the class TISP
Claim
There does not exist an algorithm for SAT that uses n1.1 time and n0.1
space.

No algorithm for SAT that is in DTIME (n) and L


Actually prove a more general statement

Defining TISP
For every two functions S, T : N N, define TISP (T (n), S(n))
(TIME-SPACE) as set of languages decided by TM M that uses T (|x|)
time and S(|x|) space.

175 / 204
Defining the class TISP
Claim
There does not exist an algorithm for SAT that uses n1.1 time and n0.1
space.

No algorithm for SAT that is in DTIME (n) and L


Actually prove a more general statement

Defining TISP
For every two functions S, T : N N, define TISP (T (n), S(n))
(TIME-SPACE) as set of languages decided by TM M that uses T (|x|)
time and S(|x|) space.

Our goal is to prove SAT


/ TISP (n1.1 , n0.2 ).

176 / 204
Defining the class TISP
Claim
There does not exist an algorithm for SAT that uses n1.1 time and n0.1
space.

No algorithm for SAT that is in DTIME (n) and L


Actually prove a more general statement

Defining TISP
For every two functions S, T : N N, define TISP (T (n), S(n))
(TIME-SPACE) as set of languages decided by TM M that uses T (|x|)
time and S(|x|) space.

Our goal is to prove SAT


/ TISP (n1.1 , n0.2 ). We show

NTIME (n)
/ TISP (n1.2 , n0.2 )

177 / 204
Proof Structure

P
TISP(n12 , n2 ) 8
2 TIME(n )

178 / 204
Proof Structure

Assume
12 2 P 8
TISP(n , n ) 2 TIME(n ) NTIME(n10 ) TISP(n12 , n2 )

179 / 204
Proof Structure

Assume
12 2 P 8
TISP(n , n ) 2 TIME(n ) NTIME(n10 ) TISP(n12 , n2 )

P 8
2 TIME(n ) TIME(n9.6 )

180 / 204
Proof Structure

Assume
12 2 P 8
TISP(n , n ) 2 TIME(n ) NTIME(n10 ) TISP(n12 , n2 )

P 8
2 TIME(n ) TIME(n9.6 )
NTIME(n10 ) TISP(n12 , n2 )
P
TISP(n12 , n2 ) 8
2 TIME(n )
P 8
2 TIME(n ) TIME(n9.6 )

181 / 204
Proof of First Claim

Claim
TISP (n12 , n2 ) 2 TIME(n8 )

182 / 204
Proof of First Claim

Claim
TISP (n12 , n2 ) 2 TIME(n8 )

Trade-off time & space, and 2 like QBF

183 / 204
Proof of First Claim

Claim
TISP (n12 , n2 ) 2 TIME(n8 )

Trade-off time & space, and 2 like QBF


I Find O(n12 )-path from C1 = Cstart to C2 = Caccept

184 / 204
Proof of First Claim

Claim
TISP (n12 , n2 ) 2 TIME(n8 )

Trade-off time & space, and 2 like QBF


I Find O(n12 )-path from C1 = Cstart to C2 = Caccept
I Path iff middle configuration C3 = Cmid such that i = 1, 2 path
from Ci to Ci+1 .

185 / 204
Proof of First Claim

Claim
TISP (n12 , n2 ) 2 TIME(n8 )

Trade-off time & space, and 2 like QBF


I Find O(n12 )-path from C1 = Cstart to C2 = Caccept
I Path iff middle configuration C3 = Cmid such that i = 1, 2 path
from Ci to Ci+1 .
I Recursively solve the two subproblems

186 / 204
Proof of First Claim

Claim
TISP (n12 , n2 ) 2 TIME(n8 )

Trade-off time & space, and 2 like QBF


I Find O(n12 )-path from C1 = Cstart to C2 = Caccept
I Path iff middle configuration C3 = Cmid such that i = 1, 2 path
from Ci to Ci+1 .
I Recursively solve the two subproblems
I Each configuration has size:

187 / 204
Proof of First Claim

Claim
TISP (n12 , n2 ) 2 TIME(n8 )

Trade-off time & space, and 2 like QBF


I Find O(n12 )-path from C1 = Cstart to C2 = Caccept
I Path iff middle configuration C3 = Cmid such that i = 1, 2 path
from Ci to Ci+1 .
I Recursively solve the two subproblems
I Each configuration has size: O(n2 ), Time:

188 / 204
Proof of First Claim

Claim
TISP (n12 , n2 ) 2 TIME(n8 )

Trade-off time & space, and 2 like QBF


I Find O(n12 )-path from C1 = Cstart to C2 = Caccept
I Path iff middle configuration C3 = Cmid such that i = 1, 2 path
from Ci to Ci+1 .
I Recursively solve the two subproblems
I Each configuration has size: O(n2 ), Time: O(n2 log n12 )

189 / 204
Proof of First Claim

Claim
TISP (n12 , n2 ) 2 TIME(n8 )

Trade-off time & space, and 2 like QBF


I Find O(n12 )-path from C1 = Cstart to C2 = Caccept
I Path iff middle configuration C3 = Cmid such that i = 1, 2 path
from Ci to Ci+1 .
I Recursively solve the two subproblems
I Each configuration has size: O(n2 ), Time: O(n2 log n12 )
I Problem:

190 / 204
Proof of First Claim

Claim
TISP (n12 , n2 ) 2 TIME(n8 )

Trade-off time & space, and 2 like QBF


I Find O(n12 )-path from C1 = Cstart to C2 = Caccept
I Path iff middle configuration C3 = Cmid such that i = 1, 2 path
from Ci to Ci+1 .
I Recursively solve the two subproblems
I Each configuration has size: O(n2 ), Time: O(n2 log n12 )
I Problem: Using O(log n12 ) alternations! Allowed only two.

191 / 204
Proof of First Claim

Claim
TISP (n12 , n2 ) 2 TIME(n8 )

Trade-off time & space, and 2 like QBF


I Find O(n12 )-path from C1 = Cstart to C2 = Caccept
I Path iff middle configuration C3 = Cmid such that i = 1, 2 path
from Ci to Ci+1 .
I Recursively solve the two subproblems
I Each configuration has size: O(n2 ), Time: O(n2 log n12 )
I Problem: Using O(log n12 ) alternations! Allowed only two.
Guess n6 Ci on this path, with inter-distance O(n12 /n6 )

192 / 204
Proof of First Claim

Claim
TISP (n12 , n2 ) 2 TIME(n8 )

Trade-off time & space, and 2 like QBF


I Find O(n12 )-path from C1 = Cstart to C2 = Caccept
I Path iff middle configuration C3 = Cmid such that i = 1, 2 path
from Ci to Ci+1 .
I Recursively solve the two subproblems
I Each configuration has size: O(n2 ), Time: O(n2 log n12 )
I Problem: Using O(log n12 ) alternations! Allowed only two.
Guess n6 Ci on this path, with inter-distance O(n12 /n6 )
Path Cstart to Caccept iff i, path between Ci and Ci+1

193 / 204
Proof of First Claim

Claim
TISP (n12 , n2 ) 2 TIME(n8 )

Trade-off time & space, and 2 like QBF


I Find O(n12 )-path from C1 = Cstart to C2 = Caccept
I Path iff middle configuration C3 = Cmid such that i = 1, 2 path
from Ci to Ci+1 .
I Recursively solve the two subproblems
I Each configuration has size: O(n2 ), Time: O(n2 log n12 )
I Problem: Using O(log n12 ) alternations! Allowed only two.
Guess n6 Ci on this path, with inter-distance O(n12 /n6 )
Path Cstart to Caccept iff i, path between Ci and Ci+1
Guessing Time + Time for each leaf =

194 / 204
Proof of First Claim

Claim
TISP (n12 , n2 ) 2 TIME(n8 )

Trade-off time & space, and 2 like QBF


I Find O(n12 )-path from C1 = Cstart to C2 = Caccept
I Path iff middle configuration C3 = Cmid such that i = 1, 2 path
from Ci to Ci+1 .
I Recursively solve the two subproblems
I Each configuration has size: O(n2 ), Time: O(n2 log n12 )
I Problem: Using O(log n12 ) alternations! Allowed only two.
Guess n6 Ci on this path, with inter-distance O(n12 /n6 )
Path Cstart to Caccept iff i, path between Ci and Ci+1
Guessing Time + Time for each leaf = O(n2 n6 + n6 )

195 / 204
Proof of First Claim

Claim
TISP (n12 , n2 ) 2 TIME(n8 )

Trade-off time & space, and 2 like QBF


I Find O(n12 )-path from C1 = Cstart to C2 = Caccept
I Path iff middle configuration C3 = Cmid such that i = 1, 2 path
from Ci to Ci+1 .
I Recursively solve the two subproblems
I Each configuration has size: O(n2 ), Time: O(n2 log n12 )
I Problem: Using O(log n12 ) alternations! Allowed only two.
Guess n6 Ci on this path, with inter-distance O(n12 /n6 )
Path Cstart to Caccept iff i, path between Ci and Ci+1
Guessing Time + Time for each leaf = O(n2 n6 + n6 )

Same idea as 2-level skip-lists with restricted storage O( n)

196 / 204
The Alternating Turing Machine

Guessing middle vertex


Cmid, |Cmid| = n2


Checking two paths Cstart to Cmid
Cstart to Cmid

197 / 204
Proof of Second Claim
Claim

NTIME (n) DTIME (n1.2 ) = 2 TIME (n8 ) NTIME (n9.6 )

198 / 204
Proof of Second Claim
Claim

NTIME (n) DTIME (n1.2 ) = 2 TIME (n8 ) NTIME (n9.6 )

If L 2 TIME (n8 ), there exists TM M


8 8
x L u {0, 1}c|x| v {0, 1}d|x| M(x, u, v ) = 1

199 / 204
Proof of Second Claim
Claim

NTIME (n) DTIME (n1.2 ) = 2 TIME (n8 ) NTIME (n9.6 )

If L 2 TIME (n8 ), there exists TM M


8 8
x L u {0, 1}c|x| v {0, 1}d|x| M(x, u, v ) = 1

8
Note that L0 = v {0, 1}d|x| M(x; u, v ) = 1 is in coNP

200 / 204
Proof of Second Claim
Claim

NTIME (n) DTIME (n1.2 ) = 2 TIME (n8 ) NTIME (n9.6 )

If L 2 TIME (n8 ), there exists TM M


8 8
x L u {0, 1}c|x| v {0, 1}d|x| M(x, u, v ) = 1

8
Note that L0 = v {0, 1}d|x| M(x; u, v ) = 1 is in coNP
NTIME (n) DTIME (n1.2 ) = coNTIME(n) DTIME (n1.2 )

201 / 204
Proof of Second Claim
Claim

NTIME (n) DTIME (n1.2 ) = 2 TIME (n8 ) NTIME (n9.6 )

If L 2 TIME (n8 ), there exists TM M


8 8
x L u {0, 1}c|x| v {0, 1}d|x| M(x, u, v ) = 1

8
Note that L0 = v {0, 1}d|x| M(x; u, v ) = 1 is in coNP
NTIME (n) DTIME (n1.2 ) = coNTIME(n) DTIME (n1.2 )

Therefore TM D deciding L0 in time O((n8 )1.2 )

202 / 204
Proof of Second Claim
Claim

NTIME (n) DTIME (n1.2 ) = 2 TIME (n8 ) NTIME (n9.6 )

If L 2 TIME (n8 ), there exists TM M


8 8
x L u {0, 1}c|x| v {0, 1}d|x| M(x, u, v ) = 1

8
Note that L0 = v {0, 1}d|x| M(x; u, v ) = 1 is in coNP
NTIME (n) DTIME (n1.2 ) = coNTIME(n) DTIME (n1.2 )

Therefore TM D deciding L0 in time O((n8 )1.2 )


But then, L can be defined as:
8
x L u {0, 1}c|x| D(x, u) = 0

203 / 204
Proof of Second Claim
Claim

NTIME (n) DTIME (n1.2 ) = 2 TIME (n8 ) NTIME (n9.6 )

If L 2 TIME (n8 ), there exists TM M


8 8
x L u {0, 1}c|x| v {0, 1}d|x| M(x, u, v ) = 1

8
Note that L0 = v {0, 1}d|x| M(x; u, v ) = 1 is in coNP
NTIME (n) DTIME (n1.2 ) = coNTIME(n) DTIME (n1.2 )

Therefore TM D deciding L0 in time O((n8 )1.2 )


But then, L can be defined as:
8
x L u {0, 1}c|x| D(x, u) = 0
implying that L NTIME (n9.6 )
204 / 204

You might also like