Consider the languages L1, L2 and L3 as given below. L1 = {0p 1q p, q ∈ N}, L2 = {0p 1q p, q ∈ N and p = q} and L3 = {0p 1q 0r p, q, r ∈ N and p = q = r}. Which of the following statements is NOT TRUE?
Topic-wise GATE CS PYQs with verified steps
GATE CSE 2011 · Q26
Time
Select one answerSingle correct
Solution
Official answer: C) All the three languages are context free
Regular and Context-Free LanguagesLet us analyze the three languages:
represents the regular language given by the regular expression . Since every regular language is also context-free, is regular and can be recognized by a finite automaton as well as a pushdown automaton (PDA).
requires matching the number of s with the number of s. It is a deterministic context-free language (DCFL) and can be recognized by a PDA.
requires comparing three independent counts simultaneously, which cannot be done with a single stack. By the pumping lemma for context-free languages, is not context-free (it is context-sensitive / recursively enumerable).
Turing machines can recognize all recursively enumerable languages, which includes , , and .
Therefore, statement (C) ("All the three languages are context free") is NOT TRUE.
Try the question first, then check your work.
Examiner trap
Recall that cannot be generated by any context-free grammar due to the single-stack limitation of pushdown automata.
This Regular and Context-Free Languages previous year question is Q26 of the GATE CSE 2011 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. 9 of them are 2-mark MCQs like this one, and GATE CSE 2011 has 2.
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.