Download presentation
Presentation is loading. Please wait.
1
Deterministic Turing Machines
2
Unique accept state. Also no arrows are coming out.
Constituents Infinite tape Head Transition diagram … … q1 q0 qf Unique accept state. Also no arrows are coming out.
3
Formal definition A Deterministic Turing Machine (DTM) is a sextuple (Q, Σ, Γ, δ, q0, qf) where: Q is a finite set of states Σ is the input alphabet Γ is the tape alphabet, There is a special blank symbol □ in Γ q0 is the start state qf is the final state δ: Q x Γ → Q x Γ x {L,R,S}, where L stands for Left, R stands for Right and S stands for Stay.
4
Formal definition (cont.)
δ(q , a) = (q’ , b, L) means: “if you are in state q and the head in the tape points to symbol a then move to state q’, replace symbol a with symbol b in the tape and move the head one position to the left” Illustration: … … … … a b head head q‘ q‘ a→b,L … a→b,L … … q … q
5
Determinism Determinism means that I have no choices!
The transition function δ sends pair (q, a) to at most one triple (q’, ?, ?) (in other words there is at most one arrow from state q reading symbol a –maybe there are no such arrows). No ε-moves are allowed (I must read something in the tape in order to change state).
6
Special status Start: Be at initial state , the tape contains only the input and the head points to the first (leftmost symbol of the input) Accept: Reach the accept state. The machine stops the computation and accept (notice that part of the input might not be read). Reject: Be in a state q, read symbol a and find no outgoing arrow under symbol a. Loop for ever: There are some cases that a machine enters a subset of states from which it can’t exit (different than the “reject case”)
7
Example Find a DTM that computes the language L = {an bn , n ≥ 0}.
High level program: Repeat Erase an a. Pass along the rest of as. Erase a b Pass along the rest of bs. Go to the beginning of the input. Until or the input is erased (accept) or you find an unmatched a or b (reject).
8
Example Find a DTM that computes the language L = {an bn , n ≥ 0}.
Answer: a → a , R x → x , R x → x , R b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
9
Example Test the machine for several possible inputs to see if it works as it should. Test inputs: ε (it should accept) aaabbb (it should accept) aaabb (it should reject) aabbb (it should reject) aabba (it should reject)
10
Test input: ε … … a → a , R x → x , R x → x , R b → b , R a → x , R
b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
11
Test input: ε … … a → a , R x → x , R x → x , R b → b , R a → x , R
b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
12
Test input: aaabbb … … a a a b b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
13
Test input: aaabbb … … x a a b b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
14
Test input: aaabbb … … x a a b b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
15
Test input: aaabbb … … x a a b b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
16
Test input: aaabbb … … x a a x b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
17
Test input: aaabbb … … x a a x b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
18
Test input: aaabbb … … x a a x b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
19
Test input: aaabbb … … x a a x b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
20
Test input: aaabbb … … x a a x b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
21
Test input: aaabbb … … x a a x b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
22
Test input: aaabbb … … x a a x b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
23
Test input: aaabbb … … x a a x b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
24
Test input: aaabbb … … x a a x b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
25
Test input: aaabbb … … x a a x b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
26
Test input: aaabbb … … x a a x b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
27
Test input: aaabbb … … x a a x b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
28
Test input: aaabbb … … x x a x b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
29
Test input: aaabbb … … x x a x b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
30
Test input: aaabbb … … x x a x b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
31
Test input: aaabbb … … x x a x x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
32
Test input: aaabbb … … x x a x x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
33
Test input: aaabbb … … x x a x x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
34
Test input: aaabbb … … x x a x x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
35
Test input: aaabbb … … x x a x x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
36
Test input: aaabbb … … x x a x x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
37
Test input: aaabbb … … x x a x x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
38
Test input: aaabbb … … x x a x x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
39
Test input: aaabbb … … x x a x x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
40
Test input: aaabbb … … x x a x x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
41
Test input: aaabbb … … x x a x x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
42
Test input: aaabbb … … x x a x x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
43
Test input: aaabbb … … x x x x x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
44
Test input: aaabbb … … x x x x x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
45
Test input: aaabbb … … x x x x x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
46
Test input: aaabbb … … x x x x x x a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
47
Test input: aaabbb … … x x x x x x a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
48
Test input: aaabbb … … x x x x x x a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
49
Test input: aaabbb … … x x x x x x a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
50
Test input: aaabbb … … x x x x x x a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
51
Test input: aaabbb … … x x x x x x a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
52
Test input: aaabbb … … x x x x x x a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
53
Test input: aaabbb … … x x x x x x a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
54
Test input: aaabbb … … x x x x x x a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
55
Test input: aaabbb … … x x x x x x a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
56
Test input: aaabbb … … x x x x x x a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
57
Test input: aaabbb … … x x x x x x a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
58
Test input: aaabbb … … x x x x x x a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
59
Test input: aaabbb … … x x x x x x a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
60
Test input: aaabbb … … x x x x x x a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
61
Test input: aaabbb … … x x x x x x a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
62
Test input: aaabb … … a a a b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
63
Test input: aaabb … … x a a b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
64
Test input: aaabb … … x a a b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
65
Test input: aaabb … … x a a b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
66
Test input: aaabb … … x a a x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
67
Test input: aaabb … … x a a x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
68
Test input: aaabb … … x a a x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
69
Test input: aaabb … … x a a x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
70
Test input: aaabb … … x a a x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
71
Test input: aaabb … … x a a x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
72
Test input: aaabb … … x a a x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
73
Test input: aaabb … … x a a x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
74
Test input: aaabb … … x a a x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
75
Test input: aaabb … … x a a x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
76
Test input: aaabb … … x x a x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
77
Test input: aaabb … … x x a x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
78
Test input: aaabb … … x x a x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
79
Test input: aaabb … … x x a x x a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
80
Test input: aaabb … … x x a x x a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
81
Test input: aaabb … … x x a x x a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
82
Test input: aaabb … … x x a x x a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
83
Test input: aaabb … … x x a x x a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
84
Test input: aaabb … … x x a x x a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
85
Test input: aaabb … … x x a x x a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
86
Test input: aaabb … … x x a x x a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
87
Test input: aaabb … … x x a x x a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
88
Test input: aaabb … … x x a x x a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
89
Test input: aaabb … … x x x x x a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
90
Test input: aaabb … … x x x x x a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
91
Test input: aaabb … … x x x x x a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
92
Test input: aaabb … … No arrow under □ so REJECT! x x x x x a → a , R
x → x , R x → x , R b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
93
Test input: aabbb … … a a b b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
94
Test input: aabbb … … x a b b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
95
Test input: aabbb … … x a b b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
96
Test input: aabbb … … x a x b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
97
Test input: aabbb … … x a x b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
98
Test input: aabbb … … x a x b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
99
Test input: aabbb … … x a x b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
100
Test input: aabbb … … x a x b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
101
Test input: aabbb … … x a x b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
102
Test input: aabbb … … x a x b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
103
Test input: aabbb … … x a x b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
104
Test input: aabbb … … x a x b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
105
Test input: aabbb … … x a x b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
106
Test input: aabbb … … x a x b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
107
Test input: aabbb … … x x x b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
108
Test input: aabbb … … x x x b b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
109
Test input: aabbb … … x x x x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
110
Test input: aabbb … … x x x x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
111
Test input: aabbb … … x x x x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
112
Test input: aabbb … … x x x x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
113
Test input: aabbb … … x x x x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
114
Test input: aabbb … … x x x x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
115
Test input: aabbb … … x x x x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
116
Test input: aabbb … … x x x x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
117
Test input: aabbb … … x x x x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
118
Test input: aabbb … … x x x x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
119
Test input: aabbb … … x x x x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
120
Test input: aabbb … … x x x x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
121
Test input: aabbb … … x x x x b a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
122
Test input: aabbb … … No arrow under b so REJECT! x x x x b a → a , R
x → x , R x → x , R b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
123
Test input: aabba … … a a b b a a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
124
Test input: aabba … … x a b b a a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
125
Test input: aabba … … x a b b a a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
126
Test input: aabba … … x a x b a a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
127
Test input: aabba … … x a x b a a → a , R x → x , R x → x , R
b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
128
Test input: aabba … … No arrow under a so REJECT! x a x b a a → a , R
x → x , R x → x , R b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.