Question
For each of the following regular expressions, give two strings that are members and two strings that are not members of the language generated by
For each of the following regular expressions, give two strings that are members and two strings that are not members of the language generated by the expression. (a) ab (b) a(ba)b (c) a b (d) aba bab (e) (episilon a)b
Give regular expressions generating the following languages, with = {0, 1} (a) {w | w begins with 00 or 11} (b) {w | w contains at least three 0s} (c) {w | w contains the substring 0011 (i.e. w = x0011y for some x, y )} (d) {w | w has length at most 3 and its second symbol is a 1} (e) {w | w starts with 0 and has odd length, or starts with a 1 and has even length} (f) {w | every 0 in w must be followed by at least one 1} (g) {w | every odd position of w is 0} (h) {w | w contains an even number of 0s, or contains exactly two 1s} (i) \ {} (All strings except the empty string) (j) {w | w is any string except 11}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started