Computer Science EngineeringModerate

How many states are in the minimal DFA over {a, b} that accepts exactly the strings ending in 'ab'?

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

Correct answer: C. 3

Three states are enough: start/no progress, seen 'a', and seen 'ab' (accepting).

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

Exams that ask this topic