Unit 12
Unit 12
Structure
12.1 Introduction
Objectives
12.4 Summary
12.5 Answers/Hints/Solutions
2 . 1 INTRODUCTION The Assignment
In the first three units of this black, you have been introduced to the
transportation problem and a cotnputational niethod for solving it. In this
unit we discuss the Assignment Problem, which is a special case of the
transportation problem. You must have noticed that a transportation problem
is a real life problem. In this unit, you will observe the same for an assign-
ment problem. For example a factory manager may wish to assign three
different jobs to three machines in such a way that the total cost is
minimized. There are 3! = 6 ways of assigning 3 jobes to 3 machines.
Ijowever, ii problem of assigning 10 jobs to 10 machines requires 10!
:~ssignn~ents to be examined, which clearly is not a simple task. Iience, the
need to evolve efficient method to solve an assignment problem. I n this case
also, the sin~plexmethod is not very helpfill although it can be used.
0bjectives
t @?
determine that an assignment problem is a special case of a
I transportation problem and so of a linenr programnling problem.
1i +.'
@ solve an Assignment Problem by the I-lungarian Method.
Let us consider the case of a factory which has three jobs to be done on the
three availabIe machines. Each machine is capable of doing any of the three
, jobs. For each job the machining-cost depends on the machine to which it is
I assigned. Costs inc~lrredby doing various jobs on different rnachines are
t given below:
I
Job I
Job I1
Job 111
Special Lincar Programming The problem of assigning jobs to machines, one to each, so as to minimize
Problems the top1 cost of doing all the jobs, is an assignment problem.
Each job machine combination which associates all jobs to machines on one-
to-one basis is called an assignment. Every assignment corresponds to a
'total-cost'. The assignment problem, proposes to determine that assignment
which corresponds to minimum total-cost. This will be called an optimal
assignment.
In the example above, let us write ali the possible assignments. Job I can be
assigned to any of the three available machines. So there are three ways in
which it can be done. Now, Job I1 cannot be assigned to the machine to
which Job I has already been assigned. This is because no two jobs can be
assigned to the same machine and conversely no two machines can be
associated with the same job. So, job I1 can be associated to any of the two
remaining machines, which can be done in two ways Ultimately job III has
only one machine left for it and so has only one way. Combining the above,
there are 3 x 2 x 1, ways in which all the jobs can be assigned to various
machines, one to each. In other words, there are 3! number of possible
assignments. The following table enumerates all these possible assignments
and also mentions the 'total~cost'corresponding to each one of these.
Job I - Machine I
Job I1 - Machine I11
Job I11 - Machine I1
Job1 - Machine I1
Job I1 - Machine 111.
Job Ill - Machine I
Job1 - Machine I1
J O ~ I I- Machine I
Job III - Machine I11
Machine III
Machine I
Machine 11
Let us now generalise it and formulate it for n jobs. Let there be 11 jobs
which are to be processed on n machines on one-job one-machine basis. Let
the cost incurred by processing each jobs on each machine be known. Then
the problenl of processing all the jobs at minimum cost is known-as the
assignment problem. We will develop a mitthematical fornlulation for the
assignment problem.
Let J,, J, .. ., Jn be the n jobs and let M,, M,, . . ., Mnbe the n machines. Also
let cijbe the cost of processing ith job Ji on j the machi~leMj. One job-one
machine basis implies that not more than one job goes to the same machine
and conversely that not more than one machine process the same job.
I
Let us define variable xi, as follows,
1
0 if it11 job is not assigned to jth machine
I
1 if ith job is assigned to jth machine
No job re.omains unprocessed and no machine remains idle. Note that the
I nuinber of jobs is equal to tlie number of machines. The liypothesis of one
I
j= 1
In each of these summntions, only one term on the left hand side has variable
: xij equal to OIIC and the rest are zeros. Also, this particular tern1 (for which
I x , = 1) pertains to that job and that machine which have been assigned
4. r ;
,
1 together.
I
I
1 '
i c
Minirnise Z =
i-1
x c i j xI
j=l
j r(
6
Subjectto x x i j = l l , , . , . (AP-1)
i
li
i=l
= 1 (i = 2, ..., n)
j-1
i = 1, 2, .,., n
xij= 0 or 1
j = 1, 2, .., , n
SpccialLinearProgramming It may be noted that assigning a non-negative integer value to xij is
Problcms equivalent to assigning values 0 or 1 to xij. For this one has only to see the
constraints of the problem (AP-1). This also justifies the way xij's have been
defined.
If each row refers to a job and each column refers to a machine, then C4is
the cost of processing ith job on jth machine. Clearly [Cij]is a square matrix
of order n.
L , Assignment Problem as a special case of Transportation Problem.
TP-1
I
I
.where
n
x x , = a,
j=1
XU 2 0,
I
Ci = per unit transportation cost from ith source to jth destination
and x2= number of units transported from ith source to jth destination.
we state a well known result here that wherever a, and bj in TP-I are -.
integers, then every basic feasible solution of TP-I has integret values.
I
Assignment problem can be viewed as a special' case of transportation The Assignment Problem
problem. What we have to do is only to regard 'jobs' as 'sources' and
'machines' as 'destinations'. As each a, = 1 and each b, = 1, therefore
m 11
'balance' it, in case it is not already so. For this, we require m=n i.e. the
number of jobs are taken equal to the number of machines. This is what
we do in an assignment problem i.e. we take the number of jobs equal to
the number of nnachines. Thus, we see that an assignment problem is a
special case of transpoi-tation problem.
TI-IEOREM I
Let [Cij] and [C*,] with C*, = CiiFY +vj represent respectively the original
assignment problem, obtained after adding or subtracting constants ui's and
vjls from its rows and colun~ns.Here, ui is the constant added or subtracted
fmm all the elements of ith row of matrix [Cij];and v, is the constant added
or subtracted froill all the elements of the jth column of the matrix [C,]. Let
n n
Z= Ccijxij be the objective function of the original problem with
i=l j=l
cost matrix [Ci,l. The objective function Z* for the resulting assignment
problem with cost matrix [CTj]is given by,
8
I
I
I -
I
Special Linear n n
Programming Problems =Z-IKwhere + U, f x v j = fK
!=I j= 1
This shows that the minimization of the original objective function Z yields
the same solution as the nlinimization of Z*. Only the optimal values differ.
In the light of the above theorem, let us take the assignment problem.
M, M2
As before, substracting the minimum element of each row from all elements
/
of that row, the reduced matrix obtained is,
The Assignment Psobler?
Keeping in mind the one job-one machine basis, the optimal assignment
yielding total cost zero is J, M,, J, M,. From the original cost-matrix of this
probleni the optimal assignment J, M,, J2 M2 corresponds to total cost 5 -t 2
' = 7.
J3
I
. ' After subtracting the minimum of each row (column) from all elements of
: that row (column) the reduced matrix so obtained is,
I J3 .
I
E
This stalemate can be resolved by creating new zeros from amongst the
f
I
,
I
Specla1 Linear elenzents uncovered by these two dotted lines. For this mininlum of the
! Programming Broh]rnl\ uncovered elements i.e. 1 is subtracted from all uncovered elements; added
i to the eletflents at intersectiori of the dotted lines, leaving other covered
! elements unchanged. The cost-matrix further reduces to,
I I
I
!
M1 M2 M3
i) ' Subtract the minimum element of each row from all elements of that
' row.
ii) Subtract the minimum element of each column from all elements of
that column.
1, '
I stage in this case go to Step 4. If r < n, a n optimal assignment can not be
1
made at this stngc. In this case go to Step 3.
Step 3 The Assignment P~wpleln
Mere, the least number of lines needed to cover all the zeros is less than the
order of the assignment problem.
Step 4
Here the minimum number of lines needed to cover all the zeros is exactly
equal to the order of the assignment.
i) Examine the rows successively until a row with exnctly one zero is
found. Encircle this zero and cross all other zeros i n its column.
a) each row and each column has an encircled zero. In this case an
optimal assignment has been made and the process terminates.
b) There lie more than one zero in some rows and columns which are
not encircled. In such a case encircle any one of the zeros which is
nbt encircled arbitrarily and cross all other ziros in its row and
column, both.
Continuing in this way, we shaIl have exnctly one encircled zero in each row
and each column.
Step 5
For obtaining the minimum cost, refer to the original cost-matrix of the
given problem. Optimum cost is obtained by adding costs cij's at all the
encircled-zero positions.
Medium + $1 II m IV
Rows &
A
D
Step P
ii) Subtracting the minimum elements of each column from elements all
of that column, we get
I I1 ,In IV
Step 2
Cover all the zeros by minimum number of horizontal and vertical lines. A
systematic approach for this is to look for a row or column containing the I
maximum number of zeros. See that we can cover ail the zeros by 3 lines
onlys. So, r = 3 < 4 = n, so go to step 3.-
. * ,
The bsignment Problem
Step 3
Again, cover the zeros by minimum number of horizontal and vertical lines.
See that we require exactly 4 lines to cover all the,zeros. As r = 4 = n :
optimal assignment can be made at this stage, so go to siep 4.
Special Linear Programming Sfep 4
Problems
! For making assignments, proceed as follows:
I TI 111 IV
i) 2nd row has only one zero in position (2, I), so encircle this zero and
cross all other zeros in its column i.e. the 1st column.
ii) Now, 4th row has only one zero in position (4,4),so encircle this
zero and cross all other zeros in its column i.e. the 4th column.
iii) 3rd column contains only one zero in position (3, I), so encircle it
and cross all other zeros in its row i.e. the 1st row.
, t
As can be seen, each row and each column has a single encircled zero. The
optimal assignment is given by : A-111, B-I, C-11, D-IV
The minimum assignment cost is read from the original cost-matrix as,
Machines
I I1 111 IV W
Jobs
EXAMPLE 2 The Assignment Problem
J3
94
SOLUTION : Step 41
I
i> Suljtracting the minimum element of each row from all elements of
that row, the reduced cost-matrix is,
' subtracting the minimum element of each column from all elements
ii)
of that column, we get
Step 2
Cover all the zeros by least number of horizontal and vertical lines. Exactly
4 lines are required to cover all the zeros. So, r = 4.
Special Linear M, M2 M3 M4
I Programming Problems
I
J,
Step 4
i) There is only one zero in 1st row in position (1, I), so encircle this
zero, and cross other zeros (if any) in its column i.e. 1st column.
ii) There is only one zero in 2nd row in position (2, 4), so encircle this
zero and cross other zeros (if any) in is column i.e. 4th column.
MI % M3 M4
1
J,
iii) Now, observe that 3rd and 4th rows as well as 2nd and 3rd columns
contain two zeros each. To break this, and make an assignment, we , ,
!
pick any zero arbitrarily. Say, we pick zero in position (3, 2) and
i
I encircle it. Now, cross all zeros in its row i s . 3rd row as well as its I
1 column i.e.2nd column.
1
I
II
.. I
iv) There is only one zero left in position (4, 3), Encircle it to get the ,
optimal assignment as J, MI, J, M,, J, M,,J4 M,.
I' \
I ,
Step 5
For determining minimum total cost, refer to the original cost-matrix of this I
problem and add the costs comsponding to J, M,, J, M4, J, Ma,J4 M, This
,
1
1
I
I1 gives the minimum assignment cost as.
I
:
. I
2+1+3+4=10. I I
I I
Note that any arbitrary choice in step 4 (iii), of the zero to'& encircled, The Assignmcnt Problcm
would yield the same rnir~irnumtotal-cost.
I I1 III IV v VI
EXAMPLE 3
Machanists
, Jobs C
1
I
SOLUTION
Step I
(Note that this step amounts to subtracting each element of the original ,
matrix (of the profit maximizing assignment problem) from the correspond-
ing maximum element of their rows respectively. In other words, substract %
all elements of 1st row from the maximum element i.e. 7 of the 1st row.
Similarly, for the other rows).
The Assignment Problem
Step 3
Observe that now we require exactly 4 lines to cover all the zeros i.e. now r
= n. So, we can go to step 4, and make optinlal assignment.
Step 4
i) There is a single zero in 2nd row in the position (2,4). Encircle this
,'I'
zero and cross all other zeros in its column i.e. 4th column.
ii) There is a single zero in 3rd row in the position (3, 3). Encircle this
zera and cross all other zeros (if any) in its colull~nsi.e. 3rd column.
iii) N ~ Wthere
, is only one unmarked zero in 4th row in the position .
(4,l). Encircle this zero and cross all other zeros in its column i.e.
-
~lstcolumn. ---
Special Linear
Programming Problems
A
iv) There is now a single zero in 1st row in the position (1,2). Encircle it
to get the optimal assignment as AII, B N , CIII, DI.
Step 5
12.4 SUMMARY
Assignment problem has been studied in rhis unit. Given an equal number of
jobs and machines the problem consists of determining an optimal assign-
ment. If the objective is to minimize the total cost incurred, the problem is
i' known as cost minimizing assignment problem or simply assignment
problem. In skction 12.1, an assignment problem has been introduced
systematically taking real life situations. Mathematical formulation of the
"problem has been developed in section 12.2, It has been shown that an
assignment problem is represented completely by its cost-matrix.
Minimum assignrnent'cost = 39
I
I
. - Maximum total return = 50. -
- - - --
Tlic Assignment Problem
REVIEW
This block has again four units namely units 9, 10, 11 and 12. In blockI,the
Linear Progr:imming was introduced and its solution only in two variables
was discussed by the graphical method. In block 2, the algebraic method
known as Si~nplexalgorithm was used to solve the problem having any
number of variables.
I11 this
block, you have studied some typical special linear programming
I
probleins namely the transportation problem and the assignment problem.
You must check for yourself to know whether you have successfully
achieved the desired objectives in this block. For this, you will do well, if
you try the followmg self-check problems and verify your answers given at
I the end of the block:
Sl 40
bj + 40 80
I
Store The Assignment Problem
1 2 3 4 5 Surplus
I
1 Warehouse' 2
I
Requirements 80 100 100 90 90
I
1
.
I P6 A team of 5 horses and 5 riders has entered a jumping-show contest.
The number of penalty points to be expected when each rider rides
any horse is given below:
Riders
R, R, R, R.4 Rs
HI
H,
Horses H,
H4
%
How should the horses be allotted to the riders so as to minimize the total
expected loss of the team?
.
P7 Five operators have to be assigned to five machines. The assignment
costs are given as:
! I
I Machines
I 1
I
I I1 111 IV v
I
A
I
B
Operator C
P1 Minimize
i
I
1
z = 4xl1+ 3x1, + 7xZ1+ 2x2,+ 5x31 +x3,
Subject to
1
4 ~i~ + x I 2 = SO, xll+ xZ1+ x3,= 40'
xZ1+ xZ2= 30, XL2+ xz2+ x3, = 80
xJ1+ xJ2= 40,
X, r O.
A toH 800
C to G 300
T11e minimum transportation cost is Rs. 9,200.
j
! From warehouse.3 to store 5 .
. 20 units
I I
I,
, I From warehouse 4 to store .4 90 units.
,
1
. I
(
I
Minimum cost of transportation = Rs. 4;200
-' 88 * .
r
I
P6 Optimal assignment : H,- R,, H,- R,,H,- R,, H,- R,, H,- R, The AssignmentRoblem