Exercises from the week 5 lectures