This algorithm solves the problem correctly because it enumerates every single possible ordering of the tasks and compares them ALL. Showing that it enumerates all the possible orders can be compared to enumeration of all n digit base 2 numbers. From experience with base 2 numbers in computer science, we can list out all possible numbers of n digits by counting from 0 to . This method of enumeration works for base 3 numbers also, but we must count to instead which my algorithm does. I can assume that my algorithm calculates the cost correctly and the comparisons are done correctly from the fact that it obtained the same answers as given in the project description.