1. Assignment Problem
Lesson Content Prepared by Dr. Mamatha S Upadhya.
Meaning of Assignment Problem:
An assignment problem is a particular case of transportation problem where the objective is to
assign a number of origins (jobs) to the equal number of destinations (persons) at a minimum cost
or maximum profit.
Definition of Assignment Problem:
Suppose there are n jobs to be performed and n persons are available for doing these jobs. Assume
that each person can do each job at a time, though with varying degree of efficiency, let cij be the
cost if the i-th person is assigned to the j-th job. The problem is to find an assignment (which job
should be assigned to which person on a one-to-one basis) So that the total cost of performing all
jobs is minimum, problem of this kind are known as assignment problem.
The assignment problem can be stated in the form of n x n cost matrix [cij ] of real numbers as
given in the following table:
2. Difference between Assignment Problem and Transportation Problem
Solution of assignment problems (Hungarian Method)
Step 1: In the given cost matrix, first check whether the number of rows is equal to the numbers
of columns, if it is so, the assignment problem is said to be balanced.
If the no of rows is not equal to the no of columns and vice versa, a dummy row or dummy column
must be added. The assignment cost for dummy cells are always zero.
Step 2: Starting with the first row, locate the smallest cost element in each row of the given cost
table and then subtract this smallest element from each element in that row. This is called Row
reduction.
Step 3: In the reduced matrix obtained from Step 2, locate the smallest element in each column
and then subtract that from each element. The column having zero element will not change. This
is called column reduction.
Step4: Draw a minimum no. of horizontal and vertical lines to cover all the zeros in the revised
cost table obtained from step (3). Let the number of lines be N.
Assignment Problem Transportation Problem
Assignment means allocating various jobs
to various people in the organization.
Assignment should be done in such a way
that the overall processing time is less,
overall efficiency is high, overall
productivity is high, etc.
A transportation problem is concerned
with transportation method or selecting
routes in a product distribution network
among the manufacture plant and
distribution warehouse situated in
different regions or local outlets.
In an assignment problem only one
allocation can be made in particular row
or a column.
A transportation problem is not subject to
any such restrictions. Many allocations
can be done in a particular row or
particular column.
When no. of jobs is not equal to no. of
workers, it is a unbalanced problem.
When the total demand is not equal to
total supply it is unbalanced problem.
3. If N=n order of the matrix then the solution is optimal.
If N< n , go to the next step.
Step5: Subtract the smallest uncovered element from all the uncovered elements and add the same
at the intersection point of the vertical and horizontal lines. Procced till you get number of lines
equal to order of the matrix (N= n ).
Step 6: For assignment (i)Choose a row which has a single zero and encircle it and cross all other
zeros in that particular column.
(ii) Similarly, examine column with exactly one zero is found and encircle it and cross out all other
zero in that particular row.
Repeat the steps (i) and (ii).
The assignment corresponding to these marked circled zeros will give the optimal assignment.
Example 1: Consider the problem of assigning five jobs to five persons. The assignment costs are
given as follows. Determine the optimum assignment schedule.
Solution: Here the number of rows and columns are equal.
∴ The given assignment problem is balanced.
Row Reduction: Select a smallest element in each row and subtract this from all the elements in
its row
4. Column Reduction
Since no. of lines N (5) = order of the matrix 5 , We determine the optimum assignment.
Examine the rows with exactly one zero. Row B contains exactly one zero. Mark that zero
PersonB is assigned to Job 1. Mark other zeros in its column by ×
Now, Row C contains exactly one zero. Mark that zero and Mark other zeros in its column by × .
5. Now, Row D contains exactly one zero. Mark that zero and Mark other zeros in its column by × .
Row E contains more than one zero, now proceed column wise. In column 1, there is an
assignment. Go to column 2. There is exactly one zero. Mark that zero and Mark other zeros in its
row by × .
There is an assignment in Column 3 and column 4. Go to Column 5. There is exactly one zero.
Mark that zero and Mark other zeros in its row by × .
Thus, all the five assignments have been made. The Optimal assignment schedule and total cost is
The optimal assignment (minimum) cost = 9
6. Example 2: Solve the following assignment problem.
Solution: Since the number of columns is less than the number of rows, given assignment problem
is unbalanced one. To balance it, introduce a dummy column with all the entries zero. The revised
assignment problem is
Here only 3 tasks can be assigned to 3 men.
Since, each row contains zero we directly go to column reduction
7. No of lines N=4 and order of the matrix is 4 thus, n=N
The optimal assignment schedule and total cost is
The optimal assignment (minimum) cost = ₹ 35
8. Example 3: Using the following cost matrix determine (a) optimal job assignment (b) the cost of
assignments
Job
Mechanic 𝐼 𝐼𝐼 𝐼𝐼𝐼 𝐼𝑉 𝑉
A 10 3 3 2 8
B 9 7 8 2 7
C 7 5 6 2 4
D 3 5 8 2 4
E 9 10 9 6 10
Row Reduction : Select the smallest element in each row and subtract this smallest element from
all the elements in its row.
8 1 1 0 6
7 5 6 0 5
5 3 4 0 2
1 3 6 0 2
3 4 3 0 4
Column Reduction: Select the smallest element in each column and subtract this smallest element
from all the elements in its column.
7 0 0 0 4
6 4 5 0 3
4 2 3 0 0
0 2 5 0 0
2 3 2 0 2
Draw the minimum number of lines to cover all zeros
9. N=4 (no of lines) and order of matrix 5 , subtract the smallest uncovered element from the
remaining uncovered elements and adding to the element at the point of intersection of lines.
9 0 0 2 6
6 2 3 0 3
4 0 1 0 0
0 0 3 0 0
2 1 0 0 2
Draw the minimum number of lines to cover all zeros
10. N=5=n . Now we determine the optimum assignment.
Job Mechanic Cost
1 D 3
2 A 3
3 E 9
4 B 2
5 C 4
Minimum Cost equal to Rs. 21
11. Maximization in Assignment Problem
In some situations, the assignment problem may call for maximization of profit, revenue etc. as
the objective. For dealing with such problems, we first change it into an equivalent minimization
problem. This is achieved by subtracting each of the elements of the given pay-off matrix from the
largest of all values in the given matrix. Then the problem is solved the same way as the
minimization problem.
Example A company has 5 jobs to be done. The following matrix shows the return in terms of
rupees on assigning ith ( i = 1, 2, 3, 4, 5 ) machine to the jth job ( j = A, B, C, D, E ). Assign the
five jobs to the five machines so as to maximize the total expected profit.
Solution: Subtract all the elements from the highest element Highest element = 14
13. Travelling salesman problem
Assuming a salesman has to visit n cities. He wishes to start from a particular city, visit each city
once and then return to his starting point. His objective is to select the sequence in which the cities
are visited in such a way that his total travelling time is minimized.
Example1: A traveling salesman has to visit 5 cities. He wishes to start from a particular city,
visit each city once and then return to his starting point. Cost of going from one city to another is
shown below. You are required to find the least cost route.
To City
From
City
P Q R S
P ∞ 15 25 20
Q 22 ∞ 45 55
R 40 30 ∞ 25
S 20 26 38 ∞
Solution: First we solve this problem as an assignment problem.
Row Reduction
∞ 0 10 5
0 ∞ 23 33
15 5 ∞ 0
0 6 18 ∞
15. N=n=4
P → R, Q → P, R → S, S → Q,
The path of the salesman P → R → S→ Q→P Distance Covered is 25+22+25+26 =98
Example 2: Solve the following travelling salesman problem.
To
From A B C D
A - 46 16 40
B 41 - 50 40
C 82 32 - 60
D 40 40 36 -
16. (
∞ 46 16 40
41 ∞ 50 40
82
40
32
40
∞ 60
36 ∞
)
Row reduction (
∞ 30 0 24
1 ∞ 10 0
50
4
0
4
∞ 28
0 ∞
)
Column reduction (
∞ 30 0 24
0 ∞ 10 0
49
3
0
4
∞ 28
0 ∞
)
N =3 (no. of lines )and order of the matrix is 4 , since N≠ n, select the smallest uncovered element
3 and subtract this element from other uncovered element and add this number 3 at the intersection
of lines.
17. (
∞ 30 0 21
0 ∞ 13 0
46
0
0
4
∞ 25
0 ∞
)
Thus, no of lines is equal to order of the matrix. Now we shall make the assignment in rows and
column having single zeros.
The optimum assignment schedule is A→ C→ B→D→ A
Assignment cost = 16+32+40+40 =128 /-