1 / 20

CSC 3130: Automata theory and formal languages

Fall 2009. The Chinese University of Hong Kong. CSC 3130: Automata theory and formal languages. More undecidable languages. Andrej Bogdanov http://www.cse.cuhk.edu.hk/~andrejb/csc3130. Summary of last lecture. U. input x. M on input x. program 〈 M 〉.

finn
Télécharger la présentation

CSC 3130: Automata theory and formal languages

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 2009 The Chinese University of Hong Kong CSC 3130: Automata theory and formal languages More undecidable languages Andrej Bogdanov http://www.cse.cuhk.edu.hk/~andrejb/csc3130

  2. Summary of last lecture U input x M on input x program 〈M〉 The universal TMU takes as inputs a program Mand a string x and simulates M on x The program M itself is specified as a TM!

  3. Summary of last lecture ATM = {〈M, w〉: Mis a TM that accepts input w} recognizable: We can simulate M on input w undecidable: by Turing’s Theorem ATM = {〈M, w〉: Mis a TM that does not accept w} not recognizable: by complementation HALTTM = {〈M, w〉: Mis a TM that halts on input w} recognizable: We can simulate M on input x undecidable by reduction from ATM

  4. More undecidable problems AEPSTM = {〈M〉: Mis a TM that accepts input e} SOMETM = {〈M〉: Mis a TM that accepts some input} EQTM = {〈M, M’〉: Mand M’ accept the same inputs} decidable recognizable but undecidable unrecognizable

  5. Example 1 • Step 1: You gotta believe it • To know if M accepts e, it looks like we have to simulate it • But then we might end up in a loop • Step 2: Use what you know AEPSTM = {〈M〉: Mis a TM that accepts input e} ATM is undecidable

  6. Proof by “reduction” • Show that if AEPSTM can be decided,... so can ATM AEPSTM = {〈M〉: Mis a TM that accepts input e} accept ifM accepts e A 〈M〉 reject if not ? accept ifM accepts w 〈M, w〉 reject if not

  7. Proof by “reduction” accept ifM accepts e A 〈M〉 reject if not accept ifM accepts w 〈M, w〉 reject if not A 〈M’〉 M’ is a Turing Machine such that: If M accepts w, then M’ accepts e If M does not accept w, then M’ does not accept e M’ on input e=M on input w

  8. Proof by “reduction” accept ifM accepts w construct M’ 〈M, w〉 reject if not M’ q1 M’: On input z, A 〈M’〉 ☐/☐R ☐/☐L If z = e, then simulate M on w and return its answer Otherwise, reject write w q0 others run M qrej qacc

  9. The argument • We assume AEPSTM is decidable. Let A be a decider. • We describe (in high level) a TM that decides ATM: S: On input 〈M, w〉: Construct the following TM M’: Run A on input 〈M’〉 and return its answer. M’: On input z, If z = e, then simulate M on w and return answer Otherwise, reject R accepts 〈M’〉 S accepts 〈M, w〉 M’ accepts e M accepts w

  10. Recognizable or not? AEPSTM = {〈M〉: Mis a TM that accepts input e} decidable recognizable but undecidable unrecognizable Turing Machine that recognizesAEPSTM: On input 〈M〉: Simulate M on input e and return answer.

  11. Example 2 • Step 1: You gotta believe it • To know if M accepts, it looks like we have to simulate it • But then we might end up in a loop • Step 2: Use what you know SOMETM = {〈M〉: Mis a TM that accepts some input} ATM is undecidable AEPSTM is undecidable

  12. Example 2 accept ifM accepts some input A 〈M〉 reject if not accept ifM accepts e 〈M, w〉 reject if not A 〈M’〉 M’ is a Turing Machine such that: If M accepts w, then M’ accepts some input If M does not accept w, then M’ does not accept anything

  13. Example 2 accept ifM accepts w construct M’ 〈M, w〉 reject if not M’: On any input, M’ accepts some input M accepts w A Simulate M on w Return its answer 〈M’〉 decidable recognizable but undecidable unrecognizable

  14. Is it recognizable? • Attempt to recognize SOMETM: SOMETM = {〈M〉: Mis a TM that accepts some input} Simulate M on input e Simulate M on input 0 Simulate M on input 1 Accept if one of them accepts Simulate M on input 00 ... ... but there are infinitely many!

  15. Is it recognizable? • Attempt to recognize SOMETM: SOMETM = {〈M〉: Mis a TM that accepts some input} For all possible strings x (in lexicographic order): Simulate M on input x what if M loops on ebut M accepts, say, 11? If it accepts, accept. If it rejects, reject. lexicographic order: e, 0, 1, 00, 01, 10, 11, 000, 001, ...

  16. Is it recognizable? • Description of recognizer for SOMETM: SOMETM = {〈M〉: Mis a TM that accepts some input} k := 1 For all possible strings x (in lexicographic order): For all strings y that come before x Simulate M on y for k steps If it accepts, accept. If it rejects or doesn’t finish, continue. k := k + 1

  17. Execution of Turing Machine • Execution: ... inputs e 0 1 00 01 Simulate M on e for 1 step If M accepts some w, execution will see this in some stage of the simulation Simulate M on e for 2 steps Simulate M on 0for 2 steps Simulate M on e for 3 steps Simulate M on 0for 3 steps Simulate M on 1for 3 steps ... decidable recognizable but undecidable unrecognizable

  18. Example 3 • Step 1: You gotta believe it • Step 2: Use what you know EQTM = {〈M1, M2〉: M1and M2 accept the same inputs} decidable recognizable but undecidable unrecognizable AEPSTM is recognizablebut undecidable ATM is recognizablebut undecidable SOMETM is recognizablebut undecidable ATM is unrecognizable

  19. Example 3 EQTM = {〈M1, M2〉: M1and M2 accept the same inputs} accept ifM1, M2 accept same inputs A 〈M1, M2〉 rej/loop if not ATM = {〈M, w〉: Mis a TM that does not accept w} ? accept ifM rej/loops on w 〈M, w〉 rej/loop if M accepts w

  20. Example 3 accept ifM1, M2 accept same inputs A 〈M1, M2〉 rej/loop if not accept ifM rej/loops on w 〈M, w〉 〈M1〉 M1: “On any input: Run M on w” A 〈M2〉 M2: “Reject” rej/loop if M accepts w M1, M2 accept same inputs M rej/loops on w

More Related