A regular expression can be defined recursively as a Base Ca
A regular expression can be defined recursively as (a) Base Case: basic elements lambda and a sigma(i.e. symbols in the alphabet), (b) Recursive Step: the concatenation, union, or Kleene-star of regular expressions, (c) Closure: starting with basic elements, the application of the recursive step a finite number of times is also a regular expression. Give a regular expression for the set of strings over {a, b, c} in which the total number of b\'s and c\'s is three. Give a regular expression for the set of strings over {a, b} with an even number of as or an odd number of b\'s.
Solution
7.
We have total 3 b\'s and/or c\'s and number of a can any.
a*(b + c)a*(b+ c)a*(b + c)a*
8. Either a is even or b is odd not both.
(aa+ab+ba+bb)
