If L1andL2 are context free languages and R a regular set. one of the languages below is not necessarily a context free language. Which one?
A
L1∪L2
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
L1L2
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
L1∩L2
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
D
L1∩R
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution
The correct option is CL1∩L2 (a) If L1andL2 are context free language then L1L2 is also context free language because context free languages are closed under concatenation.
(b) Since context free languages are not closed under intersection, L1∩L2 is not necessarily a context free language.
(c) If L1 is context free language and R is regular set then L1∩R is surely context free language because context free languages are closed under regular intersection.
(d) If L1andL2 are context free languages then L1∪L2 is surely context free language because context free languages are closed under union.