- GATE CS
- 2026–27 pattern practice
- Theory of Computation
- Finite automata
- Medium
How many states does the minimal DFA have that accepts binary strings (read MSB first) whose value is divisible by 5?
Regular Languages
Pick an option to check your answer.
Answer: A. Solution
Track the value modulo 5. Reading bit maps remainder to . The remainders – are pairwise distinguishable, so the minimal DFA has 5 states, with state 0 as start and accept. No dead state is needed.
Why not the others
- 4 merges two distinguishable remainders.
- 6 adds an unreachable or dead state.
- 10 mixes in the remainder modulo 2 unnecessarily.