COMPUTER SCIENCE AND ENGINEERING
THEORY OF COMPUTATION
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
L1 L2
|
|
L1 ∩ L2
|
|
L1 ∩ R
|
|
L1 ∪ L2
|
Detailed explanation-1: -(d) If L1 and L2 are context free languages then L1∪L2 is surely context free language because context free languages are closed under union.
Detailed explanation-2: -Context-free languages are not closed under complementation. L1 and L2 are CFL.
Detailed explanation-3: -We can prove that a language is context-free if we construct a context-free grammar that generates it. Alternatively, we can create a pushdown automaton that recognizes the language. On the other hand, we use Ogden’s lemma and the pumping lemma for context-free languages to prove that a language isn’t context-free.
Detailed explanation-4: -The correct answer is option 1. Concept: Option 1: The union of two context-free languages is context-free.