Homework 3 for CMU course 11-791 Design and Engineering of Intelligent Information Systems