Finite state machines

Question 1: