Prove or disprove the following statements a If L1 and L2 ar

Prove or disprove the following statements.

(a) If L1 and L2 are non-regular languages, then L1 L2 is also non-regular.

(b) If L1 is a regular language and L2 is a non-regular language, then L1L2 is regular

Solution

a. If L1 and L2 are nonregular languages, then L1 L2 is also not regular.

False.

Let L1 = {an bm, n m} and L2 = {an bm, n m}. L1 L2 = a*b*, which is regular.

To prove it, we offer a counter example. Let L1 = {an bm : n=m} and let L2 = {annbm : n m}. We have shown that both L1 and L2 are not regular. However, L1 L2 = a*b*, which is regular. There are plenty of other examples as well. Let L1 = {an : n 1 and n is prime}. Let L2 = {an : n 1 and n is not prime}. Neither L1 nor L2 is regular. But L1 L2 = a+ , which is clearly regular.

b.

If L1 regular and L2 are nonregular languages, then L1 L2 is also not regular. False. Let L1 = {anbm, n m} and L2 = {anbm, n m}. L1 L2 = a*b*, which is regular.

Prove or disprove the following statements. (a) If L1 and L2 are non-regular languages, then L1 L2 is also non-regular. (b) If L1 is a regular language and L2 i

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site