mathematics for machine learning exercise solutions