Mathematical formulation of assignment problem