Programming Assignment 3: Pattern Recognition