1 / 12

Tutorial 11 -- CSC3130 : Formal Languages and Automata Theory

Tutorial 11 -- CSC3130 : Formal Languages and Automata Theory. Tu Shikui ( sktu@cse.cuhk.edu.hk ) SHB 905, Office hour: Thursday 2:30pm-3:30pm 2008-11-16. Outline. Examples for Decidable Undecidable but Recognizable Unrecognizable.

Download Presentation

Tutorial 11 -- CSC3130 : Formal Languages and Automata Theory

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. Tutorial 11-- CSC3130 : Formal Languages and Automata Theory Tu Shikui (sktu@cse.cuhk.edu.hk) SHB 905, Office hour: Thursday 2:30pm-3:30pm 2008-11-16

  2. Outline • Examples for • Decidable • Undecidable but Recognizable • Unrecognizable

  3. The difference -- between Recognizable and decidable • If L is decidable, then L is recognized by a TM M that halts on all inputs. Note that, L might be recognized by other TM M’ that does not always halt. • If L is recognizable, then there might be such TM M that recognizes L but run forever, rather than rejecting, some inputs not in L. • Simply, Decidable ---- always halt Recognizable ---- halt or loop

  4. Example 1 -- Is it decidable? The shaded area: L(A) L(B) Proof: Decidable. Construct a TM M as follows:

  5. Example 2 -- Is it decidable? The answer: NOT decidable. The difficulty: How to prove a language to be not decidable? The target problem is embedded. < M > A decider of target problem Construct Mw accept reject w

  6. Example 2 -- Is it decidable?  NO. Proof: (reduce it to Halting problem.) 〈M〉 Accept, if L(M) finite D Suppose we have a TM D such that Reject, if L(M) NOT finite Then, we should consider: HALTTM = {(〈M〉, w): Mis a TM that halts on input w} 〈M〉 D Construct Mw 〈Mw〉 Accept, if M halts Reject, if M does not halt w

  7. halts on if and only if is infinite How to construct Mw ? Our Target … Construction On any input string: s Simulate M on w ; If M halts, accept s, else reject s, end

  8. 〈M〉 Accept, if L(M) finite D Reject, if L(M) NOT finite Example 2 -- Is it decidable?  NO. halts on if and only if HALTTM = {(〈M〉, w): Mis a TM that halts on input w} is infinite 〈M〉 D Construct Mw reject 〈Mw〉 Accept, if M halts accept Reject, if M does not halt w

  9. Example 3 -- Is it decidable? Proof: (reduce it to Halting problem.) 〈M〉 Accept, if … D Suppose we have a TM D such that Reject, if NOT … Then, we should consider: HALTTM = {(〈M〉, w): Mis a TM that halts on input w} 〈M〉 D Construct Mw 〈Mw〉 Accept, if M halts Reject, if M does not halt w

  10. How to construct Mw ? Our Target … Construction halts on On any input string: s Simulate M on w ; if and only if If M halts, accept if s=a or s=b else reject s, end Contains two equal length strings

  11. Example 4 -- Is it decidable? Proof: Suppose we have a TM D such that 〈M〉 Accept, if … D Reject, if NOT … ATM = {(〈M〉, w): Mis a TM that accepts w} 〈M〉 D Construct Mw 〈Mw〉 Accept, if M accept w Reject, if not w

  12. End of this tutorial!Thanks for coming!

More Related