Solution for Exercise 9.1

This is a solution for Exercise 9.1.

Solution for the first part

1
2
3
4
5

Solution for the second part

1
2
3
4
5