Introduction to algorithms - Cormen Thomas H. (McGraw-Hill, 2001)