Compute an optimum assignment of tasks