Question 3. Write down a regular expression that denotes the following language.
L = {a^m b^n : m + n is even}
Solution:
The above problem gives rise to two possible cases.
m+n must be even. To achieve this, we must see that both m and n must be even or both must be odd. Only then m+n can be even.
The two cases are as follows:
n is even and m is even:
The regular expression for this is as follows.
(aa)*(bb)*
m is odd and n is odd:
a(aa)*b(bb)*
Combining the above two cases, the regular expression is as follows.
(aa)*(bb)* + a(aa)*b(bb)*.
Question 3. Write down a regular expression that denotes the following language. L = {a^m b^n...
Question 3. Write down a regular expression that denotes the following language. L = {a mb n : m + n is even} Question 4. Let L1 be the language denoted by ab∗ a ∗ and let L2 be the language denoted by a ∗ b ∗ a Write a regular expression that denotes the language L1 ∩ L2.
Write a legal regular expression for the following regular language. L = { w | w ∊ (0 + 1)* and w contains an even number of 1’s AND an even number of 0’s}.
(4) [20 pts] Let L be the language defined by a regular expression (O | 1)0+(01 1)). over t alphabet f(o,1, +) (a) (4pt) Write down 5 different words from L (b) (8pt) Describe L using words. (c) (8pt) Draw an automaton accepting L (ideally, deterministic). (4) [20 pts] Let L be the language defined by a regular expression (O | 1)0+(01 1)). over t alphabet f(o,1, +) (a) (4pt) Write down 5 different words from L (b) (8pt) Describe...
Prove that the following language is regular or explain why it is nonregular: L = {amb" (m is odd and n is even) OR (m is even and n is odd))
Let L 1be the language denoted by ab ∗ a ∗ and let L 2 be the language denoted by a ∗ b ∗ a Write a regular expression that denotes the language L 1 ∩ L 2 .
Find a regular expression for the following language over the alphabet Σ = {a,b}. L = {strings that begin and end with a and contain bb}.
7. 15 Points For a regular expression r, we use L(r) to denote the language it represents. For each of the following regular expressions r, find an NFA that accepts L(r). (b). L((a +b+A) b(a bb)) し(((aa 7. 15 Points For a regular expression r, we use L(r) to denote the language it represents. For each of the following regular expressions r, find an NFA that accepts L(r). (b). L((a +b+A) b(a bb)) し(((aa
Which of the following is a method for showing that a language L is not regular? a) Constructing a finite state automaton recognizing L b) Showing that the opponent can always win the regular expression game for L. c) Showing that the relation L has infinitely many equivalence classes. d) Constructing a push-down automaton recognizing L
Let L be the language {0n 1m : n ≤ m ≤ 2n}. Is L regular? contextfree but not regular? or not context-free? Show that your answer is correct.
Consider the language L below. (a) Is L a regular language? – Yes, or No. (b) If L is a regular language, design the DFA (using a State Table) to accept the language L, with the minimum number of states. Assume , (c) Suppose the input is “101100”. Is this input string in the language L? Σ = {0,1} L={w l w has both an even number of O's and an odd number of 1's}