Algorithms for the Assignment and Transportation Problems