For any two languages L1 and L2 such that L1 is context-free and L2 is recursively enumerable but not recursive, which of the following is/are necessarily true? I. L̅1 (complement of L1) is recursive II. L̅2 (complement of L2) is recursive III. L̅1 is context-free IV. L̅1 ∪ L2 is recursively enumerable
For any two languages L1 and L2 such that L1 is context-free and L2 is recursively enumerable but not recursive, which of the following is/are necessarily true? I. L̅1 (complement of L1) is recursive II. L̅2 (complement of L2) is recursive III. L̅1 is context-free IV. L̅1 ∪ L2 is recursively enumerable Correct Answer I and IV only
Properties:
Context free language is not closed under complementation.
Recursively enumerable language is not closed under complementation.
Recursively enumerable language is closed under union.
Recursive languages are closed under complementation.
Explanation:
L1: Context-free
L2: recursively enumerable but not recursive
Statement I:
L̅1 (complement of L1) is recursive → TRUE
Since context free language (L1) is not closed under complementation. Therefore, L̅1 is not context free language.
Complement of context free grammar is context sensitive language and every context sensitive language is recursive language.
Statement II:
L̅2 (complement of L2) is recursive → FALSE
Since recursively enumerable language (L2) is not closed under complementation. Therefore, L̅2 is not recursively enumerable language. If a language is not recursively enumerable then it cannot be recursive for sure. Since recursive language is subset of recursively enumerable language.
Statement III:
L̅1 is context-free → FALSE
Since context free language (L1) is not closed under complementation. Therefore, L̅1 is not context free language.
Statement IV: → TRUE
Since context free language (L1) is not closed under complementation. Therefore, L̅1 is not context free language.
Complement of context free grammar is context sensitive language and every context sensitive language is recursively enumerable language.
Also, recursively enumerable language is closed under union. Therefore, L̅1 ∪ L2 is recursively enumerable.