Let L1 be a regular language and L2 be a context-free language. Which of the following languages is/are context-free?
Answer: (B) (C) (D)
- (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.
Attention reader! Don’t stop learning now. Learn all GATE CS concepts with Free Live Classes on our youtube channel.