An Introduction to the Analysis of Algorithms (2nd Edition)