Skip to content
Mad4Study

Engineering & Science

GATE Computer Science

  • GATE CS
  • 2026–27 pattern practice
  • Theory of Computation
  • Finite automata
  • Medium

How many states does the minimal DFA have for the language of all binary strings in which the number of 11s is divisible by 33?

Regular Languages

Pick an option to check your answer.

The DFA only needs to remember the count of 11s modulo 3: states q0,q1,q2q_0, q_1, q_2.

  • On input 00: stay in the same state.
  • On input 11: qi→q(i+1) mod 3q_i \to q_{(i+1) \bmod 3}.
  • Start and accepting state: q0q_0.

The three states are pairwise distinguishable (from qiq_i, the string 13−i1^{3-i} is accepted only from qiq_i), so 33 is minimal.

Why not the others

  • 22 can only track parity (divisibility by 2).
  • 44 and 66 contain equivalent states that minimisation would merge.

Report an error

GATE CS · Theory of Computation · Regular Languages