Finite Automata

Answer & solution
Official answer: 8.0
Our answer: 8
Step through it (2 parts)
1. The first two symbols may be arbitrary, the third must be a, and at least three further symbols must follow. Thus accepted strings have length at least 6 and third symbol a.
2. Construct three states for having read 0,1,2 prefix symbols. From the third of these, a enters a suffix-count state and b enters a rejecting dead state. Use four suffix states for 0,1,2,at least 3 symbols after the required a. The last is accepting and loops on both symbols; the dead state also loops on both. Total: 3+4+1=8 states.
3. To prove minimality, the seven nondead states have distinct shortest accepting continuation lengths 6,5,4,3,2,1,0. For two states, a shortest accepting suffix from the one with smaller required length is too short from the other, distinguishing them. The dead state has no accepting continuation at all. All eight are necessary.