1 / 35

Computing Functions with Turing Machines

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

Download Presentation

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. Integer Domain: Unary: 11111 101 Binary: Decimal: 5 We prefer Unary representation: Easier to manipulate

  4. A function may have many parameters: Example: Addition function are integers

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

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

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

  8. Start Finish final state

  9. Turing machine for function

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

  11. Time 0 Time 1

  12. Time 2 Time 3

  13. Time 4 Time 5

  14. Time 6 Time 7

  15. Time 8 Time 9

  16. Time 10 Time 11

  17. Time 12 HALT & accept

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

  19. Start Finish final state

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

  21. Turing Machine for

  22. Example Start Finish

  23. Another Example if The function if is computable

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

  25. Turing Machine Pseudocode: 1. Repeat Match a 1 from with a 1 from Until all or has been matched 2. If a 1 from is not matched erase tape, write 1 else erase tape, write 0

  26. Combining Turing Machines

  27. Block Diagram Turing Machine input output

  28. Example: if if Adder Comparer Eraser

  29. Turing’s Thesis

  30. Do Turing machines have the same power with a digital computer?

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

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

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

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

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

More Related