Solutions to exercise 2 - 5 in chapter 2.