The first chapter solutions

This commit contains the whole solutions for the Chapter 1 except the
last two exercises.