Hungarian algorithm with an unequal number of workers and tasks

I have problems listening for a while.

We have “workers” w_0, w_1 ... w_n and tasks t_0, t_1, ... t_m and durations D_ij such that w_i can complete t_j in this number of hours. Each worker also has a maximum m_0, m_1 ... m_n the number of hours that can be processed.

Several workers can work on the same task with a pro-effort assessment. For example, if D_11 = 2 and D_21 = 4, then worker 1 is two times more efficient than worker 2 in task 1. Thus, you can combine, for example. 1 hour 1 work and 2 out of 2 to complete the task.

How can we determine the minimum number of hours during which all tasks can be completed.

I tried using the greedy method to select the best employee for each task, but this does not work in every case. For example, worker 1 can complete task 1 in 2 hours and complete task 3 in 4 hours. It is clear that worker 1 will be selected to work on task 1, although, say, task 3 is very laborious for other workers, and worker 1 would be ideal for work.

I thought about reducing the problem to an appointment problem, but was not lucky enough to find a way.

How to solve this problem?

+4
source share
1 answer

There is direct linear programming .

D ij R ij R ij= 1/D ij. x ij, , j.

- j ij. :

  • : j x ij m i

  • : j R ij * x ij 1

  • : j ij

wikipedia .

+2

Source: https://habr.com/ru/post/1619573/


All Articles