Skip to content
Official PYQ · 1999

GATE CS 1999 Q2.4 — Regular and Context-free Languages

Explain with AI

If L1L1 is context free language and L2L2 is a regular language which of the following is/are false?

Select all correct options
View worked solution

Answer: A;C

To determine which of the statements are false, let us analyze each option using the closure properties of Context-Free Languages (CFLs) and Regular languages.

We are given:

  • L1L_1 is a Context-Free Language (CFL).
  • L2L_2 is a Regular Language.

Analysis of Options:

  • Option A: L1−L2L_1 - L_2 is not context free

    We can rewrite the set difference as: L1−L2=L1∩∼L2L_1 - L_2 = L_1 \cap \sim L_2 Since L2L_2 is regular, its complement ∼L2\sim L_2 is also regular (regular languages are closed under complementation).
    The intersection of a CFL (L1L_1) and a regular language (∼L2\sim L_2) is always a CFL. Therefore, L1−L2L_1 - L_2 is guaranteed to be a context-free language.
    Thus, the statement "L1−L2L_1 - L_2 is not context free" is FALSE.

  • Option B: L1∩L2L_1 \cap L_2 is context free

    The intersection of a CFL (L1L_1) and a regular language (L2L_2) is always a CFL.
    Thus, this statement is TRUE.

  • Option C: ∼L1\sim L_1 is context free

    Context-free languages are not closed under complementation. For a general CFL L1L_1, its complement ∼L1\sim L_1 may or may not be context-free.
    Thus, the statement "∼L1\sim L_1 is context free" is FALSE in general.

  • Option D: ∼L2\sim L_2 is regular

    Regular languages are closed under complementation. Since L2L_2 is regular, its complement ∼L2\sim L_2 is also regular.
    Thus, this statement is TRUE.


Since the question asks for the statements that are false, the correct options are A and C.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Regular and Context-free Languages questions