Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

GATE | Gate IT 2005 | Question 4

  • Last Updated : 28 Jun, 2021

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)


L is a regular language
M is a context free language
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.
Considering the above derivation, none of the statements are true. Hence correct answer would be (D) None of the above.

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.

Related article :

This solution is contributed by Vineet Purswani.

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :