Implementation of the Munkres' Assignment Algorithm (aka Hungarian Algorithm).