Which of the following statements is/are CORRECT?

2023

Which of the following statements is/are CORRECT?

  1. A.

    The intersection of two regular languages is regular.

  2. B.

    The intersection of two context-free languages is context-free.

  3. C.

    The intersection of two recursive languages is recursive.

  4. D.

    The intersection of two recursively enumerable languages is recursively enumerable.

Attempted by 80 students.

Show answer & explanation

Correct answer: A, C, D

Summary of which statements are correct and why:

  • The intersection of two regular languages is regular.

    Reason: Regular languages are closed under intersection. Construct the product deterministic finite automaton that simulates both DFAs in parallel; accept states are the pairs where both components are accepting.

  • The intersection of two context-free languages is context-free.

    Reason: This is not generally true. Counterexample: Let L1 = {a^n b^n c^m | n,m ≥ 0} and L2 = {a^m b^n c^n | m,n ≥ 0}. Each of L1 and L2 is context-free, but their intersection is {a^n b^n c^n | n ≥ 0}, which is not context-free.

  • The intersection of two recursive languages is recursive.

    Reason: Recursive (decidable) languages are closed under intersection. Given deciders for the two languages, run both deciders on the input (they always halt); accept exactly when both deciders accept, otherwise reject.

  • The intersection of two recursively enumerable languages is recursively enumerable.

    Reason: Recursively enumerable languages are closed under intersection. Given two Turing recognizers, simulate them on the input in a dovetailed fashion; if both recognizers eventually accept, then accept. If one does not accept, the combined procedure may not halt, which is consistent with being recursively enumerable.

Final answer: The correct statements are the ones asserting that the intersection of two regular languages is regular, that the intersection of two recursive languages is recursive, and that the intersection of two recursively enumerable languages is recursively enumerable. The statement claiming that the intersection of two context-free languages is context-free is false (see counterexample above).

Explore the full course: Gate Guidance By Sanchit Sir