Exercise numbers in this page refer to the exercises in Papadimitriou's book.