The Design and Analysis of Computer Algorithm - Aho, Hopcroft, Ullman (Addison Wesley)