GATE Computer ScienceVery hardGATE CS

Let L = { aⁿ : n ≥ 5 and (n is divisible by 4 or n is divisible by 6) }. How many states does the minimal complete DFA for L have?

  1. A. 12
  2. B. 16
  3. C. 17
  4. D. 13

Correct answer: C. 17

For n ≥ 5 membership is periodic with period lcm(4, 6) = 12, and the accepting residues {0, 4, 6, 8} have no smaller period, so the cycle needs 12 states. The counts 0 to 4 form a tail of 5 states that are not equivalent to any cycle state, giving 5 + 12 = 17 (confirmed by Myhill–Nerode enumeration).

More Theory of Computation questions

Exams that ask this topic