pattern recognition course: 2nd hw