Solutions for exercises in chapter 5.