Homework 1 solution