Introduction to the Design and Analysis of Algorithms (3rd Edition)