2

I understand that possible strings for this language is basically any combo of a's and b's, n times, with a's being even and at least 2 b's.

For the even a's I'm thinking of a DFA with 2 states and the initial state being accepting, that loops back to initial state when a is even. However when I mix this with the DFA that takes in 2 b's there is always a case where my DFA does not work, and accepts strings like "abb".

Any input on this?

  • Informally, a state in a DFA is a "memory note". So there are two things you could have for the number of $a$s: even or odd. To count the $b$s there are three relevant possibilities: $0$; $1$; at least $2$. You will (probably) need to consider all possible combinations of these: so one state would be "even number of $a$s and at least $2$ $b$s". Write down all (how many?) states and work out how to get from one to another. Good luck! – David Oct 03 '23 at 01:52

0 Answers0