For the expression (ab)*ba
I came up with the following (very poorly drawn):
However, this was not the correct answer - apparently the solution requires five states. I don't understand why my DFA doesn't describe the expression. My interpretation of the expression is "ab
any number of times, followed by ba
". Is this correct?