Mean completion time minimization as a graph ordering problem