Homework 4 for UMBC CMSC 491/691 Spring 2014