A regular expression can be defined recursively as (a) Base Case: basic elements
ID: 3796271 • Letter: A
Question
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.Explanation / Answer
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)
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.