Solutions for chapter 1 exercises