assignment poblems
TRANSCRIPT
1
Assignment Problems Key Points
An assignment problem is a particular case of transportation problem.
The assignment is to be made on a one-to-one basis (one job to one worker).
The objective in assignment problem is to assign certain number of resources or
facilities to an equal number of tasks or activities.( examples-job to machines or
workers, products to factories, salesmen to territories, contracts to bidders, etc) to
minimize total cost /time or maximize profit/revenue/efficiency.
An assignment problem is a balanced when the number of rows is equal to number
of columns.
An unbalanced assignment problem can be balanced by adding dummy rows or
columns as the case may be to make rows equal to columns.
In the dummy row or column all elements are zero.
An assignment problem involving restrictions in allocations (worker cannot be
assigned to a machine as he may not possess the skill to operate the machine) is
known as prohibited assignment.
In case of prohibited assignment problem, we assign cost/time of higher value say M
at the prohibited combination.
An assignment problem can have more than one solution giving the same answer.
Alternate (Multiple) optimum assignment solution exists, when there are multiple
zeros in columns and rows.
Hungarian method is the most efficient method to solve assignment problems when
the objective is minimization.
In case the objective function is maximization of say profit, we first convert the profit
table into an opportunity loss table before we apply the Hungarian method.
A travelling salesman problem is typical assignment problem with two additional
constraints:
Salesmen should not visit the city twice until he has visited all the cities.
2
No assignment should be made along the diagonal line.
Assignment technique is of little use to a firm whose facilities are perfect substitutes
of each other. For example if there are three identical machines doing the same job,
any machine can be assigned for the job and hence one-to-one allocation will be
disturbed.
Hungarian Method
Developed by Hungarian Mathematician D. Konig.
It works on the principle of reducing the given cost matrix to a matrix of opportunity
cost.
It reduces the given cost/time or opportunity loss matrix to the extent of having one
zero in each row and column.
Steps involved in solving Assignment Problems by Hungarian Method
Step1-Express the given problem into an n × n cost matrix or table.
Step 2- Subtract the minimum element of each row of the matrix from all elements of the
respective row. This step is known as Row Minima.
Step 3- Subtract the minimum element of each column from all the elements in that
respective column. This step is known as Column Minima.
Step 4- Draw the least (minimum) number of horizontal and/or vertical lines to cover all
zeros in the matrix. If the number of lines drawn are equal to the number of rows or
columns, optimum solution has been reached. In such a case proceed to step number 7 for
assignment. However if the number of lines are not equal to rows or columns, proceed to
step number 5 for modification.
Step 5- Select the smallest element not covered by the lines, subtract it from all uncovered
elements including itself, add it to the elements which are crossed by two lines and
reproduce other elements crossed by one line intact.
Step6-Repeat steps 4 and 5 until an optimal solution is reached.
Step 7- Proceed to job assignments as follows:
Examine the rows one by one starting with the first row until a row with an exactly one zero
is found. Mark the zero by enclosing it in a square indicating assignment of the task to the
3
facility. After doing so, cross out all the zeros (if any) in that column as they cannot be used
to make other assignments.
Examine next the columns for any column having a single zero, starting from the first
column. Mark the zero as mentioned above, crossing out the remaining zeros (if any) in that
row.
Repeat steps (i) and (ii) alternatively until either of the following conditions occur:
All the zeros have been marked or crossed, ensuring in the process that each row has a zero
marked. This means that optimum solution has been reached.
All the zeros cannot be marked /crossed .There are at least two zeros in each row and
column which cannot be marked by using the above mentioned step 7-(i) and (ii).This means
that more than one solution exists. In such a case we mark any one zero in a row of our
choice and cross out the remaining zeros in the row and the column where the zero is
marked. Carry out this exercise till we get one zero marked or assigned in each row and
there is no further assignment required.
Step 8- Summarize the result by having the final assignment table.
Illustrations
1. A company has five jobs to be done. The following table shows the cost of assigning each
job to each machine. Assign five jobs to the five machines so as to minimize the total cost in
INR in ‘000’.
Machine Job
1 2 3 4 5
M1 5 11 10 12 4
M2 2 4 6 3 5
M3 3 12 14 6 4
M4 6 14 4 11 7
M5 7 9 8 12 5
Solution:
Hungarian method is used to obtain optimal solution.
4
As the numbers of rows are equal to columns, we have a balanced assignment table and
move on to step number 2.
Step 2- Subtract the minimum element of each row of the matrix from all elements of the
respective row. This step is known as Row Minima.
Machine Job
1 2 3 4 5
M1 1 7 6 8 0
M2 0 2 4 1 3
M3 0 9 11 3 1
M4 2 10 0 7 3
M5 2 4 3 7 0
Note-In the first row 4 is lowest element and we have subtracted this lowest element from
all the elements in that row. The same methodology is used for the other rows.
Step 3- Subtract the minimum element of each column from all the elements in that
respective column. This step is known as Column Minima.
Machine Job
1 2 3 4 5
M1 1 5 6 7 0
M2 0 0 4 0 3
M3 0 7 11 2 1
M4 2 8 0 6 3
M5 2 2 3 6 0
5
Note- Column 1, 3 and 5 remain the same, as we have zero as the lowest element in each of
these columns. In column 2 and 4 we have 2 and 1 as the lowest elements which we have
subtracted from all elements in those respective columns.
Step 4- Draw the least (minimum) number of horizontal and/or vertical lines to cover all
zeros in the table.
Machine Job
1 2 3 4 5
M1 1 5 6 7 0
M2 0 0 4 0 3
M3 0 7 11 2 1
M4 2 8 0 6 3
M5 2 2 3 6 0
Note- We see from the above table that only four lines are sufficient to cross all zeros.This is
achieved by drawing minimum number of lines (horizontal as well as vertical) with each line
crossing out maximum zeros.
This is the most important step in the method and there is a chance that students can make
a mistake by drawing more lines to cross out all zeros than necessary. In case you draw
more lines than rows or columns it is an indication that you have a mistake. Cancel the
drawn lines and draw it up fresh. Use pencils to draw the lines.
As numbers of lines are not equal to rows or columns optimum solution has not been
reached and we move to step number 5 for modification.
Step 5- Select the smallest element not covered by the lines, subtract it from all uncovered
elements including itself, add it to the elements which are crossed by two lines and
reproduce other elements crossed by one line intact.
6
Machine Job
1 2 3 4 5
M1 1 3 4 5 0
M2 2 0 4 0 5
M3 0 5 9 0 1
M4 4 8 0 6 5
M5 2 0 1 4 0
Note- 2 is the smallest non-crossed element we have subtracted from all non-crossed
elements including itself and added this smallest element 2 to the elements which are
crossed by two lines (for example element 3 in the second row was crossed by two lines and
hence 2 was added to the element 3 by which the new element in this row is reading 5) .All
other elements which are crossed by one line remain intact (for example digit 2 in the last
row remains unchanged as it is crossed by only one line).
We again draw minimum number of lines crossing out all zeros in the table as shown below:
Machine Job
1 2 3 4 5
M1 1 3 4 5 0
M2 2 0 4 0 5
M3 0 5 9 0 1
M4 4 8 0 6 5
M5 2 0 1 4 0
Note- We require five lines as they are minimum number lines which are required to cross
out all zeros. As the number of lines is equal to rows or columns optimum solution has been
reached and we move to step number 7 for assignment.
Step 7- Proceed to job assignments as follows:
7
Examine the rows one by one starting with the first row until a row with an exactly one zero
is found. Mark the zero by enclosing it in a square indicating assignment of the task to the
facility. After doing so, cross out all the zeros (if any) in that column as they cannot be used
to make other assignments.
Examine next the columns for any column having a single zero, starting from the first
column. Mark the zero as mentioned above, crossing out the remaining zeros (if any) in that
row.
Repeat steps (i) and (ii) alternatively until all the zeros have been either assigned or crossed.
Machine Job
1 2 3 4 5
M1 1 3 4 5 0
M2 2 0 4 5
M3 0 5 9 0 1
M4 4 8 0 6 5
M5 2 1 4 0
Note- (i) On examining, we find that since in row number one there is a single zero for
assignment which we mark it by having a square around it. After doing so we check for any
other zeros in that respective column for it to be crossed out. We find that a zero is therein
column number five which we cross out.
(ii) After doing the row exercise, we try to find a single zero in the column starting from
column number one. We find that in column no one itself there is a single zero which is
marked by having a square around it. After doing so let us find whether there are other
zeros in that respective row .We find that there is one zero in row number three which we
cross out.
(iii)We again proceed to look for a single zero in a row going row by row. We find there is a
single zero in row number two for assignment which we mark it by having a square around
it. Again we should not forget to cross out any other zeros in that respective column. There
are no zeros in that respective column which is row number three.
0
0
0
0
0
8
Proceed to look for a single zero in a column by going column by column. We locate it in the
column number four for assignment. We mark it by having a square around it and search
for any other zeros in that respective row to be crossed out. There is none to be crossed out
in row number four.
We continue this row column exercise till all unique zeros is marked and others crossed out.
Step 8-Summary of the assignment is given in the table below:
Machine Job Cost in INR in ‘’000’’
M1 5 4
M2 4 3
M3 1 3
M4 3 4
M5 2 9
Total 23
Each of four workers A, B, C, D can do each of the four jobs I, II, III, IV. The figures within the
matrix given below show the time taken by each worker in minutes to do each job. Assign
the jobs to the four workers, only one to each so as to minimize total time to do all the jobs.
Jobs Workers
A B C D
I 4 3 12 7
II 5 4 7 9
III 3 1 6 2
IV 5 6 9 5
Solution:
Hungarian method is used to obtain optimal solution.
9
As the numbers of rows are equal to columns, we have a balanced assignment table and
move on to step number 2.
Step 2- Subtract the minimum element of each row of the matrix from all elements of the
respective row. This step is known as Row Minima.
Jobs Workers
A B C D
I 1 0 9 4
II 1 0 3 5
III 2 0 5 1
IV 0 1 4 0
Note-In the first row 3 is lowest element and we have subtracted this lowest element from
all the elements in that row. The same methodology is used for the other rows.
Step 3- Subtract the minimum element of each column from all the elements in that
respective column. This step is known as Column Minima.
Jobs Workers
A B C D
I 1 0 6 4
II 1 0 0 5
III 2 0 2 1
IV 0 1 1 0
Step 4- Draw the least (minimum) number of horizontal and/or vertical lines to cover all
zeros in the table.
10
Note- We see that only three lines are sufficient to cancel all zeros. We have drawn
minimum number of horizontal and vertical lines with each line striking off maximum zeros.
As the number of lines are less than the rows and columns, we move on to step number 5
for modification.
Step 5- Select the smallest element not covered by the lines, subtract it from all uncovered
elements including itself, add it to the elements which are crossed by two lines and
reproduce other elements crossed by one line intact.
Jobs Workers
A B C D
I 0 0 5 3
II 1 1 0 5
III 1 0 1 0
IV 0 2 1 0
Note- 1 is the smallest non-crossed element we have subtracted from all non-crossed
elements including itself and added this smallest element 1 to the elements which are
crossed by two lines (for example element 1 in the last row was crossed by two lines and
hence 1 was added to the element 1 by which the new element in this row instead is
reading 2) .All other elements which are crossed by one line remain intact (for example digit
1 in the last row remains unchanged as it is crossed by only one line).
Again we draw minimum number of horizontal or vertical lines crossing out all zeros.
Jobs Workers
A B C D
I 1 0 6 4
II 1 0 0 5
III 2 0 2 1
IV 0 1 1 0
11
Jobs Workers
A B C D
I 0 0 5 3
II 1 1 0 5
III 1 0 1 0
IV 0 2 1 0
Note- We require four lines (minimum) to cross out all zeros. As the numbers of lines drawn
are equal to rows and columns optimum solution has been reached and we proceed to Step
7 for assignment.
Jobs Workers
A B C D
I 0 0 5 3
II 1 1 0 5
III 1 0 1 0
IV 0 2 1 0
Note- (i) On examining, we find that since in row number two there is a single zero for
assignment which we mark it by having a square around it. After doing so we check for any
other zeros in that respective column for it to be crossed out. There are no zeros to be
crossed out.
(ii) After doing the row exercise, we try to find a single zero in the column starting from
column number one. We do not find a single zero in any of the columns
(iii)We again proceed to look for a single zero in a row going row by row. We find there is a
no single zero in any row.
This situation signifies that we have more than one solution to the problem .i.e. Multiple
Solutions
0
0
0
12
In such a case, we select the remaining zeros to be blocked of our choice ,remembering one
think that while doing so ,we ensure that there is only one zero in each row for assignment.
When we block the zero arbitrarily, any zeros in that respective column as well as row get
crossed out. For solution 1 this is done by marking zero in the first row and first column by
which zero in that column as well as row gets crossed out. Now we see that zero in third
row and second column is free for assignment and zero in the fourth column in the same
row gets crossed out. We have only one zero left in row number four and column number
four which we mark. This completes the assignment and we get Solution-1
By doing this exercise, we get two optimum solutions whose assignment is different, but the
total minutes to do all the jobs by the workers remain the same.
Solution-1
Job Worker Time in minutes
I A 4
II C 7
III B 1
IV D 5
Total 17
Solution-2
Note-In the second solution we have marked zero in the first row second column and
crossed zeros in the first row and second column. We continue this exercise as described
above to get the solution which is given below:
Jobs Workers
A B C D
I 0 0 5 3
II 1 1 0 5
III 1 0 1 0
IV 0 2 1 0
0
0
0
0
13
Job Worker Time in minutes
I B 3
II C 7
III D 2
IV A 5
Total 17
3. The government solicits five different proposals with the intent of giving one job to each
of the companies. The bid amounts in thousands of INR are given below with X denoting no
bid submitted as the company does not meet the technical criteria for that job. Find the
optimal assignment to companies such that the total cost is minimum?
Solution:
This prohibited assignment problem and can be solved by Hungarian method as the
objective is to minimize total cost.
Company Proposals(INR in ‘’000’’)
1 2 3 4 5
A 50 85 100 75 80
B 80 85 95 X 90
C 70 80 85 75 80
D X 90 95 70 85
E 85 80 90 80 90
As the numbers of rows are equal to columns, we have a balanced assignment table and
move on to step number 2.
Step 2- Subtract the minimum element of each row of the matrix from all elements of the
respective row. This step is known as Row Minima.
14
Company Proposals(INR in ‘’000’’)
1 2 3 4 5
A 0 35 50 25 30
B 0 5 15 M 10
C 0 10 15 5 10
D M 20 25 0 15
E 5 0 10 0 10
Note- M is so very high that even after subtracting small elements like 50 or 70, M remains
unchanged.
Step 3- Subtract the minimum element of each column from all the elements in that
respective column. This step is known as Column Minima.
Company Proposals(INR in ‘’000’’)
1 2 3 4 5
A 0 35 40 25 20
B 0 5 5 M 0
C 0 10 5 5 0
D M 20 15 0 5
E 5 0 0 0 0
Step 4- Draw the least (minimum) number of horizontal and/or vertical lines to cover all
zeros in the table.
15
Note- As minimum number of horizontal and vertical lines are less than number of rows or
columns, we move on to Step 5 for modification.
Step 5- Select the smallest element not covered by the lines, subtract it from all uncovered
elements including itself, add it to the elements which are crossed by two lines and
reproduce other elements crossed by one line intact.
Company Proposals(INR in ‘’000’’)
1 2 3 4 5
A 30 35 25 20
B 0 0 M 0
C 5 0 5 0
D M 15 10 0 5
E
0 0 5 5
Note- As the number of lines drawn are equal to rows or columns, optimum solution has
been reached and we proceed to Step number 7 for assignment.
Company Proposals(INR in ‘’000’’)
1 2 3 4 5
A 0 35 40 25 20
B 0 5 5 M 0
C 0 10 5 5 0
D M 20 15 0 5
E 5
0 0 0 0
10
0
0
0
16
Company Proposals(INR in ‘’000’’)
1 2 3 4 5
A 0 30 35 25 20
B 0 0 0 M 0
C 0 5 0 5 0
D M 15 10 0 5
E 10 0 0 5 5
Note- (i) On examining, we find that since in row number two there is a single zero for
assignment which we mark it by having a square around it. After doing so we check for any
other zeros in that respective column for it to be crossed out. There are two zeros which can
be crossed out.
(ii) After doing the row exercise, we try to find a single zero in the column starting from
column number one. We do not find a single zero in any of the columns
(iii)We again proceed to look for a single zero in a row going row by row. We find that there
is one zero in fourth row which we mark .After marking we find that there is no zero in that
respective column which can be crossed out.
Now there are multiple zeros in row as well as column.
This situation signifies that we have more than one solution to the problem .i.e. Multiple
Solutions
In such a case, we select the remaining zeros to be blocked of our choice ,remembering one
think that while doing so ,we ensure that there is only one zero in each row for assignment.
When we block the zero arbitrarily, any zeros in that respective column as well as row get
crossed out.
By doing this exercise, we get two optimum solutions whose assignment is different, but the
total proposal cost in INR in “000” remains the same.
Solution -1
17
Company Proposals INR in “000”
A 1 50
B 2 85
C 5 80
D 4 70
E 3 90
Total 375
In a similar way we do the arbitrarily allotment as mentioned above (Student if need be can
refer to illustration 2) to get Solution-2.
Company Proposals INR in “000”
A 1 50
B 3 95
C 5 80
D 4 70
E 2 80
Total 375
4. Schedule the training seminars in five working days of the week so that the number of
students unable to attend is kept to the minimum. The details are as follows:
18
Days Leasing (L)
Portfolio
Management
(PM)
Private Mutual
Fund (PMF)
Equity Research
(ER)
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
Solution:
As the number of columns is not equal to the number of rows, this is a case of unbalanced
assignment problem. Hence before proceeding ahead with the Hungarian method, we
need to ensure that numbers of rows are equal to number of columns and this is done by
introducing dummy column having all its elements as zero. The balanced assignment table is
given below:
Days Leasing (L)
Portfolio
Management
(PM)
Private
Mutual Fund
(PMF)
Equity
Research (ER) Dummy
Monday 50 40 60 20 0
Tuesday 40 30 40 30 0
Wednesday 60 20 30 20 0
Thursday 30 30 20 30 0
Friday 10 20 10 30 0
As each row has a zero as minimum element, we straightaway proceed to Step3 (column
minima).
Step 3- Subtract the minimum element of each column from all the elements in that
respective column. This step is known as Column Minima.
19
Days Leasing (L)
Portfolio
Management
(PM)
Private
Mutual Fund
(PMF)
Equity
Research (ER) Dummy
Monday 40 20 50 0 0
Tuesday 30 10 30 10 0
Wednesday 50 0 20 0 0
Thursday 20 10 10 10 0
Friday 0 0 0 10 0
Step 4- Draw the least (minimum) number of horizontal and/or vertical lines to cover all
zeros in the table.
Days Leasing (L)
Portfolio
Management
(PM)
Private
Mutual Fund
(PMF)
Equity
Research (ER) Dummy
Monday 40 20 50 0 0
Tuesday 30 10 30 10 0
Wednesday 50 0 20 0 0
Thursday 20 10 10 10 0
Friday 0 0 0 10 0
Note- We see that only four lines are sufficient to cancel all zeros. We have drawn minimum
number of horizontal and vertical lines with each line striking off maximum zeros. As the
number of lines are less than the rows and columns, we move on to step number 5 for
modification.
Step 5- Select the smallest element not covered by the lines, subtract it from all uncovered
elements including itself, add it to the elements which are crossed by two lines and
reproduce other elements crossed by one line intact.
20
Days Leasing (L)
Portfolio
Management
(PM)
Private
Mutual Fund
(PMF)
Equity
Research (ER) Dummy
Monday 30 10 40 0 0
Tuesday 20 0 20 10 0
Wednesday 50 0 20 10 10
Thursday 10 0 0 10 0
Friday 0 0 0 20 10
As the number of lines is equal to rows or columns optimum solution has been reached and
we move to step number 7 for assignment.
Step 7- Proceed to job assignments as follows:
Examine the rows one by one starting with the first row until a row with an exactly one zero
is found. Mark the zero by enclosing it in a square indicating assignment of the task to the
facility. After doing so, cross out all the zeros (if any) in that column as they cannot be used
to make other assignments. Examine next the columns for any column having a single zero,
starting from the first column. Mark the zero as mentioned above, crossing out the
remaining zeros (if any) in that row.
Repeat steps (i) and (ii) alternatively until all the zeros have been either assigned or crossed.
Days Leasing (L)
Portfolio
Management
(PM)
Private
Mutual Fund
(PMF)
Equity
Research (ER) Dummy
Monday 30 10 40 0 0
Tuesday 20 0 20 10 0
Wednesday 50 0 20 10 10
Thursday 10 0 0 10 0
Friday 0 0 0 20 10
Step 8-Summary of the assignment is given in the table below:
21
Days Training Seminar Absenteeism of students
Monday ER 20
Tuesday - -
Wednesday PM 20
Thursday PMF 20
Friday L 10
Tuesday is the day off from the training program.
5. The Marketing Director of the multinational company faced with the problem assigning
five senior marketing managers to six zones. From past experience he knows that the
efficiency percentage by sales depends on marketing manager-zone combination given in
the following table:
Marketing
Manager
Zones
1 2 3 4 5 6
A 71 83 85 80 76 78
B 79 83 67 74 72 83
C 73 70 81 82 76 89
D 91 94 84 89 81 80
E 88 89 77 87 67 74
As an advisor to the company, recommend which zone should be manned by junior
manager so as to maximize the overall efficiency of the company.
Solution:
We see two things which are different:
The objective function is maximization of the efficiency of the company.
The problem is an unbalanced transportation problem as the number of rows is not equal to
number of columns.
22
Note- Hungarian method can only be issued when the objective function is minimization.
There is a deviation here as the objective function is maximization.
In such a case we first convert the given assignment table (let the table be balanced or
unbalanced) to an opportunity loss table by subtracting each and every element of the table
from the highest element in the table which in this case is 94.By doing so the opportunity
loss table is as following:
Marketing
Manager
Zones
1 2 3 4 5 6
A 23 11 9 14 18 16
B 15 11 27 20 22 11
C 21 24 13 12 18 5
D 3 0 10 5 13 14
E 6 5 17 7 27 20
The above opportunity loss table is unbalanced as the number of rows is not equal to
number of columns .A dummy row is added with each element in that row being zero. By
doing so the balanced opportunity loss table is given as follows:
Marketing
Manager
Zones
1 2 3 4 5 6
A 71 83 85 80 76 78
B 79 83 67 74 72 83
C 73 70 81 82 76 89
D 91 94 84 89 81 80
E 88 89 77 87 67 74
Dummy 0 0 0 0 0 0
We now proceed to Step number 2 for row minima.
23
Step 2- Subtract the minimum element of each row of the matrix from all elements of the
respective row. This step is known as Row Minima.
Marketing
Manager
Zones
1 2 3 4 5 6
A 14 2 0 5 9 7
B 4 0 16 9 11 0
C 16 19 8 7 13 0
D 3 0 10 5 13 14
E 1 0 12 2 22 15
Dummy 0 0 0 0 0 0
As each column has a zero, column minima is not required and we move on to step number
4
Step 4- Draw the least (minimum) number of horizontal and/or vertical lines to cover all
zeros in the table.
Marketing
Manager
Zones
1 2 3 4 5 6
A 14 2 0 5 9 7
B 4 0 16 9 11 0
C 16 19 8 7 13 0
D 3 0 10 5 13 14
E 1 0 12 2 22 15
Dummy 0 0 0 0 0 0
Note- We see that only four lines are sufficient to cancel all zeros. We have drawn minimum
number of horizontal and vertical lines with each line striking off maximum zeros. As the
24
number of lines are less than the rows and columns, we move on to step number 5 for
modification.
Step 5- Select the smallest element not covered by the lines, subtract it from all uncovered
elements including itself, add it to the elements which are crossed by two lines and
reproduce other elements crossed by one line intact.
Marketing
Manager
Zones
1 2 3 4 5 6
A 14 3 0 5 9 10
B 1 0 13 6 8 0
C 13 19 5 4 10 0
D 0 0 7 2 10 14
E 0 2 11 1 21 17
Dummy 0 3 0 0 0 3
Note- 1 is the smallest non-crossed element we have subtracted from all non-crossed
elements including itself and added this smallest element 1 to the elements which are
crossed by two lines (for example element 2 in the second column was crossed by two lines
and hence 1 was added to the element 2 by which the new element in this column is
reading 3) .All other elements which are crossed by one line remain intact (for example digit
14 in the first row remains unchanged as it is crossed by only one line).
We again draw minimum number of lines crossing out all zeros in the table as shown below:
25
Marketing
Manager
Zones
1 2 3 4 5 6
A 14 3 0 5 9 10
B 1 0 13 6 8 0
C 13 19 5 4 10 0
D 0 0 7 2 10 14
E 0 2 11 1 21 17
Dummy 0 3 0 0 0 3
Note- We again see that only five lines are sufficient to cancel all zeros. We have drawn
minimum number of horizontal and vertical lines with each line striking off maximum zeros.
As the number of lines is less than the rows and columns, we again use step number 5 for
modification.
Marketing
Manager
Zones
1 2 3 4 5 6
A 14 3 0 4 8 10
B 1 0 13 5 7 0
C 13 19 5 3 9 0
D 0 0 7 1 9 14
E 0 2 11 0 20 17
Dummy 1 4 1 0 0 4
We again draw minimum number of lines crossing out all zeros in the table as shown below
26
Marketing
Manager
Zones
1 2 3 4 5 6
A 14 3 0 4 8 10
B 1 0 13 5 7 0
C 13 19 5 3 9 0
D 0 0 7 1 9 14
E 0 2 11 0 20 17
Dummy 1 4 1 0 0 4
As the number of lines is equal to rows or columns optimum solution has been reached and
we move to step number 7 for assignment.
Step 7- Proceed to job assignments as follows:
Examine the rows one by one starting with the first row until a row with an exactly one zero
is found. Mark the zero by enclosing it in a square indicating assignment of the task to the
facility. After doing so, cross out all the zeros (if any) in that column as they cannot be used
to make other assignments. Examine next the columns for any column having a single zero,
starting from the first column. Mark the zero as mentioned above, crossing out the
remaining zeros (if any) in that row.
Repeat steps (i) and (ii) alternatively until all the zeros have been either assigned or crossed.
Marketing
Manager
Zones
1 2 3 4 5 6
A 14 3 0 4 8 10
B 1 0 13 5 7 0
C 13 19 5 3 9 0
D 0 0 7 1 9 14
E 0 2 11 0 20 17
Dummy 1 4 1 0 0 4
27
Step 8-Summary of the assignment is given in the table below
Marketing
Manager Zone Efficiency
A 3 85
B 2 83
C 6 89
D 1 91
E 4 87
:
Zone 5 is left out, which can be manned by a junior manager to maximize overall efficiency
of the company.
6. An airline that operates seven days in a week has time table shown below. Crews must
have a minimum layover of five hours between flights. Obtain the pairing of flights that
minimize layover time away from home. For any given pair the crew will be based at the city
that results in smaller layover.
Delhi-Jaipur
Flight No Departure Arrival
101 7 A.M. 8 A.M.
102 8 A.M. 9 A.M.
103 1.30 P.M. 2.30 PM
104 6.30 P.M. 7.30 PM
28
Jaipur-Delhi
Flight No Departure Arrival
201 8 A.M. 9.15A.M.
202 8.30 A.M. 9.45 AM
203 12 Noon 1.15PM
204 5.30 P.M. 6.45 PM
For each pair also mention the place where the crew should be based.
Solution:
The illustration mentions about flight operating from Delhi-Jaipur and Jaipur-Delhi on a daily
basis. We need to locate the crew for pair of flights where layover time (idle time) is the
lowest.
Since the objective is to minimize layover time between flights, we can use the Hungarian
method.
However before doing so we need to calculate the layover time for each pair of flights from
Delhi to Jaipur and back with crew based at Delhi and similarly calculate the layover time for
each pair of flights from Jaipur to Delhi and back with crew based at Jaipur.
After getting the respective tables containing layover time, we select the lowest layover
time out of the two tables for each pair of flights and by which get the lowest layover time
table on which we need to carry out the Hungarian method.
29
Table consisting of Layover time in minutes for crew based in Delhi
Delhi-Jaipur
Return Flight Flight Number
Delhi-Jaipur
Flights 201 202 203 204
101 *1440 1470 1680 570
102 1380 1410 1620 510
103 1050 1080 1290 1620
104 750 780 990 1320
Note-*101 flight lands at Jaipur at 8 am. In case the crew flying on 101 wants to come back
to Delhi by 201 flight which takes off from Jaipur at 8 am, the layover time between these
two flights is 24 hours (8am takeoff next day from Jaipur-8am, the time it lands at Jaipur.)
equals 24 hours which is 1440 minutes.
Let us do one more calculation. Consider 104-202 combination.
Note-104 flight lands at Jaipur at 7.30 pm and 202 flight takes off from Jaipur at 8.30 am.
Therefore the layover time between this pair of flight will be 8.30 am next day and 7.30 pm
earlier day, which is equal to 13 hours and in minutes 13×60= 780 minutes.
Note-We have to keep in mind that the minimum layover time has to be five hours. Layover
time between pair of flights is equal to the difference between takeoff of the return flight
and the landing of the earlier flight. Further we avoid fractions in terms of hours we have
taken minutes as the basis for the formation of the above table.
Can you do the balance calculations? I am sure you will.
Let us do the same exercise of calculating layover time in minutes for crew based in Jaipur
for the Jaipur-Delhi sector.
30
Table consisting of Layover time in minutes for crew based in Jaipur
Delhi-Jaipur
Jaipur-Delhi Flight Number
Return Flights 201 202 203 204
101 1305 **1275 1065 735
102 1365 1335 1125 795
103 1695 1665 1455 1125
104 555 525 315 1425
Note-** 202 flight lands at Delhi at 9.45 am and in case the crew on this flight wants to
come back by 101 flight which departs from Delhi at 7am,the difference works out to 21
hours plus 15 minutes which is equal to 21×60+15 minutes=1275 minutes.
As said before we now get the lowest layover time table from the above two tables for each
pair of flights an which is as given below:
Flights Flight Number
201 202 203 204
101 1305 1275 1065 570
102 1365 1335 1125 510
103 1050 1080 1290 1125
104 555 525 315 1320
means crew is based at Jaipur and if there is nomeans crew is based at Delhi.
As the above table is balanced and least cost table, we can use the Hungarian method and
proceed to Step number 2 for Row Minima.
Step 2- Subtract the minimum element of each row of the matrix from all elements of the
respective row. This step is known as Row Minima.
31
Flights Flight Number
201 202 203 204
101 735 705 495 0
102 855 825 615 0
103 0 30 240 75
104 240 210 0 1005
Step 3- Subtract the minimum element of each column from all the elements in that
respective column. This step is known as Column Minima.
Flights Flight Number
201 202 203 204
101 735 675 495 0
102 855 795 615 0
103 0 0 240 75
104 240 180 0 1005
Step4-Draw the least (minimum) number of horizontal and/or vertical lines to cover all zeros
in the table.
Flights Flight Number
201 202 203 204
101 735 675 495 0
102 855 795 615 0
103 0 0 240 75
104 240 180 0 1005
32
As the number of lines are less than the rows and columns, we move on to step number 5
for modification.
Step 5- Select the smallest element not covered by the lines, subtract it from all uncovered
elements including itself, add it to the elements which are crossed by two lines and
reproduce other elements crossed by one line intact.
Flights Flight Number
201 202 203 204
101 240 160 0 0
102 360 300 120 0
103 0 0 240 570
104 240 180 0 1500
Note- We again see that only four lines are sufficient to cancel all zeros. We have drawn
minimum number of horizontal and vertical lines with each line striking off maximum zeros.
As the number of lines is less than the rows and columns, we again use step number 5 for
modification
Flights Flight Number
201 202 203 204
101 80 0 0 0
102 200 140 120 0
103 0 0 400 730
104 240 180 0 1500
We again draw minimum number of lines crossing out all zeros in the table as shown below
33
Flights Flight Number
201 202 203 204
101 80 0 0 0
102 200 140 120 0
103 0 0 400 730
104 240 180 0 1500
As the number of lines is equal to rows or columns optimum solution has been reached and
we move to step number 7 for assignment.
Flights Flight Number
201 202 203 204
101 80 0 0 0
102 200 140 120 0
103 0 0 400 730
104 240 180 0 1500
Step 7- Proceed to job assignments as follows:
Examine the rows one by one starting with the first row until a row with an exactly one zero
is found. Mark the zero by enclosing it in a square indicating assignment of the task to the
facility. After doing so, cross out all the zeros (if any) in that column as they cannot be used
to make other assignments.
Examine next the columns for any column having a single zero, starting from the first
column. Mark the zero as mentioned above, crossing out the remaining zeros (if any) in that
row.
Repeat steps (i) and (ii) alternatively until all the zeros have been either assigned or crossed.
34
Flights Flight Number
201 202 203 204
101 240 160 0 0
102 360 300 120 0
103 0 0 240 570
104 240 180 0 1500
Step 8-Summary of the assignment is given in the table below
Pair of Flights Crew based at Layover Time in
minutes
101-202 Jaipur 1275
102-204 Delhi 510
103-201 Delhi 1050
104-203 Jaipur 315
Total 3150
Note-For pair of flight101-202 we see from the least layover time table, the crew is based at
Jaipur. Remember the marking and similarly for the other pair of flight we can know where
the crew will be based.
7. A travelling salesman has to visit five cities. He wishes to start from a particular city, visit
each city once and then return to his starting point. The travelling cost (Rs in 000) of each
city from a particular city is given below:
35
From City To City
A B C D E
A M 2 5 7 1
B 6 M 3 8 2
C 8 7 M 4 7
D 12 4 6 M 5
E 1 3 2 8 M
What is the sequence of visit of the salesman to achieve the least cost route?
Solution:
The given assignment table is a balance assignment table and is regarding travelling
salesman. We will use Hungarian method with a difference to satisfy the condition that, the
salesman should visit each city before returning to the city where he started from.
Note- A travelling salesman problem is typical assignment problem with two additional
constraints:
Salesmen should not visit the city twice until he has visited all the cities.
No assignment should be made along the diagonal line.
As the numbers of rows are equal to columns, we have a balanced assignment table and
move on to step number 2.
Step 2- Subtract the minimum element of each row of the matrix from all elements of the
respective row. This step is known as Row Minima.
36
From City To City
A B C D E
A M 1 4 6 0
B 4 M 1 6 0
C 4 3 M 0 3
D 8 0 2 M 1
E 0 2 1 7 M
Step 3- Subtract the minimum element of each column from all the elements in that
respective column. This step is known as Column Minima.
From City To City
A B C D E
A M 1 3 6 0
B 4 M 0 6 0
C 4 3 M 0 3
D 8 0 1 M 1
E 0 2 0 7 M
Step 4- Draw the least (minimum) number of horizontal and/or vertical lines to cover all
zeros in the table.
37
From City To City
A B C D E
A M 1 3 6 0
B 4 M 0 6 0
C 4 3 M 0 3
D 8 0 1 M 1
E 0 2 0 7 M
As the number of lines is equal to rows or columns optimum solution has been reached and
we move to step number 7 for assignment.
Step 7- Proceed to job assignments as follows:
Examine the rows one by one starting with the first row until a row with an exactly one zero
is found. Mark the zero by enclosing it in a square indicating assignment of the task to the
facility. After doing so, cross out all the zeros (if any) in that column as they cannot be used
to make other assignments.
Examine next the columns for any column having a single zero, starting from the first
column. Mark the zero as mentioned above, crossing out the remaining zeros (if any) in that
row.
Repeat steps (i) and (ii) alternatively until all the zeros have been either assigned or crossed.
From City To City
A B C D E
A M 1 3 6 0
B 4 M 0 6 0
C 4 3 M 0 3
D 8 0 1 M 1
E 0 2 0 7 M
38
However the solution gives the sequence A-E-A .This does not satisfy the condition that the
salesman has to visit each city once before returning to the starting point.
Hence we have to look at the next best solution which satisfies the above mentioned
condition. This can be obtained by the next (non-zero) minimum element i.e. 1 into the
solution. In the above table cost 1 occurs at three different places .Therefore we consider all
these three one’s, one by one until the acceptable solution or next best solution is found to
meet the above condition.
Case1- We select 1 in the cell AB instead of zero assignment in the cell AE and delete row A
and column B. After this step we select exclusive zero in the row or column .Except at one
place i.e row number four we get exclusive zero in a row or a column. After selecting lowest
element 1 in this row, in cell DE we are able to satisfy the condition. The assignment table
on the above basis is as follows:
From City To City
A B C D E
A M 1 3 6 0
B 4 M 0 6 0
C 4 3 M 0 3
D 8 0 1 M 1
E 0 2 0 7 M
We have not taken other two cases as we achieved the next best solution satisfying the
condition.
The table below gives us the total transportation cost:
39
From City To City Travelling Cost INR
A B 2000
B C 3000
C D 4000
D E 5000
E A 1000
Total 15000
Note-No feasible solution is obtained in case we had selected 1 in cell DC.
CLOSING NOTES ON ASSIGNMENT
A variety of assignment problems have been taken to give you a flavour of this topic.
Students are advised to make all attempts to solve these illustrations in the CD-ROM on
their own, an only when they are stuck up as a last measure refer to the solutions therein.
Go step by step to achieve the optimum solution.
Notes are provided in the illustrations only for guidance.
You need not be a maths expert to solve the illustrations, just believe in your ability and
keep a positive approach.
The notes given in the illustrations are for guidance only. The notes and steps mentioned in this
book as well as the CD-ROM should be used by the students to get a good insight on the diversity of
the illustrations solved. While solving illustrations on their own, students are requested to mention
the step in brief before writing the table below the same.