turing machines l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Turing Machines PowerPoint Presentation
Download Presentation
Turing Machines

Loading in 2 Seconds...

  share
play fullscreen
1 / 69
yen

Turing Machines - PowerPoint PPT Presentation

138 Views
Download Presentation
Turing Machines
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. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Turing Machines

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

  3. Languages accepted by Turing Machines Context-Free Languages Regular Languages

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

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

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

  7. Example: Time 0 ...... ...... Time 1 ...... ...... 1. Reads 2. Writes 3. Moves Left

  8. Time 1 ...... ...... Time 2 ...... ...... 1. Reads 2. Writes 3. Moves Right

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

  10. States & Transitions Write Read Move Left Move Right

  11. Example: Time 1 ...... ...... current state

  12. Time 1 ...... ...... Time 2 ...... ......

  13. Example: Time 1 ...... ...... Time 2 ...... ......

  14. Example: Time 1 ...... ...... Time 2 ...... ......

  15. Determinism Turing Machines are deterministic Not Allowed Allowed No epsilon transitions allowed

  16. Partial Transition Function Example: ...... ...... Allowed: No transition for input symbol

  17. Halting The machine haltsif there are no possible transitions to follow

  18. Example: ...... ...... No possible transition HALT!!!

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

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

  21. Turing Machine Example A Turing machine that accepts language a*

  22. Time 0

  23. Time 1

  24. Time 2

  25. Time 3

  26. Time 4 Halt & Accept

  27. Rejection Example Time 0

  28. Time 1 No possible Transition Halt & Reject

  29. Infinite Loop Example Another Turing machine for language a*and is this one correct???

  30. Time 0

  31. Time 1

  32. Time 2

  33. Time 2 Time 3 Time 4 Time 5 ... Infinite Loop

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

  35. Another Turing Machine Example Turing machine for the language

  36. Time 0

  37. Time 1

  38. Time 2

  39. Time 3

  40. Time 4

  41. Time 5

  42. Time 6

  43. Time 7

  44. Time 8

  45. Time 9

  46. Time 10

  47. Time 11

  48. Time 12

  49. Time 13 Halt & Accept

  50. Observation: If we modify the machine for the language we can easily construct a machine for the language