Algorithms and Complexity Homework #2