1 / 120

CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 12 Mälardalen University 2007

CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 12 Mälardalen University 2007. Content Chomsky Language Hierarchy Turing Machines Determinism Halting TM Examples Standard TM Computing Functions with TM Combining TMs Turing Thesis. The Language Hierarchy. ?. ?.

rianna
Download Presentation

CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 12 Mälardalen University 2007

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. CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 12 Mälardalen University 2007

  2. ContentChomsky Language Hierarchy Turing Machines DeterminismHaltingTM ExamplesStandard TMComputing Functions with TMCombining TMsTuring Thesis

  3. The Language Hierarchy ? ? Context-Free Languages Regular Languages

  4. Unrestrictedgrammarlanguages Context-free languages Regular Languages

  5. Languages accepted by Turing Machines Push-down Automata FA

  6. Turing Machines

  7. A Turing Machine Tape ...... ...... Read-Write head Control Unit

  8. The Tape No boundaries -- infinite length ...... ...... Read-Write head The head moves Left or Right

  9. ...... ...... Read-Write head The head at each time step: 1. Reads a symbol 2. Writes a symbol 3. Moves Left or Right

  10. Time 0 ...... ...... Time 1 ...... ...... Example 1. Reads a 2. Writes k 3. Moves left

  11. Time 1 ...... ...... Time 2 ...... ...... 1. Reads b 2. Writes f 3. Moves Right

  12. The Input String Input string Blank symbol ...... ...... head Head starts at the leftmost position of the input string

  13. States & Transitions Write Read Move Left Move Right

  14. Example Time 1 ...... ...... current state

  15. Time 1 ...... ...... Time 2 ...... ......

  16. Example Time 1 ...... ...... Time 2 ...... ......

  17. Example Time 1 ...... ...... Time 2 ...... ......

  18. Determinism Turing Machines are deterministic Not Allowed Allowed No lambda transitions allowed in TM!

  19. Partial Transition Function Example ...... ...... Allowed No transition for input symbol

  20. Halting The machine halts if there are no possible transitions to follow

  21. Example ...... ...... No possible transition HALT!

  22. Allowed Not Allowed Final States • Final states have no outgoing transitions • In a final state the machine halts

  23. Acceptance If machine halts in a final state Accept input If machine halts in a non-final state or If machine enters an infinite loop Reject input

  24. A TM that accepts the language Turing Machine Example

  25. Time 0

  26. Time 1

  27. Time 2

  28. Time 3

  29. Time 4 Halt & Accept

  30. Rejection Example Time 0

  31. Time 1 No possible Transition Halt & Reject

  32. Another TM for language Infinite Loop Example

  33. Time 0

  34. Time 1

  35. Time 2

  36. Time 2 Time 3 Time 4 Time 5 ... infinite loop…

  37. Because of the infinite loop: • The final state cannot be reached • The machine never halts • The input is not accepted

  38. Another Turing Machine Example Turing machine for the language

  39. Time 0

  40. Time 1

  41. Time 2

  42. Time 3

  43. Time 4

  44. Time 5

  45. Time 6

  46. Time 7

  47. Time 8

  48. Time 9

  49. Time 10

  50. Time 11

More Related