Design DFA for $ (a + b(ba)^*)^*b$

359 Views Asked by At

I'm having some trouble to design a DFA that accepts the language defined by this regular expression

$(a + b(ba)^*)^*b$

Can I say that $(a + b(ba)^*)^*$ is the same as $(a + b)^*$ ? Given this assumption, here is my DFA ("all strings over $\{a, b, \epsilon\}$ ending in $b$"):

enter image description here

Thanks in advance!

1

There are 1 best solutions below

1
On BEST ANSWER

Your statement that $(a + b(ba)^*)^*$ is the same as $(a + b)^*$ is correct. Your DFA is correct, but is not minimal: you could identify states $q_1$ and $q_2$.