I'm trying to construct a finite-state automaton from the following regular expression:
$$ (a|ba)(a|ba)^*(b|ab)^* $$
I know that from $$ (a|ba) $$
the automaton should look something like this:
automaton http://cdn.imghack.se/images/5ab1437745d2a53d4630619819074d6c.jpg
from $$ (a|ba)^* $$
it should look like this I guess:
automaton2 http://cdn.imghack.se/images/e1dc6ac63c6d967086d1f40aebf62c51.jpg
and from $$ (b|ab)^* $$
is pretty much the same as the last one, the thing is I don't know how to unite them in one automaton.
I would appreciate any help in this matter
PS: I'm sorry for the images I'm still learning how to work with the automata editor jflap...