Latest

6/recent/ticker-posts

Find all strings in L((a + b) b (a + ab)*) of length less than four-solution of peter Linz



Find all strings in L((a + b) b (a + ab)*) of length less than four.

Solution:

All the possible combinations are shown below. The highlighted letters are chosen in each of the combinations.

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

=ab

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

=bb

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

=abb

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

=aba

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

=abab

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

=bba

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

=bbab

((a + bb (+ ab)*)

=abba

So, all the strings of length less than four will be:

ab, bb, abb, aba, abab, bba, bbab, abba


Post a Comment

0 Comments