Computer Science EngineeringHard

The minimal DFA over {a, b} accepting strings whose length is divisible by 3 has how many states?

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

Correct answer: A. 3

Only the length modulo 3 matters, so 3 states suffice.

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

Exams that ask this topic