(10) L is a language. The reverse of L is defined as follows: LR = {wR|w ∈ L}. Prove or disprove the follwing claims:
(a) (L1 SL2)R = LR 1 SLR 2 .
(b) (LR)∗ = (L∗)R.
(a) (L1 SL2)R = LR 1 SLR 2 .
Incorrect
Counter Example:
L1 = {a}
L2 = {b}
Below two are not same
(b) Correct
(LR)∗ = (L∗)R
Lets say L = {a, b}*
x is a string in L
(LR)∗ = (xR)* = 0 or more occurrences of xR
(L∗)R = (x*)R = 0 or more occurrences of x and reversed
Since regular languages are closed under kleene closure, both of the above are equivalent.
(10) L is a language. The reverse of L is defined as follows: LR = {wR|w...
The “tail” of a language is defined as the set of all suffixes of its strings. That is, tail(L) = {y : xy ∈ L for some x ∈ Σ∗} (i). If L = {w ∈ {a, b}∗ : w contains exactly three b’s}, give a brief description of tail(L). (ii). Show that if L is any regular language, then tail(L) is also a regular language. As with Question 3, you can assume Σ = {a, b} if you like....
Prove that the following language is not regular: L = { w | w ∈ {a,b,c,d,e}* and w = wr}. So L is a palindrome made up of the letters a, b, c, d, and e.
1. Construct a DFSM to accept the language: L = {w € {a,b}*: w contains at least 3 a's and no more than 3 b's} 2. Let acgt} and let L be the language of strings consisting of repeated copies of the pairs at, ta, cg, gc. Construct both a DFSM to accept the language and a regular expression that represents the language 3. Let a,b. For a string w E ', let W denote the string w with the...
2. If L is a regular language, prove that the language 11 = { uv/ u E 1 , |v|-2) is also regular. (Hint: Can you build an NFA of L1 using an NFA of a language L? Use N, the NFA of the language L)
Give a context-free grammar for the following language: L1 = {ww^R c^n : w ∈ {a, b}*, n >= 0}, i.e each string consists of a string w containing a’s and b’s, followed by the reverse of w, followed by 0 or more c’s.
Question 1: Every language is regular T/F Question 2: There exists a DFA that has only one final state T/F Question 3: Let M be a DFA, and define flip(M) as the DFA which is identical to M except you flip that final state. Then for every M, the language L(M)^c (complement) = L( flip (M)). T/F Question 4: Let G be a right linear grammar, and reverse(G)=reverse of G, i.e. if G has a rule A -> w B...
[10 marks] We know from our discussion that the language Onlnln-0} is not regular. Is the language L {0"w1nIn 〉 0, w E {0, 1)'} regular! Be sure to prove your answer
[10 marks] We know from our discussion that the language Onlnln-0} is not regular. Is the language L {0"w1nIn 〉 0, w E {0, 1)'} regular! Be sure to prove your answer
prove that the given language is Not Context Free L2 = { w ∈ {0,1,2}∗ | w follows 0^(i)1^(j)2^(k) pattern, where i < j and i < k and i, j, k >= 0 }
DO NUMBER 4 AND 5
2. Let {acgt} and let L be the language of strings consisting of repeated copies of the pairs at, ta, cg, gc. Construct both a DFSM to accept the language and a regular expression that represents the language 3. Let a,b. For a string w E X", let W denote the string w with the a's and b's flipped. For example, for w aabbab: w bbaaba wR babbaa abaabb {wwR Construct a PDA to accept...
DO NUMBER 3
2. Let {acgt} and let L be the language of strings consisting of repeated copies of the pairs at, ta, cg, gc. Construct both a DFSM to accept the language and a regular expression that represents the language 3. Let a,b. For a string w E X", let W denote the string w with the a's and b's flipped. For example, for w aabbab: w bbaaba wR babbaa abaabb {wwR Construct a PDA to accept the language:...