Download presentation
Presentation is loading. Please wait.
Published byAlexander White Modified over 8 years ago
1
1 Computing Functions with Turing Machines
2
2 A function Domain Result Region has:
3
3 Integer Domain: Unary: Binary: Decimal: 11111 101 5 We prefer Unary representation: Easier to manipulate
4
4 A function may have many parameters: Example: Addition function are integers
5
5 Definition: A function is computable if there is a Turing Machine such that: Initial Configuration Final configuration Domain final state
6
6 Initial Configuration Final Configuration Domain A function is computable if there is a Turing Machine such that: In other words:
7
7 Example The function is computable Turing Machine: Input string: unary Output string:unary are integers
8
8 Start Finish final state
9
9 Turing machine for function
10
10 Execution Example: Time 0 Final Result (2)
11
11 Time 0Time 1
12
12 Time 2Time 3
13
13 Time 4Time 5
14
14 Time 6Time 7
15
15 Time 8Time 9
16
16 Time 10Time 11
17
17 Time 12 HALT & accept
18
18 Another Example The function is computable Turing Machine: Input string: unary Output string:unary is integer
19
19 Start Finish final state
20
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
21 Turing Machine for
22
22 Example Start Finish
23
23 Another Example The function is computable if
24
24 Turing Machine for if Input: Output: or
25
25 Turing Machine Pseudocode: Match a 1 from with a 1 from 1. Repeat Until all or has been matched 2. If a 1 from is not matched erase tape, write 1 else erase tape, write 0
26
26 Combining Turing Machines
27
27 Block Diagram Turing Machine inputoutput
28
28 Example: if Comparer Adder Eraser
29
29 Turing ’ s Thesis
30
30 Do Turing machines have the same power with a digital computer?
31
31 Do Turing machines have the same power with a digital computer? Intuitive answer: Yes There is no formal answer
32
32 Turing ’ s thesis: Any computation carried out by mechanical means can be performed by Turing Machine (1930)
33
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
34 Definition of Algorithm: An algorithm for function is a Turing Machine which computes
35
35 When we say: There exists an algorithm Algorithms are Turing Machines We mean: There exists a Turing Machine
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.