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?

  1. A.

    L₁, L₂

  2. B.

    L₁ ∩ L₂

  3. C.

    L₁ ∩ R

  4. 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.

Explore the full course: Gate Guidance By Sanchit Sir