1 / 105

Theory of computing, part 4

Theory of computing, part 4. Course outline. Turing machines. The language hierarchy. Context-Free Languages. Regular Languages. The language hierarchy. Languages accepted by Turing Machines. Context-Free Languages. Regular Languages. A Turing machine. Tape. Read-Write head.

slavigne
Télécharger la présentation

Theory of computing, part 4

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. Theory of computing, part 4

  2. Course outline

  3. Turing machines

  4. The language hierarchy Context-Free Languages Regular Languages

  5. The language hierarchy Languages accepted by Turing Machines Context-Free Languages Regular Languages

  6. A Turing machine Tape ...... ...... Read-Write head Control Unit

  7. The tape No boundaries -- infinite length ...... ...... Read-Write head The head moves Left or Right

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

  9. Example Time 0 ...... ...... Time 1 ...... ...... 1. Reads 2. Writes 3. Moves Left

  10. Example Time 1 ...... ...... Time 2 ...... ...... 1. Reads 2. Writes 3. Moves Left

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

  12. States and transitions Write Read Move Left Move Right

  13. Example Time 1 ...... ...... current state

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

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

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

  17. Determinism Turing Machines are deterministic Not Allowed Allowed

  18. Example: partial transition function ...... ...... Allowed: No transition for input symbol

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

  20. Example ...... ...... No possible transition HALT

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

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

  23. Turing machine example A Turing machine that accepts language a*

  24. Turing machine example Time 0

  25. Turing machine example Time 1

  26. Turing machine example Time 2

  27. Turing machine example Time 3

  28. Turing machine example Time 4 Halt & Accept

  29. Rejection example Time 0

  30. Rejection example Time 1 No possible Transition Halt & Reject

  31. Infinite loop example Another Turing machine for language a*and is this one correct???

  32. Infinite loop example Time 0

  33. Infinite loop example Time 1

  34. Infinite loop example Time 2

  35. Infinite loop example Time 2 Time 3 Time 4 Time 5 ... Infinite Loop

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

  37. Another Turing machine example Turing machine for the language

  38. Another Turing machine example Time 0

  39. Another Turing machine example Time 1

  40. Another Turing machine example Time 2

  41. Another Turing machine example Time 3

  42. Another Turing machine example Time 4

  43. Another Turing machine example Time 5

  44. Another Turing machine example Time 6

  45. Another Turing machine example Time 7

  46. Another Turing machine example Time 8

  47. Another Turing machine example Time 9

  48. Another Turing machine example Time 10

  49. Another Turing machine example Time 11

  50. Another Turing machine example Time 12

More Related