Switching and finite automata theory, 2nd ed.