Provide regular expressions for the following languages The
Provide regular expressions for the following languages: The set of strings over the alphabet {a, b, c} containing at least one a and least one b. The set of strings over {0, 1} whose tenth symbol from the right end is 1. The set of strings over {0, 1} not containing 101 as a substring.
Solution
(a)-The set of strings over alphabet {a,b,c} containing at least one a and at least one b.
(A + B + C)(A(A + B + C)B + B(A + B + C)A)(A + B + C)
(b)-The set of strings of 0’s and 1’s whose tenth symbol from the right end is 1.
(0+ 1)1(0 + 1)9
(c)The set of strings of 0’s and 1’s with at most one pair of consecutive 1’s.
(0 + 10)(11 + )(0 + 10)
