Solutions for problem 2.