GateAI
Regular Expressions and Finite Automata

GATE CSE 2014 Set 1 · Q15

MCQ1 markEasy

Time

Which one of the following is TRUE?

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified 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 Automata

Let us evaluate the options:

  • (A) L={anbn∣n≥0}L = \{a^n b^n \mid n \ge 0\} is a classic deterministic context-free language that is not regular, as it requires unbounded memory to match the number of aa's and bb's.

  • (B) L={an∣n is prime}L = \{a^n \mid n \text{ is prime}\} is not regular since the sequence of prime numbers cannot be tracked by any finite automaton.

  • (C) L={w∣w has 3k+1 b’s for some k∈N with Σ={a,b}}L = \{w \mid w \text{ has } 3k + 1\ b\text{'s for some } k \in \mathbb{N} \text{ with } \Sigma = \{a, b\}\} represents strings where the number of bb's satisfies ∣w∣b≡1(mod3)|w|_b \equiv 1 \pmod 3. This can be easily recognized by a 3-state Deterministic Finite Automaton (DFA) that tracks ∣w∣b(mod3)|w|_b \pmod 3. Therefore, this language is regular.

  • (D) L={ww∣w∈Σ∗ with Σ={0,1}}L = \{ww \mid w \in \Sigma^* \text{ with } \Sigma = \{0, 1\}\} is not regular (nor context-free) as it requires matching two arbitrary-length copies of ww.

Thus, only (C) is TRUE.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

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

Where do you stand for GATE?

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.

One GATE CSE PYQ every morning

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 in GATE CSE

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 Automata

More from GATE CSE 2014 Set 1

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2014 Set 1 · Q15 · MCQ

Which one of the following is TRUE?

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.