Presentation is loading. Please wait.

Presentation is loading. Please wait.

INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.

Similar presentations


Presentation on theme: "INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011."— Presentation transcript:

1

2 INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011

3 GENERALIZED GEOGRAPHY b a e c d f g i h

4 We show that FG  P GG GG IS PSPACE-HARD We convert a formula  into 〈 G,b 〉 such that: Player E has winning strategy in  if and only if Player I has winning strategy in 〈 G,b 〉 For simplicity we assume  is of the form:  =  x 1  x 2  x 3 …  x k [  ] where  is in cnf

5 b c TRUEFALSE x1x1 x2x2 xkxk c1c1 c2c2 cncn x1x1 (x 1  x 1  x 2 )  (  x 1   x 2   x 2 )  … x2x2 x2x2 x1x1 x1x1 x2x2

6 b TRUEFALSE x1x1 c1c1 x1x1 x1x1 x1x1 c  x 1 [ (x 1  x 1  x 1 ) ]

7 n x n GO, chess and checkers can be shown to be PSPACE-hard Question: Is Chess PSPACE complete? No, because determining whether Player I has a winning strategy takes constant time and space

8 Office hours next week: Tuesday 2-4pm Wednesday 10am-noon Thursday 10am-noon Friday 3-5pm FINAL EXAM SATURDAY, MAY 18 8:00AM – 10:00AM. Reminder: one page (8.5×11”) “cheat sheet”

9 1*(0 ∪ 01) 0 q0q0 q2q2 1 q1q1 0 1 {0 k 1 k | k ≥ 0} R → LRL | b L → a | b S → R | ε { ww | w ∈ {0,1}* } MODELS

10 0 → 0, R readwritemove  → , R q accept 0 → 0, R  → , R 0 → 0, R  → , L TURING MACHINES UNBOUNDED TAPE 0 q0q0 q0q0 q1q1 q2q2 q1q1 q2q2 0

11 A TM = {  M,w  | M is a TM that accepts string w } A TM is undecidable:(proof by contradiction) Assume there is a program accepts to decide A TM. accepts(  M ,w) = true if M(w) accepts false if M(w) does not. Construct a new TM LLPF that on input  M , runs accepts(  M ,  M  ) and “does the opposite”: LLPF(PROG ) =if (accepts( PROG, PROG )) then reject; else accept. LLPF

12 REDUCTIONS A  m B if there is a computable ƒ so that w  A  ƒ(w)  B ƒ is called a reduction from A to B A  P B if there is a poly-time computable ƒ so that w  A  ƒ(w)  B

13 COMPLEXITY THEORY P = Problems where it is easy to find the answer. NP = Problems where it’s easy to check the answer. If P = NP then generation is as easy as recognition. Is there a fast program for this problem? PSPACE = Problems that can be solved in polynomial space. If P = PSPACE then TIME is as powerful as SPACE.

14 COMPLETE PROBLEMS NP:3SAT,SUBSET-SUM,HAMPATH, VERTEX COVER, 3-COLOR,CLIQUE,… PSPACE:TQBF,FG,GEOGRAPHY,… If C is a class of languages and B is a language, then B is C-Complete if: 1. B ∈ C. 2. ∀ A ∈ C, A ≤ P C (i.e. B is C-Hard)

15

16 SPACE COMPLEXITY P VS NP POTPOURRI FINAL JEOPARDY 400

17 A tight asymptotic bound on the function ƒ(n) = n 3/2 + n log(n 2 )

18 A proof that SET-PARTITION ∈ NP, where SET-PARTITION = { T = {x 1,x 2,…,x n } | ∃ S ⊆ T so that Σ x ∈ S x = Σ y  S y }.

19 A proof that 3-COLOR ≤ P 4-COLOR, where 4-COLOR = {  G  | G is a graph that is 4-colorable. }

20 A proof of SUBSET-SUM ≤ P SET-PARTITION, where SET-PARTITION = { T = {x 1,x 2,…,x n } | ∃ S ⊆ T so that Σ x ∈ S x = Σ y  S y }.

21 A winning strategy for Player I in this GG instance: a b c d

22 A proof that PATH ∈ PSPACE, where PATH = {  G,s,t  | G is a directed graph with a path from s to t}

23 A proof that MIN-FORMULA ∈ PSPACE, where MIN-FORMULA = {  |  is a formula and ∀ formulae . |  | < |  | ⇒ ∃ x.  (x)   (x) }

24 A proof that 3SAT ≤ P TQBF.

25 A CFG for the language {  |  is in cnf }, where variable x i is represented by the string x i.

26 A proof that TQBF is not regular.

27 A proof that A TM is PSPACE-Hard.

28 A proof that {  M  | L(M) ∈ P } is undecidable, using the assumption P  NP.

29 FINAL JEOPARDY TRUE


Download ppt "INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011."

Similar presentations


Ads by Google