Solution for the lecture exercises