Design automata for these languages

64 Views Asked by At

I'm taking a Automata Theory and Formal Languages class, as homework I have to do this:

  • a) Design a Finite Deterministic Automaton (FDA) that recognizes language $\{w\in \{a,b\}^* \, |\, w \mbox{ has as substrings $ab$ and $ba$.}\}$.
  • b) Design a Finite Deterministic Automaton (FDA) that recognizes language $\{w\in \{a,b\}^* \, |\, w \text{ has as substrings $ab$ or $bba$.}\}$.

I have already done it, but I just would like to verify if the Automata are well designed.

Automaton for a enter image description here

Automaton for b enter image description here

Thank you! PD: I don't know how to put the images here, sorry