Advantest interview question

Various state machine problems.