THEORY OF AUTOMATA AND PROGRAMMING