The Design and analysis of computer algorithms - Ullman, Jeffrey D.