Assignment Problem Solutions Explained
Assignment Problem Solutions Explained
Assignment problem
Trace back to the origins of linear programming.
This is a special case of the transportation problem and, by
consequently, from the minimum cost flow problem.
The problem consists of assigning the elements of a set to those
from another set according to a bijective approach (one to one)
so that the total cost of the assignments is minimized.
n n
Min Z = cijxij where xij= 1 if i is assigned to j
i=1j=1 0 otherwise.
n
xij= 1 i = 1, 2, …, n cijallocation cost
j=1 from i to j.
n
xij= 1 j = 1, 2, …, n
i=1
xij= 0 or 1 i, j
2
Network
of a
problem
generic
of allocation jandtask
of (receives only 1 unit of flow)
n employees ieemployee
à emits only 1 unit
n tasks the nice
3
Notes:
Assignment problem 4
Example:
Suppose that in a company, n workers can work
indifferently on n machines, but with more or less efficiency;
efficiency can be measured by the income from the sale of
products made by the various workers working on the different
machines.
Assignment problem 7
Hungarian method ("primal-dual method")
Assignment problem 8
Theorem: The original problem is equivalent in the sense of the set.
optimal solutions to the following problem:
n n
Min Z = c'ijxij
i=1j=1
n
xij= 1 i = 1, 2, …, n
j=1
n
xij= 1 j = 1, 2, …, n
i=1
xij= 0 or 1 i, j
The dual of the original problem has the following feasible solution:
1 1
capacity 1
capacity 1 2 2
capacity 1
1 .
s . t
. .
capacity 1 . .
. . capacity 1
n n
An arc (i, j) intermediate between the sources and the destinations exists.
11
if cij= 0 and it has infinite capacity.
The search for an assignment x consists of finding a maximum flow.
from s to t in the previous network using Ford's algorithm
Fulkerson.
In order to increase the flow between s and t, it is necessary to create additional arcs.
between the marked sources and the unmarked destinations
marked:
we put = min {cij | I marked, I unmarked.
Thus, the new relative cost is equal to the old one. or zero, according to
the status of vertices i and j.
Assignment problem 13
Description of the Hungarian method in a form that allows for
perform all calculations in the data matrix of the problem:
7 8 5 4 3 8 15 5
6 3 16 18 3 19 6 8
6 1 17 6 5 11 7 9
5 0 13 4 5 6 1 2
12 13 4 12 3 1 12 14
3 12 3 7 13 6 8 3
13 4 1 5 5 5 4 9
Assignment problem 17
By applying steps 1 and 2, we obtain:
3 6 3 0 3 0 2 4
4 5 2 1 0 5 11 2
3 0 13 15 0 16 2 5
5 0 16 5 4 10 5 8
5 0 13 4 5 6 0 2
11 12 3 11 2 0 10 13
0 9 0 4 10 3 4 0
12 3 0 4 4 4 2 8
Assignment problem 18
By applying step 3, we obtain:
3 6 3 0 3 0 2 4
4 5 2 1 0 5 11 2
3 0 13 15 0 16 2 5
5 0 16 5 4 10 5 8
5 0 13 4 5 6 0 2
11 12 3 11 2 0 10 13
0 9 0 4 10 3 4 0
12 3 0 4 4 4 2 8
Assignment issue 19
By applying step 4, we obtain:
3 6 3 0 3 0 2 4
4 5 2 1 0 5 11 2
3 0 13 15 0 16 2 5
5 0 16 5 4 10 5 8
5 0 13 4 5 6 0 2
11 12 3 11 2 0 10 13
0 9 0 4 10 3 4 0
12 3 0 4 4 4 2 8
Assignment problem 20
No unmarked zero and a complete assignment has not been made;
skip to steps 6 to 9.
3 6 3 0 3 0 2 4
4 5 2 1 0 5 11 2
3 0 13 15 0 16 2 5
5 0 16 5 4 10 5 8
5 0 13 4 5 6 0 2
11 12 3 11 2 0 10 13
0 9 0 4 10 3 4 0
12 3 0 4 4 4 2 8
Assignment problem 21
Let's now apply step 10.
3 6 3 0 3 0 2 4
4 5 2 1 0 5 11 2
3 0 13 15 0 16 2 5
5 0 16 5 4 10 5 8
5 0 13 4 5 6 0 2
11 12 3 11 2 0 10 13
0 9 0 4 10 3 4 0
12 3 0 4 4 4 2 8
Assignment problem 22
Let's apply step 11. The smallest element is 1.
3 7 3 0 4 0 2 4
3 5 1 0 0 4 10 1
2 0 12 14 0 15 1 4
4 0 15 4 4 9 4 7
5 1 13 4 6 6 0 2
11 13 3 11 3 0 10 13
0 10 0 4 11 3 4 0
12 4 0 4 5 4 2 8
Assignment problem 23
Let's go back to steps 3 and 4.
3 7 3 0 4 0 2 4
3 5 1 0 0 4 10 1
2 0 12 14 0 15 1 4
4 0 15 4 4 9 4 7
5 1 13 4 6 6 0 2
11 13 3 11 3 0 10 13
0 10 0 4 11 3 4 0
12 4 0 4 5 4 2 8
Assignment problem 24
No unmarked zero and a complete assignment has not been made;
move to steps 6 to 9.
3 7 3 0 4 0 2 4
3 5 1 0 0 4 10 1
2 0 12 14 0 15 1 4
4 0 15 4 4 9 4 7
5 1 13 4 6 6 0 2
11 13 3 11 3 0 10 13
0 10 0 4 11 3 4 0
12 4 0 4 5 4 2 8
25
Let's apply step 10.
3 7 3 0 4 0 2 4
3 5 1 0 0 4 10 1
2 0 12 14 0 15 1 4
4 0 15 4 4 9 4 7
5 1 13 4 6 6 0 2
11 13 3 11 3 0 10 13
0 10 0 4 11 3 4 0
12 4 0 4 5 4 2 8
26
Let's apply step 11. The smallest element is 1.
2 7 2 0 4 0 1 3
2 5 0 0 0 4 9 0
1 0 11 14 0 15 0 3
3 0 14 4 4 9 3 6
5 2 13 5 7 7 0 2
10 13 2 11 3 0 9 12
0 11 0 5 12 4 4 0
12 5 0 5 6 5 2 8
Assignment problem 27
We return to steps 3 and 4.
2 7 2 0 4 0 1 3
2 5 0 0 0 4 9 0
1 0 11 14 0 15 0 3
3 0 14 4 4 9 3 6
5 2 13 5 7 7 0 2
10 13 2 11 3 0 9 12
0 11 0 5 12 4 4 0
12 5 0 5 6 5 2 8
Assignment problem 28
Each row has an assignment; it is therefore optimal.
Assignment problem 29