Definition of a language L with alphabet {a} is given as following. L = {ank k > 0, and n is a positive integer constant} What is the minimum number of states needed in a DFA to recognize L?
Topic-wise GATE CS PYQs with verified steps
GATE CSE 2011 · Q42
Time
Select one answerSingle correct
Solution
Official answer: B) n+1
Regular Expressions and Finite AutomataThe language is defined as:
Here, is a fixed positive integer constant, and .
The string (length ) is not in because .
The initial state corresponds to length and must be a non-accepting state.
From , reading copies of '' brings the DFA to non-accepting states .
Reading the -th '' leads to state , which is an accepting state.
Subsequent transitions cycle through because reading another '' from transitions to .
Since cannot be merged with (as ), the states are:
(start state, non-accepting)
( non-accepting states)
(accepting state)
Total number of states required in the minimal DFA = .
Hence, the correct option is (B).
Try the question first, then check your work.
Examiner trap
Note that , which means . Therefore, the start state cannot be the accepting modulo-zero state.
This Regular Expressions and Finite Automata previous year question is Q42 of the GATE CSE 2011 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. 10 of them are 2-mark MCQs like this one, and GATE CSE 2011 has 2.
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.