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