796 views
0 0 votes

Let L be the language over {a, b} that contains the same number of occurrences of a
and b. Which of the following languages is regular?
(a) L ∩ a∗b∗
(b) (L ∩ a∗b∗) ∪ a∗b∗

(c) L ∪ a∗b∗
(d) (L ∩ a∗b∗) ∪ b∗a

My personal doubts :( Sorry, this somewhat will reveeal the answer but I am a little confused )

Could someone please explain  ( c ) and ( d ) ?
I have posted their official answer below as well.

 

One more thing, RL are closed under union, intersection.

L 1= a*b*  is regular and and L is regular.

However L1 union/intersection L is not regular … Could someone please explain this question in some detail ?

1 Answer

0 0 votes

This is the official answer ;

A\
       

Answer: (b) (L ∩ a∗b∗) ∪ a∗b∗
(a) L ∩ a∗b∗ = {anbn | n ≥ 0} is not a regular language.
(b) (L ∩ a∗b∗) ∪ a∗b∗ = {ambn | m, n ≥ 0} is a regular language.
(c) If L3 = L ∪ a∗b∗ were regular, then L3 ∩ b∗a∗ would also be regular. But L3 ∩ b∗a∗
is {bnan | n ≥ 0}, which is not regular.
(d) If L4 = (L ∩ a∗b∗) ∪ b∗a∗ were regular, then L4 ∩ a∗b∗ would also be regular. But
L4 ∩ a∗b∗ is {anbn | n ≥ 0}, which is not regular.

\

Position:
Show:

Related questions

0 0 votes
1 1 answer
655
655 views
ChayAdhiraj asked May 20, 2022
655 views
2. Imagine you are playing a computer game that consists of different types of coins.You have the power to cast two magic spells s1 and s2. Each spell consumes somenumber...
1 1 vote
0 0 answers
441
441 views
Gaurangi Katiyar asked Dec 8, 2018
441 views
How to calculate how many memory references will Instruction Decode phase take in an Instruction Cycle?
0 0 votes
2 2 answers
762
762 views
rsansiya111 asked Dec 9, 2021
762 views
One day, Dumbledore assigns Harry Potter the task of obtaining the Philosopher’s Stone that lies in an inner chamber surrounded by many rooms. To guide him along, he is g...
1 1 vote
1 1 answer
1.2k
1.2k views
rsansiya111 asked Dec 7, 2021
1,193 views
If the milkman doesn’t deliver milk or the geyser doesn’t work, then Akash will be late for school and lunch will be cooked late. Suppose lunch was actually cooked on tim...