Design a (deterministic or nondeterministic) finite automaton A such that L(A) consists of all strings over the alphabet {a, b} that begin with ab and do not end with aa.
I have this question that is puzzling me and I cannot come to a conclusion
the best regex I could come up is the following
$+ab(a+b)*(ab+bb+ba)
the empty string indicated with $ is accepted as it says all the words, then the compulsory ab concatenated with any word (a+b)* then also concatenated with all possible ending that are not aa. However this does not accept ab and or abb which should be accepted.
Maybe someone has better suggestions?
$\epsilon+ab(a+b)*(ab+bb+ba) + ab + abb$.