How to build deterministic finite automaton for words where $b$ (if exists) is followed by at least 2 occurrences of $a$?

67 Views Asked by At

Given the alphabet $\sum=\{a,b\}$ in any word that belongs to the language the character $b$ (if it exists in the word) is followed by at least two occurrences of $a$. For example, the string $a$ and $baaa$ are in the language but $bab$ is not.

Build deterministic finite automaton (DFA) for the language.

I found that the correct answer for this question if the following DFA:

enter image description here

However, I drew the following DFA:

enter image description here

I wonder why my DFA is not good. I suspect that the $q5$ node is redundant however I don't understand why. $q1$ is an accepting node because an empty word also conforms to the rules of the language. But $q5$ signifies a non-empty word which conforms to the language.