Pergunta de entrevista da empresa Apple

about finite state machine: moore and mealy