Automata Theory and Formal Languages (Third Edition)