solution to the sixth homework from spring 2013 4392773