CS171, Homework 4