programme reduction applications prove non decidable
play

Programme Reduction - applications Prove non-decidable properties - PowerPoint PPT Presentation

Programme Reduction - applications Prove non-decidable properties of TMs Theorem 11.7 Acc- = {e(T) | L(T) } is not recursive Reduction technique Describe non-decidable properties of other universal Proof: Show Acc


  1. Programme Reduction - applications • Prove non-decidable properties of TMs • Theorem 11.7 Acc- Λ = {e(T) | Λ ∈ L(T) } is not recursive – Reduction technique Λ • Describe non-decidable properties of other universal Proof: Show Acc Acc- ≤ formalisms – Chomsky grammars • Theorem – Java Let T U denote the universal Turing Machine, then • Prove non-decidable properties of non-universal Uni-Acc = {e(w) | w ∈ L(T U ) } is not recursive formalisms – Games – Context-free grammars Proof: Show Acc Uni-Acc ≤ dBerLog 2007 1 dBerLog 2007 2 Reduction - applications Rice’s Theorem - definition • Theorem 11.8 • Definition AccSome = {e(T) | L(T) is nonempty} is not recursive Proof: Show Acc- Λ AccSome A property of languages is said to be nontrivial iff it is ≤ satisfied by some but not all recursively enumerable AccEver = {e(T) | L(T)’ is empty} is not recursive languages Proof: Show Acc- Λ AccEver ≤ Subset = {e(T 1 )e(T 2 ) | L(T 1 ) ⊆ L(T 2 )} is not recursive Proof: Show Acc-Ever Subset ≤ dBerLog 2007 3 dBerLog 2007 4

  2. Nontrivial language properties Rice’s Theorem ∀ Λ ∈ L • Theorem 11.9 • L = Ø Let R be any nontrivial property of languages, then • L = Σ * P R = {e(T) | L(T) has property R} is not recursive! Proof: Show Acc- Λ P • L is finite ≤ R • L is regular • All strings in L have even length dBerLog 2007 5 dBerLog 2007 6 Reduction: Acc- Λ P Reduction: Acc- Λ P R ≤ ≤ R • Construct TM accepting Acc- Λ • Assume you had TM accepting P R Acc- Λ Y Y Y Λ ∈ L(T) L(T) sat R L(T’) sat R P R P R e(T) e(T) e(T’) N N N Λ ∉ L(T) L(T) viol R L(T’) viol R Assume Ø viol R. Then T R exists s.t. L(T R ) sat R Construct T’ s.t. if Λ ∉ L(T) then L(T’)=Ø else L(T’)= L(T R ) dBerLog 2007 7 dBerLog 2007 8

  3. Programme Harel diagonalization • Prove non-decidable properties of TMs Assume halting problem solvable in JAVA – Reduction technique • Describe non-decidable properties of other universal prog in formalisms – Chomsky grammars P – Java • Prove non-decidable properties of non-universal formalisms FINE LOOP if prog(in) ↓ if prog(in) ↑ – Context-free grammars dBerLog 2007 9 dBerLog 2007 10 Harel diagonalization Harel diagonalization prog Q Construct program Q Run Q with input Q COPY COPY prog prog Q Q P P Q Q FINE LOOP FINE LOOP LOOP LOOP dBerLog 2007 11 dBerLog 2007 12

  4. Busy Beaver Chomsky grammars • A Chomsky grammar is a tuple G = (V, Σ , S, P), where • Definition BB( n ):= the maximal number of 1’s printed by a Turing V and Σ are finite disjoint sets of variables and terminals resp. machine starting with n 1s on the tape and with n states S is the start variable , an element of V P is a set of productions of the form • Exercise Type 3 : A → a or A → aB, where A, B ∈ V and a ∈ Σ BB is not computable! Type 2 : A → β , where A ∈ V and β ∈ (V ∪ Σ )* Type 0 : α → β , where α ∈ (V ∪ Σ )*V (V ∪ Σ )* and β ∈ (V ∪ Σ )* dBerLog 2007 13 dBerLog 2007 14 Chomsky type 0 languages Chomsky type 0 example • Given a Chomsky type 0 grammar G = (V, Σ , S, P), define • Let G = (V, Σ , S, P), where V = {S, A, B, C} Σ = {a, b, c} if α → β ∈ P, then for all α ’, α ’’, β ’, β ’’ ∈ (V ∪ Σ )* P: S → FT α ’ α α ’’ ⇒ β ’ β β ’’ T → ABCT T → ABC BA → AB CA → AC CB → BC L(G) = {w ∈ Σ *  S ⇒ * w} FA → a aA → aa aB → ab bB → bb bC → bc cC → cc L(G) = {a i b i c i  i > 0} dBerLog 2007 15 dBerLog 2007 16

  5. Turing and Chomsky Programme • Prove non-decidable properties of TMs • Theorems 10.8 and 10.9 – Reduction technique For any language L ⊆ Σ *, • Describe non-decidable properties of other universal L is generated by a Chomsky type 0 grammar formalisms iff (constructively!!) – Chomsky grammars L is accepted by a Turing machine – Java • Prove non-decidable properties of non-universal formalisms • Corollary – Games All nontrivial properties of languages for Chomsky type 0 – Context-free grammars grammars are undecidable! dBerLog 2007 17 dBerLog 2007 18 Post’s correspondence problem - example Post’s correspondence problem - example • List A: List B: • List A: List B: α 1 = b β 1 = bbb α 1 = b β 1 = bbb α 2 = babbb β 2 = ba α 2 = babbb β 2 = ba α 3 = ba β 3 = a α 3 = ba β 3 = a Does there exist a sequence of indices i1, i2,..., im ∈ {1,2,3} such that Solution? α i1 α i2 ...... α im = β i1 β i2 ...... β im dBerLog 2007 19 dBerLog 2007 20

  6. Post’s correspondence problem - example Post’s correspondence problem - example • List A: • List A: List B: List B: α 1 = b β 1 = bbb α 1 = ba β 1 = bab α 2 = babbb β 2 = ba α 2 = abb β 2 = bb α 3 = ba β 3 = a α 3 = bab β 3 = abb Solution? YES: 2 1 1 3 Solution? α 2 α 1 α 1 α 3 = babbbbbba = β 2 β 1 β 1 β 3 dBerLog 2007 21 dBerLog 2007 22 Post’s correspondence problem - example Post’s correspondence problem - formally • Given two finite lists of strings over some alphabet Γ • List A: List B: α 1 = ba β 1 = bab List A: α 1 , α 2 ,.., α k α 2 = abb β 2 = bb List B: β 1 , β 2 ,...., β k α 3 = bab β 3 = abb • Does there exist a sequence of indices Solution? NO! i1, i2,...,im ∈ {1,2,..,k} such that α i1 α i2 ...... α im = β i1 β i2 ...... β im ? dBerLog 2007 23 dBerLog 2007 24

  7. Modified Post’s correspondence problem Post’s correspondence problem • Given two finite lists of strings over some alphabet Γ • Theorem List A: α 1 , α 2 ,.., α k List B: β 1 , β 2 ,...., β k Post’s correspondence problem is undecidable! • Does there exist a sequence of indices i2, i3,...,im ∈ {1,2,..,k} such that α 1 α i2 ...... α im = β 1 β i2 ...... β im ? dBerLog 2007 25 dBerLog 2007 26 Post’s correspondence problem - reductions Modified Post’s correspondence problem • Theorem 11.11 Modified Post’s correspondence problem is undecidable! Acc MPCP PCP Reduction I Reduction II dBerLog 2007 27 dBerLog 2007 28

  8. Reduction I A Turing Machine • Given Turing machine T and input w, construct algoritmically MPCP T,w such that 0/X,R 1/Y, L p q r T accepts w iff p010 |- Xq10 |- rXY0........ MPCP T,w has a solution # p010 # Xq10 # rXY0 #........ dBerLog 2007 29 dBerLog 2007 30 Reduction I - lists of MPCP T,w Reduction I • List A: List B: • Given T = (Q, Σ , Π , δ , q 0 ,) and w ∈ Σ * α 1 = # β 1 = #q 0 ∆ w# (assume w.l.g. that T has no Stay-moves!) • Alphabet of MPCP T,w Γ := (Q ∪ {h a , h r }) ∪ ( Π ∪ { ∆ }) ∪ {#} dBerLog 2007 31 dBerLog 2007 32

  9. Reduction I - lists of MPCP T,w Reduction I - lists of MPCP T,w • List A: • List A: List B: List B: α 1 = # β 1 = #q 0 ∆ w# α 1 = # β 1 = #q 0 ∆ w# α d = X β d = X for all X ∈ Γ α d = X β d = X for all X ∈ Γ α q,X = qX β q,X = Yp if δ (q,X) = (p, Y, R) α q,X = qX β q,X = Yp if δ (q,X) = (p, Y, R) α q,X = ZqX β q,X = pZY if δ (q,X) = (p, Y, L) α q,X = ZqX β q,X = pZY if δ (q,X) = (p, Y, L) α q,B = q# β q,B = Yp# if δ (q, ∆ ) = (p, Y, R) α q,B = q# β q,B = Yp# if δ (q, ∆ ) = (p, Y, R) α q,B = Zq# β q,B = pZY#if δ (q, ∆ ) = (p, Y, L) α q,B = Zq# β q,B = pZY#if δ (q, ∆ ) = (p, Y, L) α a1 = Xh a Y β a1 = h a for all X,Y ∈ Γ α a2 = Xh a β a2 = h a for all X,Y ∈ Γ α a3 = h a Y β a3 = h a for all X,Y ∈ Γ dBerLog 2007 33 dBerLog 2007 34 Reduction I - lists of MPCP T,w Reduction II • List A: List B: • Given MPCP over alphabet Γ α 1 = # β 1 = #q 0 ∆ w# α d = X β d = X for all X ∈ Γ • Construct PCP over alphabet Γ ’ such that α q,X = qX β q,X = Yp if δ (q,X) = (p, Y, R) α q,X = ZqX β q,X = pZY if δ (q,X) = (p, Y, L) α q,B = q# β q,B = Yp# if δ (q, ∆ ) = (p, Y, R) MPCP has solution α q,B = Zq# β q,B = pZY#if δ (q, ∆ ) = (p, Y, L) iff α a1 = Xh a Y β a1 = h a for all X,Y ∈ Γ PCP has solution α a2 = Xh a β a2 = h a for all X,Y ∈ Γ α a3 = h a Y β a3 = h a for all X,Y ∈ Γ α s = h a ## β s = # dBerLog 2007 35 dBerLog 2007 36

  10. Definitions Reduction II ir, il : Γ * → ( Γ ∪ {#})* • Given MPCP with k lists over alphabet Γ A : α 1 , α 2 ,.... α k B : β 1 , β 2 ,..... β k ir ( ε ) = ε ir (ax) = a# • ir (x) a ∈ Γ , x ∈ Γ * il ( ε ) = ε il (ax) = #a • il (x) a ∈ Γ , x ∈ Γ * • Construct PCP with k+2 lists over Γ ∪ {#, $} A’: B’: Examples: α ’ 0 = # ir ( α 1 ) β ’ 0 = il ( β 1 ) ir (bob) = b#o#b# α ’ i = ir ( α 1 ) β ’ i = il ( β i ) for i = 1,2,..k il (bob) = #b#o#b α ’ k+1 = $ β ’ k+1 = #$ dBerLog 2007 37 dBerLog 2007 38 Context-free Grammar for expressions Ambiguity - example • G = ({E, I}, {1,2,+, ∗ ,(,)}, P, S) E E P: E → I | E + E | E ∗ E | (E) E E ∗ E E I → 1 | 2 + I E E I E E ∗ + 2 2 I I I I 1 2 2 1 dBerLog 2007 39 dBerLog 2007 40

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend