1 / 40

Computing Functions with Turing Machines

Computing Functions with Turing Machines. A function. has:. Domain:. Result Region:. A function may have many parameters:. Example:. Addition function. We prefer unary representation:. easier to manipulate. Integer Domain. Decimal:. 5. Binary:. 101. Unary:. 11111. Definition:.

janm
Télécharger la présentation

Computing Functions with 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. Computing FunctionswithTuring Machines

  2. A function has: Domain: Result Region:

  3. A function may have many parameters: Example: Addition function

  4. We prefer unary representation: easier to manipulate Integer Domain Decimal: 5 Binary: 101 Unary: 11111

  5. Definition: A function is computable if there is a Turing Machine such that: Initial configuration Final configuration initial state final state For all Domain

  6. In other words: A function is computable if there is a Turing Machine such that: Initial Configuration Final Configuration For all Domain

  7. Example is computable The function are integers Turing Machine: Input string: unary Output string: unary

  8. Start initial state Finish final state

  9. Turing machine for function

  10. Execution Example: Time 0 (2) (2) Final Result

  11. Time 0

  12. Time 1

  13. Time 2

  14. Time 3

  15. Time 4

  16. Time 5

  17. Time 6

  18. Time 7

  19. Time 8

  20. Time 9

  21. Time 10

  22. Time 11

  23. Time 12 HALT & accept

  24. Another Example is computable The function is integer Turing Machine: Input string: unary Output string: unary

  25. Start initial state Finish final state

  26. Turing Machine Pseudocode for • Replace every 1 with $ • Repeat: • Find rightmost $, replace it with 1 • Go to right end, insert 1 Until no more $ remain

  27. Turing Machine for

  28. Example Start Finish

  29. Another Example if The function if is computable

  30. Turing Machine for if if Input: or Output:

  31. Turing Machine Pseudocode: • Repeat Match a 1 from with a 1 from Until all of or is matched • If a 1 from is not matched • erase tape, write 1 • else • erase tape, write 0

  32. Combining Turing Machines

  33. Block Diagram Turing Machine input output

  34. Example: if if Adder Comparer Eraser

  35. Turing’s Thesis

  36. Question: Do Turing machines have the same power with a digital computer? Intuitive answer: Yes There is no formal answer!!!

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

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

  39. Definition of Algorithm: An algorithm for function is a Turing Machine which computes

  40. Algorithms are Turing Machines When we say: There exists an algorithm We mean: There exists a Turing Machine

More Related