GateAI
Regular Expressions and Finite Automata

GATE CSE 2016 Set 2 · Q16

NAT1 markEasy

Time

The number of states in the minimum sized DFA that accepts the language defined by the regular expression (0+1)∗(0+1)(0+1)∗(0+1)^*(0+1)(0+1)^* is ___________ .

Your answerNumerical answer

Enter a value to check

Solution

Step-by-step verified solution

Official answer: 2

Regular Expressions and Finite Automata

The given regular expression is:

(0+1)∗(0+1)(0+1)∗(0+1)^*(0+1)(0+1)^*

This represents the set of all strings over Σ={0,1}\Sigma = \{0, 1\} containing at least one symbol (i.e., (0+1)+(0+1)^+), or equivalently, all strings except the empty string ϵ\epsilon.

A minimum DFA to recognize this language requires 22 states:

  1. State q0q_0 (Start state, non-accepting):

    • On input 00 or 11, it transitions to state q1q_1.

  2. State q1q_1 (Accepting state):

    • On input 00 or 11, it self-loops at q1q_1.

Since strings of length 00 (ϵ\epsilon) are rejected and strings of length ≥1\ge 1 are accepted, 22 states are necessary and sufficient.

Therefore, the number of states in the minimum DFA is 2.

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 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

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. 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 Automata

More from GATE CSE 2016 Set 2

Share this solution

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

GateAI solution cardGATE CSE 2016 Set 2 · Q16 · NAT

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

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