Algorithms and Complexity Homework #3