-
Let L1 , L2 be any two context-free languages and R be any regular language. Then which of the following is/are CORRECT ?
I. L1 ∪ L2 is context-free.
II. L1 is context-free.
III. L1 – R is context-free.
IV. L1 ∩ L2 is context-free.
-
- I , II and IV only
- I and III only
- II and IV only
- I only
- I , II and IV only
Correct Option: B
1. L1 ∪ L2 is context-free because the union of two context free language is always a context free or CFL are closed under union operation. So, it is correct.
2. L1 is not context-free because CFL are not closed under complement operation. So, it is incorrect.
3. L1 - R is context-free because if context-free language is intersection to the complement of regular language then it is always context-free. L1 - R = L1 ∩ R1, so it is correct.
4. L1 ∩ L2 is not context-free because context-free languages are not closed under complement operations. So it is incorrect.