Similar questions 1 more →
Finite Automata

Answer & solution
Official answer: 4.0
Our answer: 4
Step through it (2 parts)
1. The expression allows any prefix, then b, then exactly one final symbol. Thus acceptance depends on whether the second-last symbol is b, and words shorter than two are rejected.
2. Use states aa,ab,ba,bb representing the last two symbols, padding the initial short prefix on the left with a. Start at aa; on input z shift xy to yz. Accept ba and bb. All four states are reachable.
3. Two states with different first symbols have different acceptance immediately. If their first symbols agree but second symbols differ, append a; their new first symbols then differ. Every pair is distinguishable, proving the four-state construction minimal.