The minimum number of states required for a DFA to accept strings with even…
2026
The minimum number of states required for a DFA to accept strings with even number of 0's and even number of 1's over the alphabet {0,1} is
Answer: C. 4 — To accept strings with an even number of 0's and an even number of 1's, a Deterministic Finite Automaton (DFA) must track the parity (even or odd status) of…
- A.
2
- B.
3
- C.
4
- D.
5
Attempted by 112 students.
Show answer & explanation
Correct answer: C
To accept strings with an even number of 0's and an even number of 1's, a Deterministic Finite Automaton (DFA) must track the parity (even or odd status) of both symbols independently. We need four distinct states to represent all possible combinations: (even 0s, even 1s), (odd 0s, even 1s), (even 0s, odd 1s), and (odd 0s, odd 1s). The initial state represents the empty string with zero counts of both symbols (even, even), which is also the accepting state. Transitions toggle between these states based on input symbols; for instance, reading a '0' from the (even 0s, even 1s) state moves to (odd 0s, even 1s). Since we must distinguish between all four parity combinations to ensure correctness upon string termination, fewer states like 2 or 3 cannot capture the necessary logic. Therefore, exactly four states are required.