Introduction to the theory of computation - Sipser, Michael (The PWS series in computer science, 1996)