Can I use the Hungarian algorithm to find max cost?

后端 未结 2 472
忘了有多久
忘了有多久 2021-02-09 04:29

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:50

    As David said in the comment:

    Multiply the cost matrix by -1 for maximization.
    

提交回复
热议问题