If L₁ and L₂ are context free language and R a regular set, one of the…
1996
If L₁ and L₂ are context free language and R a regular set, one of the languages below is not necessarily a context free language. Which one?
- A.
L₁, L₂
- B.
L₁ ∩ L₂
- C.
L₁ ∩ R
- D.
L₁ ∪ L₂
Attempted by 16 students.
Show answer & explanation
Correct answer: B
Context-free languages are closed under union and intersection with regular sets. However, the intersection of two context-free languages is not necessarily context-free. Therefore, L₁ ∩ L₂ may result in a non-context-free language.
A video solution is available for this question — log in and enroll to watch it.