Elements of the Theory of Computation- Lewis & Papadimitriou