Introduction to algorithms - Cormen, T H; Stein, C; Leiserson, C E (MIT Press, 2009)
3rd ed.