Question

In: Computer Science

Give examples of languages L1 and L2 over {a, b} that satisfy the descriptions below: (a)...

Give examples of languages L1 and L2 over {a, b} that satisfy the descriptions below:

(a) L1 is regular, L2 is nonregular, and L1 U L2 is regular;

(b) L1 is regular, L2 is nonregular, and L1 U L2 is nonregular;

(c) L1 is regular, L2 is nonregular, and L1 n L2 is regular;

(d) L1 is nonregular, L2 is nonregular, and L1 U L2 is regular.

(e) L1 is nonregular, L2 is nonregular, and L1 n L2 is regular.

Solutions

Expert Solution

(a) L1 = a* , L2 = a^n such that n is prefect square. L1 U L2 is a* which is regular

(b) L1 = aa , L2 = a^n such that n is prefect square. L1 U L2 is L2 which is non regular

(c) L1 and L2 same as above.  L1 intersection L2 is L1 which is regular.

(d) L1 = (a^n)(b^m ) where n>=m, L2= (a^n)(b^m ) where n<=m both are not regular L1UL2 is a*b* which is regular.

(e) L1 = a^n such that n is not divisible ny 3, L2 = a^n such that n is divisible ny 3, So L1 intersection L2 is null set which is regular.


Related Solutions

Consider the two languages below: L1 = {w | w є {0,1,2}* and is of the...
Consider the two languages below: L1 = {w | w є {0,1,2}* and is of the form 0i1j2k where i, j and k ≥ 0 and i = j or j = k} L2 = {w | w є {0,1,2}* and is of the form 0i1j2k where i, j and k ≥ 0} One of the languages in the above problem is regular. Which one? Prove it. Prove that the OTHER one is not regular. Is the non-regular one context...
Consider the two languages below: L1 = {w | w є {0,1,2}* and is of the...
Consider the two languages below: L1 = {w | w є {0,1,2}* and is of the form 0i1j2k where i, j and k ≥ 0 and i = j or j = k} L2 = {w | w є {0,1,2}* and is of the form 0i1j2k where i, j and k ≥ 0} One of the languages in the above problem is regular. Which one? Prove it. Prove that the OTHER one is not regular. Is the non-regular one context...
(a) Find the cosine of the angle between the lines L1 and L2 whose vector equations are given below:
(a) Find the cosine of the angle between the lines L1 and L2 whose vector equations are given below: L1 : ~r1(t) = [1, 1, 1] + t[1, 2, 3] L2 : ~r2(t) = [1, 1, 1] + t[−1, 4, 2]. (b) Find the equation of the plane that contains both L1 and L2.
Are the following languages over {a, b} regular? If they are then prove it. If they...
Are the following languages over {a, b} regular? If they are then prove it. If they are not prove it with the Pumping Lemma a) {ap | p is a prime number} b) {xax | x Î{a,b}*} (start by listing some strings in, not in, the language
3. Are the following languages A and B over the alphabet Σ = {a, b, c,...
3. Are the following languages A and B over the alphabet Σ = {a, b, c, d} regular or nonregular? • For a language that is regular, give a regular expression that defines it. • For a nonregular language, using the pumping lemma prove that it is not regular. (a) A = {d 2j+1c k+1 | j ≥ k ≥ 0} · {c r+2b 2s+3 | r ≥ 0 and s ≥ 0} (b) B = {a 2j+2b k+3c j+1...
Please give brief descriptions and examples withdiagrams onenvelope in signaltxcovccio
Please give brief descriptions and examples with diagrams onenvelope in signaltxcovccio
Please give brief descriptions and examples with diagrams on SHDN LNA VSWR
Please give brief descriptions and examples with diagrams on SHDN LNA VSWR
4. Construct regular expressions for the following languages over the alphabet {a, b}: a. Strings that...
4. Construct regular expressions for the following languages over the alphabet {a, b}: a. Strings that do not begin with an “a”. b. Strings that contain both aa and bb as substrings. 5. Let ? = {? ?? ?? ? | ? > ? + ?}. a. List all strings of length 7. (use power notation: i.e. aabbbbaaaaaaaa is a2b 4a 8 ) b. Use the Pumping Lemma for Regular Languages to prove that L is not regular.
Please give brief descriptions and examples with diagrams on RSSI POWER BANDS SENSITIVITY
Please give brief descriptions and examples with diagrams on RSSI POWER BANDS SENSITIVITY
The first five questions give languages over {0,1}. In each case decide whether the language is...
The first five questions give languages over {0,1}. In each case decide whether the language is regular or not, and prove your answer is correct The set of all strings x beginning with a non-null string of the form ww.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT