Regular Expressions

What regular expression is represented by the finite state machines shown below? ( S 0 (S_0 is the starting state. ) )

http://rstb.royalsocietypublishing.org/content/367/1598/1933 http://rstb.royalsocietypublishing.org/content/367/1598/1933

(ab)* ab* a b a*b ab

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.

2 solutions

Karleigh Moore
Jun 21, 2016

The answer is (ab)*. The starting state is S0, since the starting state is also the accept state, and there is no transition from the start state back into itself, the machine must transition from S0 to S1, which generates an "a". To get back to the accept state, we must transition, which adds a "b" to the string, yielding "ab" and this string can be repeated however many times because an "ab" cycle will start at the start/accept state and end there too.

Sana Ullah
Sep 9, 2020

The RE for this FA will be (ab)*. Here S0 is the starting and final state so this FA will accept empty string and 'ab' at least. it cannot generate string of odd length it will always accept even length of string including '0' length. second this FA will not accept string with consecutive same alphabet. it will only accept the following strings. output = {^, ab, abab, ababab, .......}

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...