Professional Documents
Culture Documents
Lecture #4
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
Language accepted: L {aa}
q1 a q2
a
q0
a
q3
Lambda Transitions
q0 a q1 q2 a q3
a a
q0 a q1 q2 a q3
a a
q0 a q1 q2 a q3
(read head does not move)
a a
q0 a q1 q2 a q3
a a
q0 a q1 q2 a q3
all input is consumed
a a
“accept”
q0 a q1 q2 a q3
aa
String is accepted
Rejection Example
a a a
q0 a q1 q2 a q3
a a a
q0 a q1 q2 a q3
(read head doesn’t move)
a a a
q0 a q1 q2 a q3
a a a
q0 a q1 q2 a q3
No transition:
the automaton hangs
Input cannot be consumed
a a a
“reject”
q0 a q1 q2 a q3
aaa
String is rejected
Language accepted: L {aa}
q0 a q1 q2 a q3
Another NFA Example
q0 a q1 b q2 q3
How to accept a string
How to accept a string
a b
q0 a q1 b q2 q3
a b
q0 a q1 b q2 q3
a b
q0 a q1 b q2 q3
a b
“accept”
q0 a q1 b q2 q3
Another String
a b a b
q0 a q1 b q2 q3
a b a b
q0 a q1 b q2 q3
a b a b
q0 a q1 b q2 q3
a b a b
q0 a q1 b q2 q3
a b a b
q0 a q1 b q2 q3
a b a b
q0 a q1 b q2 q3
a b a b
q0 a q1 b q2 q3
a b a b
“accept”
q0 a q1 b q2 q3
Language accepted
q0 a q1 b q2 q3
Another NFA Example
0
q0 q1 0, 1 q2
1
Language accepted