Skip to content
Official PYQ · 2021

GATE CS 2021 Set 2 Q9 — Regular Expressions and Finite Automata

Explain with AI

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

Choose one option
View worked solution

Answer: C

To find which language must necessarily be accepted by a minimal DFA with exactly kk states, let us analyze the properties of the complement operation on DFAs.

1. Complement of a Language ({0,1}∗−L\{0,1\}^* - L)

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 language L‾={0,1}∗−L\overline{L} = \{0,1\}^* - L is accepted by the DFA M′=(Q,Σ,δ,q0,Q∖F)M' = (Q, \Sigma, \delta, q_0, Q \setminus F), which is obtained simply by swapping the accepting (final) and non-accepting states of MM.

Proof of Minimality:

  • Suppose M′M' is not minimal, meaning there exists a DFA M′′M'' accepting L‾\overline{L} with fewer than kk states.
  • By swapping the final and non-final states of M′′M'', we would obtain a DFA accepting LL with fewer than kk states.
  • This directly contradicts the assumption that the minimal DFA for LL has kk states.

Thus, the minimal DFA for {0,1}∗−L\{0,1\}^* - L must have exactly kk states.

2. Counterexamples for Other Options

Let L={0,1}∗L = \{0,1\}^*. The minimal DFA for LL has k=1k = 1 state (a single accepting state with self-loops on 00 and 11).

  • Option A (L−{01}L - \{01\}): The language is {0,1}∗−{01}\{0,1\}^* - \{01\}. The minimal DFA for this language requires at least 33 states to track and reject the string "01". Thus, the number of states changes.
  • Option B (L∪{01}L \cup \{01\}): If we choose L=∅L = \emptyset, the minimal DFA has k=1k = 1 state (a non-accepting state with self-loops). But L∪{01}={01}L \cup \{01\} = \{01\}, which requires 44 states in its minimal DFA.
  • Option D (L⋅LL \cdot L): If we choose L={a}L = \{a\} over Σ={a}\Sigma = \{a\}, the minimal DFA has k=3k = 3 states (start, accept, and dead state). The language L⋅L={aa}L \cdot L = \{aa\} requires 44 states in its minimal DFA.

Therefore, only option C is guaranteed to have exactly kk states in its minimal DFA.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Regular Expressions and Finite Automata questions