Let be a regular language and be a context-free language. Which of the following languages is/are context-free?
GATE CSE 2021Theory of Computation › Language Classification, Closure Properties & ProofsVerified
GATE CSE 2021 PYQ: Let L 1 L_1 L 1 be a regular language and L 2 L_2 L 2 be a context-free language. Which of the following…
- A
- BCorrect answer
- CCorrect answer
- DCorrect answer
Answer
(B, C, D) L 1 ‾ ∪ L 2 ‾ ‾ \overline{\overline{L_1} \cup \overline{L_2}} L 1 ∪ L 2 ; L 1 ∪ ( L 2 ∪ L 2 ‾ ) L_1 \cup (L_2 \cup \overline{L_2}) L 1 ∪ ( L 2 ∪ L 2 ); ( L 1 ∩ L 2 ) ∪ ( L 1 ‾ ∩ L 2 ) (L_1 \cap L_2) \cup (\overline{L_1} \cap L_2) ( L 1 ∩ L 2 ) ∪ ( L 1 ∩ L 2 )
Approach
Simplify each set expression using De Morgan and standard closure properties: regular languages are closed under complement, union, and intersection; context-free languages are closed under union and under intersection with regular languages, but not under complement or arbitrary intersection. Then test whether each simplified form is guaranteed context-free.
Options B, C, and D reduce respectively to \(L_1 \cap L_2\), \(\Sigma^*\), and \(L_2\), all of which are guaranteed context-free under the given conditions. Option A does not always reduce to a context-free language because the complement of a context-free language is not necessarily context-free.
Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.