Let L1 and L2 be two languages over a finite alphabet, such that L1 ∩ L2 and L2 are regular languages. Which of the following statements is/are always true?
Topic-wise GATE CS PYQs with verified steps
GATE CSE 2026 Set 1 · Q51
Time
Select all that applyOne or more correct
Solution
Official answer: C) L2 is context-free
Regular and Context-Free LanguagesWe are given that and are regular languages over a finite alphabet .
Option (C) is always true:
Regular languages are closed under complementation. Since is regular, its complement is also a regular language.
Every regular language is a context-free language (regular languages are a proper subset of context-free languages).
Therefore, is always context-free.
Counterexample for Options (A), (B), and (D):
Let , which is a regular language.
For any arbitrary language , the intersection , which is also regular, satisfying the given conditions.
If we choose (or any non-context-free / undecidable language):
is not regular (disproving A).
, which is not regular (disproving B).
is not context-free (disproving D).
Hence, only statement (C) is always true.
Try the question first, then check your work.
Examiner trap
Consider the closure properties of regular languages under complementation, and test the extreme case where .
This Regular and Context-Free Languages previous year question is Q51 of the GATE CSE 2026 Set 1 paper. Find more GATE CSE PYQs on Regular and Context-Free Languages in Theory of Computation, or browse all GATE CSE PYQs.
Free diagnostic
Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Regular and Context-Free Languages PYQs now with no account.
An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.
Regular and Context-Free Languages has 21 GATE CSE PYQs across 13 papers from 2011 to 2026. 4 of them are 2-mark MSQs like this one, and it is the only one in GATE CSE 2026 Set 1.
How GATE tests Regular and Context-Free LanguagesIndependent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.