pattern recognition and machine learning exercise solutions