I need to understand the epsilon transition for NFA, for example I have an NFA with four states q0
, q1
, q2
and q3
the latter is an accepted state.
In particular the transition function is:
{q0, a}= {q1}
{q1, eps}= {q2}
{q2, b}= {q3}
I would implementing this behavior in java.
I have the string 'ab' and I have to see if it is accepted. I begin reading the character 'a' and arrival in the state q1
, the next character is 'b' but the state q1
don't have transition for 'b'.
I have to run the epsilon transition as I read the character 'a'? I do not know how to do this in my application, can you help me?
Thanks