# INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.

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

INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011

GENERALIZED GEOGRAPHY b a e c d f g i h

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

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

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

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

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”

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

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

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

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

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.

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)

SPACE COMPLEXITY 100 200 300 P VS NP 100 200 300 POTPOURRI 100 200 300 FINAL JEOPARDY 400

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

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 }.

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

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 }.

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

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

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

A proof that 3SAT ≤ P TQBF.

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

A proof that TQBF is not regular.

A proof that A TM is PSPACE-Hard.

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

FINAL JEOPARDY TRUE