1 / 68

Turing Machines

Turing Machines. A Turing Machine. Tape. . . Read-Write head. Control Unit. The Tape. No boundaries -- infinite length. . . Read-Write head. The head moves Left or Right. . . Read-Write head. The head at each time step: 1. Reads a symbol 2. Writes a symbol

vila
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. 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. Turing Machines

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

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

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

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

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

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

  8. Input string Blank symbol ...... ...... head Remark: the input string is never empty

  9. States & Transitions Write Read Move Left Move Right

  10. Example: Time 1 ...... ...... current state

  11. Time 1 ...... ...... Time 2 ...... ......

  12. Example: Time 1 ...... ...... Time 2 ...... ......

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

  14. Determinism Turing Machines are (for now) deterministic Not Allowed Allowed

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

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

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

  18. Final (accepting) States Allowed Not Allowed • Final states have no outgoing transitions • In a final state the machine halts

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

  20. Turing Machine Example A Turing machine that accepts the language:

  21. Time 0

  22. Time 1

  23. Time 2

  24. Time 3

  25. Time 4 Halt & Accept

  26. Rejection Example Time 0

  27. Time 1 No possible Transition Halt & Reject

  28. Infinite Loop Example A Turing machine for the language that includes all strings an with n>0 or strings that start with b.

  29. Time 0

  30. Time 1

  31. Time 2

  32. Time 2 Time 3 Infinite loop Time 4 Time 5

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

  34. Standard Turing Machine The machine we described is the standard: • Deterministic • Infinite tape in both directions • Tape is the input/output file

  35. Turing’s Thesis

  36. Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)

  37. Computer Science Law: A computation is mechanical if and only if it can be performed by a Turing Machine There is no known model of computation more powerful than Turing Machines

  38. Algorithms are Turing Machines When we say: There exists an algorithm We mean: There exists a Turing Machine that executes the algorithm

  39. Variationsof theTuring Machine

  40. The Standard Model Infinite Tape Read-Write Head (Left or Right) Control Unit Deterministic

  41. The variations form different Turing MachineClasses We want to prove: Each Class has the same power with the Standard Model

  42. Same Power of two classes means: Both classes of Turing machines accept the same languages

  43. Same Power of two classes means: For any machine of first class there is a machine of second class such that: And vice-versa

  44. Multitape Turing Machines Control unit Tape 1 Tape 2 Input

  45. Tape 1 Time 1 Tape 2 Time 2

  46. Multitape machines simulate Standard Machines: Use just one tape We can also prove that standard machines simulate Multitape machines.

  47. Same power doesn’t imply same speed: Language Acceptance Time Standard machine Two-tape machine

  48. Standard machine: Go back and forth times Two-tape machine: Copy to tape 2 ( steps) ( steps) Leave on tape 1 Compare tape 1 and tape 2 ( steps)

  49. NonDeterministic Turing Machines Non Deterministic Choice

  50. Time 0 Time 1 Choice 1 Choice 2

More Related