134k views
3 votes
Write regular expressions for the following languages:a. The set of strings over alphabet {a, b, c} with at least one a and at least one b.b. The set of strings of 0’s and 1’s whose tenth symbol from the right end is 1.c. The set of strings of 0’s and 1’s with at most on pair of consecutive 1’s.

1 Answer

5 votes

Answer and Step-by-step explanation:

a. The strings {a, b, c} with at least one a and at least one b.

Solution: ∑ = {a, b, c}

where

(a +b +c)(a (a +b +c)*b + b (a +b +c) a (a +b +c)*

b. The set of 0’s and 1’s string whose tenth symbol from the right end is 1.

Sol: (0+1)*1(0+1)9

c. The set of 0’s and 1’s string with at most one pair of consecutive 1’s.

sol: (0+10)(11+∑)(0+10)

User Jozua
by
3.8k points