RE
(a|b)*a(a|b|ε)
RE → \rightarrow → NFA
We can draw NFA easily as, Here diamond-shape means final state
State transition table for NFA,
state | Input a | Input b |
---|---|---|
A | *{A,B,C} | {A} |
B | *{C} | *{C} |
*C | {} | {} |
NFA → \rightarrow → DFA
We can convert this table into table for DFA as,
state | Input a | Input b |
---|---|---|
A | *[ABC] | [A] |
*[ABC] | *[ABC] | *[AC] |
*[AC] | *[ABC] | A |
We can draw DFA as,
Here no state is redundant.
So states in minimal DFA = 3