For any two languages \(L_1\) and \(L_2\) such that \(L_1\) is context-free…
2015
For any two languages \(L_1\) and \(L_2\) such that \(L_1\) is context-free and \(L_2\) is recursively enumerable but not recursive, which of the following is/are necessarily true?
I. \(\overline L_1\) (complement of \(L_1\)) is recursive
II. \(\overline L_2\) (complement of \(L_2\)) is recursive
III. \(\overline L_1\) is context-free
IV. \(\overline L_1 \cup L_2\) is recursively enumerable
- A.
I only
- B.
III only
- C.
III and IV only
- D.
I and IV only
Attempted by 61 students.
Show answer & explanation
Correct answer: D
Answer: I and IV are necessarily true.
I. Complement of L1 is recursive: True. Every context-free language is decidable (there are parsing algorithms to decide membership), so L1 is recursive. Recursive languages are closed under complement, so the complement of L1 is recursive.
II. Complement of L2 is recursive: False in general. L2 is given as recursively enumerable but not recursive, so its complement need not be recursively enumerable and cannot be recursive (if both a language and its complement were recursive enumerable, the language would be recursive). For example, the complement of the halting problem language is not recursive.
III. Complement of L1 is context-free: Not necessarily. Context-free languages are not closed under complement. For example, L1 = { a^n b^n : n ≥ 0 } is context-free but its complement is not context-free.
IV. overline(L1) ∪ L2 is recursively enumerable: True. From I, overline(L1) is recursive; every recursive language is also recursively enumerable. Since L2 is recursively enumerable, the union of two recursively enumerable languages is recursively enumerable, so this union is recursively enumerable.
Conclusion: The only statements that are necessarily true are I and IV.
A video solution is available for this question — log in and enroll to watch it.