Regular Expression to Deterministic Finite Automata

359 Views Asked by At

How would you convert this RE to a DFA?

(a+aab)*b

I'm having trouble drawing the state diagram for this one. I'm not sure where to start, especially with the arbitrary number of a's involved.

1

There are 1 best solutions below

0
On

it does not respect exactly the proper format for DFA but you can use the following (very bad) drawing as a starting point.

In order to respect the standard format, you can move each letter to the curves/lines pointing to the rectangle containing it and replace the letters in the rectangles by the state numbers q1, q2, q3, etc. (this should be straightforwards)

enter image description here Good luck!