Question:

Consider the following deterministic finite automaton (DFA). The number of strings of length 8 accepted by the above automaton is \(\underline{\hspace{2cm}}\). 

Show Hint

If a DFA reaches an accepting sink state with self-loops on all inputs, all longer strings are accepted.
Updated On: Feb 2, 2026
Hide Solution
collegedunia
Verified By Collegedunia

Correct Answer: 256

Solution and Explanation

Step 1: Observe the accepting state. 
The DFA has a single accepting state with a self-loop on both input symbols \( 0 \) and \( 1 \). 
 

Step 2: Reachability of accepting state. 
From the start state, every string of length at least 2 can reach the accepting state, after which the automaton stays in the accepting state for all remaining symbols. 
 

Step 3: Count binary strings of length 8. 
Since all binary strings of length 8 are accepted: 
\[ \text{Number of strings} = 2^8 = 256 \]

Final Answer: \[ \boxed{256} \]

Was this answer helpful?
0
0

Top Questions on Regular expressions and finite automata

View More Questions