Skip to content
Related Articles

Related Articles

Improve Article
GATE | GATE CS 2021 | Set 2 | Question 22
  • Last Updated : 23 May, 2021

Let L1 be a regular language and L2 be a context-free language. Which of the following languages is/are context-free?
(A) L1∩L2
(B) (L1‘∪L2‘)’
(C) L1∪(L2∪L2‘)
(D) (L1∩L2)∪(L1∩L2)


Answer: (B) (C) (D)

Explanation:

  • (A) Regular union CSL = CSL. Incorrect option
  • (B) (L1’U L2′)’ can be written as (L1 ∩ L2)”. So after simplifying it would be L1 ∩ L2 hence its CFL. Correct option.
  • (C) L2 U L2′ means using complement logic its universal set represented by Σ*. So anything union with Σ* is Σ* itself and Σ* is regular hence by default its CFL also. Correct option
  • (D) (L1∩L2)∪(L1∩L2), Here we clearly observe CFL U CFL = CFL. Correct option.


Quiz of this Question

Attention reader! Don’t stop learning now. Learn all GATE CS concepts with Free Live Classes on our youtube channel.

My Personal Notes arrow_drop_up
Recommended Articles
Page :