GATE Computer ScienceVery hardGATE CS

Let L = { w ∈ {a, b}* : w begins with aba, or (w ends with b and n_a(w) ≡ 0 (mod 3)) }. The minimal complete DFAs for L and for its reversal Lᴿ have m and n states respectively. What is (m, n)?

  1. A. (8, 16)
  2. B. (8, 14)
  3. C. (8, 8)
  4. D. (14, 8)

Correct answer: B. (8, 14)

Building the minimal DFA for L gives 8 states; reversing the language and applying subset construction followed by minimisation gives 14 states (checked by exhaustive Myhill–Nerode computation). Reversal need not preserve the size of the minimal DFA, and here it grows because the prefix condition must now be verified last.

More Theory of Computation questions

Exams that ask this topic