I think it's better if you first eliminate epsilon transition to get NFA (without epsilon transition). From NFA it should be easier to get the equivalent DFA.
How to eliminate epsilon transition?
First, we have term ECLOSE
of a state. ECLOSE(q)
is defined as set of all states (including state q
itself) that can be reached by following epsilon transition.
In your case:
ECLOSE(1) = {1,2}
To eliminate epsilon transition, follow below steps:
- If
ECLOSE(1)
contains the final state, then set state 1
as final
state
- Add transition (with respective label) from
state 1
to state q
if and only if there is a transition from some states in ECLOSE(1)
to state q
- Now you can remove all epsilon transitions.
After above steps (you didn't specify which states are start and or final states), you should get:
a b c
1 {3} {} {}
2 {3} {} {}
3 {4} {3,4} {}
4 {4} {} {}