Null Transition
•An NFA with null transition is allowed to make
transition not only on input from the alphabet
but also with null input, i.e. without any input
symbol. This transition without input is called
null transition.
Null Transition
Null Transition
1
q
2
q
3q
a
a
a
0q
Language accepted: }{aaL
Lambda Transitions
1
q
3
qa
0
q
2
qa
aa
1
q
3
qa
0
q
2
qa
aa
1
q
3
qa
0
q
2
qa
aa
1
q
3
qa
0
q
2
qa
(read head does not move)
aa
1
q
3
qa
0
q
2
qa
aa
1
q
3
qa
0
q
2
qa
“accept”
String is accepted
aa
all input is consumed
aa
1
q
3
qa
0
q
2
qa
Rejection Example
a
aa
1
q
3
qa
0
q
2
qa
a
aa
1
q
3
qa
0
q
2
qa
(read head doesn’t move)
a
aa
1
q
3
qa
0
q
2
qa
a
No transition:
the automaton hangs
aa
1
q
3
qa
0
q
2
qa
“reject”
String is rejected
aaa
a
Input cannot be consumed
Language accepted: }{aaL
1
q
3
qa
0
q
2
qa
Another NFA Example
0q 1q
2qa b
3
q
How to accept a string
How to accept a string
ab
0q 1q
2qa b
3
q
0q 2qa b
3
q
ab
1
q
ab
0q 1q a b
3
q
2
q
ab
0q 1q a b
3
q
2
q
“accept”
0q
a b
ab
Another String
ab
1
q
2
q
3
q
0q
a b
abab
1
q
2
q
3
q
0q
a b
abab
1
q
2
q
3
q
0q
a b
abab
1
q
2
q
3
q
0q
a b
abab
1
q
2
q
3
q
0q
a b
abab
1
q
2
q
3
q
0q
a b
abab
1
q
2
q
3
q
abab
0q
a b
1
q
2
q
3
q
“accept”
ab
ababababababL ...,,,
Language accepted
0q 1q
2qa b
3
q
In finite Automata acceptability was decided on the basis of reach
ability of the final state by initial state.
This restriction are removed and new model is given in which
output can be chosen from some other alphabet.
The value of the output function Z(t) is a function of present state
q(t) and the present input x(t)
Z(t) = λ(q(t), x(t)) Mealy Machine
The value of the output function Z(t) is a function of present state
q(t) only and is independent of the current input
Z(t) = λ(q(t)) Moore Machine
Mealy and Moore Model
Moore Machine is six-tuple (Q,∑,∆,δ,λ,q
0
):
(i)Q is a finite set of states
(ii)∑ is the input alphabet
(iii)∆ is the output alphabet
(iv)δ is the transition function from ∑ X Q into Q
(v)λ is the output function mapping Q into ∆ and
(vi) q
0 is the initial state
Moore Machine
Mealy Machine is six-tuple (Q,∑,∆,δ,λ,q
0
):
(i)Q is a finite set of states
(ii)∑ is the input alphabet
(iii)∆ is the output alphabet
(iv)δ is the transition function from ∑ X Q into Q
(v)λ is the output function mapping ∑ X Q into ∆ and
(vi) q
0 is the initial state
Mealy Machine
Example of Moore Machine
Example of Mealy Machine
Transforming Mealy to Moore Machine
Solution
Transforming Moore to Mealy Machine
Solution
Solution
Answer Justification
•Here there is no output associated with q1 so,
It will be ^.
•q2 is associated with 2 outputs z1 and z2 so 2
states will be considered q21,q22.
•q3 is associated with 2 outputs z1 and z2 so 2
states will be considered q31,q32