DFA for at most two $b$'s and at least one $a$ I'm totally new to DFA's and automata in general&nbsp;&ndash; this is the first week or two of class that I've actually seen this&nbsp;&ndash; and I'm curious as to a pattern to match the following:

"Match the set of all strings on the alphabet $\{a, b\}$ that have at most two $b$'s and 1 or more $a$'s."
Close your eyes. Tell yourself: I am an automaton. 

What is my task? Check whether the number of $a$'s is at most $1$ and the number of $b$'s is at least $2$. So I will count $a$'s and $b$'s. My memory holds two numbers, the respective counts. I start with two zero's. When I see $a$ I add one to the first number, when I read $b$ I add one to the second number.

Ah. When the number of $a$'s reaches $2$ I can stop counting them: my test be be always false. When the number of $b$'s equals $2$ I can stop counting them, I have seen enough of them.

Now open your eyes and write down your state diagram: all possible states (=  memory contents) and actions upon reading a letter to another state. Mark the "good" states.

Done.