While Learning about removing null moves from NFA , I came across a thought....
To Remove Epsilon moves we follow following steps :
- Find Closure of all states which have null moves
- Mark these states which have null moves
- Make a revised transition table without epsilon column and Find all possible transition for those marked states by using their Closures.
- you will get nfa without null moves/epsilon moves
Where is the issue : Actually, Doubt arises when you think of an nfa like this :
If we try to remove epsilon moves out of it...
Initial transition Table :
Now finding closure for q0, q1 and q3.
Which is CL(q0) = {q0,q1,q2}
CL(q1) = {q1,q2}
CL(q3) = {q2,q3}
We find a transition table after following above steps which is :
The question gets quite tricky...
because now this nfa has q1,q2 where there is no way to reach them..
So What do you think we will remove q1 and q2 as they are unreachable or we will draw a nfa with them...