Skip to content
Official PYQ · 2007

GATE CS 2007 Q75 — Regular Expressions and Finite Automata

Explain with AI

Consider the following Finite State Automaton:

The minimum state automaton equivalent to the above FSA has the following number of states:

Choose one option
View worked solution

Answer: B

To find the number of states in the minimum state automaton, we can use the state minimization algorithm (partition refinement method).

Let the states of the given DFA be q0,q1,q2,q3q_0, q_1, q_2, q_3, where q0q_0 is the start state, and the final states are F={q0,q2}F = \{q_0, q_2\}. The transition rules from the given diagram are:

  • δ(q0,a)=q1\delta(q_0, a) = q_1, δ(q0,b)=q2\delta(q_0, b) = q_2
  • δ(q1,a)=q2\delta(q_1, a) = q_2, δ(q1,b)=q3\delta(q_1, b) = q_3
  • δ(q2,a)=q3\delta(q_2, a) = q_3, δ(q2,b)=q0\delta(q_2, b) = q_0
  • δ(q3,a)=q0\delta(q_3, a) = q_0, δ(q3,b)=q1\delta(q_3, b) = q_1

Step 1: 0-equivalence Partition (P0P_0)
Divide the states into final and non-final states:
P0={{q0,q2},{q1,q3}}P_0 = \{ \{q_0, q_2\}, \{q_1, q_3\} \}

Step 2: 1-equivalence Partition (P1P_1)
We check if the states in each group behave identically on all inputs:

  • For {q0,q2}\{q_0, q_2\}:
    On input aa: δ(q0,a)=q1\delta(q_0, a) = q_1 and δ(q2,a)=q3\delta(q_2, a) = q_3. Both q1,q3q_1, q_3 belong to the same group {q1,q3}\{q_1, q_3\}.
    On input bb: δ(q0,b)=q2\delta(q_0, b) = q_2 and δ(q2,b)=q0\delta(q_2, b) = q_0. Both q2,q0q_2, q_0 belong to the same group {q0,q2}\{q_0, q_2\}.
    Thus, q0≡q2q_0 \equiv q_2.
  • For {q1,q3}\{q_1, q_3\}:
    On input aa: δ(q1,a)=q2\delta(q_1, a) = q_2 and δ(q3,a)=q0\delta(q_3, a) = q_0. Both q2,q0q_2, q_0 belong to the same group {q0,q2}\{q_0, q_2\}.
    On input bb: δ(q1,b)=q3\delta(q_1, b) = q_3 and δ(q3,b)=q1\delta(q_3, b) = q_1. Both q3,q1q_3, q_1 belong to the same group {q1,q3}\{q_1, q_3\}.
    Thus, q1≡q3q_1 \equiv q_3.

Since the partition does not split further, P1=P0={{q0,q2},{q1,q3}}P_1 = P_0 = \{ \{q_0, q_2\}, \{q_1, q_3\} \}. The minimum state automaton has exactly 2 states.

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

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