Unit-1e
Unit-1e
Introduction
The assignment problem is a particular case of the transportation problem in which the
objective is to assign a number of tasks (Jobs or origins or sources) to an equal number of
facilities (machines or persons or destinations) at a minimum cost (or maximum profit).
Suppose that we have ‘n’ jobs to be performed on ‘m’ machines (one Job to one machine)
and our objective is to assign the jobs to the machines at he minimum cost (or maximum profit)
under the assumption that each machine can perform each job but with varying degree of
efficiencies.
The assignment problem can be stated in the form of m ´ n matrix ( c ij ) called a Cost
matrix (or) Effectiveness matrix where c ij is the cost of assigning t th machine to the j th job.
Jobs
1 2 3 ……………… n
1 c11 c12 c13 ……………… c1 n
2 c 21 c 22 c 23 ……………… c 2n
Machines 3 c 31 c 32 c 33 ……………… c 3n
: … … … ……………… …
: … … … ……………… …
: … … … ……………… …
m c m1 c m2 c m3 ……………… c mn
141
The technique used for solving assignment problem makes use of the following two
theorems.
Theorem 1 : The optimum assignment schedule remains unaltered if we add or subtract
a constant from all the elements of the row or column of the assignment cost matrix.
Theorem 2 : If for an assignment problem all c ij > 0, then an assignment schedule ( x ij )
which satisfies å cij x ij = 0, must be optimal.
Difference between the Transportation Problem
and the Assignment Problem
Transportation Problem Assignment Problem
(a) Supply at any source may be any Supply at any source (machine) will be
positive quantity a i 1 i. e., a i = 1.
(b) Demand at any destination may be any Demand at any destination (job) will be
positive quantity b j 1. i. e., b j = 1
(c) One or more source to any number of One source (machine) to only one
destinations destination (job).
Step 5 : Cover all the zeros by drawing a minimum number of straight lines as follows.
(a) Mark (4) the rows that do not have assignment.
(b) Mark (4) the columns (not already marked) that have zeroes in marked rows.
(c) Mark (4) the rows (not already marked) that have assignments in marked columns.
(d) Repeat (d) and (c) until no more marking is required.
(e) Draw lines through all unmarked rows and marked columns. If the number of these
lines is equal to the order of the matrix then it is an optimum solution otherwise not.
Step 6 : Determine the smallest cost element not covered by the straight lines. Subtract
this smallest cost element from all the uncovered elements and add this to all those elements
which are laying in the intersection of these straight lines and do no change the remaining
elements which lie on the straight lines.
Step 7 : Repeat steps (1) to (6), until an optimum assignment is attained.
Note 1 : It case some rows or columns contain more than one zero, encircle any
unmarked zero arbitrarily and cross all other zeroes in its columns or row.
Proceed in this way until no zero is left unmarked or encircled.
Note 2 : The above assignment algorithm is only for minimization problems.
Note 3 : If the given assignment problem is of maximization type, convert it to a
minimization assignment problem by max Z = - min ( - Z) and multiply all the
given cost elements by - 1 in the cost matrix and then solve by assignment
algorithm.
Note 4 : Some times, a final cost matrix contains more than required number of zeroes
at independent positions. This implies that there is more than one optimal
solution (multiple optimal solutions) with the same optimum assignment cost.
* Example 1 : Consider the problem of assigning five jobs to five persons. The
assignment costs are given as follows :
Job
1 2 3 4 5
A æ 8 4 2 6 1 ö
ç ÷
B ç 0 9 5 5 4 ÷
Person C ç 3 8 9 2 6 ÷
ç ÷
D ç 4 3 1 0 3 ÷
E çè 9 5 8 9 5 ÷ø
Determine the optimum assignment schedule.
Solution : The cost matrix of the given assignment problem is
æ 8 4 2 6 1 ö
ç ÷
ç 0 9 5 5 4 ÷
ç 3 8 9 2 6 ÷
ç ÷
ç 4 3 1 0 3 ÷
ç 9 5 8 9 5 ÷ø
è
145
Since the number of rows is equal to the number of columns in the cost matrix, the given
assignment problem is balanced.
Step 1 : Select the smallest cost element in each row and subtract this from all the
elements of the corresponding row, we get the reduced matrix
æ 7 3 1 5 0 ö
ç ÷
ç 0 9 5 5 4 ÷
ç 1 6 7 0 4 ÷
ç ÷
ç 4 3 1 0 3 ÷
ç 4 0 3 4 0 ÷ø
è
Step 2 : Select the smallest cost element in each column and subtract this from all the
elements of the corresponding column, we get the reduced matrix.
æ 7 3 0 5 0 ö
ç ÷
ç 0 9 4 5 4 ÷
ç 1 6 6 0 4 ÷
ç ÷
ç 4 3 0 0 3 ÷
ç 4 0 2 4 0 ÷ø
è
Since each row and each column contains atleast one zero, we shall make assignments in
the reduced matrix.
Step 3 : Examine the rows successively until a row with exactly one unmarked zero is
found. Since the 2nd row contains a single zero, encircle this zero and cross all other zeroes of its
columns.The 3rd row contains exactly one unmarked zero, so encircle this zero and cross all
other zeroes in its column. The 4th row contains exactly one unmarked zero, so encircle this
zero and cross all other zeroes in its column. The 1st row contains exactly one unmarked zero, so
encircle this zero and cross all other zeroes in its column. Finally the last row contains exactly
one unmarked zero, so encircle this zero and cross all other zeroes in its column. Like wise
examine the columns successively. The assignments in rows and columns in the reduced matrix
is given by
æ 7 3 0 5 (0) ö
ç ÷
ç (0) 9 4 5 4 ÷
ç 1 6 6 (0) 4 ÷
ç ÷
ç 4 3 (0) 0 3 ÷
ç 4 (0) 2 4 0 ÷ø
è
Step 4 : Since each row and each column contains exactly one assignment (i. e., exactly
one encircled zero) the current assignment is optimal.
\ The optimum assignment schedule is given by A ® 5, B ® 1, C ® 4, D ® 3, E ® 2.
The optimum (minimum) assignment cost = (1 + 0 + 2 + 1 + 5) cost units = 9/- units of cost.
* Example 2 : The processing time in hours for the jobs when allocated to the
different machines are indicated below. Assign the machines for the jobs so that the
total processing time is minimum
146
Machines
M1 M2 M3 M4 M5
J1 9 22 58 11 19
J2 43 78 72 50 63
Jobs J3 41 28 91 37 45
J4 74 42 27 49 39
J5 36 11 57 22 25
Examine the columns successively. Fourth column contains exactly one unmarked zero,
encircle this zero and cross all other zeroes in its row. After examining all the rows and
columns, we get
æ 0 13 49 (0) 0 ö
ç ÷
ç (0) 35 29 5 10 ÷
ç 13 (0) 63 7 7 ÷
ç ÷
ç 47 15 (0) 20 2 ÷
ç 25 0 46 9 4 ÷ø
è
Step 4 : Since the 5 th row and 5 th column do not have any assignment, the current
assignment is not optimal.
Step 5 : Cover all the zeroes by drawing a minimum number of straight lines as follows :
(a) Mark (4) the rows that do not have assignment. The row 5 is marked.
(b) Mark (4) the columns (not already marked) that have zeroes in marked rows. This
column 2 is marked.
(c) Mark (4) the rows (not already marked) that have assignments in marked columns.
Thus row 3 is marked.
(d) Repeat (b) and (c) until no more making is required. In the present case this
repetition is not necessary.
(e) Draw lines through all unmarked rows (rows 1, 2 and 4) and marked columns
(column 2). We get
æ 0 13 49 0 0 ö
ç ÷
ç 0 35 29 5 10 ÷
ç 13 0 63 7 7 ÷ 3
ç ÷
ç 47 15 0 20 2 ÷
ç 25 0 46 9 ( 4) ÷ø 3
è
3
Step 6 : Here 4 is the smallest element not covered by these straight lines. Subtract this 4
from all the uncovered elements and add this 4 to all those elements which are lying in the
intersection of these straight lines and do not change the remaining elements which lie on these
straight lines, we get the following matrix.
æ 0 17 49 0 0 ö
ç ÷
ç 0 39 29 5 10 ÷
ç 9 0 59 3 3 ÷
ç ÷
ç 47 19 0 20 2 ÷
ç 21 0 42 5 0 ÷ø
è
Since each row and each column contains atleast one zero, we examine the rows and
columns successively, i. e., repeat step 3 above, we get
148
æ 0 17 49 (0) 0 ö
ç ÷
ç (0) 39 29 5 10 ÷
ç 9 (0) 59 3 3 ÷
ç ÷
ç 47 19 0 20 2 ÷
ç 21 0 42 5 (0) ÷ø
è
In the above matrix, each row and each column contains exactly one assignment (i. e.,
exactly one encircled zero), therefore the current assignment is optimal.
\ The optimum assignment schedule is J1 ® M 4 , J 2 ® M 1 , J 3 ® M 2 , J 4 ® M 3 ,
J 5 ® M 5 and the optimum (minimum) processing time
= 11 + 43 + 28 + 27 + 25 hours
= 134 hours.
* Example 3 : Four different jobs can be done on four different machines.The set
up and take down time costs are assumed to be prohibitively high for change overs.
The matrix below gives the cost in rupees of processing job i on machine j.
Machines
M1 M2 M3 M4
J1 5 7 11 6
Jobs J2 8 5 9 6
J3 4 7 10 7
J4 10 4 8 3
How should the jobs be assigned to the various machines so that the total cost
is minimized ?
Solution : The assignment problem is given by the cost matrix
æ 5 7 11 6 ö
ç ÷
ç 8 5 9 6 ÷
ç 4 7 10 7 ÷
çç ÷
è 10 4 8 3 ÷ø
Since the number of rows is equal to the number of columns in the cost matrix, the given
assignment problem is balanced.
Select the smallest cost element in each row and subtract this from all the elements of the
corresponding row, we get the reduced matrix.
æ 0 2 6 1 ö
ç ÷
ç 3 0 4 1 ÷
ç 0 3 6 3 ÷
çç ÷
è 7 1 5 0 ÷ø
149
Select the smallest cost element in each column and subtract this from all the elements of
the corresponding column, we get the following reduced matrix.
æ 0 2 2 1 ö
ç ÷
ç 3 0 0 1 ÷
ç 0 3 2 3 ÷
çç ÷
è 7 1 1 0 ÷ø
Since each row and each column contains atleast one zero, we shall make the assignment
in rows and columns of this reduced matrix.
Examine the rows successively until a row with exactly one unmarked zero is found. The
first row contains exactly one unmarked zero, encircle this zero and cross all other zeroes of its
column. The fourth row contains exactly one unmarked zero, encircle this zero and cross all
other zeroes in its column. The 2nd column contains exactly one unmarked zero, encircle this
zero and cross all other zeroes in its row. We get
æ (0) 2 2 1 ö
ç ÷
ç 3 (0 ) 0 1 ÷
ç 0 3 2 3 ÷
çç ÷
è 7 1 1 (0) ÷ø
Since there are some rows and column without assignment (i. e., without encircled zero),
the current assignment is not optimal.
Cover all the zeroes by drawing a minimum number of straight lines.
We get
æ 0 2 2 (1) ö
ç ÷
ç 3 0 0 1 ÷ 3
ç 0 3 2 3 ÷
çç ÷
è 7 1 1 0 ÷ø 3
3
Here 1 is the smallest cost element not covered by these straight lines. Add this 1 to those
elements which lie in the intersection of these straight lines, subtract this 1 from all the
uncovered elements and do not change the remaining elements which lie on the straight lines
we get
æ 0 1 1 0 ö
ç ÷
ç 4 0 0 1 ÷
ç 0 2 1 2 ÷
çç ÷
è 8 1 1 0 ÷ø
Since each row and each column contains atleast one zero, we shall make assignment in
the rows and columns of this reduced matrix. We get
æ 0 1 1 0 ö
ç ÷
ç 4 (0) 0 1 ÷
ç (0) 2 1 2 ÷
çç ÷
è 8 1 1 (0) ÷ø
150
Since there are some rows and columns without assignment, the current assignment is
not optimal.
Cover all the zeroes by drawing a minimum number of straight lines.
We get
æ 0 1 1 0 ö
ç ÷ 3
ç 4 0 0 1 ÷
ç 0 2 1 2 ÷3
çç ÷
è 8 (1) 1 0 ÷ø 3
3 3
Here 1 is the smallest cost element not covered by these straight lines. Subtract this 1
from all the uncovered elements, add this 1 to those elements which lie in the intersection of
these straight lines and do not change the remaining elements which lie on these straight lines.
We get
æ 0 0 0 0 ö
ç ÷
ç 5 0 0 2 ÷
ç 0 1 0 2 ÷
çç ÷
è 8 0 0 0 ÷ø
Since each row and each column contains atleast one zero, we shall make the assignment
in the rows and columns of this reduced matrix. We get
æ (0) 0 0 0 ö
ç ÷
ç 5 (0) 0 2 ÷
ç 0 1 (0) 2 ÷
çç ÷
è 8 0 0 (0) ÷ø
Since each row and each column contains exactly one assignment (i. e., exactly one
encircled zero) the current assignment is optimal.
\ The optimum assignment schedule is given by J1 ® M 1 , J 2 ® M 2 , J 3 ® M 3 ,
J 4 ® M 4 and the optimum (minimum) assignment cost
= Rs. ( 5 + 5 + 10 + 3) = Rs. 23/-
* Example 4 : The assignment cost of assigning any one operator to any one
machine is given in the following table
Operators
I II III IV
A 10 5 13 15
Machines B 3 9 18 3
C 10 7 3 2
D 5 11 9 7
* Example 5 : A company has four machines to do three jobs. Each job can be
assigned to one and only one machine. The cost of each job on each machine is given
in the following table.
Machines
1 2 3 4
A 18 24 28 32
Jobs B 8 13 17 19
C 10 15 19 22
0 6 10 14 ö 3
æ
ç ÷
ç 0 5 9 11 ÷ 3
ç 0 ( 5) 9 12 ÷ 3
çç ÷
è 0 0 0 0 ÷ø
3
Here 5 is the smallest cost element not covered by these straight lines. Subtract this 5
from all the uncovered elements, add this 5 to those elements which lie in the intersection of
these straight lines and do not change the remaining elements which lie on the straight lines.
We get
æ 0 1 5 9 ö
ç ÷
ç 0 0 4 6 ÷
ç 0 0 4 7 ÷
çç ÷
è 5 0 0 0 ÷ø
Since each row and each column contains atleast one zero, we shall make assignment in
the rows and columns having single zero. We get
æ (0) 1 5 9 ö
ç ÷
ç 0 (0) 4 6 ÷
ç 0 0 4 7 ÷
çç ÷
è 5 0 (0) 0 ÷ø
Since there are some rows and columns without assignment, the current assignment is
not optimal.
Cover all the zeroes by drawing a minimum number of straight lines.
æ 0 1 5 9 ö 3
ç ÷
ç 0 0 4 6 ÷ 3
ç 0 0 ( 4) 7 ÷ 3
çç ÷
è 5 0 0 0 ÷ø
3 3
Choose the smallest cost element not covered by these straight lines, subtract this from
all the uncovered elements, add this to those elements which are in the intersection of the lines
and do not change the remaining elements which lie on these straight lines. Thus we get
æ 0 1 1 5 ö
ç ÷
ç 0 0 0 2 ÷
ç 0 0 0 3 ÷
çç ÷
è 9 4 0 0 ÷ø
Since each row and each column contains atleast one zero, we shall make the assignment
in the rows and columns having single zero. We get
æ (0) 1 1 5 ö
ç ÷
ç 0 (0) 0 2 ÷
ç 0 0 (0) 3 ÷
çç ÷
è 9 4 0 (0) ÷ø
154
Since each row and each column contains exactly one assignment (i. e., exactly one
encircled zero) the current assignment is optimal.
\ The optimum assignment schedule is given by A ® 1, B ® 2, C ® 3, D ® 4 and the
optimum (minimum) assignment cost
= (18 + 13 + 19 + 0) cost units = 50/- units of cost
Note 1 : For this problem, the alternative optimum schedule is A ® 1, B ® 3, C ® 2,
D ® 4 with the same optimum assignment cost = Rs. (18 + 17 + 15 + 0) = 50/- units of cost.
Note 2 : Here the assignment D ® 4 means that the dummy job D is assigned to the 4 th
machine. It means that machine 4 is left without any assignment.
* Example 6 : Assign four trucks 1, 2 3, and 4 to vacant spaces A, B, C, D, E and F
so that the distance travelled is minimized. The matrix below shows the distance.
1 2 3 4
A 4 7 3 7
B 8 2 5 5
C 4 9 6 9
D 7 5 4 8
E 6 3 5 4
F 6 8 7 3
æ 4 7 3 7 ö
ç ÷
ç 8 2 5 5 ÷
ç 4 9 6 9 ÷
ç ÷
ç 7 5 4 8 ÷
ç 6 3 5 4 ÷
ç ÷
ç 6 8 7 3 ÷ø
è
Since the number of rows is more than the number of columns, the given assignment
problem is unbalanced. To make it balanced, let us introduce two dummy trucks (columns) with
zero costs. We get
æ 4 7 3 7 0 0 ö
ç ÷
ç 8 2 5 5 0 0 ÷
ç 4 9 6 9 0 0 ÷
ç ÷
ç 7 5 4 8 0 0 ÷
ç 6 3 5 4 0 0 ÷
ç ÷
ç 6 8 7 3 0 0 ÷ø
è
155
Select the smallest cost element in each row (column) and subtract this from all the
elements of the corresponding row (column). We get
æ 0 5 0 4 0 0 ö
ç ÷
ç 4 0 2 2 0 0 ÷
ç 0 7 3 6 0 0 ÷
ç ÷
ç 3 3 1 5 0 0 ÷
ç 2 1 2 1 0 0 ÷
ç ÷
ç 2 6 4 0 0 0 ÷ø
è
Since each row and each column contains atleast one zero, we make the assignment in
rows and columns having single zero. We get
æ0 5 (0) 4 0 0 ö
ç ÷
ç 4 (0) 2 2 0 0 ÷
ç (0) 7 3 6 0 0 ÷
ç ÷
ç 3 3 1 5 (0) 0 ÷
ç 2 1 2 1 0 (0) ÷
ç ÷
ç 2 6 4 (0) 0 0 ÷ø
è
Since each row and each column contains exactly one assignment (i. e., exactly one
encircled zero), the current assignment is optimal.
\ The optimum assignment schedule is given by A ® 3, B ® 2, C ® 1, D ® 5, E ® 6,
F ® 4, and the optimum (minimum) distance.
= (3 + 2 + 4 + 0 + 0 + 3)
units of distance = 12/- units of the distance.
* Example 7 : A batch of 4 jobs can be assigned to 5 different machines. The set up
time (in hours) for each job on various machines is given below :
Machine
1 2 3 4 5
1 10 11 4 2 8
2 7 11 10 14 12
Job 3 5 6 9 12 14
4 13 15 11 10 7
Find an optimal assignment of jobs to machines which will minimize the total
set up time.
Solution : The matrix of the given assignment problem is
156
æ 10 11 4 2 8ö
ç ÷
ç 7 11 10 14 12 ÷
ç 5 6 9 12 14 ÷
çç ÷
è 13 15 11 10 7 ÷ø
Since the number of rows is less than the number of columns in the cost matrix, the given
assignment problem is unbalanced.
To make it a balanced one, add a dummy job 5 (row) with zero cost elements. The
balanced cost matrix is given by
æ 10 11 4 2 8ö
ç ÷
ç 7 11 10 14 12 ÷
ç 5 6 9 12 14 ÷
ç ÷
ç 13 15 11 10 7÷
ç 0 0 0 0 0 ÷ø
è
Now select the smallest cost element in each row (column) and subtract this from all the
elements of the corresponding row (column), we get the reduced cost matrix.
æ 8 9 2 0 6 ö
ç ÷
ç 0 4 3 7 5 ÷
ç 0 1 4 7 9 ÷
ç ÷
ç 6 8 4 3 0 ÷
ç 0 0 0 0 0 ÷ø
è
Since each row and each columns contains atleast one zero, we shall make the
assignment in rows and columns of this reduced cost matrix.
æ 8 9 2 (0) 6 ö
ç ÷
ç (0) 4 3 7 5 ÷
ç 0 1 4 7 9 ÷
ç ÷
ç 6 8 4 3 (0) ÷
ç 0 (0) 0 0 0 ÷ø
è
Since there are some rows and columns with out assignment, the current assignment is
not optimal.
Cover all the zeroes by drawing a minimum number of straight lines
æ8 9 2 0 6 ö
ç ÷
ç0 4 3 7 5 ÷ 3
ç0 (1) 4 7 9 ÷3
ç ÷
ç6 8 4 3 0 ÷
ç0 0 0 0 0 ÷ø
è
3
Here 1 is the smallest cost element not covered by these straight lines. Subtract this 1
from all the uncovered elements, add this 1 to those elements which lie in the intersection of
these straight lines and do not change the remaining elements which lie on the straight lines.
157
We get
æ9 9 2 0 6 ö
ç ÷
ç0 3 2 6 4÷
ç0 0 3 6 8 ÷
ç ÷
ç7 8 4 3 0 ÷
ç1 0 0 0 0 ÷ø
è
Since each row and each column contains atleast one zero, we shall make the
assignment in rows and columns of this reduced cost matrix.
æ 9 9 2 (0) 6 ö
ç ÷
ç (0) 3 2 6 4 ÷
ç 0 (0) 3 6 8 ÷
ç ÷
ç 7 8 4 3 (0) ÷
ç 1 0 (0) 0 0 ÷ø
è
Since each row and each column contains exactly one assignment (i. e., exactly one
encircled zero), the current assignment is optimal.
\The optimum assignment schedule is given by Job 1 ® M/c 4, Job 2 ® M/c 1, Job 3 ® M/c
2, Job 4 ® M/c 5. M/c 3 is left without any assignment.
The optimum (minimum) total set up time
= 2 + 7 + 6 + 7 hours
= 22 hours.
Districts
1 2 3 4
A 16 10 14 11
Salesmen B 14 11 15 15
C 15 15 13 12
D 13 12 14 15
Find the assignment of salesmen to various districts which will yield maximum
profit.
Solution : The cost matrix of the given assignment problem is
æ (16) 10 14 11 ö
ç ÷
ç 14 11 15 15 ÷
ç 15 15 13 12 ÷
çç ÷
è 13 12 14 15 ÷ø
Since this is a maximization problem, it can be converted into an equivalent
minimization problem by subtracting all the cost elements in the cost matrix from the highest
cost element 16 of this cost matrix. Thus the cost matrix of the equivalent minimization
problem is
æ0 6 2 5 ö
ç ÷
ç2 5 1 1 ÷
ç1 1 3 4 ÷
çç ÷
è3 4 2 1 ÷ø
Select the smallest cost element in each row (column) and subtract this from all the cost
elements of the corresponding row (column). We get the reduced cost matrix.
æ 0 6 2 5 ö
ç ÷
ç 1 4 0 0 ÷
ç 0 0 2 3 ÷
çç ÷
è 2 3 1 0 ÷ø
Since each row and each column contains atleast one zero, we shall make the assignment
in rows and columns having single zero. We get
æ (0) 6 2 5 ö
ç ÷
ç 1 4 (0 ) 0 ÷
ç 0 (0) 2 3 ÷
çç ÷
è 2 3 1 (0) ÷ø
Since each row and each column contains exactly one encircled zero, the current
assignment is optimal.
\ The optimum assignment schedule is given by A ® 1, B ® 3, C ® 2, D ® 4 and the
optimum (maximum) profit
= Rs. (16 + 15 + 15 + 15)
= Rs. 61/-.
159
* Example 9 : Solve the assignment problem for maximization given the profit
matrix (profit in rupees).
Machines
P Q R S
A 51 53 54 50
Job B 47 50 48 50
C 49 50 60 61
D 63 64 60 60
Since each row and each column contains exactly one encircled zero, the current
assignment is optimal.
\The optimum assignment schedule is given by A ® R, B ® Q, C ® S, D ® P and the
optimum (maximum) profit
= Rs. ( 54 + 50 + 61 + 63)
= Rs. 228/-
* Example 10 : A company is faced with the problem of assigning four different
salesman to four territories for promoting its sales.Territories are not equally rich in
their sales potential and the salesman also differ in their ability to promote sales.The
following table gives the expected annual sales (in thousands of Rs.) for each
salesman if assigned to various territories. Find the assignment of salesman so as to
maximize the annual sales.
Territories
1 2 3 4
1 60 50 40 30
Salesmen 2 40 30 20 15
3 40 20 35 10
4 30 30 25 20
Since each row and each column contains atleast one zero, we make the assignment in
rows and columns of this reduced cost matrix
æ (0) 10 15 20 ö
ç ÷
ç 0 10 15 15 ÷
ç 0 20 (0) 20 ÷
çç ÷÷
è 0 (0) 0 0 ø
Since there are some rows and columns without assignment, the current assignment is
not optimal.
Cover all the zeroes by drawing a minimum number of straight lines
æ 0 10 15 20 ö 3
ç ÷
ç 0 (10) 15 15 ÷ 3
ç 0 20 0 20 ÷
çç ÷
è 0 0 0 0 ÷ø
3
Here 10 is the smallest cost element not covered by these straight lines.Subtract this 10
from all the uncovered elements, add this 10 to those elements which lie in the intersection of
these straight lines and do not change the remaining elements which lie on these straight lines.
We get
æ 0 0 5 10 ö
ç ÷
ç 0 0 5 5 ÷
ç 10 20 0 20 ÷
çç ÷
è 10 0 0 0 ÷ø
Since each row and each column contains atleast one zero, we make the assignment in
rows and columns of this reduced cost matrix.
æ (0) 0 5 10 ö
ç ÷
ç 0 (0) 5 5 ÷
ç 10 20 (0) 20 ÷
çç ÷
è 10 0 0 (0) ÷ø
Since each row and each column contains exactly one assignment (i. e., exactly one
encircled zero), the current assignment is optimal.
\The optimum assignment schedule is given by salesman 1 ® Territory, Salesman 2 ®
Territory 2, Salesman 3 ® Territory 3, Salesman 4 ® Territory 4.
The optimum (maximum) annual sales
= 60 + 30 + 35 + 20 (in thousand of rupees)
= 145 (in thousand of rupees)
= Rs. 1,45,000/-
Note : For this problem, there exists alternative optimal assignment schedule with the
same maximum sales Rs. 1,45,000/-.
162
Restrictions in Assignments
The assignment technique assumes that the problem is free from practical restrictions
and any task could be assigned to any facility. But in some cases, it may not be possible to
assign a particular task to a particular facility due to space size of the task, process capability of
the facility, technical difficulties or other restrictions. This can be overcome by assigning a very
high processing time or cost element (it can be ¥) to the corresponding cell. This cell will be
automatically excluded in the assignment because of the unused high time cost associated
with it.
* Example 11 : A machine shop purchased a drilling machine and two lathes of
different capacities. The positioning of the machines among 4 possible locations on
the shop floor is important from the standard of materials handling.Given the cost
estimate per unit time of materials below, determine the optimal location of the
machines.
Location
1 2 3 4
Lathe 1 12 9 12 9
Drill 15 not suitable 13 20
Lathe 2 4 8 10 6
Solution : Since the drilling machine is not suitable for location 2, the corresponding
cost element should be taken as ¥. Thus the cost matrix of the given assignment problem is
æ 12 9 12 9 ö
ç ÷
ç 15 ¥ 13 20 ÷
ç 4 8 10 6 ÷
è ø
Since the number of rows is less than the number of columns, we add a dummy row (a
dummy drilling machine or a dummy lathe 3) with zero cost elements. The cost matrix for the
balanced assignment problem is
æ 12 9 12 9 ö
ç ÷
ç 15 ¥ 13 20 ÷
ç 4 8 10 6 ÷
çç ÷
è 0 0 0 0 ÷ø
Select the smallest cost in each row (column) and subtract this from all the cost elements
of the corresponding row (column). We get the reduced matrix
æ 3 0 3 0 ö
ç ÷
ç 2 ¥ 0 7 ÷
ç 0 4 6 2 ÷
çç ÷÷
è 0 0 0 0 ø
Since each row and each column contains atleast one zero, we shall make the assignment
in rows and columns having single zero. We get
163
æ 3 (0) 3 0 ö
ç ÷
ç 2 ¥ (0) 7 ÷
ç (0) 4 6 2÷
çç ÷
è0 0 0 (0) ÷ø
Since each row and each column contains exactly one encircled zero, the current
assignment is optimal.
\The optimum assignment schedule is given by
Lathe 1 ® Location 2, Drill ® Location 3,
Lathe 2 ® Location 1, Dummy drill ® Location 4
= (9 + 13 + 4 + 0) unit of cost
= 26/- units of cost
= (9 + 13 + 4 + 0) units of cost
= 26/- units of cost.
* Example 12 : Five workers are available to work with the machines and the
respective costs (in rupees) associated with each worker-machine assignment is
given below. A sixth machine is available to replace one of the existing machines and
the associated costs are also given below :
Machines
M1 M2 M3 M4 M5 M6
W1 12 3 6 – 5 8
W2 4 11 – 5 – 3
Workers W3 8 2 10 9 7 5
W4 – 7 8 6 12 10
W5 5 8 9 4 6 –
æ 12 3 6 ¥ 5 8 ö
ç ÷
ç 4 11 ¥ 5 ¥ 3 ÷
ç 8 2 10 9 7 5 ÷
ç ÷
ç ¥ 7 8 6 12 10 ÷
ç 5 8 9 4 6 ¥ ÷ø
è
Since the number of rows is less than the number of columns, the given assignment
problem is unbalanced. Add a dummy worker W6 (dummy row) with zero cost elements.
Thus the cost matrix of the balanced assignment problem is
æ 12 3 6 ¥ 5 8 ö
ç ÷
ç 4 11 ¥ 5 ¥ 3 ÷
ç 8 2 10 9 7 5 ÷
ç ÷
ç ¥ 7 8 6 12 10 ÷
ç 5 8 9 4 6 ¥ ÷
ç ÷
ç 0 0 0 0 0 0 ÷ø
è
Select the smallest cost in each row and column and subtract this from all the cost
elements of the corresponding row and column of the cost matrix. We get
æ9 0 3 ¥ 2 5 ö
ç ÷
ç1 8 ¥ 2 ¥ 0 ÷
ç6 0 8 7 5 3 ÷
ç ÷
ç¥ 1 2 0 6 4 ÷
ç1 4 5 0 2 ¥ ÷
ç ÷
ç0 0 0 0 0 0 ÷
è ø
Since each row and each column contains atleast one zero, we shall make the assignment
in rows and columns having single zero. We get
æ 9 (0) 3 ¥ 2 5 ö
ç ÷
ç 1 8 ¥ 2 ¥ (0) ÷
ç 6 0 8 7 5 3 ÷
ç ÷
ç ¥ 1 2 (0) 6 4 ÷
ç 1 4 5 0 2 ¥ ÷
ç ÷
ç (0) 0 0 0 0 0 ÷ø
è
Since some rows and columns are without assignment, the current assignment is not optimal.
Cover all the zeroes by drawing minimum number of straight lines.
æ 9 0 3 ¥ 2 5 ö 3
ç ÷
ç 1 8 ¥ 2 ¥ 0 ÷
ç 6 0 8 7 5 3 ÷ 3
ç ÷
ç ¥ 1 2 0 6 4 ÷ 3
ç (1) 4 5 0 2 ¥ ÷ 3
ç ÷
ç 0 0 0 0 0 0 ÷ø
è
3 3
165
Choose the smallest cost element not covered by these straight lines. Here 1 is such
element. Subtract this 1 from all the uncovered elements, add this 1 to those elements which
are in the intersection of the straight lines and do not change the remaining elements which lie
on these straight lines. We get
æ 8 0 2 ¥ 1 4 ö
ç ÷
ç 1 9 ¥ 3 ¥ 0 ÷
ç 5 0 7 7 4 2 ÷
ç ÷
ç ¥ 1 1 0 5 3 ÷
ç 0 4 4 0 1 ¥ ÷
ç ÷
ç 0 1 0 1 0 0 ÷
è ø
Now we shall make the assignment in rows and columns having single zero.
æ 8 (0) 2 ¥ 1 4 ö
ç ÷
ç 1 9 ¥ 3 ¥ (0) ÷
ç 5 0 7 7 4 2÷
ç ÷
ç¥ 1 1 (0) 5 3 ÷
ç (0) 4 4 0 1 ¥÷
ç ÷
ç0 1 (0) 1 0 8 ÷ø
è
Since some rows and columns are without assignment, the current assignment is not
optimal.
Cover all the zeroes by drawing minimum number of straight lines.
æ 8 0 2 ¥ (1) 4 ö 3
ç ÷
ç1 9 ¥ 3 ¥ 0÷
ç 5 0 7 7 4 2÷ 3
ç ÷
ç¥ 1 1 0 5 3 ÷
ç 0 4 4 0 1 ¥÷
ç ÷
ç0 1 0 1 0 0÷
è ø
3
Subtract the smallest uncovered element 1 from all the uncovered elements, add this 1 to
those elements which are in teh intersection of these straight lines and do not change the
remaining elements which lie on these straight lines. We get
æ7 0 1 ¥ 0 3ö
ç ÷
ç 1 10 ¥ 3 ¥ 0 ÷
ç4 0 6 6 3 1÷
ç ÷
ç¥ 2 1 0 5 3 ÷
ç 0 5 4 0 1 ¥÷
ç ÷
ç0 2 0 1 0 0÷
è ø
Now we shall make the assignment in rows and columns having single zeroes.
166
æ7 0 1 ¥ (0) 3 ö
ç ÷
ç 1 10 ¥ 3 ¥ (0) ÷
ç 4 (0) 6 6 3 1÷
ç ÷
ç ¥ 2 1 (0) 5 3 ÷
ç (0) 5 4 0 1 ¥÷
ç ÷
ç0 2 (0) 1 0 0 ÷ø
è
Since each row and each column contains exactly one encircled zero, the current
assignment is optimal.
\The optimum assignment schedule is given by
W1 ® M 5 , W2 ® M 6 , W3 ® M 2 , W4 ® M 4 , W5 ® M 1 , W6 ® M 3 and the optimum
(minimum) assignment cost according to this schedule is
= Rs.( 5 + 3 + 2 + 6 + 5 + 0)
= Rs. 21/-
Now, if the sixth machine M 6 is not assigned to any of the workers, the given problem
reduces to balanced one (deleting the sixth column). Applying the assignment algorithm to this
balanced problem (reduced problem), the optimal assignment schedule is given by
W1 ® M 5 , W2 ® M 1 , W3 ® M 2 , W4 ® M 3 , W5 ® M 4
and the optimum (minimum) assignment cost according to this schedule is
= Rs. ( 5 + 4 + 2 + 8 + 4)
= Rs. 23/-
It is clear from the above that the minimum cost is more when there are only five
machines. Hence, the sixth machine should be accepted. By accepting this sixth machine the
associated saving cost will be Rs. ( 23 - 21) = Rs. 2/-
Travelling Salesman Problem
A salesman normally must visit a number of cities starting from his headquarters. The
distance (or time or cost) between every pair of cities are assumed to be known. The problem of
finding the shortest distance (or minimum time or minimum cost) if the salesman starts from
his headquarters and passes through each city under his Jurisdiction exactly once and returns
to the headquarters in called the Travelling salesman problem or A Travelling
salesperson problem.
A travelling salesman problem is very similar to the assignment problem with the
additional constraints.
(a) The salesman should go through every city exactly once except the starting city
(headquarters).
(b) The salesman starts from one city (head quarters) and comes back to that city (head-
quarters).
(c) Obviously going from any city to the same city directly is not allowed (i. e., no
assignments should be made along the diagonal line).
Note 1 : Conditions (a) and (b) are usually called route conditions.
167
Note 2 : If a salesmen has a to visit n cities, then he will have a total of ( n - 1)! possible
round trips.
Therefore, the necessary basic steps to solve a travelling salesman problem are :
(i) Assigning an infinitely large element ( ¥) in each of the squares along the diagonal line
in the cost matrix.
(ii) Solving the problem as a routine assignment problem.
(iii) Scrutinizing the solution obtained under (ii) to see if the “route” conditions are
satisfied.
(iv) If not, making adjustments in assignments to satisfy the condition with minimum
increase in total cost (i. e., to satisfy route condition “next best solution” may require to
be considered).
* Example 13 : Solve the following travelling salesmen problem
To
A B C D
A – 46 16 40
From B 41 – 50 40
C 82 32 – 60
D 40 40 36 –
Now we shall make the assignment in rows and columns having single zero. We get
æ ¥ 30 (0) 24 ö
ç ÷
ç (0) ¥ 10 0 ÷
ç 49 (0) ¥ 28 ÷
çç ÷
è 3 4 0 ¥ ÷ø
Since some rows and columns are with out assignment, the current assignment is not
optimal.
Cover all the zeroes by drawing a minimum number of straight lines.
æ ¥ 30 0 24 ö 3
ç ÷
ç 0 ¥ 10 0 ÷
ç 49 0 ¥ 28 ÷
çç ÷
è (3) 4 0 ¥ ÷ø 3
3
Subtract the smallest uncovered cost element 3 from all uncovered elements, add this 3
to those elements which are in the intersection of these straight lines and do not change the
remaining elements which lie on these straight lines. We have
æ ¥ 27 0 21 ö
ç ÷
ç 0 ¥ 13 0 ÷
ç 49 0 ¥ 28 ÷
çç ÷
è 0 1 0 ¥ ÷ø
Now we shall make the assignment in rows and columns having single zeroes. We get
æ ¥ 27 (0) 21 ö
ç ÷
ç 0 ¥ 13 (0) ÷
ç 49 (0) ¥ 28 ÷
çç ÷
è (0) 1 0 ¥ ÷ø
Since each row and each column contains exactly one encircled zero, the current
assignment is optimal for the assignment problem.
\The optimum assignment schedule is given by
A ® C, B ®D, C ® B, D®A
i. e., A ® C, C ® B, B ® D, D ® A,
i. e., A ®C ® B ® D ® A
Check whether the route conditions are satisfied.
A ® C ® B ® D ® A satisfies the route condition.
\The required minimum costs.
= (16 + 32 + 40 + 40) units of cost.
= 128/- units of cost.
169
Since some rows and columns are without assignment, the current assignment is not
optimal.
Cover all the zeroes by drawing a minimum number of straight lines.
æ ¥ (1) 3 0 1 ö 3
ç ÷
ç 1 ¥ 2 0 1 ÷ 3
ç 2 1 ¥ 2 0 ÷
ç ÷
ç 0 0 3 ¥ 4 ÷
ç 0 0 0 3 ¥ ÷ø
è
3
Subtract the smallest uncovered cost element 1 from all uncovered elements, add this 1
to those elements which are in the intersection of these straight lines and do not change the
remaining elements which lie on these elements lines.We have
æ¥ 0 2 0 0 ö
ç ÷
ç 0 ¥ 1 0 0 ÷
ç 2 1 ¥ 3 0 ÷
ç ÷
ç 0 0 3 ¥ 4 ÷
ç 0 0 0 4 ¥÷
è ø
Now we shall make the assignment in rows and columns having single zero. We get
æ ¥ 0 2 (0) 0 ö
ç ÷
ç (0) ¥ 1 0 0 ÷
ç 2 1 ¥ 3 (0) ÷
ç ÷
ç 0 (0) 3 ¥ 4 ÷
ç 0 0 (0) 4 ¥ ÷ø
è
Since each row and each column contains exactly one encircled zero, the current
assignment is optimal.
\The optimal assignment schedule is given by
A ® D, B ® A, C ® E, D ® B, E ®C
i. e., A ® D ® B ® A, C ® E ®C
and the corresponding optimum (minimum) assignment cost
= ( 2 + 3 + 4 + 2 + 4) units of cost
= 15/- units of cost.
But this assignment schedule does not provide the solution of this travelling salesman
problem, because it does not satisfy the ‘route’ condition.
We try to find the next best solution which satisfies the route condition also. The next
minimum (non-zero) cost element in the cost matrix is 1. So we try to bring 1 to the solution. But
the 1 occurs at two places. We shall consider all the cases separately until the acceptable
solution is reached.
We start with making an assignment at (2, 3) instead of zero assignment at (2, 1). The
resulting feasible solution will then be
171
æ ¥ 0 2 (0) 0 ö
ç ÷
ç 0 ¥ (1) 0 0 ÷
ç 2 1 ¥ 3 (0) ÷
ç ÷
ç 0 (0) 3 ¥ 4 ÷
ç (0) 0 0 4 ¥ ÷ø
è
\ The optimum assignment is given by
A ® D, B ® C, C ® E, D ® B, E ® A,
i. e., A ® D ® B ®C ® E ® A
Also, when an assignment is made at (3, 2) instead of zero assignment at (3, 5) the
resulting feasible solution will be
æ ¥ 0 2 0 (0) ö
ç ÷
ç 0 ¥ 1 (0) 0 ÷
ç 2 (1) ¥ 3 0 ÷
ç ÷
ç (0) 0 3 ¥ 4 ÷
ç 0 0 (0) 4 ¥ ÷ø
è
\The optimum assignment is given by
A ® E, B ® D, C ® B, D ® A, E ® C,
i. e., A ® E ®C ® B ® D ® A
\For the given travelling salesman problem, the optimum assignment schedule is given
by
A ® D ® B ® C ® E ® A, (or)
A ® E ®C ® B ® D ® A
In both cases, the optimum (minimum) assignment cost is 16/- units of cost.
MOST IMPORTANT QUESTIONS
1. What is Assignment Problem ? Is it true to say that it is a special case of the
transportation problem ? Explain.
2. Describe the Assignment Problem giving a suitable example. Give two areas of its
applications.
3. Explain the Hungarian Assignment method. Is it better than other methods of solving
assignment problem ? How ?
4. Explain the difference between Assignment Problem and Transportation Problem.
5. What is Unbalanced Assignment Model ? Is it solved by HAM ?
6. Explain the modification that are needed in an assignment problem when the objective is
of maximization instead of minimization. Explain by taking suitable example.
7. Explain the nature of a travelling salesman problem & give its mathematical
formulation.
8. Describe the method of drawing minimum number of lines in the context of Assignment
Problem.
172
4. Four operators Q1 , Q 2 , Q 3 and Q 4 are available to a manager who has to get 4 Jobs
J1 , J 2 , J 3 and J 4 done by assigning one job to each operator. Time needed by different
operators for different jobs in the matrix as follows : Jobs
J1 J2 J3 J4
Q1 12 10 10 8
Operators Q2 14 12 15 11
Q3 6 10 16 4
Q4 8 10 9 7
(i) How should the manager assign the jobs so that the total time needed for all 4 jobs
is minimum ?
(ii) If job J 2 is not assigned to operator Q 2 , what should be the assignment and how
much additional total time will be required ?
(Ans. (i) Q ® J 3 ; O 2 ® J 2 ; O 3 ® J 4 ; O 4 ® J1 ; Total Minimum Time = 34 minutes
(ii) Q1 ® J 2 ; Q 2 ® J 4 ; Q 3 ® J1 ; Q1 ® J 3 ; Total Time = 36 minutes)
5. Solve the following Assignment problem and find the optimal allocation and total cost :
Machines
M1 M2 M3 M4
J1 5 7 11 6
Jobs J2 8 5 9 6
J3 4 7 10 7
J4 10 4 8 3
(Ans. J1 ® M 3 ; J 2 ® M 2 ; J 3 ® M 1 ; J 4 ® M 4 ; Minimum Total Cost = 23)
6. The quotations (Rs. in lakhs) received for 4 project from four contractors are as follows :
Project
A B C D
I 7 5 9 10
Contractor II 3 7 5 8
III 7 4 8 9
IV 8 7 5 2
(i) If only one project is to be awarded to one contractor, find out the assignment of
projects to contractors in order to minimise the total cost.
(ii) If due to certain reasons, it has been decided to award project B to contractor I. How
will you assign the remaining projects to each of the remaining 3 contractors so that
the total cost is minimum.
(Ans. (i) 1 ® A; II ® C ; III ® B; IV ® D; Total Minimum Cost = 18
(ii) 1 ® B; II ® A; III ® C ; IV ® D; Minimum Cost= 18)
174
7. A transportation corporation operatos every day four routes with four trucks and the
relevant data are given below : Routes
Trucks A B C D
1 5.2 5.5 5.0 5.6
2 4.9 5.1 5.2 5.4
3 4.8 5.2 4.9 5.3
4 5.0 5.0 5.2 5.4
Distance to be covered 220 320 360 250
The table contains the kms run per litre of diesel consumption by each of the trucks when
run is given in the four routes.
(i) Find out the assignment of trucks to routes in order to reduce the consumption of
diesel per day.
(ii) If truck 4 is under repair, which of the three routes should be operated for fuel
economy. (Ans. (i) 1 ® B; 2 ® C ; 3 ® D; 4; Minimum Consumption 218.58
(ii) 1 ® A; 2 ® D; 3 ® B; 4 ® C, Minimum Consumption = 150.15 lts.)
8. A solicitors firm employs typists on hourly piece-rate basis for their daily work. There are
five typists and their charges and speed are different. According to an earlier
understanding only one job is given to one typist and the typist is paid for full hour even if
he works for a fraction of an hour. find the least cost allocation for the following data :
Typist Rate per hour (Rs.) No. of pages Types/hour
A 5 12
B 6 14
C 3 8
D 4 10
E 4 11
seminars should be held once per week in the afternoons. However, scheduling these
seminars (one for each topic, and not more than one seminar per afternoon) has to be
done carefully so that the number of students unable to attend is kept to a minimum. A
carefull study indicates that the number of students who cannot attend a particular
seminar on a specific day is as follows;
Leasing Portfolio Private Swaps and
Management Mutual Funds Options
Monday 50 40 60 20
Tuesday 40 30 40 30
Wednesday 60 20 30 20
Thursday 30 30 20 30
Friday 10 20 10 30
Find an optimal schedule of the seminars. Also find out the total number of students who
will be missing at least one seminar.
No. of Students missing
atleast one seminar
(Ans. (1) Monday ® Swaps and Options 20
(2) Tuesday ® No Seminar 0
(3) Wednesday ® Portfolio Management 20
(4) Thursday ® Private Mutual Funds 20
(5) Friday ® Learning 10
70 )
10. A company has four vehicles to be run on four routes. The distance (kms) for each route
and the kms run per litre of diesel for each vehicle in each of the routes are given below.
Drivers are associated with the trucks.
Kms per litre in the route of
I II III IV
A 4.0 5.0 5.0 3.0
Vehicles B 4.5 6.0 5.0 3.5
C 5.0 5.5 6.0 4.0
D 4.8 5.8 5.5 3.0
Distance covered per day (km) 200 300 250 150
Which vehicle should be assigned to which route in order to minimise the total
consumption of diesel by all the four vehicles ?
(Ans. A ® III; B ® II; C ® IV; D ® I; Total Minimum Consumption= 179.17)