GATE Computer ScienceHardGATE CSE

Over {a, b}, let L = { w : n_a(w) ≡ 1 (mod 4) OR n_b(w) is even }. What is the number of states in its minimal complete DFA?

  1. A. 7
  2. B. 8
  3. C. 9
  4. D. 14

Correct answer: B. 8

State = (n_a mod 4, n_b mod 2) gives 8 combinations. All are reachable and pairwise distinguishable (for example (1,0) and (1,1) differ after one more a), so the minimal DFA has 8 states.

More Theory of Computation questions

Exams that ask this topic