Which one of the following is TRUE?
Topic-wise GATE CS PYQs with verified steps
GATE CSE 2014 Set 1 · Q15
Time
Select one answerSingle correct
Solution
Official answer: C) The language L = {w w has 3k + 1 b's for some k ∈ N with = {a, b}} is regular.
Regular Expressions and Finite AutomataLet us evaluate the options:
(A) is a classic deterministic context-free language that is not regular, as it requires unbounded memory to match the number of 's and 's.
(B) is not regular since the sequence of prime numbers cannot be tracked by any finite automaton.
(C) represents strings where the number of 's satisfies . This can be easily recognized by a 3-state Deterministic Finite Automaton (DFA) that tracks . Therefore, this language is regular.
(D) is not regular (nor context-free) as it requires matching two arbitrary-length copies of .
Thus, only (C) is TRUE.
Try the question first, then check your work.
Examiner trap
A language defined by counting a symbol modulo a fixed integer constant can be tracked with a finite number of states (DFA).
This Regular Expressions and Finite Automata previous year question is Q15 of the GATE CSE 2014 Set 1 paper. Find more GATE CSE PYQs on Regular Expressions and Finite Automata 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 Expressions and Finite Automata 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 Expressions and Finite Automata has 41 GATE CSE PYQs across 24 papers from 2011 to 2026. 14 of them are 1-mark MCQs like this one, and GATE CSE 2014 Set 1 has 3.
How GATE tests Regular Expressions and Finite AutomataIndependent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.