Solving the Activity Selection Problem