Skip to content
Mad4Study

Engineering & Science

GATE Computer Science

  • GATE CS
  • 2026–27 pattern practice
  • Theory of Computation
  • Finite automata
  • Easy

How many states does the minimal DFA have that accepts all binary strings ending in 01?

Regular Languages

Pick an option to check your answer.

The DFA must remember how much of the suffix 01 it has just seen: nothing useful, a trailing 0, or a trailing 01. These three situations behave differently on future input, so they cannot be merged, and three states suffice. The minimal DFA has 3 states.

Why not the others

  • 22 cannot distinguish 'just read 0' from 'just read 01'.
  • 44 includes a redundant state that is equivalent to one of the three.
  • 55 is not minimal.

Report an error

GATE CS · Theory of Computation · Regular Languages