lecture 9 finite state machines 1378967