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

(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
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.
Compare and contrast public and private types of health insurance? Give examples and descriptions of health...
Compare and contrast public and private types of health insurance? Give examples and descriptions of health insurance practiced in at least 2 countries of your choice.
The first five questions give languages over {0, 1}. In each case decide whether the language...
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. 5. The set of strings in which the number of 0's is a perfect square.
Form fits function. Give three good examples (a, b, c as specified below) of how the...
Form fits function. Give three good examples (a, b, c as specified below) of how the form or structure of a component fits its function in the cell. Clearly state the name and function of your chosen component and explain how form and function are related. a) Must be a small molecule or coenzyme: b) Must be a protein: c) Must be a multi-subunit macromolecular complex or organelle:
Give context free grammars for the languages below. To avoid mistakes, I recommend using scratch paper...
Give context free grammars for the languages below. To avoid mistakes, I recommend using scratch paper to check that your grammars produce the right set of string. This question is structured so that nonterminals (and associated rules) from an earlier subquestion might be useful in a grammar for a later sub-question. That’s why, rather than “S” as the start symbol, we will used different start symbols for each part. If you do use a nonterminal from an earlier sub-question, say...
Give context free grammars for the languages below. To avoid mistakes, I recommend using scratch paper...
Give context free grammars for the languages below. To avoid mistakes, I recommend using scratch paper to check that your grammars produce the right set of string. This question is structured so that nonterminals (and associated rules) from an earlier subquestion might be useful in a grammar for a later sub-question. That’s why, rather than “S” as the start symbol, we will used different start symbols for each part. If you do use a nonterminal from an earlier sub-question, say...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT