Title: Assignment problems
1 2What is an assignment problem?
- Suppose there are n jobs to be performed and n
persons - are available for doing these jobs. Assume that
each - person can do each job at a time , though with
varying - degree of efficiency. Let cij be the
cost(payment) if the - ith person is assigned the jth job , the problem
is to find - an assignment (which job should be assigned to
which - person ) so that the total cost for performing
all jobs is - minimum.
3The Assignment Model
- Each assignment problem has associated with it a
table, or matrix. - Generally, the rows contain the objects or people
we wish to assign, and the columns comprise the
tasks or things we want them assigned to. Note-
The number of persons and number of jobs are
equal. - The numbers in the table are the costs associated
with each particular assignment.
Jobs? Persons 1 2 3 4
A 8 26 17 11
B 13 28 4 26
C 38 19 18 15
D 19 26 24 10
4The Assignment Model
- An assignment problem can be viewed as a
transportation problem in which - the capacity from each source (or person to be
assigned) is 1 and - the demand at each destination (or job to be
done) is 1. - Such a formulation could be solved using the
transportation algorithm, but it would have a
severe degeneracy problem. - However, this type of problem is very easy to
solve using the Hungarian method.
5Assignment algorithm (Hungarian assignment method)
- Find the opportunity cost table by
- Subtracting the smallest number in each row of
the original cost table or matrix from every
number in that row. - Then subtracting the smallest number in each
column of the table obtained in part (a) from
every number in that column.
6Continue..
- Test the table resulting from step 1 to see
whether an optimal assignment can be made. - The procedure is to draw the minimum number of
vertical and horizontal straight lines necessary
to cover all zeros in the table. - If the number of lines equals either the number
of rows or columns in the table, an optimal
assignment can be made. - If the number of lines is less than the number of
rows or columns, then proceed to step 3.
7Continue.
- Revise the present opportunity cost table.
- This is done by subtracting the smallest number
not covered by a line from every other uncovered
number. - This same smallest number is also added to any
number(s) lying at the intersection of horizontal
and vertical lines. - We then return to step 2 and continue the cycle
until an optimal assignment is possible.
8Steps in the Assignment algorithm.
Not optimal
Step 1
Step 2
Optimal
9Example-
- A car hire company has one car at each of five
depots a,b,c,d and e. A customer requires a car
in each town , namely A,B,C,D and E. Distance (in
km s) between depots (origins) and towns
(destinations ) are given in the following
matrix.
a b c d e
A 160 130 175 190 200
B 135 120 130 160 175
C 140 110 155 170 185
D 50 50 80 80 110
E 55 35 70 80 105
10Solution-
- Now we will find the opportunity table as follow.
a b c d e
A 160 130 175 190 200
B 135 120 130 160 175
C 140 110 155 170 185
D 50 50 80 80 110
E 55 35 70 80 105
a b c d e
A 30 0 45 60 70
B 15 0 10 40 55
C 30 0 45 60 75
D 0 0 30 30 60
E 20 0 35 45 70
a b c d e
A 30 0 35 30 15
B 15 0 0 10 0
C 30 0 35 30 20
D 0 0 20 0 5
E 20 0 25 15 15
11Continue
To test for optimality , we will draw the minimum
no of vertical and horizontal lines to cover
all the zeros. So we have
Now the opportunity table is as follow.
a b c d e
A 30 0 35 30 15
B 15 0 0 10 0
C 30 0 35 30 20
D 0 0 20 0 5
E 20 0 25 15 15
a b c d e
A 30 0 35 30 15
B 15 0 0 10 0
C 30 0 35 30 20
D 0 0 20 0 5
E 20 0 25 15 15
Here the number of lines are 3. which is not
equal to rows ( or columns)
So it is not an optimal solution.
Then we do the following operations to get
improved table as follow.
12a b c d e
A 30 0 35 30 15
B 15 0 0 10 0
C 30 0 35 30 20
D 0 0 20 0 5
E 20 0 25 15 15
Choose the minimum element among all uncovered
elements .
Here the minimum element is 15.
Then subtract the minimum element (15) from all
uncovered elements by the lines and add that
element to intersection of these lines.
a b c d e
A 15 0 20 15 0
B 15 15 0 10 0
C 15 0 20 15 5
D 0 15 20 0 5
E 5 0 10 0 0
So the matrix becomes
Now draw the minimum no of lines to cover all the
zeros.
Here we saw that number of lines are 5.i.e. which
is equal to number of rows (or columns).
Hence it is the optimal solution table.
13Now optimal solution is obtained as follow.
Here column a has single zero in row D so
make a zero assignment to this by square and put
on the zeros in that row . (if any).
a b c d e
A 15 0 20 15 0
B 15 15 0 10 0
C 15 0 20 15 5
D 0 15 20 0 5
E 5 0 10 0 0
0
0
Similarly we can make remaining zero assignments
in a such a way that each row and each column as
a single zero assignment.
0
0
0
Now we will take the values at zero assignment in
the table form original table.
a b c d e
A 160 130 175 190 200
B 135 120 130 160 175
C 140 110 155 170 185
D 50 50 80 80 110
E 55 35 70 80 105
So we have.
Route A-e B-c C-b D-a E-d total
Distance 200 130 110 50 80 570kms
14