Task assignment and routing are tightly coupled problems for teams of mobile agents. To fairly balance the workload, each agent should be assigned a set of tasks which take a similar amount of time to complete. The completion time depends on the time needed to travel between tasks which depends on the order of tasks. We formulate the task assignment problem as the minimum Hamiltonian partition problem (MHPP) form agents, which is equivalent to the minmax multiple traveling salesperson problem (m-TSP). While the MHPP’s cost function depends on the order of tasks, its solutions are similar to solutions of the average Hamiltonian partition problem (AHPP) whose cost function is order-invariant. We prove that the AHPP is NP-hard and present an effective heuristic, AHP, for solving it. AHP improves a partitions of a graph using a series of transfer and swap operations which are guaranteed to improve the solution’s quality. The solution generated by AHP is used as an initial partition for an algorithm, AHP-mTSP, which solves the combined task assignment and routing problems to near optimality. For n tasks and m agents, each iteration of AHP is O(n2) and AHP-mTSP has an average run-time that scales with n2.11m0.33. Compared to state-of-the-art approaches, our approach found approximately 10% better solutions for large problems in a similar run-time