Home » Theory of Computation » Theory of computation miscellaneous » Question

Theory of computation miscellaneous

Theory of Computation

  1. 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.
    1. I , II and IV only
    2. I and III only
    3. II and IV only
    4. I 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 = L1R1, 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.



Your comments will be displayed only after manual approval.