Solve the combinations problem.