Introduction to algorithms [2nd ed.]