Consider the following deterministic finite automaton (DFA) The number of…
2021
Consider the following deterministic finite automaton (DFA)

The number of strings of length 8 accepted by the above automaton is ___________.
Attempted by 177 students.
Show answer & explanation
Correct answer: 256
Key insight: after reading three symbols the automaton reaches an accepting sink state, so every binary string of length at least 3 is accepted.
Step 1: The first input symbol sends the machine to one of the two left-middle states (0 → upper, 1 → lower).
Step 2: The second symbol moves the machine to one of the two right-middle states determined solely by that second symbol (0 → top-right, 1 → bottom-right).
Step 3: The third symbol always leads from either right-middle state to the accepting sink state, which has loops on both 0 and 1. Thus the machine stays in an accepting state for all remaining symbols.
Conclusion: Every binary string of length 8 is accepted, so the number of accepted strings of length 8 is 2^8 = 256.
A video solution is available for this question — log in and enroll to watch it.