0% found this document useful (0 votes)
404 views9 pages

Nfa

Non-deterministic finite automata (NFA) allow multiple possible transitions from a given state based on an input symbol, unlike deterministic finite automata (DFA) which allow only a single transition. An NFA is defined similarly to a DFA using a 5-tuple, but allows epsilon transitions and multiple next states. NFAs can be converted to equivalent DFAs, though the DFA may have more states. NFAs are easier to construct than DFAs for a given language.

Uploaded by

Ibrahim Ansari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
404 views9 pages

Nfa

Non-deterministic finite automata (NFA) allow multiple possible transitions from a given state based on an input symbol, unlike deterministic finite automata (DFA) which allow only a single transition. An NFA is defined similarly to a DFA using a 5-tuple, but allows epsilon transitions and multiple next states. NFAs can be converted to equivalent DFAs, though the DFA may have more states. NFAs are easier to construct than DFAs for a given language.

Uploaded by

Ibrahim Ansari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

NFA

Non-deterministic Finite Automata

• The finite Automata are called non deterministic finite


automata if there exist many paths for specific input from
current state to next state
• It is easy to construct a NFA for a given language
• Every NFA is not DFA, but every NFA can be translate into
DFA
• NFA is defined in the same way as DFA, but with two
exceptions:
1. Multiple next states
2. It contains ε transitions

3
2
Definition of NFA
• NFA has 5-tuples same as DFA but with different
transition
M = (Q,Σ,δ,qo,F)
Q: finite set called the states
Σ: finite set called the alphabets
δ: transition specifying from which state on which input
symbol where the transition goes (QxΣ)→
qo: initial state
F: set of final states

3
Graphical representation of NFA
• The state is represented by vertices
• The arc labelled with an i/p character show the
transition
• The initial state is marked with an arrow
• The final state is denoted by double circle

3
4
Example of NFA
Q. Let NFA be Q={qo,q1,q2} q= {qo} Σ={0,1} F={q2}
construct a transition table

3
5
Example of NFA
Q. Design NFA for the given transition table
State 0 1
qo q0,q1 q0, q2
q1 q3 ε
q2 q2 ,q3 q3
q3 * q3 q3

3
6
Example of NFA
Q. Design NFA with Σ={0,1} accepts the strings in which
second last bit is 1

3
7
Example of NFA
Q. Design DFA with Σ={0,1} accepts the strings in which
second last bit is 1

3
8
Example of NFA

3
9

You might also like