Computational Complexity
Lecture 9 More of the Polynomial Hierarchy Alternation
1
Computational Complexity Lecture 9 More of the Polynomial - - PowerPoint PPT Presentation
Computational Complexity Lecture 9 More of the Polynomial Hierarchy Alternation 1 PH is in terms of verification 2 PH is in terms of verification Recall kp 2 PH is in terms of verification Recall kp Languages L = {x| w 1 w
1
2
Recall Σkp
2
Recall Σkp Languages L = {x| ∃w1∀w2...Qwk F(x;w1,w2,..,wk)}, where F in P
2
Recall Σkp Languages L = {x| ∃w1∀w2...Qwk F(x;w1,w2,..,wk)}, where F in P Consider deterministic polynomial time machine M for F , with k read-once tapes for the certificates
2
Recall Σkp Languages L = {x| ∃w1∀w2...Qwk F(x;w1,w2,..,wk)}, where F in P Consider deterministic polynomial time machine M for F , with k read-once tapes for the certificates Tapes read one after the other
2
Recall Σkp Languages L = {x| ∃w1∀w2...Qwk F(x;w1,w2,..,wk)}, where F in P Consider deterministic polynomial time machine M for F , with k read-once tapes for the certificates Tapes read one after the other x in L if ∃w1 ∀w2 ... Qwk such that M(x;w1,w2,..,wk) accepts
2
Recall Σkp Languages L = {x| ∃w1∀w2...Qwk F(x;w1,w2,..,wk)}, where F in P Consider deterministic polynomial time machine M for F , with k read-once tapes for the certificates Tapes read one after the other x in L if ∃w1 ∀w2 ... Qwk such that M(x;w1,w2,..,wk) accepts Plan: Formulate in terms of a non-deterministic TM (with no certificates)
2
3
3
3
Read from Tape 1
3
Read from Tape 1 Read from Tape 1
3
Read from Tape 1 Read from Tape 1
3
Read from Tape 1 Read from Tape 1 Read from Tape 2
3
Read from Tape 1 Read from Tape 1 Read from Tape 2
3
Read from Tape 1 Read from Tape 1 Read from Tape 2 Guess 0
3
Read from Tape 1 Read from Tape 1 Read from Tape 2 Guess 0 Guess 1
3
Read from Tape 1 Read from Tape 1 Read from Tape 2 Guess 0 Guess 1 Guess 0
3
Read from Tape 1 Read from Tape 1 Read from Tape 2 Guess 0 Guess 1 Guess 0 Guess 1
3
Read from Tape 1 Read from Tape 1 Read from Tape 2 Guess 0 Guess 1 Guess 0 Guess 0 Guess 1
3
Read from Tape 1 Read from Tape 1 Read from Tape 2 Guess 0 Guess 1 Guess 0 Guess 0 Guess 1 Guess 1
3
Read from Tape 1 Read from Tape 1 Read from Tape 2 Guess 0 Guess 1 Guess 0 Guess 0 Guess 1 Guess 1
3
Read from Tape 1 Read from Tape 1 Read from Tape 2 Guess 0 Guess 1 Guess 0 Guess 0 Guess 1 Guess 1
3
Read from Tape 1 Read from Tape 1 Read from Tape 2 Guess 0 Guess 1 Guess 0 Guess 0 Guess 1 Guess 1
3
Read from Tape 1 Read from Tape 1 Read from Tape 2 Guess 0 Guess 1 Guess 0 Guess 0 Guess 1 Guess 1
3
Read from Tape 1 Read from Tape 1 Read from Tape 2 Guess 0 Guess 1 Guess 0 Guess 0 Guess 1 Guess 1
3
Guess 0 Guess 1 Guess 0 Guess 0 Guess 1 Guess 1
4
Alternating Turing Machine
Guess 0 Guess 1 Guess 0 Guess 0 Guess 1 Guess 1
4
Alternating Turing Machine At each step, execution can fork into two
Guess 0 Guess 1 Guess 0 Guess 0 Guess 1 Guess 1
4
Alternating Turing Machine At each step, execution can fork into two Exactly like an NTM or co-NTM
Guess 0 Guess 1 Guess 0 Guess 0 Guess 1 Guess 1
4
Alternating Turing Machine At each step, execution can fork into two Exactly like an NTM or co-NTM Accepting rule is more complex
Guess 0 Guess 1 Guess 0 Guess 0 Guess 1 Guess 1
4
Alternating Turing Machine At each step, execution can fork into two Exactly like an NTM or co-NTM Accepting rule is more complex Like in the game tree for QBF
Guess 0 Guess 1 Guess 0 Guess 0 Guess 1 Guess 1
4
Guess 0 Guess 1 Guess 0 Guess 0 Guess 1 Guess 1
5
Two kinds of configurations: ∃ and ∀
Guess 0 Guess 1 Guess 0 Guess 0 Guess 1 Guess 1
5
Two kinds of configurations: ∃ and ∀ Depending on the state
Guess 0 Guess 1 Guess 0 Guess 0 Guess 1 Guess 1
5
Two kinds of configurations: ∃ and ∀ Depending on the state A ∃ configuration is accepting if either child is accepting
Guess 0 Guess 1 Guess 0 Guess 0 Guess 1 Guess 1
5
Two kinds of configurations: ∃ and ∀ Depending on the state A ∃ configuration is accepting if either child is accepting A ∀ configuration is accepting only if both children are accepting
Guess 0 Guess 1 Guess 0 Guess 0 Guess 1 Guess 1
5
Read from Tape 1 Read from Tape 1 Read from Tape 2 Guess 0 Guess 1 Guess 0 Guess 0 Guess 1 Guess 1
6
Read from Tape 1 Read from Tape 1 Read from Tape 2 Guess 0 Guess 1 Guess 0 Guess 0 Guess 1 Guess 1
Given a verifier for L using k certificate tapes, can build an ATM for L with at most k alternations
6
Read from Tape 1 Read from Tape 1 Read from Tape 2 Guess 0 Guess 1 Guess 0 Guess 0 Guess 1 Guess 1
Given a verifier for L using k certificate tapes, can build an ATM for L with at most k alternations Non-deterministically guesses tape contents and runs verifier
6
Guess 0 Guess 1 Guess 0 Guess 0 Guess 1 Guess 1
Read from Tape 1 Read from Tape 1 Read from Tape 2
7
Guess 0 Guess 1 Guess 0 Guess 0 Guess 1 Guess 1
Given ATM for L with at most k alternations, can build a verifier (using k certificate tapes)
Read from Tape 1 Read from Tape 1 Read from Tape 2
7
Guess 0 Guess 1 Guess 0 Guess 0 Guess 1 Guess 1
Given ATM for L with at most k alternations, can build a verifier (using k certificate tapes) Same time/space requirements (in terms of |x|)
Read from Tape 1 Read from Tape 1 Read from Tape 2
7
Guess 0 Guess 1 Guess 0 Guess 0 Guess 1 Guess 1
Given ATM for L with at most k alternations, can build a verifier (using k certificate tapes) Same time/space requirements (in terms of |x|) |wi| = #choices
Read from Tape 1 Read from Tape 1 Read from Tape 2
7
8
Complexity measures
8
Complexity measures Time: Maximum number of steps in any thread
8
Complexity measures Time: Maximum number of steps in any thread Space: Maximum space in any configuration reached
8
Complexity measures Time: Maximum number of steps in any thread Space: Maximum space in any configuration reached Alternations: Maximum number of quantifier switches in any thread
8
9
ΣkTIME, ΠkTIME
9
ΣkTIME, ΠkTIME ΣkTIME(T): languages decided by ATMs with at most k alternations starting with ∃, in time T(n)
9
ΣkTIME, ΠkTIME ΣkTIME(T): languages decided by ATMs with at most k alternations starting with ∃, in time T(n) ΣkTIME(poly) = Σkp
9
ΣkTIME, ΠkTIME ΣkTIME(T): languages decided by ATMs with at most k alternations starting with ∃, in time T(n) ΣkTIME(poly) = Σkp Latter being exactly the certificate version
9
ΣkTIME, ΠkTIME ΣkTIME(T): languages decided by ATMs with at most k alternations starting with ∃, in time T(n) ΣkTIME(poly) = Σkp Latter being exactly the certificate version ATIME
9
ΣkTIME, ΠkTIME ΣkTIME(T): languages decided by ATMs with at most k alternations starting with ∃, in time T(n) ΣkTIME(poly) = Σkp Latter being exactly the certificate version ATIME ATIME(T): languages decided by ATMs in time T(n)
9
10
ATIME(T) ⊆ DSPACE(T2)
10
ATIME(T) ⊆ DSPACE(T2) c.f. NTIME(T) ⊆ DSPACE(T)
10
ATIME(T) ⊆ DSPACE(T2) c.f. NTIME(T) ⊆ DSPACE(T) AP ⊆ PSPACE
10
ATIME(T) ⊆ DSPACE(T2) c.f. NTIME(T) ⊆ DSPACE(T) AP ⊆ PSPACE But PSPACE ⊆ AP
10
ATIME(T) ⊆ DSPACE(T2) c.f. NTIME(T) ⊆ DSPACE(T) AP ⊆ PSPACE But PSPACE ⊆ AP TQBF in AP (why?)
10
ATIME(T) ⊆ DSPACE(T2) c.f. NTIME(T) ⊆ DSPACE(T) AP ⊆ PSPACE But PSPACE ⊆ AP TQBF in AP (why?) AP = PSPACE
10
11
Evaluate if the start configuration is accepting, recursively
11
Evaluate if the start configuration is accepting, recursively A ∃ configuration is accepting if any child is, and a ∀ configuration is accepting if all children are
11
Evaluate if the start configuration is accepting, recursively A ∃ configuration is accepting if any child is, and a ∀ configuration is accepting if all children are Space needed: depth x size of configuration
11
Evaluate if the start configuration is accepting, recursively A ∃ configuration is accepting if any child is, and a ∀ configuration is accepting if all children are Space needed: depth x size of configuration Depth = # alternations = O(T). Also, size of configuration = O(T) as any thread runs for time O(T)
11
Evaluate if the start configuration is accepting, recursively A ∃ configuration is accepting if any child is, and a ∀ configuration is accepting if all children are Space needed: depth x size of configuration Depth = # alternations = O(T). Also, size of configuration = O(T) as any thread runs for time O(T) O(T2)
11
12
ASPACE(S) = DTIME(2O(S))
12
ASPACE(S) = DTIME(2O(S)) Recall, already seen NSPACE(S) ⊆ DTIME(2O(S))
12
ASPACE(S) = DTIME(2O(S)) Recall, already seen NSPACE(S) ⊆ DTIME(2O(S)) Poly-time connectivity in configuration graph
12
ASPACE(S) = DTIME(2O(S)) Recall, already seen NSPACE(S) ⊆ DTIME(2O(S)) Poly-time connectivity in configuration graph
Instead of connectivity, can recursively label all accepting nodes (2 lookups per node: in poly(S) time). So ASPACE(S) ⊆ DTIME(2O(S))
12
ASPACE(S) = DTIME(2O(S)) Recall, already seen NSPACE(S) ⊆ DTIME(2O(S)) Poly-time connectivity in configuration graph
Instead of connectivity, can recursively label all accepting nodes (2 lookups per node: in poly(S) time). So ASPACE(S) ⊆ DTIME(2O(S)) To show DTIME(2O(S)) ⊆ ASPACE(S)
12
13
To decide, is configuration after t steps accepting
13
To decide, is configuration after t steps accepting Accept configuration, with unique first cell α (blank tape cell and unique accept state)
13
To decide, is configuration after t steps accepting Accept configuration, with unique first cell α (blank tape cell and unique accept state) Once there, stays there
13
To decide, is configuration after t steps accepting Accept configuration, with unique first cell α (blank tape cell and unique accept state) Once there, stays there Is first cell of config after t steps α
13
To decide, is configuration after t steps accepting Accept configuration, with unique first cell α (blank tape cell and unique accept state) Once there, stays there Is first cell of config after t steps α C(i,j,x) : if after i steps, jth cell of config is x
13
To decide, is configuration after t steps accepting Accept configuration, with unique first cell α (blank tape cell and unique accept state) Once there, stays there Is first cell of config after t steps α C(i,j,x) : if after i steps, jth cell of config is x Need to check C(t,1,α)
13
14
C(i,j,x) : if after i steps, jth cell of config is x
14
C(i,j,x) : if after i steps, jth cell of config is x Recall reduction in Cook’ s theorem
14
C(i,j,x) : if after i steps, jth cell of config is x Recall reduction in Cook’ s theorem If C(i-1,j-1,a), C(i-1,j,b), C(i-1,j+1,c) then C(i,j,x) iff x=F(a,b,c)
14
C(i,j,x) : if after i steps, jth cell of config is x Recall reduction in Cook’ s theorem If C(i-1,j-1,a), C(i-1,j,b), C(i-1,j+1,c) then C(i,j,x) iff x=F(a,b,c) C(i,j,x): ∃a,b,c st x=F(a,b,c) and C(i-1,j-1,a), C(i-1,j,b), C(i-1,j+1,c)
14
C(i,j,x) : if after i steps, jth cell of config is x Recall reduction in Cook’ s theorem If C(i-1,j-1,a), C(i-1,j,b), C(i-1,j+1,c) then C(i,j,x) iff x=F(a,b,c) C(i,j,x): ∃a,b,c st x=F(a,b,c) and C(i-1,j-1,a), C(i-1,j,b), C(i-1,j+1,c) Base case: C(0,j,x) easy to check from input
14
C(i,j,x) : if after i steps, jth cell of config is x Recall reduction in Cook’ s theorem If C(i-1,j-1,a), C(i-1,j,b), C(i-1,j+1,c) then C(i,j,x) iff x=F(a,b,c) C(i,j,x): ∃a,b,c st x=F(a,b,c) and C(i-1,j-1,a), C(i-1,j,b), C(i-1,j+1,c) Base case: C(0,j,x) easy to check from input Naive recursion: Extra O(S) space at each level for 2O(S) levels!
14
15
ATM to check if C(i,j,x)
15
ATM to check if C(i,j,x) C(i,j,x): ∃a,b,c st x=F(a,b,c) and C(i-1,j-1,a), C(i-1,j,b), C(i-1,j+1,c)
15
ATM to check if C(i,j,x) C(i,j,x): ∃a,b,c st x=F(a,b,c) and C(i-1,j-1,a), C(i-1,j,b), C(i-1,j+1,c) Tail-recursion (in parallel forks)
15
ATM to check if C(i,j,x) C(i,j,x): ∃a,b,c st x=F(a,b,c) and C(i-1,j-1,a), C(i-1,j,b), C(i-1,j+1,c) Tail-recursion (in parallel forks) Check x=F(a,b,c); then enter universal state, fork out for each of the three configurations to be checked
15
ATM to check if C(i,j,x) C(i,j,x): ∃a,b,c st x=F(a,b,c) and C(i-1,j-1,a), C(i-1,j,b), C(i-1,j+1,c) Tail-recursion (in parallel forks) Check x=F(a,b,c); then enter universal state, fork out for each of the three configurations to be checked Overwrite C(i,j,x) with C(i-1,...) and reuse space
15
ATM to check if C(i,j,x) C(i,j,x): ∃a,b,c st x=F(a,b,c) and C(i-1,j-1,a), C(i-1,j,b), C(i-1,j+1,c) Tail-recursion (in parallel forks) Check x=F(a,b,c); then enter universal state, fork out for each of the three configurations to be checked Overwrite C(i,j,x) with C(i-1,...) and reuse space Stay within the same O(S) space at each level!
15
ATM to check if C(i,j,x) C(i,j,x): ∃a,b,c st x=F(a,b,c) and C(i-1,j-1,a), C(i-1,j,b), C(i-1,j+1,c) Tail-recursion (in parallel forks) Check x=F(a,b,c); then enter universal state, fork out for each of the three configurations to be checked Overwrite C(i,j,x) with C(i-1,...) and reuse space Stay within the same O(S) space at each level!
G e t s t h e A N D c h e c k f
f r e e . N
e e d t
s e a s t a c k .
15
16
ASPACE(S) = DTIME(2O(S))
16
ASPACE(S) = DTIME(2O(S)) APSPACE = EXP
16
ASPACE(S) = DTIME(2O(S)) APSPACE = EXP AL = P
16
P
PSPACE
EXP NP NEXP L NL
NPSPACE
ΣkP
AP
PH
17
P
PSPACE
EXP NP NEXP L NL
NPSPACE APSPACE
AL ΣkP
AP
PH
17
P
PSPACE
EXP NP NEXP L NL
NPSPACE APSPACE
AL ΣkP
AP
PH
17
18
Theorem: NTIME(n) ⊄ DTISP(n1+ε,nδ) for some ε, δ > 0
18
Theorem: NTIME(n) ⊄ DTISP(n1+ε,nδ) for some ε, δ > 0 i.e., cannot solve SAT in some slightly super-linear time and slightly super-logarithmic space
18
Theorem: NTIME(n) ⊄ DTISP(n1+ε,nδ) for some ε, δ > 0 i.e., cannot solve SAT in some slightly super-linear time and slightly super-logarithmic space Commonly Believed: can’t solve in less than exponential time or with less than linear space
18
Theorem: NTIME(n) ⊄ DTISP(n1+ε,nδ) for some ε, δ > 0 i.e., cannot solve SAT in some slightly super-linear time and slightly super-logarithmic space Commonly Believed: can’t solve in less than exponential time or with less than linear space Follows (after careful choice of parameters) from
18
Theorem: NTIME(n) ⊄ DTISP(n1+ε,nδ) for some ε, δ > 0 i.e., cannot solve SAT in some slightly super-linear time and slightly super-logarithmic space Commonly Believed: can’t solve in less than exponential time or with less than linear space Follows (after careful choice of parameters) from DTISP(T,S) ⊆ Σ2TIME(T1/2 S)
18
Theorem: NTIME(n) ⊄ DTISP(n1+ε,nδ) for some ε, δ > 0 i.e., cannot solve SAT in some slightly super-linear time and slightly super-logarithmic space Commonly Believed: can’t solve in less than exponential time or with less than linear space Follows (after careful choice of parameters) from DTISP(T,S) ⊆ Σ2TIME(T1/2 S)
quantification to guess intermediate configs, check consecutive ones good
18
Theorem: NTIME(n) ⊄ DTISP(n1+ε,nδ) for some ε, δ > 0 i.e., cannot solve SAT in some slightly super-linear time and slightly super-logarithmic space Commonly Believed: can’t solve in less than exponential time or with less than linear space Follows (after careful choice of parameters) from DTISP(T,S) ⊆ Σ2TIME(T1/2 S) NTIME(n) ⊆ DTIME(n1+ε) ⇒ Σ2TIME(T) ⊆ NTIME(T1+ε)
quantification to guess intermediate configs, check consecutive ones good
18
Theorem: NTIME(n) ⊄ DTISP(n1+ε,nδ) for some ε, δ > 0 i.e., cannot solve SAT in some slightly super-linear time and slightly super-logarithmic space Commonly Believed: can’t solve in less than exponential time or with less than linear space Follows (after careful choice of parameters) from DTISP(T,S) ⊆ Σ2TIME(T1/2 S) NTIME(n) ⊆ DTIME(n1+ε) ⇒ Σ2TIME(T) ⊆ NTIME(T1+ε) NTIME(n) ⊆ DTISP(n1+ε,nδ) ⇒ NTIME(nt) ⊆ NTIME(nt(1/2+ε’)) !
quantification to guess intermediate configs, check consecutive ones good
18
19
ATM to define levels of PH
19
ATM to define levels of PH ATIME and ASPACE
19
ATM to define levels of PH ATIME and ASPACE AP = PSPACE and APSPACE = EXP
19
ATM to define levels of PH ATIME and ASPACE AP = PSPACE and APSPACE = EXP Using Σ2TIME for a DTISP lower-bound
19