Computer Science EngineeringVery hard

The language of unary strings a^n with n divisible by 2 or by 3 has a minimal DFA with how many states?

  1. A. 6
  2. B. 5
  3. C. 4
  4. D. 3

Correct answer: A. 6

The DFA must track n mod 6, and the residues 0 to 5 are all pairwise distinguishable.

More Theory of Computation, Compilers & Digital Logic (ISRO CS) questions

Exams that ask this topic