3rd problem set of 6.005