Download presentation
Presentation is loading. Please wait.
Published byPolly Watkins Modified over 9 years ago
1
Prof. Busch - LSU1 Turing Machines
2
Prof. Busch - LSU2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
3
Prof. Busch - LSU3 Regular Languages Context-Free Languages Languages accepted by Turing Machines
4
Prof. Busch - LSU4 A Turing Machine...... Tape Read-Write head Control Unit
5
Prof. Busch - LSU5 The Tape...... Read-Write head No boundaries -- infinite length The head moves Left or Right
6
Prof. Busch - LSU6...... Read-Write head The head at each transition (time step): 1. Reads a symbol 2. Writes a symbol 3. Moves Left or Right
7
Prof. Busch - LSU7...... Example: Time 0...... Time 1 1. Reads 2. Writes 3. Moves Left
8
Prof. Busch - LSU8...... Time 1...... Time 2 1. Reads 2. Writes 3. Moves Right
9
Prof. Busch - LSU9 The Input String...... Blank symbol head Head starts at the leftmost position of the input string Input string
10
Prof. Busch - LSU10 States & Transitions Read Write Move Left Move Right
11
Prof. Busch - LSU11 Example:...... Time 1 current state
12
Prof. Busch - LSU12...... Time 1...... Time 2
13
Prof. Busch - LSU13...... Time 1...... Time 2 Example:
14
Prof. Busch - LSU14...... Time 1...... Time 2 Example:
15
Prof. Busch - LSU15 Determinism Allowed Not Allowed No lambda transitions allowed Turing Machines are deterministic
16
Prof. Busch - LSU16 Partial Transition Function...... Example: No transition for input symbol Allowed:
17
Prof. Busch - LSU17 Halting The machine halts in a state if there is no transition to follow
18
Prof. Busch - LSU18 Halting Example 1:...... No transition from HALT!!!
19
Prof. Busch - LSU19 Halting Example 2:...... No possible transition from and symbol HALT!!!
20
Prof. Busch - LSU20 Accepting States Allowed Not Allowed Accepting states have no outgoing transitions The machine halts and accepts
21
Prof. Busch - LSU21 Acceptance Accept Input If machine halts in an accept state Reject Input If machine halts in a non-accept state or If machine enters an infinite loop string
22
Prof. Busch - LSU22 Observation: In order to accept an input string, it is not necessary to scan all the symbols in the string
23
Prof. Busch - LSU23 Turing Machine Example Accepts the language: Input alphabet
24
Prof. Busch - LSU24 Time 0
25
Prof. Busch - LSU25 Time 1
26
Prof. Busch - LSU26 Time 2
27
Prof. Busch - LSU27 Time 3
28
Prof. Busch - LSU28 Time 4 Halt & Accept
29
Prof. Busch - LSU29 Rejection Example Time 0
30
Prof. Busch - LSU30 Time 1 No possible Transition Halt & Reject
31
Prof. Busch - LSU31 Accepts the language: but for input alphabet A simpler machine for same language
32
Prof. Busch - LSU32 Time 0 Halt & Accept Not necessary to scan input
33
Prof. Busch - LSU33 Infinite Loop Example A Turing machine for language
34
Prof. Busch - LSU34 Time 0
35
Prof. Busch - LSU35 Time 1
36
Prof. Busch - LSU36 Time 2
37
Prof. Busch - LSU37 Time 2 Time 3 Time 4 Time 5 Infinite loop
38
Prof. Busch - LSU38 Because of the infinite loop: The accepting state cannot be reached The machine never halts The input string is rejected
39
Prof. Busch - LSU39 Another Turing Machine Example Turing machine for the language
40
Prof. Busch - LSU40 Match a’s with b’s: Repeat: replace leftmost a with x find leftmost b and replace it with y Until there are no more a’s or b’s If there is a remaining a or b reject Basic Idea:
41
Prof. Busch - LSU41 Time 0
42
Prof. Busch - LSU42 Time 1
43
Prof. Busch - LSU43 Time 2
44
Prof. Busch - LSU44 Time 3
45
Prof. Busch - LSU45 Time 4
46
Prof. Busch - LSU46 Time 5
47
Prof. Busch - LSU47 Time 6
48
Prof. Busch - LSU48 Time 7
49
Prof. Busch - LSU49 Time 8
50
Prof. Busch - LSU50 Time 9
51
Prof. Busch - LSU51 Time 10
52
Prof. Busch - LSU52 Time 11
53
Prof. Busch - LSU53 Time 12
54
Prof. Busch - LSU54 Halt & Accept Time 13
55
Prof. Busch - LSU55 If we modify the machine for the language we can easily construct a machine for the language Observation:
56
Prof. Busch - LSU56 Formal Definitions for Turing Machines
57
Prof. Busch - LSU57 Transition Function
58
Prof. Busch - LSU58 Transition Function
59
Prof. Busch - LSU59 Turing Machine: States Input alphabet Tape alphabet Transition function Initial state blank Accept states
60
Prof. Busch - LSU60 Configuration Instantaneous description:
61
Prof. Busch - LSU61 Time 4Time 5 A Move: (yields in one mode)
62
Prof. Busch - LSU62 Time 4Time 5 Time 6Time 7 A computation
63
Prof. Busch - LSU63 Equivalent notation:
64
Prof. Busch - LSU64 Initial configuration: Input string
65
Prof. Busch - LSU65 The Accepted Language For any Turing Machine Initial stateAccept state
66
Prof. Busch - LSU66 If a language is accepted by a Turing machine then we say that is: Turing Acceptable Recursively Enumerable Turing Recognizable Other names used:
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.