GATE Computer ScienceHardGATE CS (PYQ pattern)

Let L₁ = { w ∈ {a, b}* : n_a(w) ≡ 0 (mod 4) } and L₂ = { w : |w| ≡ 0 (mod 6) }. The minimal complete DFA for L₁ ∩ L₂ has how many states?

  1. A. 12
  2. B. 10
  3. C. 48
  4. D. 24

Correct answer: D. 24

The pair (n_a mod 4, |w| mod 6) is moved by (1, 1) on a and (0, 1) on b; these generate all of Z₄ × Z₆, so all 24 pairs are reachable, and all are distinguishable.

More Theory of Computation questions

Exams that ask this topic