Skip to content
GATEiit

GATE CSE 2021 Set 1 Q11: Closure of CFLs under operations with a regular language

Question

Suppose that L1L_1 is a regular language and L2L_2 is a context-free language. Which one of the following languages is NOT necessarily context-free?

Try it: multiple choice: exactly one correct option

Select one option
Wrong answer costs 1/3 mark in GATE.
Show answer and explanation

Answer: C (official GATE 2021 final answer key)

Concept used: CFLs are closed under union, concatenation and intersection with a regular set, but not under complement.

First step: Write L1−L2=L1∩L2‾L_1 - L_2 = L_1 \cap \overline{L_2} and take L1=Σ∗L_1 = \Sigma^*.

Full step-by-step solution

Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.

Share this question

WhatsAppDownload image

Source: official GATE 2021 Set 1 CS question paper and final answer key, organised by IIT Bombay. Question paper · Answer key