disprove that the given lan 4. [20 Points For each of the following languages, prove or guage is regular (a) L1www e {a...
For each of the languages listed below, give a regular expression that generates the lan- guage. Briefly justify your answer. (a) The set of strings over (a, b such that any a in the string is followed by an odd number of b's. Examples: bbbab E L, but abb f L. (b) The set of strings over fa, b in which there is an a in every even position and the total number of b's is odd, where the first...
Which of the following languages are regular. Prove (by providing a regular expression) or disprove. a. L1 = {ai bj ck dl | (i + j)mod 2 = (k + l)mod 2 , i, j, k, l ≥ 0} b. L2 = {ai bj ck dl | (i + j) = (k + l), i, j, k, l ≥ 0}
Give context-free grammars that generate the following languages (E = {a,b}). (a) (1 point) L1 = {w | W contains at least two b's} (b) (1 point) L2 = {w/w = wf, w is a palindrome} (c) (1 point) L3 = {w w contains less a's than b's}. (d) (1 point) LA = {w w = ayn+1, n > 2} (e) (1 points) Ls = {w w = a";2(m+n)cm, m, n >0}; (S = {a,b,c}).
1. (Non-regular languages) Prove that the following languages are not regular. You may use the pumping lemma and the closure of the class of regular languages under union, intersection, complement, and reverse (b) L2 = { w | w ∈ {0, 1}* is not a palindrome }. A palindrome is a string that reads the same forward and backward
Regular expressions, DFA, NFA, grammars, languages Regular Languages 4 4 1. Write English descriptions for the languages generated by the following regular expressions: (a) (01... 9|A|B|C|D|E|F)+(2X) (b) (ab)*(a|ble) 2. Write regular expressions for each of the following. (a) All strings of lowercase letters that begin and end in a. (b) All strings of digits that contain no leading zeros. (c) All strings of digits that represent even numbers. (d) Strings over the alphabet {a,b,c} with an even number of a's....
Problem 3 [20 points Prove that the class of regular languages is closed under reverse. That is, show that if A is a regular language, then AR -[wR | w e A is also regular. [Hint: given a DFA M = (Q,Σ, δ, q0,F) that recognizes A, construct a new NFA (Q', Σ,8,6, F') that recognizes AR.]
5. Prove that the following languages are not regular: (a) L = {a"bak-k < n+1). (b) L-(angla": kメn + 1). (c) L = {anglak : n = l or l k} . (d) L = {anb : n2 1} L = {w : na (w)关nb (w)). "(f) L = {ww : w E {a, b)'). (g) L = {w"www" : w E {a,b}*}
5. (20 pt.) Prove that the class of regular languages is closed under reverse. That is, show that if A is a regular language, then AR = {wR W E A} is also regular. Hint: given a DFA M = (Q,2,8,90, F) that recognizes A, construct a new NFA N = (Q', 2,8', qo',F') that recognizes AR and justify why your construction is correct.
Prove that each of the following languages is not regular A) L= {a^n b^m c^k : k = 2n + 3m and n, m, k ≥ 0} B) L = {a^n : n is a power of 5}
just need to answer (e , f , g ) 5. Prove that the following languages are not regular (a) L = {a"bak : k-n +1). (b) L = {a"bak : k n +1). (c) L = {an blak : n = l or l k} Chapter 4 Propertics of Regular Lauge Chapter 4 Properties of Regular Languages (d) L = {anl/ : n > 1). (e) L= {w: na(w)メnb (w)). (f) L = {ww : w E {a,b)').