Solutions for chapter 6 exercises