Prove or disprove the following If L is regular then L must
Prove or disprove the following:
If L* is regular, then L must be regular.
For any language L, L* must be regular
If L1L2 is regular, then both L1 and L2 have to be regular.
The union of finite number of regular languages is always regular.
The union of infinite number of regular languages is always regular.
Solution
1. If L* is regular, then L must be regular.
This is not necessary true. Lets take an example . Let L be a language a2n which operate on symbol as { a }.
Then L* is {a}* which is regular.
L which is a2n is not regular. This can be proved using pumping lemma
L = {a,aa,aaaa etc}
Break the string into three parts xyz which length of xy is less than equal to n
So x contains all a\'s of length n and y contains all a\'s of length n but when we pump y number of a\'s increases and it violates our language. Hence L is not regular
2. For any language L, L* must be regular . This is also false.
Any language which is not regular, Its closure csnnot be a regular language.
Lets see Now. Take L as number of a\'s equal to number of b\'s.
By pumping lemma we can say that L* is not regular.
3. If L1L2 is regular, then both L1 and L2 have to be regular.
True, Regular language is closed under intersection. They needs to be regular to satisy the Intersection property.
L1 = r1 , L2 = r2 . Then L1.L2 = r1.r2 . Thius we can say that L1 and L2 have to be regular otherwise the Multiplication prorety wont hold.
4. The union of finite number of regular languages is always regular. --> True
Any finite language is regular, So we can say that Regular language that is union finite number of times is regular
5. The union of infinite number of regular languages is always regular.-->False
The union of infinite number of regular languages can be regular not not always. Think about Taking L as regular language and taking infinite unions of it and getting a language such that its not regular.
Thanks, I hope it clarifies. Let me know if there is any concern.
