What regular expression is represented by the finite state machines shown below? is the starting state.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
The answer is a ∗ b ∗ .
The starting state is S 0 but both S 0 and S 1 are accepting states. Since we start in S 0 , we can either stop right away, resulting in an empty string, or transition back to S 0 with "a" (we can do this however many times, thus, we have a ∗ ), or we can transition to S 1 with a "b" and once in S 1 we can transition back into S 1 with another "b" however many times, yielding b*. All put together, the regular expression for this diagram is a ∗ b ∗ .