computational complexity
play

Computational Complexity Lecture 4 in which Diagonalization takes - PowerPoint PPT Presentation

Computational Complexity Lecture 4 in which Diagonalization takes on itself, and we enter Space Complexity (But first Ladner s Theorem) 1 Ladner s Theorem 2 Ladner s Theorem If P ! NP, then are all non-P NP languages equally


  1. Oracles What if we had an oracle for language A Class P A : L ∈ P A if L decided by a TM M A , in poly time Turing reduction: L ! T A 6

  2. Oracles What if we had an oracle for language A Class P A : L ∈ P A if L decided by a TM M A , in poly time Turing reduction: L ! T A Class NP A : L ∈ NP A if 6

  3. Oracles What if we had an oracle for language A Class P A : L ∈ P A if L decided by a TM M A , in poly time Turing reduction: L ! T A Class NP A : L ∈ NP A if L decided by an NTM M A , in poly time 6

  4. Oracles What if we had an oracle for language A Class P A : L ∈ P A if L decided by a TM M A , in poly time Turing reduction: L ! T A Class NP A : L ∈ NP A if L decided by an NTM M A , in poly time Equivalently, L = {x| ∃ w, |w| < poly(|x|) s.t. (x,w) ∈ L ’ }, where L ’ is in P A 6

  5. Oracles What if we had an oracle for language A Class P A : L ∈ P A if L decided by a TM M A , in poly time Turing reduction: L ! T A Class NP A : L ∈ NP A if L decided by an NTM M A , in poly time Equivalence carries over! Equivalently, L = {x| ∃ w, |w| < poly(|x|) s.t. (x,w) ∈ L ’ }, where L ’ is in P A 6

  6. Proofs that Relativize 7

  7. Proofs that Relativize Often entire theorems/proofs carry over, with the oracle tagging along 7

  8. Proofs that Relativize Often entire theorems/proofs carry over, with the oracle tagging along e.g. Time hierarchy theorems (and proofs!) hold for machines with access to any given oracle A 7

  9. Proofs that Relativize Often entire theorems/proofs carry over, with the oracle tagging along e.g. Time hierarchy theorems (and proofs!) hold for machines with access to any given oracle A Said to “relativize” 7

  10. P vs. NP with oracles 8

  11. P vs. NP with oracles How does P vs. NP fare relative to different oracles? 8

  12. P vs. NP with oracles How does P vs. NP fare relative to different oracles? Does their relation (equality or not) relativize? 8

  13. P vs. NP with oracles How does P vs. NP fare relative to different oracles? Does their relation (equality or not) relativize? No! Different in different worlds! 8

  14. P vs. NP with oracles How does P vs. NP fare relative to different oracles? Does their relation (equality or not) relativize? No! Different in different worlds! There exist languages A, B such that P A = NP A , but P B ! NP B ! 8

  15. A s.t. P A = NP A 9

  16. A s.t. P A = NP A If A is EXP-complete (w.r.t ! Cook or ! P ), P A = NP A = EXP 9

  17. A s.t. P A = NP A If A is EXP-complete (w.r.t ! Cook or ! P ), P A = NP A = EXP A EXP-hard ⇒ EXP ⊆ P A ⊆ NP A 9

  18. A s.t. P A = NP A If A is EXP-complete (w.r.t ! Cook or ! P ), P A = NP A = EXP A EXP-hard ⇒ EXP ⊆ P A ⊆ NP A A in EXP ⇒ NP A ⊆ EXP (note: to decide a language in NP A can try all possible witnesses, and carry out P A computation in exponential time) 9

  19. A s.t. P A = NP A If A is EXP-complete (w.r.t ! Cook or ! P ), P A = NP A = EXP A EXP-hard ⇒ EXP ⊆ P A ⊆ NP A A in EXP ⇒ NP A ⊆ EXP (note: to decide a language in NP A can try all possible witnesses, and carry out P A computation in exponential time) A simple EXP-complete language: 9

  20. A s.t. P A = NP A If A is EXP-complete (w.r.t ! Cook or ! P ), P A = NP A = EXP A EXP-hard ⇒ EXP ⊆ P A ⊆ NP A A in EXP ⇒ NP A ⊆ EXP (note: to decide a language in NP A can try all possible witnesses, and carry out P A computation in exponential time) A simple EXP-complete language: EXPTM = { (M,x,1 n ) | TM represented by M accepts x within time 2 n } 9

  21. B s.t. P B ! NP B 10

  22. B s.t. P B ! NP B Building B and L, s.t. L in NP B \P B 10

  23. B s.t. P B ! NP B Building B and L, s.t. L in NP B \P B L={1 n | ∃ w, |w|=n and w ∈ B} 10

  24. B s.t. P B ! NP B Building B and L, s.t. L in NP B \P B L={1 n | ∃ w, |w|=n and w ∈ B} B 10

  25. B s.t. P B ! NP B Building B and L, s.t. L in NP B \P B L={1 n | ∃ w, |w|=n and w ∈ B} ... 0 1 00 01 10 11 1 n L B 10

  26. B s.t. P B ! NP B Building B and L, s.t. L in NP B \P B L={1 n | ∃ w, |w|=n and w ∈ B} ... 0 1 00 01 10 11 1 n L B 10

  27. B s.t. P B ! NP B Building B and L, s.t. L in NP B \P B L={1 n | ∃ w, |w|=n and w ∈ B} L in NP B . To do: L not in P B ... 0 1 00 01 10 11 1 n L B 10

  28. B s.t. P B ! NP B Building B and L, s.t. L in NP B \P B L={1 n | ∃ w, |w|=n and w ∈ B} L in NP B . To do: L not in P B For each i, ensure M iB in ... 0 1 00 01 10 11 1 n 2 n-1 time gets L(1 n ) wrong L (for some new n) B 10

  29. B s.t. P B ! NP B Building B and L, s.t. L in NP B \P B L={1 n | ∃ w, |w|=n and w ∈ B} L in NP B . To do: L not in P B For each i, ensure M iB in ... 0 1 00 01 10 11 1 n 2 n-1 time gets L(1 n ) wrong L (for some new n) B M i 10

  30. B s.t. P B ! NP B Building B and L, s.t. L in NP B \P B L={1 n | ∃ w, |w|=n and w ∈ B} L in NP B . To do: L not in P B For each i, ensure M iB in ... 0 1 00 01 10 11 1 n 2 n-1 time gets L(1 n ) wrong L (for some new n) B 1 n M i 10

  31. B s.t. P B ! NP B Building B and L, s.t. L in NP B \P B L={1 n | ∃ w, |w|=n and w ∈ B} L in NP B . To do: L not in P B For each i, ensure M iB in ... 0 1 00 01 10 11 1 n 2 n-1 time gets L(1 n ) wrong L (for some new n) B 1 n M i 10

  32. B s.t. P B ! NP B Building B and L, s.t. L in NP B \P B L={1 n | ∃ w, |w|=n and w ∈ B} L in NP B . To do: L not in P B For each i, ensure M iB in ... 0 1 00 01 10 11 1 n 2 n-1 time gets L(1 n ) wrong L (for some new n) B Pick n s.t. B not yet set beyond 1 n-1 . Run M i on 1 n 1 n for 2 n-1 steps. M i 10

  33. B s.t. P B ! NP B Building B and L, s.t. L in NP B \P B L={1 n | ∃ w, |w|=n and w ∈ B} L in NP B . To do: L not in P B For each i, ensure M iB in ... 0 1 00 01 10 11 1 n 2 n-1 time gets L(1 n ) wrong L (for some new n) B Pick n s.t. B not yet set beyond 1 n-1 . Run M i on 1 n 1 n for 2 n-1 steps. M i 10

  34. B s.t. P B ! NP B Building B and L, s.t. L in NP B \P B L={1 n | ∃ w, |w|=n and w ∈ B} L in NP B . To do: L not in P B For each i, ensure M iB in ... 0 1 00 01 10 11 1 n 2 n-1 time gets L(1 n ) wrong L (for some new n) B Pick n s.t. B not yet set beyond 1 n-1 . Run M i on 1 n 1 n for 2 n-1 steps. M i 10

  35. B s.t. P B ! NP B Building B and L, s.t. L in NP B \P B L={1 n | ∃ w, |w|=n and w ∈ B} L in NP B . To do: L not in P B For each i, ensure M iB in ... 0 1 00 01 10 11 1 n 2 n-1 time gets L(1 n ) wrong L (for some new n) B Pick n s.t. B not yet set beyond 1 n-1 . Run M i on 1 n 1 n for 2 n-1 steps. M i 10

  36. B s.t. P B ! NP B Building B and L, s.t. L in NP B \P B L={1 n | ∃ w, |w|=n and w ∈ B} L in NP B . To do: L not in P B For each i, ensure M iB in ... 0 1 00 01 10 11 1 n 2 n-1 time gets L(1 n ) wrong L (for some new n) B Pick n s.t. B not yet set beyond 1 n-1 . Run M i on 1 n 1 n for 2 n-1 steps. M i 10

  37. B s.t. P B ! NP B Building B and L, s.t. L in NP B \P B L={1 n | ∃ w, |w|=n and w ∈ B} L in NP B . To do: L not in P B For each i, ensure M iB in ... 0 1 00 01 10 11 1 n 2 n-1 time gets L(1 n ) wrong L (for some new n) B Pick n s.t. B not yet set beyond 1 n-1 . Run M i on 1 n 1 n for 2 n-1 steps. M i 10

  38. B s.t. P B ! NP B Building B and L, s.t. L in NP B \P B L={1 n | ∃ w, |w|=n and w ∈ B} L in NP B . To do: L not in P B For each i, ensure M iB in ... 0 1 00 01 10 11 1 n 2 n-1 time gets L(1 n ) wrong L (for some new n) B Pick n s.t. B not yet set beyond 1 n-1 . Run M i on 1 n 1 n for 2 n-1 steps. When M i queries B on x > 1 n-1 , set B(X)=0 M i 10

  39. B s.t. P B ! NP B Building B and L, s.t. L in NP B \P B L={1 n | ∃ w, |w|=n and w ∈ B} L in NP B . To do: L not in P B For each i, ensure M iB in ... 0 1 00 01 10 11 1 n 2 n-1 time gets L(1 n ) wrong L (for some new n) B Pick n s.t. B not yet set beyond 1 n-1 . Run M i on 1 n 1 n for 2 n-1 steps. When M i queries B on x > 1 n-1 , set B(X)=0 M i After M i finished set B up to x=1 n s.t. L(1 n ) ! M iB (1 n ) 10

  40. Meta-Result of the Day 11

  41. Meta-Result of the Day P vs. NP cannot be resolved using a relativizing proof 11

  42. Meta-Result of the Day P vs. NP cannot be resolved using a relativizing proof “Diagonalization proofs” relativize 11

  43. Meta-Result of the Day P vs. NP cannot be resolved using a relativizing proof “Diagonalization proofs” relativize Just need a way to enumerate/ encode machines, and to simulate one without much overhead given its encoding 11

  44. Meta-Result of the Day P vs. NP cannot be resolved using a relativizing proof “Diagonalization proofs” relativize Just need a way to enumerate/ encode machines, and to simulate one without much overhead given its encoding Do not further depend on internals of computation 11

  45. Meta-Result of the Day P vs. NP cannot be resolved using a relativizing proof “Diagonalization proofs” relativize Just need a way to enumerate/ encode machines, and to simulate one without much overhead given its encoding Do not further depend on internals of computation e.g. of non-relativizing proof: that of Cook-Levin theorem 11

  46. Space Complexity 12

  47. Space Complexity 13

  48. Space Complexity Natural complexity question 13

  49. Space Complexity Natural complexity question How much memory is needed 13

  50. Space Complexity Natural complexity question How much memory is needed More pressing than time: 13

  51. Space Complexity Natural complexity question How much memory is needed More pressing than time: Can’ t generate memory on the fly 13

  52. Space Complexity Natural complexity question How much memory is needed More pressing than time: Can’ t generate memory on the fly Or maybe less pressing: 13

  53. Space Complexity Natural complexity question How much memory is needed More pressing than time: Can’ t generate memory on the fly Or maybe less pressing: Turns out, often a little memory can go a long way (if we can spare the time) 13

  54. DSPACE and NSPACE 14

  55. DSPACE and NSPACE Measure of working memory (work-tape) used by a TM/NTM: input kept in a read-only tape 14

  56. DSPACE and NSPACE Measure of working memory (work-tape) used by a TM/NTM: input kept in a read-only tape Model allows o(n) memory usage 14

  57. DSPACE and NSPACE Measure of working memory (work-tape) used by a TM/NTM: input kept in a read-only tape Model allows o(n) memory usage DSPACE(n) may already be inefficient in terms of time 14

  58. DSPACE and NSPACE Measure of working memory (work-tape) used by a TM/NTM: input kept in a read-only tape Model allows o(n) memory usage DSPACE(n) may already be inefficient in terms of time We shall stick to " (log n) 14

  59. DSPACE and NSPACE Measure of working memory (work-tape) used by a TM/NTM: input kept in a read-only tape Model allows o(n) memory usage DSPACE(n) may already be inefficient in terms of time We shall stick to " (log n) Less than log is too little space to remember locations in the input 14

  60. DSPACE and NSPACE Measure of working memory (work-tape) used by a TM/NTM: input kept in a read-only tape Model allows o(n) memory usage DSPACE(n) may already be inefficient in terms of time We shall stick to " (log n) Less than log is too little space to remember locations in the input DSPACE/NSPACE more robust across models 14

Recommend


More recommend