Skip to main content

GATE CSE 2026Theory of Computation › Language Classification, Closure Properties & ProofsVerified

GATE CSE 2026 PYQ: Let L 1 L_{1} L 1 ​ and L 2 L_{2} L 2 ​ be two languages over a finite alphabet, such that L 1 ∩ L 2 L_{1}…

Let L1L_{1} and L2L_{2} be two languages over a finite alphabet, such that L1∩L2L_{1} \cap L_{2} and L2L_{2} are regular languages.

Which of the following statements is/are always true?

  1. A
    L1L_{1} is regular
  2. B
    L1∪L2L_{1} \cup L_{2} is regular
  3. C
    L2‾\overline{L_{2}} is context-free
    Correct answer
  4. D
    L1L_{1} is context-free

Answer

(C) L 2 ‾ \overline{L_{2}} L 2 ​ ​ is context-free

Approach

Use closure properties and counterexamples. Since $L_2$ is regular, its complement is regular and therefore context-free. For the other options, take $L_2 = \emptyset$, which is regular, and choose $L_1$ to be a non-regular/non-context-free language; then $L_1 \cap L_2 = \emptyset$ is regular, so the hypotheses hold, but $L_1$, $L_1 \cup L_2$, and $L_1$ being context-free can fail.

Only statement C follows necessarily from $L_2$ being regular. The remaining statements fail for suitable non-regular/non-context-free $L_1$ when $L_2$ is chosen as the empty set.

Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.