Computer Sciences > Gate 2015 Set-1 > CFG
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. L1' (complement of L1) is recursive
II. L2' (complement of L2) is recursive
III. L1' is context-free
IV. L1' ∪ L2 is recursively enumerable
A
I only
B
III only
C
III and IV only
D
I and IV only

Correct : CFG

L1 is context-free and L2 is recursively enumerable but not recursive.
Statement I — True: Every CFL is recursive, and recursive languages are closed under complement. Since L1 is CFL → L1 is recursive → L1'' is recursive.
Statement II — False: L2 is RE but not recursive. If L2'' were recursive, it would also be RE, and having both L2 and L2'' be RE would imply L2 is recursive — a contradiction. So L2'' is not recursive.
Statement III — False: CFLs are not closed under complementation. The complement of a CFL need not be context-free. For example, the complement of {anbncn : n≥1} is CFL but not all CFL complements are CFLs. So L1'' is not necessarily context-free.
Statement IV — True: From I, L1'' is recursive, so L1'' is also RE. L2 is RE. RE languages are closed under union. Therefore L1'' ∪ L2 is RE.
Correct answer: D — I and IV only. Your page''s answer display is a bug showing "CFG" instead of D ✓

Similar Questions

In the context of abstract-syntax-tree (AST) and control-flow-graph (CFG), which one of the following is True?
#52 MCQ
A student wrote two context-free grammars G1 and G2 for generating a single C-like array declaration. The dimension of the array is at least one. For example,...
#86 MCQ
Consider the following languages: L1= {anbmcn+m : m, n >= 1} L2= {anbnc2n : n >= 1} Which one of the following is TRUE?
#89 MCQ

Related Topics

CFL complement recursive RE language GATE 2015 GATE CS 2015 Set-1 Q14 context-free language complement recursive GATE RE not recursive complement not recursive GATE CS closure properties CFL recursive RE GATE L1 complement recursive I and IV true GATE

Unique Visitor Count

Total Unique Visitors

Loading......