Consider the following deterministic finite automaton

The number of strings of length accepted by the above automaton is ___________
View worked solution
Answer: 256 : 256
By analyzing the given DFA, we can observe the reachability of its states from the start state :
- The start state is a final (accepting) state.
- From , on input we transition to (which is also a final state), and on input we remain in .
- From , on input we remain in , and on input we transition back to .
- The state is a non-final state, but there is no path from the start state to . Thus, is unreachable.
Since all reachable states ( and ) are final states, every possible sequence of transitions starting from will always end in an accepting state. Therefore, the DFA accepts all strings over the alphabet .
The number of strings of length over the binary alphabet is:
Free practice · Your answers on this page are not saved.
