100% found this document useful (1 vote)
3K views

ε-NFA to NFA Conversion

This document discusses the conversion of an ε-NFA (non-deterministic finite automaton with epsilon transitions) to an equivalent NFA. It explains the concept of the epsilon closure of a state, which is the set of states reachable from that state using only epsilon transitions. The document provides an example of converting an ε-NFA to an NFA by first constructing the transition table and then determining the epsilon closure of each state to build the converted NFA transition diagram.

Uploaded by

Khushbul Alam
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
3K views

ε-NFA to NFA Conversion

This document discusses the conversion of an ε-NFA (non-deterministic finite automaton with epsilon transitions) to an equivalent NFA. It explains the concept of the epsilon closure of a state, which is the set of states reachable from that state using only epsilon transitions. The document provides an example of converting an ε-NFA to an NFA by first constructing the transition table and then determining the epsilon closure of each state to build the converted NFA transition diagram.

Uploaded by

Khushbul Alam
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

ε-NFA to NFA Conversion

Afsana Afrin
Lecturer
Dept of Computer Science and Engineering
Bangladesh Army University of Science & Technology

15-Jul-20 ε -NFA to DFA Conversion 1


ε-NFA

Non-deterministic finite automata(NFA) is a finite automata where


for some cases when a specific input is given to the current state,
the machine goes to multiple states or more than 1 states. It can
contain ε move. If any FA contains ε transaction or move, the finite
automata is called NFA with ∈ move.

15-Jul-20 ε -NFA to DFA Conversion 2


Epsilon Closure

ε-closure: ε-closure for a given state A means a set of


states which can be reached from the state A with only
ε(null) move including the state A itself.

15-Jul-20 ε -NFA to DFA Conversion 3


Example

Convert the NFA with ε into its equivalent NFA.

15-Jul-20 ε -NFA to DFA Conversion 4


Example

Solution: For the given transition diagram we will first


construct the transition table.

0 1 ε
→q0 ∅ ∅ {q1,q2}
q1 {q3} ∅ ∅
q2 ∅ {q3} ∅
q3 ∅ {q4} ∅
*q4 ∅ ∅ ∅

15-Jul-20 ε -NFA to DFA Conversion 5


Solution

Let us obtain ε-closure of each state.

ε-closure {q0} = {q0, q1, q2}


ε-closure {q1} = {q1}
ε-closure {q2} = {q2}
ε-closure {q3} = {q3}
ε-closure {q4} = {q4}

15-Jul-20 ε -NFA to DFA Conversion 6


Solution

ε-closure 0 ε-closure
q0

q0 q1 q3 q3

q2

15-Jul-20 ε -NFA to DFA Conversion 7


Solution

ε-closure 1 ε-closure
q0

q0 q1

q2 q3 q3

15-Jul-20 ε -NFA to DFA Conversion 8


Solution

ε-closure 0 ε-closure
q1 q1 q3 q3

ε-closure 1 ε-closure
q1 q1 ∅

15-Jul-20 ε -NFA to DFA Conversion 9


Solution

ε-closure 0 ε-closure
q2 q2 ∅

ε-closure 1 ε-closure
q2 q2 q3 q3

15-Jul-20 ε -NFA to DFA Conversion 10


Solution

ε-closure 0 ε-closure
q3 q3 ∅

ε-closure 1 ε-closure
q3 q3 q4 q4

15-Jul-20 ε -NFA to DFA Conversion 11


Solution

ε-closure 0 ε-closure
q4 q4 ∅

ε-closure 1 ε-closure
q4 q4 ∅

15-Jul-20 ε -NFA to DFA Conversion 12


Solution

0 1
→q0 {q3} {q3}
q1 {q3} ∅
q2 ∅ {q3}
q3 ∅ {q4}
*q4 ∅ ∅

Figure: Transition Table

15-Jul-20 ε -NFA to DFA Conversion 13


Thank You

15-Jul-20 ε -NFA to DFA Conversion 14

You might also like