The number of states in the minimum sized DFA that accepts the language defined by the regular expression (0+1)*(0+1)(0+1)* is …
Topic-wise GATE CS PYQs with verified steps
GATE CSE 2016 Set 2 · Q16
Time
Your answerNumerical answer
Solution
Official answer: 2
Regular Expressions and Finite AutomataThe given regular expression is:
This represents the set of all strings over containing at least one symbol (i.e., ), or equivalently, all strings except the empty string .
A minimum DFA to recognize this language requires states:
State (Start state, non-accepting):
On input or , it transitions to state .
State (Accepting state):
On input or , it self-loops at .
Since strings of length () are rejected and strings of length are accepted, states are necessary and sufficient.
Therefore, the number of states in the minimum DFA is 2.
Try the question first, then check your work.
Examiner trap
The regular expression generates all binary strings of length at least 1 (all strings except ).
This Regular Expressions and Finite Automata previous year question is Q16 of the GATE CSE 2016 Set 2 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. 5 of them are 1-mark NAT questions like this one, and GATE CSE 2016 Set 2 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.