1 / 70

Fall 2013 CMU CS 15-855 Computational Complexity

Fall 2013 CMU CS 15-855 Computational Complexity. Non-determinism , NTIME hierarchy threorem , Ladner’s Proof. Lecture 3 and 4. Robust Time and Space Classes. Robust time and space classes: L = SPACE(log n) PSPACE =  k SPACE(n k ) P =  k TIME(n k ) EXP =  k TIME(2 n k ) .

ura
Download Presentation

Fall 2013 CMU CS 15-855 Computational Complexity

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Fall 2013 CMU CS 15-855Computational Complexity Non-determinism, NTIME hierarchy threorem, Ladner’s Proof Lecture 3 and 4

  2. Robust Time and Space Classes • Robust time and space classes: L = SPACE(log n) PSPACE = kSPACE(nk) P = kTIME(nk) EXP = kTIME(2nk)

  3. Our world picture so far EXP PSPACE P L

  4. Relationships between classes • So far: L µ P µ PSPACE µ EXP • believe all containments strict • know L(PSPACE, P(EXP • even before any mention of NP, two major unsolved problems: L = PP = PSPACE ? ?

  5. Completeness • complexity class C • L is C-hard if • every language in C reduces to L • language L is C-completeif • L is in C • L is C-hard

  6. A P-complete problem • logspace reduction: f computable by TM that uses O(log n) space • denoted “L1≤LL2” • If L2is P-complete, then L2in L implies L = P (homework problem)

  7. A P-complete problem • Circuit Value (CVAL): given a variable-free Boolean circuit (gates , , , 0, 1), does it output 1? Theorem: CVAL is P-complete. • Proof: • already argued in P • L arbitrary language in P, TM M decides L in nc steps

  8. A P-complete problem • Tableau (configurations written in an array) for machine M on input w: … w1/qs w2 … wn _ • height = time taken = |w|c • width = space used ≤ |w|c … w1 w2/q1 … wn _ … w1/q1 a … wn _ ... ... … _/qa _ … _ _

  9. A P-complete problem • Important observation: contents of cell in tableau determined by 3 others above it: a/q1 b a a b/q1 a b/q1 a a b a b

  10. A P-complete problem • Can build Boolean circuit STEP • input (binary encoding of) 3 cells • output (binary encoding of) 1 cell • each output bit is some function of inputs • can build circuit for each • size is independent of size of tableau a b/q1 a STEP a

  11. A P-complete problem Tableau for M on input w … w1/qs w2 … wn _ • |w|c copies of STEP compute row i from i-1 … w1 w2/q1 … wn _ ... ... … STEP STEP STEP STEP STEP …

  12. A P-complete problem w1 w2 wn This circuit CM, w has inputs w1w2…wn and C(w) = 1 iff M accepts input w. logspace reduction Size = O(|w|2c) … w1/qs w2 … wn _ STEP STEP STEP STEP STEP STEP STEP STEP STEP STEP ... ... STEP STEP STEP STEP STEP ignore these 1 iff cell contains qaccept

  13. Answer to question • Can we evaluate an n node Boolean circuit using O(log n) space?    • NO! (probably) • CVAL in L if and only if L = P    1 0 1 0 1

  14. L  EXP <-> PADL  P A consequence of measuring running time as a function of input length: • -.> • suppose L  EXP, and define PADL = { x#N: x  L, N = 2|x|k } • TM that decides PADL: ensure suffix of N #s, ignore #s, then simulate TM that decides L • running time now polynomial ! • <- M regPADL  P so M runs in time exp in length of x

  15. Succinctness • converse (intuition only): “succinctness” • suppose L is P-complete • intuitively,some inputs are “hard” -- require full power of P • SUCCINCTL has inputs encoded in different form than L, some exponentially shorter • if “hard” inputs are exponentially shorter, then candidate to be EXP-complete

  16. Succinct encodings • succinct encoding for a directed graph G= (V = {1,2,3,…}, E): • a succinct encoding for a variable-free Boolean circuit: 1 iff (i, j)  E i j 1 iff wire from gate i to gate j type of gate i type of gate j i j

  17. An EXP-complete problem • Succinct Circuit Value: given a succinctly encoded variable-free Boolean circuit (gates , , , 0, 1), does it output 1? Theorem: Succinct Circuit Value is EXP-complete. • Proof: • in EXP (why?) • L arbitrary language in EXP, TM M decides L in 2nk steps

  18. An EXP-complete problem • tableau for input x = x1x2x3…xn: • Circuit C from CVAL reduction has size O(22nk). • TM M accepts input xiff circuit outputs 1 x _ _ _ _ _ height, width 2nk

  19. An EXP-complete problem • Can encode C succinctly: • if i, j within single STEP circuit, easy to compute output • if i, j between two STEP circuits, easy to compute output • if one of i, j refers to input gates, consult x to compute output 1 iff wire from gate i to gate j type of gate i type of gate j i j

  20. Summary • Remaining TM details: big-oh necessary. • First complexity classes: L, P, PSPACE, EXP • First separations (via simulation and diagonalization): P ≠ EXP, L ≠ PSPACE • First major open questions: L = PP = PSPACE • First complete problems: • CVAL is P-complete • Succinct CVAL is EXP-complete ? ?

  21. Nondeterminism: introduction A motivating question: • Can computers replace mathematicians? L = { (x, 1k) : statement x has a proof of length at most k }

  22. Nondeterminism: introduction • Outline: • nondeterminism • nondeterministic time classes • NP, NP-completeness, P vs. NP • coNP • NTIME Hierarchy • Ladner’s Theorem

  23. Nondeterminism • Recall deterministic TM • Q finite set of states • ∑ alphabet including blank: “_” • qstart, qaccept, qreject in Q • transition function: δ : Q x ∑ ! Q x ∑ x {L, R, -}

  24. Nondeterminism • nondeterministic Turing Machine: • Q finite set of states • ∑ alphabet including blank: “_” • qstart, qaccept, qreject in Q • transition relation ∆ (Q x ∑) x (Q x ∑ x {L, R, -}) • given current state and symbol scanned, several choices of what to do next.

  25. Nondeterminism • deterministic TM: given current configuration, unique next configuration qstartx1x2x3…xn qstartx1x2x3…xn x L x  L qaccept qreject • nondeterministic TM: given current configuration, several possible next configurations

  26. Nondeterminism qstartx1x2x3…xn qstartx1x2x3…xn • asymmetric accept/reject criterion “computation path” x  L x  L “guess” qaccept qreject

  27. Nondeterminism • all paths terminate • time used: maximum length of paths from root • space used: maximum # of work tape squares touched on any path from root

  28. Nondeterminism • NTIME(f(n)) = languages decidable by a multi-tape NTM that runs for at most f(n) steps on any computation path, where n is the input length, and f :N !N • NSPACE(f(n))= languages decidable by a multi-tape NTM that touches at most f(n) squares of its work tapes along any computation path, where n is the input length, and f :N!N

  29. Nondeterminism • Focus on time classes first: NP = kNTIME(nk) NEXP = kNTIME(2nk)

  30. Poly-time verifiers “witness” or “certificate” Very useful alternate definition of NP: Theorem: language L is in NP if and only if it is expressible as: L = { x| 9 y, |y| ≤ |x|k, (x, y)  R } where R is a language in P. • poly-time TM MR deciding R is a “verifier” efficiently verifiable

  31. Poly-time verifiers • Example: 3SAT expressible as 3SAT = {φ : φ is a 3-CNF formula for which  assignment A for which (φ, A)  R} R = {(φ, A) : A is a sat. assign. for φ} • satisfying assignment A is a “witness” of the satisfiability of φ (it “certifies” satisfiability of φ) • R is decidable in poly-time

  32. Poly-time verifiers L = { x | 9 y, |y| ≤ |x|k, (x, y)  R } Proof: () give poly-time NTM deciding L phase 1: “guess” y with |x|k nondeterministic steps phase 2: decide if (x, y)  R

  33. Poly-time verifiers Proof: () given L  NP, describe L as: L = { x | 9 y, |y| ≤ |x|k, (x, y)  R } • L is decided by NTM M running in time nk • define the language R = { (x, y) : y is an accepting computation history of M on input x} • check: accepting history has length ≤ |x|k • check: R is decidable in polynomial time • check: M accepts x iff y, |y| ≤ |x|k, (x, y)  R

  34. Why NP? problem requirements object we are seeking • not a realistic model of computation • but, captures important computational feature of many problems: exhaustive search works • contains huge number of natural, practical problems • many problems have form: L = { x | 9 y s.t. (x,y) 2 R} efficient test: does y meet requirements?

  35. Why NP? • Why not EXP? • too strong! • important problems not complete.

  36. Relationships between classes • Easy: P µNP, EXP µNEXP • TM special case of NTM • Recall: L  NP iff expressible as L = { x | 9 y, |y| · |x|k s.t. (x,y) 2 R} • NP µ PSPACE(try all possible y) • The central question: P = NP finding a solution vs. recognizing a solution ?

  37. NP-completeness • Circuit SAT: given a Boolean circuit (gates , , ), with variables y1, y2, …, ym is there some assignment that makes it output 1? Theorem: Circuit SAT is NP-complete. • Proof: • clearly in NP

  38. CIRCUIT-SAT is NP-complete Theorem: CIRCUIT-SAT is NP-complete CIRCUIT-SAT = {C : C is a Boolean circuit for which there exists a satisfying truth assignment} Proof: • Part 1: need to show CIRCUIT-SAT  NP. • can express CIRCUIT-SAT as: CIRCUIT-SAT = {C : C is a Boolean circuit for which  x such that (C, x)  R} R = {(C, x) : C is a Boolean circuit and C(x) = 1}

  39. CIRCUIT-SAT is NP-complete CIRCUIT-SAT = {C : C is a Boolean circuit for which there exists a satisfying truth assignment} Proof: • Part 2: for each language A  NP, need to give poly-time reduction from A to CIRCUIT-SAT • for a given language A  NP, we know A = {x | 9 y, |y| ≤ |x|k, (x, y)  R } and there is a (deterministic) TM MR that decides R in time g(n) ≤ nc for some c.

  40. CIRCUIT-SAT is NP-complete • Tableau (configurations written in an array) for machine MR on input w = (x, y): … w1/qs w2 … wn _ • height = time taken = |w|c • width = space used ≤ |w|c … w1 w2/q1 … wn _ … w1/q1 a … wn _ ... ... … _/qa _ … _ _

  41. CIRCUIT-SAT is NP-complete • Important observation: contents of cell in tableau determined by 3 others above it: a/q1 b a a b/q1 a b/q1 a a b a b

  42. CIRCUIT-SAT is NP-complete • Can build Boolean circuit STEP • input (binary encoding of) 3 cells • output (binary encoding of) 1 cell • each output bit is some function of inputs • can build circuit for each • size is independent of size of tableau a b/q1 a STEP a

  43. CIRCUIT-SAT is NP-complete Tableau for MR on input w = (x, y) … w1/qs w2 … wn _ • |w|c copies of STEP compute row i from i-1 … w1 w2/q1 … wn _ ... ... … STEP STEP STEP STEP STEP …

  44. CIRCUIT-SAT is NP-complete w1 w2 wn … This circuit CMR, w has inputs w1w2…wn and C(w) = 1 iff MR accepts input w. Size = O(|w|2c) w1/qs w2 … wn _ STEP STEP STEP STEP STEP STEP STEP STEP STEP STEP ... ... STEP STEP STEP STEP STEP ignore these 1 iff cell contains qaccept

  45. CIRCUIT-SAT is NP-complete • recall: we are reducing language A: A = { x |9 y, |y| ≤ |x|k, (x, y)  R } to CIRCUIT-SAT. • f(x) produces the following circuit: x1 x2 … xn y1 y2 … ym • hardwire input x • leave y as variables 1 iff (x,y)  R CircuitCMR, w

  46. NP-completeness • Given L  NP of form L = { x | 9 y s.t. (x,y) 2 R} x1 x2 … xn y1 y2 … ym 1 iff (x,y)  R CVAL reduction for R • hardwire input x; leave y as variables

  47. NEXP-completeness • Succinct Circuit SAT: given a succinctly encoded Boolean circuit (gates , , ), with variables y1, y2, …, ym is there some assignment that makes it output 1? Theorem: Succinct Circuit SAT is NEXP-complete. • Proof: • same trick as for Succinct CVAL EXP-complete.

  48. Upwards Collapse Theorem • P=NP implies EXP=NEXP • Let L be a NEXP-complete language • PADL = { x#N: x  L, N = 2|x|k} remains NEXP complete (ignore padding) • PADL is in NP • So PADLis in P, and thus, L im EXP • .

  49. Complement classes • In general, if C is a complexity class • co-C is the complement class, containing all complements of languages in C • L  C implies (* - L)  co-C • (* - L) C implies L  co-C • Some classes closed under complement: • e.g. co-P = P

  50. coNP • Is NP closed under complement? x  L Can we transform this machine: x  L x  L x  L qaccept qreject into this machine? qaccept qreject

More Related