INTRODUCTION AUTOMATA THEORY LANGUAGES AND COMPUTATION - AND MOTWANI, HOPCROFT (2009)