Open In App

GATE | Gate IT 2005 | Question 4

Like Article
Like
Save
Share
Report

Let L be a regular language and M be a context-free language, both over the alphabet Σ. Let Lc and Mc denote the complements of L and M respectively. Which of the following statements about the language Lc∪ Mc is TRUE
(A) It is necessarily regular but not necessarily context-free
(B) It is necessarily context-free.
(C) It is necessarily non-regular.
(D) None of the above


Answer: (D)

Explanation:  

Proposition:
L is a regular language
M is a context free language
Derivation:
L_c  union M_c = complement{L intersection M}
Now, L intersection M is a CFL according to closure laws of CFLs, i.e. intersection of a CFL with RL is always a CFL.
But, complement{L intersection M} might not be a CFL because complement over CFL doesn’t guarantee a CFL. It can even be a RL or it might even lie outside the CFL circle. It will be a context-sensitive language certainly, but nothing else can be said about it.
Conclusion:
Considering the above derivation, none of the statements are true. Hence correct answer would be (D) None of the above.

Related article :

https://www.geeksforgeeks.org/closure-properties-of-context-free-languages/

This solution is contributed by Vineet Purswani.

Quiz of this Question


Last Updated : 28 Jun, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads