Question
For any two languages and such that is context-free and is recursively enumerable but not recursive, which of the following is/are necessarily true?
I. (complement of ) is recursive
II. (complement of ) is recursive
III. is context-free
IV. is recursively enumerable
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:
- is a Context-Free Language (CFL).
- is Recursively Enumerable (RE) but not Recursive (REC).
Evaluating each statement:
- Statement I ( is recursive): Every context-free language is recursive (decidable). The class of recursive languages is closed under complementation. Thus, is always recursive. (Necessarily true)
- Statement II ( is recursive): If were recursive, then its complement would also be recursive. But is given to be non-recursive. Thus, is not even RE, let alone recursive. (False)
- Statement III ( is context-free): The class of context-free languages is not closed under complementation. For example, is a CFL whose complement is not a CFL. (Not necessarily true)
- Statement IV ( is recursively enumerable): Since is recursive, it is also RE. The union of two recursively enumerable languages ( and ) 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).
D
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.