9
Assignment Problems
Learning Objectives,
The learning objectives of this chapter are to;
© to introduce the assignment model and the requirements to solve the
assignment problems
to demonstrate the Hungarian algorithm to solve the assignment prob-
lems
© to introduce variants of assignment problems and demonstrate the
solution procedure for those variants
pee koncs
The learners will be able to:
© prepare assignment models and solve them,
@ solve and interpret the solutions of different variants of the assignment
problems
© model and solve transshipment problems
Assignment Problem considers the assignment of a group of tasks to be carried
out by exactly the same number of workers, groups. machines, etc. Each task has a
one-to-one assignment with workers or facilities. It is also applicable to fit people or
tasks to different time slots to achieve benefits in the form of reduced costs. time or
effort. Even though the general objective in the assignment problem is to reduce the
sociated total cost components, it is equally applicable to maximization problems
through slight modification of the problem.
‘This type of problems involve matching of items in a set of resources to another
item in a set of tasks and vice versa such as: task-worker, job-machine, time-person,
lime-group, position-person, job-time, ete. The requirement in this type of problems270 Operations Research: Concepts, Problems & Solu,
ions
is that the matching has to be established one-to-one, Therefore, to assign my humbep
of tasks. there should be exactly m number of resources. In the cases of unequal
rn unbalanced problem, The solution procedure for suey
numbers, it is called a1
9.2.2.
problems are discussed in Section
9.1. Problem Structure and Assumptions
The assignment problems in general have the following structure. There are
2 pool of resources or people and another pool of tasks or jobs. Each resource.
task pair has an associated cost. Only one of these pairs will be selected for
cach resource end for each task leading to the final solution. The variable in the
ifies the binary condition whether a pair selected or not,
esource j. the variable x,, becomes true or 1. All other
feta atly. for any task k # i, x4; = 0.
vs made based on the cost components in every cell of 2
the associated costs in the respective cells. Rows and columns
represent the resturces/people and the jobs/tasks, respectively.
be shown interchanged, The entries in the
ssignments. If the number
+s usually denoted
problem si
sk i is assigned
sociated in various pos
by mii | ws the number of tas
viz. m =n, necessery modificeions are made
+ equal before solving. Figure 9.) shows
easigreent problercs.
Sect cctvAssignment Problerna on
3 The number of resource/facility is equal to the number of jobaltzake end
usually denoted by n.
4 A resource/facility, say , assigned for a job, say J”. will cause 2 cont of.
5 The decision varinbles are x,, thar will take
assigned to j” facility, x will
6 Total number of decision varizbles =n 7 n
7 Every (i, j) pair will have 4 cont associated with it,
ot of assignment in the position, (i, jy becomes:
Cy.
values 10, J}. Sf the & job is
,otherwine 0.
hay Which is either O oF
Cy
9 The objective is to minimize the total cost: EE cis,
10 Two sets of constraints have to be satisfied while solving the problems: (a) the
total nurnber of allocations for a resource/facility (rerw wire ellccationsy has to
be one, and (b) total number of allocations for 2 job (column wise allocations)
has to be one. That is,
A
iss
Of the assignment problem is as follows
number of row constraint equation
all of them defined over 2 set of n* number of
Minimize, Z=) Yeux, es)
fal pA
subject to. Diyeh 120 (92)
ra
Mayak W=12 (93)
4 =00rk: Hi. jy (Ay
91.2 Cost Matrix
Cost matrix of assignment problem is a squase matrix of size n 2s shown in
Figure 9.2. The available n resources are assigned to the n tasks thes provides the
Minimum pensible total cow. The resources are shown 2s B, to B, end the tasks are
shown as Ay to Ag.Operations Research: Concepts, Problems & Solution,
Is
Ay Ap Aj + An
272
Rp] en | ez | aj foes | Sin
Ro | ai | €22 | C27 [or Can
Ri} ci | Cig | Cij fore | Cin
Rn | em | ena | nj fo | enn
Figure 9.2: Assignment problem cost matrix
9.1.3 Types of Assignment Models
Assignment problems are of different types. Though the general objective is
minimizing cost. there are problems of maximizing objective. The matrix in such
problems represent the benefits of different assignments rather than the costs. Such
problems have to be converted to minimization type by the method similar to that
adopted for maximization transportation problem conversion.
Unbalanced problems are another type of problems. The number of resources
and the jobs are different in such problem. From a pool of resources, the optimum
ones have to be selected for the tasks. In the other setting, the best suitable jobs/tasks
are allotted to the resources that minimizes the cost.
9.2 Solution to Assignment Problems
The solution to the problem can be prepared by enumeration if the matrix size
is small. For an mx n matrix, the number of sequences possible to check becomes
n!. These assignment sequences with the total cost have to be compared to get the
minimum cost assignment. For a matrix of size 4, the number of such possible
assignments become 24. Up to a size of 3, this enumeration process is manageable
by hand. Check the following example.
+ Example 9.1 Assume a cost matrix of an assignment problem as follows. 3
machines M1, M2, and M3 have to be assigned to the available 3 jobs, J1, J2, and
J3. Each job when performed in these machines take different time to complete.
Determine the minimum cost assignment to the problem. Table shows time in hours.
Jobs
no2 B
2M 2 6 3 .
3 M2 3° 5 4
2 M3 5 4 6
al‘Assignment Problems os
«Solution 9.1 In this small problem there are six alternate assignments possible.
‘They can be shown as follows.
M/c Job Assignment
Mi non Rn Rp B
M2 23 3B WN NW I
M3 3°22 U0 B 2
Time(hrs) 13° 10 15 15 10 13
Out of these enumeration, two assignments are found to have the minimum
possible duration of 10 hours. The assignments are: M1-J1; M2-J3; M3-J2, and
MI-J3; M2-J1; M3-J2. These two assignments will give the same duration as
observed. .
9.2.1 Hungarian Assignment Algorithm
Enumeration method fails as the matrix size increases. For a 3x5 matrix itself
the enumeration required becomes 120 and with 5 entries in each assignment makes
it more difficult to handle, Hungarian Assignment Algorithm provides a systematic
procedure to solve assignment problems of higher size. The steps in Hungarian
algorithm are as follows.
. Write down the cost of assignments as a square matrix of size n. If not square.
add dummy columns (rows) of zero cost to make it square.
. Subtract the minimum element in each row from all elements in the respective
row.
3. From the resultant matrix, subtract minimum element in every column from
all elements of each column if all columns do not have an element as zero.
4. Draw minimum number (N) of lines to cover alll the zeros. There can be
N=norN
+ Solution 96 The problem gives the runs as benefits from every assignment of
batsman to the different batting positions, The maximum runs by any batsman in
any position is 49. Therefore, all entries in the matrix will be subtracted from this
maximum run 49: Fig, 9.14(a). After the row and column operations the matrix
changes as: Fig. 9.14(b).
The zeros in the resultant matrix ca be
of five lines. Therefore, a fe:
rows have one
completely covered by a minimum
asible solution exists, The first row and the fourth
ero cach. Therefore, they can be assigned first and then the other
ignments also can be made without any arbitrary selection, Fig. 9.14(c) shows
the assignments made in the matrix which is unique,
‘The optimal assignment of batsmen to the positions are: A - V, B= 1V, C= 1th
D-1.E- I. Therefore, the batting order is: D-E-C-B-A, The expected runs from
these batsmen can be found out by selecting the runs from these assigned cells of
the original matrix.
‘The expected runs in this batting order = 49 +394 444 464482226 *~
‘pgsignmont Problems 283
gli | 1/0 16] 11/3} 1] 0 16} 11] 3 | 1 {Lo
1017 6|0|5}0}7 6|4\5 |[o] 7
19] 15 0} 1] 0 }14}10 W| 1 |[o]j14}10
11|16 0/4 6] 8/13 o|] 4| 6| 8 \13
7/9 3/0/0}6/8 3 [fol] #| 6] 8
(a) Minimization matrix (b) Row & column operation (c) Optimal solution
Figure 9.14: Solution to Example 9.6
9.4 Crew Scheduling Problem
Crew assignment arises in the transport sector. Some examples are: Airlines
Crew scheduling, Freight Crew scheduling, bus crew scheduling, etc. In these
examples, the crew needs to be provided with proper layover time. For this, the
crew should be stationed at some location such that the schedules can be operated
without any problem of insufficient layover. There arise the pairing of schedules to
the crew in onward and return journeys.
In such problems, the objective will be to minimize the total layover time for
the crew. Different pairing of schedules and stationing of crew at different cities
will provide layover time for the crew. The minimization of the layover times are
achieved by the Hungarian assignment algorithm.
Example 9.7 An airline that operates seven days a week has the following time
table. The crew must have a minimum layover of 5 hours between flights. Obtain
the pairing of flights that minimizes crew layover time away from home. For any
pairing, the crew will be based at the city that provides smaller layover.
Flight | Chennai-Bangalore | Flight | Bangalore-Chennai |
No Depart Arrive No. Depart Arrive
CBI | 7:00am 8:00am | BCI 8:00 am 9:15 am
CB2 | 8:00am 9:00am | BC2 $:30am 9:45 am
CB3 | 1:30pm 2:30pm | BC3 | 12:00noon 1:15 pm
CB4 [6:30pm 7:30pm | BC4 | 5:30pm __ 6:45 pm
For each pair also mention in which city the crew must be stationed. .
= Solution 9.7 The crew that depart from stationed city can be assumed to have a
pairing flight from the other city to come back. Similarly, if the crew is stationed in
the other city, the crew will reach this city and return to the station city in another
nearest flight. The crew should however be allowed with a minimum layover time
in the transit city.
The problem should be solved considering two possibilities of station city for the
same pair of flights, Example; Flight No. 201 and 101 can be paired by assuming
the station city either as Delhi or as Jaipur. Both will give different layover times.
These layover times are found out consider the two cities separately for all the flightaN
ones Concepts, Problems
S § Solutions
over for sae pang ad the corresponding station
ation,
sill be pained iin layover consider ng minimim
erence between the arrival time at the tansit city
till
matrix and for both the cities.
ring benween 201 and 101, with the crew
ity, the flight reaches at 8:00 am.
only on the next day at 8:00 am.
24 hours.
utes: “(83 5 he).
The layover matrices can be obtained as:
I | Bcl | BC? | BC3 | BCS |
[CBI 17.75 | 12.25 |
(cB? | 75 [1 |
(ces | 2825 | 24.25 [18.75 |
[eps | 925 | 8 75 |
Siationed at Chennai
ch pairing. select the minimum time from the nwo tables. This minimum
jer the minimum required time for the crew layover in each city, Here is
ven as 5 brs. Therefore, the selection of the minimum layover will be above
hours minimum. This selection can happen from both the city as the station
city.
The entries will be multiplied by 4 to remove the decimal portion of the time
Values. Using * for Chennai. the minimum layover time matrix becomes.
Bcl | BC? | BCS | BC | [Bci | BC2 | BC3 | BC+
21.73" | 2 [1775 | 95 _| cBi | s7= | ss* | 7i= | 38
| [ep por | aor | 75* | 34 |
| cB3 | 70 | 72 | 86 | 75*
| [eps | 37 | 35 | 21 | 88
‘Affer row and column ‘operations. the matrix changes tor =
BCl BC2_BC3_ BCA] BC1| BC2| BC3| BC4
CB 49" | 47" 33" | | [epil ase | a5 | 33* [0
cB2_ 57" 58" 41" | 0 | | CB2| 5z* | 53* | ae | 0
cas 0 2 | 6 | | ces) 0 | 0 | 6 |
ces ie" 14" | or | 67 |) cBa) er | 2" | o | 67
18.75"Assignmont Problems
The zeros in the matrix can be covered by three lines. Therefore, a feasible
solution does not exist, From the uncovered cells, the minimum 33 is subtracted
and added to the crossing cell elements,
BCI] BC2| BC3| BCa BCI
cB1| 49° | 45" | 33" | 6 | | CB1| 16" | 12° | o | 0
cB2| 57* | 53* | 41" |) 0 cB2| 24" | 20° | 8° o |
b €B3} -0 -+ -0 -+ 16-+ 5*-| | CB3| 0 0 | 16 | 38*
Fepat as aa*-- -o-F 67-| | cB] 6" | 12° | o* | 100
in three lines can cover all the zeros. Therefore. the minimum of uncovered
jements subtracted from all uncovered cells and added to the crossing cells.
BCl] BC2| BC3] BC4) BC1| BC2| BC3| BC4)
ci] 16* | 12* | o | 0 cpi| 4° | o | ot | 0 |
cB2| 24* | 20% | 8 [ 0 cB2| 12* | 8* | 8* | 0
|
|
2
t €B3 | o--a6-- 38+] | cB3] 0 | 0 | 28 | 50°)
cB4| 16* | 12* | o* | 160 CB4| 4* o* o* 100 |
Now the minimum number of lines required to cover all the zeros is four. Two
feasible solutions exist as one of the zeros to be chosen arbitrarily. The solutions
are:
BCI] BC2] BC3| BC4| BCi| BC2| BC3| BC4|
cB1| 4* | [of | w | a cpl] 4a | a | jor] a |
cp2| 12° | 8= | 8* | [ol | | cB2| 12* | a« | 8° | Jo] |
cps] [o] | a | 28 | so*| | cp3| [oj] | w | 28 | 50]
cpa] 4° | we | fof | 100 || cBal 4* | fos | we | 100)
The results have to be interpreted as follows.
Solution 1:
CB1-BC2 to be paired and crew to be stationed at Chennai (* for Chennai): 21.25
hrs.
CB2-BC4 to be paired and crew to be stationed at Bangalore: 8.5 hrs.
CB3-BCI to be paired and crew to be stationed at Bangalore: 17.5 hrs.
CB4-BC3 to be paired and crew to be stationed at Chennai: 5.25 hrs.
Total layover time = 52 hrs. 30 minutes
Solution 2:
CB1-BC3 to be paired and crew to be stationed at Chennai (* for Chennai): 17.75
hrs.
CB2-BC4 to be paired and crew to be stationed at Bangalore: 8.5 hrs.
CB3-BC1 to be paired and crew to be stationed at Bangalore: 17.5 hrs.
CB4-BC2 to be paired and crew to be stationed at Chennai: 8.75 hrs.
Total layover time = 52 hrs 30 minutes .~) Optimal solution
Figure 9.20: Optimal solutions to Example 9.9: IV-II broken
‘The upper bound reduced to 14 from 16 and close to the lower bound 13. Since
all the solutions obtained are TSP feasible, no further reduction is possible in the280 Operations Research: Concepts, Problems & Solutions
olution to the problem is to follow the tour WH-ITIL-TV-L.Wy
with minimum possible distance of 14 units :
Summary
“The structure of assignment problems. various types of problems, the solution
methods for assignment problems. and travelling salesman’s problems and solution
methods have been introduced in this chapter.
« An assignment problem has the requirement that the number of resources/.
facilities and the number of tasks/jobs have to be equal. A square matrix
will show the cost of assigning each facility to each task. The objective of
ent problems is to minimize the total cost of assigning the tasks to
x Lewty
There are two constraint sets: row constraints and column constraints:
ass
the facilities
‘The decision variables are binary in this problem: xjj = {0, 1}; ¥é, 7
If a problem is unbalanced. the number of rows not equal to the number
of columns. make it to a balanced problem by adding required number of
rows/columns of cost zero.
Apply Hungarian assignment algorithm to solve the balanced problem
(i) Subtract the minimum cost in each row from the elements of the row
and then subtract the minimum cost in each column from the elements
of the column
(ii) Draw minimum number of horizontal and vertical lines connecting all
zeros. If the number of lines required to cover all zeros is the size of the
matrix, a feasible solution exists.
(iii) If not, subtract the minimum among the uncovered cells from the un-
covered cell elements and add it to the cells with horizontal and vertical
crossing.
(iv) Select the single zero rows or columns and assign the those zeros as the
selection. Cross out other zeros on the corresponding row and column.
Do this till all the rows and columns get one zero selected.
© A maximization assignment problem can be converted to a minimization
problem by subtracting all elements from the maximum element and writing
the results in the respective cells,
# Solve this matrix as a minimization problem and get the optimal solution. Use
the maximization values on the selected cells to get the maximum benefit.
aed‘Assignment Problems
291
of problems such as crew scheduling, prepare the cost matrix
en information and solve as an assignment problem
© Travelling salesman’s problem (TSP) has the requirement that a person has to
visit all the nods and come back to the starting node covering the minimum.
possible distance.
Assignment solution becomes the lower bound for the travelling salesman’s
problem which may not be TSP feasible. Avoid sub tours by introducing co
into the corresponding cells to remove sub-tours and solve again to get the
solution.
« For variety
from the giom
most optimal
eme of cars from the de-
customer locations. What
snum total distance that the
wld cover to serve the
Problem 9.3: Six wagons are available
@ stations A. B.C. D. E. and F. These
@fe required at stations I. I. IIL IV, Vv,
and VL. The distance between different
fin kan) is given below.
A 20 23 18 16 20
B 350 20 17 Bon
c 6 30 40 8 7
D6 7 10 100 9
E i$ 19 28 60 70
F 10 20 40 55
How should the wagons be assigned
so that the total distance covered is min-
imized?
Problem 9.4: Six jobs: A-F have to
be processed by six machines available.
The average time the jobs take in each
of these machines is tabulated below. It
is proposed to purchase a new machine
to replace one of the existing machines.
The estimate of the average time on
the new machine is also available. Is
it advantageous to purchase this new
machine? If yes. which machine should
be replaced by this new machine?
Average time on machines
A 8 8
Bo9 0 8 7 8 9 10
C8 7 8 8 8 6 8
D2 13144 14 15 4 oI
E9 9 9 8 8 0 9
Fo7es8 9 9 9 8 8
Problem 9.5; A team of five horses and
riders entered the finals of a jumping
contest. The number of penalty points
that each rider can commit when riding
each horse is given below.Assignment Problems
Rider
Horse RI R2_R3_ Rd RS
wHo506306406d7
HD 2 3 7 6 5
HB 4°15 2 4
HH 6 8 1 2 3
Hw 4 2 5 7 4
Determine the most optimam assign-
ment of horse to riders that will mini-
mize the total penalty points to the team.
Problem 9.6: Five men are available
to do five different jobs. From the past
records, the time (in 2 hrs) that each
men takes to do each job is known and
given in the following table.
Determine the optimum assignment
solution. Check if the solution is unique.
If not, get all the other solutions.
Problem 9.7: Consider the problem
of assigning five operators to five ma-
chines. The assignment costs are given
below:
MI | M2] M3 | M4 | M5)
Al7|[7/-[418
Blo le[4j/5/|6
Ciujsy7}-s
Dio | 4 8 iol 4
E[sj/7[/9)/u/3)
Find the optimum cost assignment
293
of machines to operators.
Problem 9.8: Solve the following as-
signment problem.
(AT8y4] 21611]
B/0/915\5/4)
C/3/819 2/6)
Di4/3/1/3/3)
[ET915/81915
Problem 9.9: Four drivers are available
to be assigned to five routes. The ex-
pected cost per trip on each route when
each of these drivers are assigned is
shown below.
Route
Divr A B C D £E
62 78 50 101 82
Tl 84 61 73 59
87 92 111 71 81
48 64 87 77 80
Select four routes from the available
such that the expected cost will be mini-
mum. Which route will be left without
operation?
28a
Problem 9.10: Determine an optimum
cost assignment for the cost matrix
given below.
Machines
Job 1 2 3 4 5 6
A oll 17 8 16 20 15
B 9 7 12 6 15 13
Cc 13 16 15 12 16 8
D 21 24 17 28 26 15
E 4 10 12 11 15 6
Problem 9.11: A shipping company has one excess truck each after preparing
the schedules in the cities C1, C2, C3. C4, and C5. At the same time, they have
deficit of one truck each in the cities D1, D2, D3, D4. DS. and D6. The cost of
Wansportation and handling between the cities with deficit truck and cities with
excess truck are as follows.