Chapter 6: Solutions for exercises 1 to 6