The theory of automata