Algorithms and Complexity Homework #5