GateAI
Regular Expressions and Finite Automata

GATE CSE 2021 Set 2 · Q9

MCQ1 markMedium

Time

Let L⊆{0,1}∗L \subseteq \{0, 1\}^* be an arbitrary regular language accepted by a minimal DFA with kk states. Which one of the following languages must necessarily be accepted by a minimal DFA with kk states?

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: C) {0, 1}* - L

Regular Expressions and Finite Automata

Let M=(Q,Σ,δ,q0,F)M = (Q, \Sigma, \delta, q_0, F) be the minimal DFA accepting LL with ∣Q∣=k|Q| = k states.

The complement of LL is L‾={0,1}∗−L\overline{L} = \{0, 1\}^* - L. The DFA accepting L‾\overline{L} is constructed by simply inverting the set of final states:

M′=(Q,Σ,δ,q0,Q∖F)M^{\prime} = (Q, \Sigma, \delta, q_0, Q \setminus F)
  1. Reachability: Since all states in MM are reachable from q0q_0 and the transition function δ\delta is unchanged, all states in M′M^{\prime} remain reachable.

  2. Distinguishability: Any two distinct states p,q∈Qp, q \in Q that are distinguished by a string w∈Σ∗w \in \Sigma^* in MM (meaning one leads to an accepting state and the other to a non-accepting state) will still be distinguished by ww in M′M^{\prime} (since the acceptance status of all states is inverted).

Therefore, M′M^{\prime} is also minimal and has precisely kk states.

For the other operations (difference with a singleton set, union with a singleton set, concatenation), the number of states in the minimal DFA can change depending on LL.

Hence, the correct option is (C).

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 Q9 of the GATE CSE 2021 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. 14 of them are 1-mark MCQs like this one, and GATE CSE 2021 Set 2 has 3.

How GATE tests Regular Expressions and Finite Automata

More from GATE CSE 2021 Set 2

Share this solution

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

GateAI solution cardGATE CSE 2021 Set 2 · Q9 · MCQ

Let L ⊆ {0, 1}* be an arbitrary regular language accepted by a minimal DFA with k states. Which one of the following languages must necessarily be accepted by a minimal DFA with k states?

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.