Add test case from Papadimitriou's algorithms book