formal languages and automata theory problems and solutions