- 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.
Answer: B. Solution
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
- cannot distinguish 'just read 0' from 'just read 01'.
- includes a redundant state that is equivalent to one of the three.
- is not minimal.