computational complexity
play

Computational Complexity Lecture 6 NL-Completeness and NL=co-NL 1 - PowerPoint PPT Presentation

Computational Complexity Lecture 6 NL-Completeness and NL=co-NL 1 Story, so far NEXP EXP PSPACE NPSPACE NP P NL L 2 Story, so far Time/Space Hierarchies NEXP EXP PSPACE NPSPACE NP P NL L 2 Story, so far Time/Space


  1. Directed Path PATH = {(G,s,t) | G a directed graph with a path from s to t} G using some representation, of size say, n 2 (n=#vertices) Such that, if two vertices x,y on work-tape, can read the input tape to check for edge (x,y) PATH in NL 7

  2. Directed Path PATH = {(G,s,t) | G a directed graph with a path from s to t} G using some representation, of size say, n 2 (n=#vertices) Such that, if two vertices x,y on work-tape, can read the input tape to check for edge (x,y) PATH in NL Certificate w is the path (poly(n) long certificate) 7

  3. Directed Path PATH = {(G,s,t) | G a directed graph with a path from s to t} G using some representation, of size say, n 2 (n=#vertices) Such that, if two vertices x,y on work-tape, can read the input tape to check for edge (x,y) PATH in NL Certificate w is the path (poly(n) long certificate) Need to verify adjacent vertices are connected: need keep only two vertices on the work-tape at a time 7

  4. Directed Path PATH = {(G,s,t) | G a directed graph with a path from s to t} G using some representation, of size say, n 2 (n=#vertices) Such that, if two vertices x,y on work-tape, can read the input tape to check for edge (x,y) PATH in NL Certificate w is the path (poly(n) long certificate) Need to verify adjacent vertices are connected: need keep only two vertices on the work-tape at a time Note: w is scanned only once 7

  5. Seen PATH before? 8

  6. Seen PATH before? In proving NSPACE(S(n)) ⊆ DTIME(2 O(S(n)) ) (e.g. NL ⊆ P) 8

  7. Seen PATH before? In proving NSPACE(S(n)) ⊆ DTIME(2 O(S(n)) ) (e.g. NL ⊆ P) Every problem in NL Karp reduces to PATH 8

  8. Seen PATH before? In proving NSPACE(S(n)) ⊆ DTIME(2 O(S(n)) ) (e.g. NL ⊆ P) Every problem in NL Karp reduces to PATH PATH ∈ P 8

  9. Seen PATH before? In proving NSPACE(S(n)) ⊆ DTIME(2 O(S(n)) ) (e.g. NL ⊆ P) Every problem in NL Karp reduces to PATH PATH ∈ P In Savitch’ s theorem 8

  10. Seen PATH before? In proving NSPACE(S(n)) ⊆ DTIME(2 O(S(n)) ) (e.g. NL ⊆ P) Every problem in NL Karp reduces to PATH PATH ∈ P In Savitch’ s theorem PATH ∈ DSPACE(log 2 (n)) 8

  11. PATH is NL-complete 9

  12. PATH is NL-complete Log-space reducing any NL language L 1 to PATH 9

  13. PATH is NL-complete Log-space reducing any NL language L 1 to PATH Given input x, output (G,s,t) where G is the configuration graph G(M,x), where M is the NTM accepting L 1 , and s,t are start, accept configurations 9

  14. PATH is NL-complete Log-space reducing any NL language L 1 to PATH Given input x, output (G,s,t) where G is the configuration graph G(M,x), where M is the NTM accepting L 1 , and s,t are start, accept configurations Outputting G: Cycle through all pairs of configurations, checking if there is an edge between them, outputting 0 or 1 in the adjacency matrix 9

  15. PATH is NL-complete Log-space reducing any NL language L 1 to PATH Given input x, output (G,s,t) where G is the configuration graph G(M,x), where M is the NTM accepting L 1 , and s,t are start, accept configurations Outputting G: Cycle through all pairs of configurations, checking if there is an edge between them, outputting 0 or 1 in the adjacency matrix Edge checking done using M’ s transition table 9

  16. PATH is NL-complete Log-space reducing any NL language L 1 to PATH Given input x, output (G,s,t) where G is the configuration graph G(M,x), where M is the NTM accepting L 1 , and s,t are start, accept configurations Outputting G: Cycle through all pairs of configurations, checking if there is an edge between them, outputting 0 or 1 in the adjacency matrix Edge checking done using M’ s transition table Need to store only two configurations at a time in the work-tape 9

  17. PATH is NL-complete Log-space reducing any NL language L 1 to PATH Given input x, output (G,s,t) where G is the configuration graph G(M,x), where M is the NTM accepting L 1 , and s,t are start, accept configurations Outputting G: Cycle through all pairs of configurations, checking if there is an edge between them, outputting 0 or 1 in the adjacency matrix Edge checking done using M’ s transition table Need to store only two configurations at a time in the work-tape Note: in fact O(S)-space reduction from L ∈ NSPACE(S) to PATH 9

  18. If PATH ∈ co-NL 10

  19. If PATH ∈ co-NL If PATH ∈ co-NL, then co-NL ⊆ NL 10

  20. If PATH ∈ co-NL If PATH ∈ co-NL, then co-NL ⊆ NL For any L ∈ co-NL, we have L ! L PATH c (as L c ! L PATH), and if PATH c ∈ NL, then L ∈ NL (NL is downward closed under ! L ) 10

  21. If PATH ∈ co-NL If PATH ∈ co-NL, then co-NL ⊆ NL For any L ∈ co-NL, we have L ! L PATH c (as L c ! L PATH), and if PATH c ∈ NL, then L ∈ NL (NL is downward closed under ! L ) Implies co-NL = NL (why?) 10

  22. If PATH ∈ co-NL If PATH ∈ co-NL, then co-NL ⊆ NL For any L ∈ co-NL, we have L ! L PATH c (as L c ! L PATH), and if PATH c ∈ NL, then L ∈ NL (NL is downward closed under ! L ) Implies co-NL = NL (why?) If Y ⊆ X, then co-Y ⊆ co-X. Consider X = NL, Y = co-NL. 10

  23. If PATH ∈ co-NL 11

  24. If PATH ∈ co-NL In fact, PATH ∈ co-NL implies co-NSPACE(S) = NSPACE(S) 11

  25. If PATH ∈ co-NL In fact, PATH ∈ co-NL implies co-NSPACE(S) = NSPACE(S) Recall: O(S)-space reduction from any L ∈ NSPACE(S) to PATH 11

  26. If PATH ∈ co-NL In fact, PATH ∈ co-NL implies co-NSPACE(S) = NSPACE(S) Recall: O(S)-space reduction from any L ∈ NSPACE(S) to PATH i.e., from any L ’ ∈ co-NSPACE(S) to PATH c 11

  27. If PATH ∈ co-NL In fact, PATH ∈ co-NL implies co-NSPACE(S) = NSPACE(S) Recall: O(S)-space reduction from any L ∈ NSPACE(S) to PATH i.e., from any L ’ ∈ co-NSPACE(S) to PATH c Size of the new instance is at most N = 2 O(|S|) 11

  28. If PATH ∈ co-NL In fact, PATH ∈ co-NL implies co-NSPACE(S) = NSPACE(S) Recall: O(S)-space reduction from any L ∈ NSPACE(S) to PATH i.e., from any L ’ ∈ co-NSPACE(S) to PATH c Size of the new instance is at most N = 2 O(|S|) PATH c ∈ NL implies an NTM that decides if the instance is in PATH c in NSPACE(log N) = NSPACE(S) 11

  29. If PATH ∈ co-NL In fact, PATH ∈ co-NL implies co-NSPACE(S) = NSPACE(S) Recall: O(S)-space reduction from any L ∈ NSPACE(S) to PATH i.e., from any L ’ ∈ co-NSPACE(S) to PATH c Size of the new instance is at most N = 2 O(|S|) PATH c ∈ NL implies an NTM that decides if the instance is in PATH c in NSPACE(log N) = NSPACE(S) Then L ’ ∈ co-NSPACE(S) is also in NSPACE(S), by composing space-bounded computations. So, co-NSPACE(S) ⊆ NSPACE(S) 11

  30. If PATH ∈ co-NL In fact, PATH ∈ co-NL implies co-NSPACE(S) = NSPACE(S) Recall: O(S)-space reduction from any L ∈ NSPACE(S) to PATH i.e., from any L ’ ∈ co-NSPACE(S) to PATH c Size of the new instance is at most N = 2 O(|S|) PATH c ∈ NL implies an NTM that decides if the instance is in PATH c in NSPACE(log N) = NSPACE(S) Then L ’ ∈ co-NSPACE(S) is also in NSPACE(S), by composing space-bounded computations. So, co-NSPACE(S) ⊆ NSPACE(S) Hence co-NSPACE(S) = NSPACE(S) 11

  31. If PATH ∈ co-NL 12

  32. If PATH ∈ co-NL If PATH ∈ co-NL then NSPACE(S) = co-NSPACE(S) 12

  33. If PATH ∈ co-NL If PATH ∈ co-NL then NSPACE(S) = co-NSPACE(S) In particular NL = co-NL 12

  34. If PATH ∈ co-NL If PATH ∈ co-NL then NSPACE(S) = co-NSPACE(S) In particular NL = co-NL And indeed, PATH ∈ co-NL! 12

  35. If PATH ∈ co-NL If PATH ∈ co-NL then NSPACE(S) = co-NSPACE(S) In particular NL = co-NL And indeed, PATH ∈ co-NL! There is a (polynomial sized) certificate that can be verified in log-space, that there is no path from s to t in a graph G 12

  36. PATH c ∈ NL 13

  37. PATH c ∈ NL Certificate for (s,t) connected is just the path 13

  38. PATH c ∈ NL Certificate for (s,t) connected is just the path What is a certificate that (s,t) not connected? 13

  39. PATH c ∈ NL Certificate for (s,t) connected is just the path What is a certificate that (s,t) not connected? size c of the connected component of s, C; a list of all v ∈ C (with certificates) in order; and (somehow) a certificate for c = |C| 13

  40. PATH c ∈ NL Certificate for (s,t) connected is just the path What is a certificate that (s,t) not connected? size c of the connected component of s, C; a list of all v ∈ C (with certificates) in order; and (somehow) a certificate for c = |C| Log-space, one-scan verification of certified C (believing |C|): scan list, checking certificates, counting, ensuring order, and that t not in the list. Verify certificate for |C|. 13

  41. PATH c ∈ NL Certificate for (s,t) connected is just the path What is a certificate that (s,t) not connected? size c of the connected component of s, C; a list of all v ∈ C (with certificates) in order; and (somehow) a certificate for c = |C| Log-space, one-scan verification of certified C (believing |C|): scan list, checking certificates, counting, ensuring order, and that t not in the list. Verify certificate for |C|. If list has |C| many v ∈ C, without repeating, list must be complete 13

  42. Certificate for |C| 14

  43. Certificate for |C| Let C i := set of nodes within distance i of s. Then C = C N 14

  44. Certificate for |C| Let C i := set of nodes within distance i of s. Then C = C N Tail recursion to verify |C N |: 14

  45. Certificate for |C| Let C i := set of nodes within distance i of s. Then C = C N Tail recursion to verify |C N |: Read |C N-1 |, believing it verify |C N |, forget |C N |; 14

  46. Certificate for |C| Let C i := set of nodes within distance i of s. Then C = C N Tail recursion to verify |C N |: Read |C N-1 |, believing it verify |C N |, forget |C N |; Read |C N-2 |, believing it verify |C N-1 |, forget |C N-1 |; ... 14

  47. Certificate for |C| Let C i := set of nodes within distance i of s. Then C = C N Tail recursion to verify |C N |: Read |C N-1 |, believing it verify |C N |, forget |C N |; Read |C N-2 |, believing it verify |C N-1 |, forget |C N-1 |; ... Base case: |C 0 |=1 14

  48. Certificate for |C| Let C i := set of nodes within distance i of s. Then C = C N Tail recursion to verify |C N |: Read |C N-1 |, believing it verify |C N |, forget |C N |; Read |C N-2 |, believing it verify |C N-1 |, forget |C N-1 |; ... Base case: |C 0 |=1 Believing |C i-1 | verify |C i |: for each vertex v certificate that v ∈ C i or that v ∉ C i (these certificates should be poly(N) long) 14

  49. Certificate for |C| Let C i := set of nodes within distance i of s. Then C = C N Tail recursion to verify |C N |: Read |C N-1 |, believing it verify |C N |, forget |C N |; Read |C N-2 |, believing it verify |C N-1 |, forget |C N-1 |; ... Base case: |C 0 |=1 Believing |C i-1 | verify |C i |: for each vertex v certificate that v ∈ C i or that v ∉ C i (these certificates should be poly(N) long) Certificate that v ∉ C i given (i.e., believing) |C i-1 |: list of all vertices in C i-1 in order, with certificates. As before verify C i-1 believing |C i-1 | (scan and ensure list is correct/complete), but also check that no node in the list has v as a neighbor 14

  50. Certificate for t ∉ C N 15

  51. Certificate for t ∉ C N t ! C N 15

  52. Certificate for t ∉ C N t ! C N |C N | 15

  53. Certificate for t ∉ C N t ! C N t ! C N /|C N | |C N | |C N | 15

  54. Certificate for t ∉ C N t ! C N t ! C N /|C N | |C N | |C N | |C N | vertices 15

  55. Certificate for t ∉ C N t ! C N t ! C N /|C N | |C N | |C N | |C N | vertices v i ∈ C N path(s,v i ) 15

  56. Certificate for t ∉ C N t ! C N t ! C N /|C N | |C N | |C N | |C N | vertices v i ∈ C N path(s,v i ) v i ≠ t 15

  57. Certificate for t ∉ C N t ! C N t ! C N /|C N | |C N | |C N | |C N-1 | |C N | vertices v i ∈ C N path(s,v i ) v i ≠ t 15

  58. Certificate for t ∉ C N t ! C N t ! C N /|C N | |C N | |C N | /|C N-1 | |C N-1 | |C N | |C N-1 | |C N | vertices v i ∈ C N path(s,v i ) v i ≠ t 15

  59. Certificate for t ∉ C N t ! C N t ! C N /|C N | |C N | |C N | /|C N-1 | |C N-1 | |C N | |C N-1 | |C N | vertices all N vertices v i ∈ C N path(s,v i ) v i ≠ t 15

Recommend


More recommend