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 + b) b (a + ab)*)
=abba
So, all the strings of length less than four will be:
ab, bb, abb, aba, abab, bba, bbab, abba
0 Comments