homework solution to pattern recognition