Problem set 06: Dynamic programming