state - Converting Epsilon-NFA to NFA -
i'm having trouble understanding process of converting epsilon-nfa nfa, wondered if me it:
and answer says:
the 0 in new nfa has going 1,2 , 2. figured because 0 in epsilon nfa leads 1 , 2 (combined epsilon). why doesn't 1,2 have a-step going 2, because in epsilon nfa 1 has a-step 1 , 2?
whenever remove ε
nfa, should careful @ time of conversion direction of ε
transition.
in case, ε transition node 1 node 2, accept state. so, need consider incoming transitions state 1.
also, {1} moves {2} upon ε-transition, 1 can reduced {1,2} , it'll accept state. check this question know why happens.
so, removal of ε-transition, check incoming transitions state 1, replace {1} accept state {1,2} , convert them :-
- state 0 transits state 1 when reads
a
, , state 1 automatically transit state 2 readsε
.
so, should omit path 1 2(of ε-transition), , state 0 on reading transits both {1} , {2}. so, 1 transition added exisitng nfa
{0} -> {2} (on reading a) // should drawn, not given {0} -> {1} (on reading a) // given
- state 2 transits state 1 when reads
a
, , state 1 automatically transit state 2 readsε
.
so, should omit path 1 2(of ε-transition), , state 2 on reading transits both {1} , {2}, itself. so, 1 transition added exisitng nfa
{2} -> {2} (on reading a) // self-loop, should drawn, not given {2} -> {1} (on reading a) // given
please take special care replace state {1} accept state {1,2} because of reason explained above.
there no more incoming arrows directed state 1 , hence dependencies resolved. new nfa matches given nfa answer.
Comments
Post a Comment