Epsilon Non-Deterministic Finite Automaton (Ε-NFA)

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 8

Epsilon non-deterministic finite

automaton (ε-NFA)
ε-NFA
An epsilon nondeterministic finite automaton (NFA) has null or epsilon transitions from one
 

state to another. Epsilon NFA is also called a null NFA or an NFA lambda.

A regular expression for a language forms an epsilon NFA. This epsilon NFA then converts to a
 

simple NFA. We then use the simple NFA to make a deterministic finite automaton (DFA).
ε-NFA
We extend the class of NFAs by allowing instantaneous (ε) transitions:

1. The automaton may be allowed to change its state without reading the input symbol.

2. In diagrams, such transitions are depicted by labeling the appropriate arcs with ε.

3. Note that this does not mean that ε has become an input symbol. On the contrary, we assume that the
symbol ε does not belong to any alphabet.
Conversion of Epsilon-NFA to NFA
Null closure method
Suppose an NFA  <Q, Σ, q0​​, δ, F> and S⊆Q is a defined set of states. where
• Q is the finite set of states.
• Σ is the input symbols.
• q0​ is the start state.
• δ is the transition function.
• F is the final state.
The null closure of S will be the set Λ(S) and can be defined recursively as follows.
1. S⊆Λ(S)
2. For every q∈Λ(S), δ(q,Λ)⊆Λ(S)
Conversion of Epsilon-NFA to NFA

To convert an epsilon NFA to NFA, the null closure method makes use of the following general
set of rules.

1. Find the null closures for each state.

2. For each state, check for the transitions by the null closures obtained, the given input, and
then the null closures again. This eliminates any potential null closures that can occur.

3. Make an NFA by the transitions obtained in the previous step. The final state will be all
those states that have F in them.
Example
Consider the following epsilon NFA, q0​ is the start state.
Q={q0​,q1​,q2​,q3​}
Σ=(0,1)
F={q3​}
Step 1: Find null closure of all states
Find the null closure of all the states by the property defined before.
Null Closure
Example

Step 2: Follow the process of null closure, input, null closure

Implement the process for all states for the given inputs in order.

Transitions
Example

 
Step 3: Result
 
Make the NFA through the transitions obtained in the previous step.

Q={q0​,q1​,q2​,q3​}
Σ=(0,1)
F={q0​,q1​,q3​}
All states that have q3​ in their null closure are final states.

You might also like