Session 5: �Finite State systems – Non Deterministic Finite Automaton – NDFA
By
Dr. Ashok Kumar
Amity School of Engineering & Technology
Formal Definition of NFAs
Set of states, i.e.
Input alphabet, i.e.
Transition function
Initial state
Final states
Amity School of Engineering & Technology
3
Alphabet =
Nondeterministic Finite Accepter (NFA)
Amity School of Engineering & Technology
4
Two choices
Alphabet =
Nondeterministic Finite Accepter (NFA)
Amity School of Engineering & Technology
5
No transition
Two choices
No transition
Alphabet =
Nondeterministic Finite Accepter (NFA)
Amity School of Engineering & Technology
6
An NFA accepts a string:
when there is a computation of the NFA
that accepts the string
all the input is consumed and the automaton
is in a final state
AND
Amity School of Engineering & Technology
Example
7
aa is accepted by the NFA:
“accept”
“reject”
because this
computation
accepts
Amity School of Engineering & Technology
8
An NFA rejects a string:
when there is no computation of the NFA
that accepts the string:
automaton is in a non final state
OR
Amity School of Engineering & Technology
Example
9
is rejected by the NFA:
“reject”
“reject”
All possible computations lead to rejection
Amity School of Engineering & Technology
Amity School of Engineering & Technology
Amity School of Engineering & Technology
Amity School of Engineering & Technology
Amity School of Engineering & Technology
Language accepted:
Amity School of Engineering & Technology
Language accepted
(redundant
state)
Amity School of Engineering & Technology
Formal Definition
(final state)
Amity School of Engineering & Technology
Amity School of Engineering & Technology
Remarks:
input tape
Amity School of Engineering & Technology
NFA
DFA
express languages easier than DFAs
Amity School of Engineering & Technology
Amity School of Engineering & Technology
Amity School of Engineering & Technology
Amity School of Engineering & Technology
Amity School of Engineering & Technology
Amity School of Engineering & Technology
Amity School of Engineering & Technology