# Is this a valid DFA for (a|b)*abb?

I'm trying to come up with an alternate DFA for accepting (a|b)*abb than the one present in the dragon book. Here's the one I tried:

It seems valid to me but I'm not sure. Also, is there a way to check for validity of automatons so that I don't end up bugging you guys next time?

• Given two DFAs, you can check whether they accept the same language via the product automaton. There might even be libraries implementing this algorithm. – Yuval Filmus Apr 9 at 17:33
• Your DFA does not accept $a b b$, which is part of your language (shortest accepted strings are $a a b b$ and $b a b b$), – vonbrand Apr 13 at 1:51
• @YuvalFilmus, or build minimal automata for each, and compare. Look at e.g. JFLAP or Automata Tutor for some easy to use tools to fool around with automata (not just finite ones). – vonbrand Apr 13 at 1:54

Your DFA does not recognize $$(a|b)^*abb$$. For example it does not recognize $$abb$$.