Introduction to the design and analysis of algorithms - Goodman, Seymour E. (McGraw-Hill Computer Science Series., 1977)