Introduction to Automatta Theory Languages,and Computation 3re edition by Hopcroft and Motwani and Ullman