Introduction to Automata Theory