Assignment
Assignment
Characteristics
c21
c22
2 2
c23
c31 c32
3 3
c33
WORKERS JOBS
Assignment Problem –
Cost Matrix
Let the following represent the standard assignment problem
cost matrix, c:
Tasks
1 2 … n
1 c 11 c 12 … c 1n
Assignees 2 c 21 c 22 … c 2n
… …
n c n1 c n2 … c nn
Assignment Problem
Linear Programming Formulation
Min cijxij
ij
s.t. xij = 1 for each resource (row) i
j
Tasks
1 2 3 4
1 10 0 3 0
Assignees 2 0 9 3 0
3 5 5 0 4
4 0 1 3 5
0 16
28
30
Fed. B
18
0
35 32
20
Gol. C
0
25 25
14
Univ. Dum.
0
Example 1: AP
Initial Tableau Setup
Since the Hungarian algorithm requires that there be the
same number of rows as columns, add a Dummy column
so that the first tableau is (the smallest elements in each
row are marked red):
A B C Dummy
Westside 50 36 16 0
Federated 28 30 18 0
Goliath 35 32 20 0
Universal 25 25 14 0
Example 1: AP
Step 1: Subtract minimum number in each row from all
numbers in that row. Since each row has a zero, we
simply generate the original matrix (the smallest
elements in each column are marked red). This yields:
A B C Dummy
Westside 50 36 16 0
Federated 28 30 18 0
Goliath 35 32 20 0
Universal 25 25 14 0
Example 1: AP
Step 2: Subtract the minimum number in each column
from all numbers in the column. For A it is 25, for B it is
25, for C it is 14, for Dummy it is 0. This yields:
A B C Dummy
Westside 25 11 2 0
Federated 3 5 4 0
Goliath 10 7 6 0
Universal 0 0 0 0
Example 1: AP
Step 3: Draw the minimum number of lines to cover all zeroes
Step 3: Draw the minimum number of lines to cover all zeroes
(called minimum cover). Although one can "eyeball" this
minimum, use the following algorithm. If a "remaining" row has
only one zero, draw a line through the column. If a remaining
column has only one zero in it, draw a line through the row. Since
the number of lines that cover all zeros is 2 < 4 (# of rows), the
current solution is not optimal.
A B C Dummy
Westside 25 11 2 0
Federated 3 5 4 0
Goliath 10 7 6 0
Universal 0 0 0 0
A B C Dummy
Westside 23 9 0 0
Federated 1 3 2 0
Goliath 8 5 4 0
Universal 0 0 0 2
Example 1: AP
Step 3: Draw the minimum number of lines to cover all
zeroes. Since 3 (# of lines) < 4 (# of rows), the current
solution is not optimal.
A B C Dummy
Westside 23 9 0 0
Federated 1 3 2 0
Goliath 8 5 4 0
Universal 0 0 0 2
A B C Dummy
Westside 23 9 0 1
Federated 0 2 1 0
Goliath 7 4 3 0
Universal 0 0 0 3
Example 1: AP
Find the minimum cover:
A B C Dummy
Westside 23 9 0 1
Federated 0 2 1 0
Goliath 7 4 3 0
Universal 0 0 0 3
A B C Dummy
Westside 23 9 0 1
Federated 0 2 1 0
Goliath 7 4 3 0
Universal 0 0 0 3
Example 1: AP
The optimal assignment is (go back to the original table for
the distances):