GATE Computer ScienceVery hardGATE CSE

Let L = { w ∈ {a, b}* : the number of a's is divisible by 4 and w contains bb as a substring }. How many states does the minimal complete DFA for L have?

  1. A. 8
  2. B. 12
  3. C. 13
  4. D. 10

Correct answer: B. 12

The a-counter mod 4 combined with the tracker (no pending b, one pending b, bb already seen) gives 12 reachable states, and Moore refinement shows all 12 are pairwise distinguishable.

More Theory of Computation questions

Exams that ask this topic