0

I need the DFA and the regular expression for this language. My dfa

I think the DFA is this but the Regular expression I get is this ((aUb)a)* and I think it's not correct.

Joseph Marikle
  • 76,418
  • 17
  • 112
  • 129
Matioski
  • 117
  • 1
  • 2
  • 11
  • It should be `((a|b)a)*a?` – Bergi Jun 06 '17 at 20:33
  • Thank you but I think it's Not, because your regex is not going to accept b, using the DFA to regex conversion now and I think I got it: ((aa|ba)*a)|((aa|ba)*b)|(aa|ba)* – Matioski Jun 06 '17 at 20:43

1 Answers1

1

Using the DFA to regex conversion now and I think I got it:

((aa|ba)*a)|((aa|ba)*b)|(aa|ba)*

Simplified as @Bergi said:

(aa|ba)*|(a|b|ε)

Matioski
  • 117
  • 1
  • 2
  • 11