An Introduction to Formal Languages and Automata, 5th Edition