The exercise is copied literally, and asks to find an automaton that recognizes the language described by the regular expression $a{(bab\vee a)}^\ast b$.
I have no idea how to start.
Any help? Thanks!
The exercise is copied literally, and asks to find an automaton that recognizes the language described by the regular expression $a{(bab\vee a)}^\ast b$.
I have no idea how to start.
Any help? Thanks!
Copyright © 2021 JogjaFile Inc.
This automaton should recognize strings that starts with $a$ and ends in $b$ which is easy to draw. $$\rightarrow s_0\stackrel{a}\rightarrow s_1\stackrel{b}\rightarrow s_2$$ where $s_2$ is the final state.
The middle part $(bab\vee a)^*$ is a finite length string made of $bab$ and $a$. This should be implemented in the state $s_1$ with self-loop labeled $a$ and for $bab$, $$s_1\stackrel{b}\rightarrow s_3\stackrel{a}\rightarrow s_4\stackrel{b}\rightarrow s_1.$$
Edit:
Image by @manooooh