Can I use the Hungarian algorithm to find max cost?

后端 未结 2 1230
孤独总比滥情好
孤独总比滥情好 2021-02-09 04:25

The Hungarian algorithm solves the assignment problem in polynomial time. Given workers and tasks, and an n×n matrix containing the cost of assigning each worker to a task, it

2条回答
  •  深忆病人
    2021-02-09 04:59

    As David said in the comment:

    Multiply the cost matrix by -1 for maximization.
    

提交回复
热议问题