Question

For any two languages L1L_1 and L2L_2 such that L1L_1 is context-free and L2L_2 is recursively enumerable but not recursive, which of the following is/are necessarily true?

I. L1‾\overline{L_1} (complement of L1L_1) is recursive
II. L2‾\overline{L_2} (complement of L2L_2) is recursive
III. L1‾\overline{L_1} is context-free
IV. L1‾∪L2\overline{L_1} \cup L_2 is recursively enumerable

Choose one option
Official answer and solution
Official answer
D
From
Official GATE 2015 answer key

Solution

Use the closure properties and relationships among context-free, recursive, and recursively enumerable languages.

Given:

  • L1L_1 is a Context-Free Language (CFL).
  • L2L_2 is Recursively Enumerable (RE) but not Recursive (REC).

Evaluating each statement:

  1. Statement I (L1‾\overline{L_1} is recursive): Every context-free language is recursive (decidable). The class of recursive languages is closed under complementation. Thus, L1‾\overline{L_1} is always recursive. (Necessarily true)
  2. Statement II (L2‾\overline{L_2} is recursive): If L2‾\overline{L_2} were recursive, then its complement L2L_2 would also be recursive. But L2L_2 is given to be non-recursive. Thus, L2‾\overline{L_2} is not even RE, let alone recursive. (False)
  3. Statement III (L1‾\overline{L_1} is context-free): The class of context-free languages is not closed under complementation. For example, L={anbncn}cL = \{a^n b^n c^n\}^c is a CFL whose complement is not a CFL. (Not necessarily true)
  4. Statement IV (L1‾∪L2\overline{L_1} \cup L_2 is recursively enumerable): Since L1‾\overline{L_1} is recursive, it is also RE. The union of two recursively enumerable languages (L1‾\overline{L_1} and L2L_2) is always recursively enumerable because the class of RE languages is closed under union. (Necessarily true)

Therefore, Statements I and IV are necessarily true (option D).

Final answer

D

Common trap

Assuming context-free languages are closed under complement, which would incorrectly make III true.

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2015 Computer Science and Information Technology (CS) Session 1
Question
13 of 65, printed as CS Q.3
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.