finished assignment 4 for discrete math