A Least Cost Assignment Technique For Solving Assignment Problems
A Least Cost Assignment Technique For Solving Assignment Problems
Vol. 17 No.2 (2013) Journal of International Academy of Physical Sciences pp. 187-202
S. Shukla
S. S. Jain Subodh P.G. College, Jaipur
Email: [email protected]
1. Introduction
The assignment problem is one of the earliest applications of linear
integer programming problem. A variety of practical problems turn out to
be a special instance of the assigning problem, i.e. a problem, where one
looks for an assignment of members of set A to members of set B such
that some function attains its optimum. It may always assumed that the
numbers of elements in sets A and B are equal and that we want to assign
exactly one element from A to each element from B. Solving such a
problem often means that some functions are evaluated for each
assignment. Since there are n! possible assignments, where n is the
188 P. R. Sharma and S. Shukla
Here, m is the numbers of jobs as well as the number of operators and cij be
the processing time of the job i if it is assigned to the operator j. The
objective is to assign the jobs to the operators such that the total processing
time is minimized. Table 2 summarized different examples of the
assignment problems.
190 P. R. Sharma and S. Shukla
m
∑ xij = 1, i = 1, 2,...., m
(2.3) j =1
m
subject to ∑ xij = 1, j = 1, 2,...., m
i =1
xij = 0 or 1, i, j = 1, 2,..., m
here, m being the number of rows (jobs) as well as the number of columns
(operators) and cij the time/cost of assigning the row i to the column j.
In this model the objective function minimizes the total cost of assigning
the row to the columns. The first set of constraints ensures that each row is
assigned to only one column. The second set of constraints ensures that each
column is assigned to only one row.
Here cij can be replaced by d ij in the zero-one assignment problem in the
maximization form and can solve it by any standard procedure (Hungarian
method or by any software) to get the optimal assignment. In that case the
model for the preference assignment problem becomes
m m
(2.4) Max z = ∑∑ dij xij
i =1 j =1
n
∑ xij = 1, j = 1, 2,...., m
i =1
(2.5) n
subject to ∑ xij = 1, i = 1, 2,...., m
j =1
x = 0 or 1, i, j = 1, 2,..., m
ij
3. Method of Solution
Algorithm for finding the optimal solution of assignment problem is
presented below
Step-I. First, we find row penalties, i.e. the difference between the first
minimum and second minimum in each row. If the two minimum values are
same then the row penalty is zero.
192 P. R. Sharma and S. Shukla
Step-II. Find column penalties, i.e. the difference between the first
minimum and second minimum in each column. If the two minimum values
are same then the column penalty is zero.
Step-III. Find the maximum penalty amongst the row penalties and the
column penalties and identify whether it occurs in a row or in a column. If
the maximum penalties is in a row then go to next step otherwise go to step-
VI.
Step-IV. Identify the cell for assign which has the least cost in that row.
Step-VI. Identify the cell for assign which has the least cost in that column.
Step-X. Delete both the row and column which has the assign element to the
selected cell. Then revise the above procedure for row and column penalties.
Step-XI. Check whether exactly one row/column is left out, if yes then we
get the complete solution.
Tasks Subordinates
↓ I II III IV
194 P. R. Sharma and S. Shukla
A 8 26 17 11
B 13 28 4 26
C 38 19 18 15
D 19 26 24 10
Table 3
Solution:
Step-I. First, we calculate the penalties for all rows and columns. They are
written below the Table 4 for the row difference and aside the table for the
column differences. We now select column, III because it has the highest
penalty rating 13.we look at the cell with the least cost in the column III is
to be identified. Here it is the cell (B, III) with entry 4. So we assign 4 to (B,
III). Hence row and column are deleted corresponding to cell (B, III) and
resulting data shown in Table 5
C 38 19 18 15 3
D 19 26 24 10 9
Penalty 5 7 13 1
Table 4
Step-II. We now select column I because it has the highest penalty rating
11.we look at the cell with the least cost in the column I is to be identified.
Here it is the cell (A, I) with entry 8. So we assign 8 to (A, 1). Hence row
and column are deleted corresponding to cell (A, I) and resulting data shown
in Table 6
Tasks Subordinates Penalty
↓ I II IV ↓
A 8 26 11 3
C 38 19 15 4
D 19 26 10 9
Penalty 11 7 1
Table 5
Step-III. We now select row D because it has the highest penalty rating
16.we look at the cell with the least cost in the row D is to be identified.
Here it is the cell (D, II) with entry 10. So we assign 10 to (D, II). Hence
row and column are deleted corresponding to cell (D, II) and resulting data
shown in Table 7
A Least Cost Assignment Technique For Solving Assignment Problems 195
Penalty 7 5
Table 6
Step-IV. Here we have only one cost so we assign that cost, which is shown
in Table 7.
Tasks Subordinates
↓ I
C 19
Table 7
Step-V. The whole procedure can be done in a single table as given below
Tasks Subordinates
↓ I II III IV
A 8 26 17 11
B 13 28 4 26
C 38 19 18 15
D 19 26 24 10
Table 8
Hence optimal solution is: A→I, B→III, C→II, D→IV
Optimal value = 8+4+19+10=41.
Example-2. 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
Jobs Machine
↓ W X Y Z
A 18 24 28 32
B 8 13 17 19
C 10 15 19 22
Table 9
What are the job assignments which will minimize the cost?
Solution: Step-I. This is a case of unbalanced assignment problem. So we
introduce a fictitious (dummy) job D with all entries zero and after this, the
technique is applied.
Jobs Machine
↓ W X Y Z
A 18 24 28 32
196 P. R. Sharma and S. Shukla
B 8 13 17 19
C 10 15 19 22
D 0 0 0 0
Table 10
Step-II. First, we calculate the penalties for all rows and columns. They are
written below the table for the row difference and aside the table for the
column differences. We now select column Z because it has the highest
penalty rating 19.we look at the cell with the least cost in the column Z is to
be identified. Here it is the cell (D, Z) with entry 0. So we assign 0 to (D, Z).
Hence row and column are deleted corresponding to cell (D, Z) and
resulting data shown in Table 12.
Penalty 8 13 17 19
Table 11
Step-III. We now select row A because it has the highest penalty rating
6.we look at the cell with the least cost in the row A is to be identified. Here
it is the cell (A, W) with entry 18. So we assign 18 to (A, W). Hence row
and column are deleted corresponding to cell (A, W) and resulting data
shown in Table 13.
B 8 13 17 5
C 10 15 19 5
Penalty 2 2 2
Table 12
Step-IV. We now select row B because it has the highest penalty rating
4.we look at the cell with the least cost in the row B is to be identified. Here
it is the cell (B, X) with entry 13. So we assign 13 to (B, X). Hence row and
column are deleted corresponding to cell (B, X) and resulting data shown in
Table 14
A Least Cost Assignment Technique For Solving Assignment Problems 197
C 15 19 4
Penalty 2 2
Table 13
Step-V. Here we have only one cost so we assign that cost, which is shown
in Table 14.
Jobs Machine
↓ Y
C 19
Table 14
Step-VI. The whole procedure can be done in a single table as the given
below.
Jobs Machine
↓ W X Y Z
A 18 24 28 32
B 8 13 17 19
C 10 15 19 22
D 0 0 0 0
Table 15
Hence optimal solution is: A→W, B→X, C→Y, D→Z
The minimum cost = 18+13+19+0=50 Rs.
Example-3. A marketing manner has five salesman and sales-districts.
Considering the capabilities of the salesman and the nature of districts, the
marketing manager estimates that
sale per month (in hundred Rupees) for each salesman in each district would
be as follows
Salesman Districts
↓ A B C D E
1 32 38 40 28 40
2 40 24 28 21 36
3 41 27 33 30 37
4 22 38 41 36 36
5 29 33 40 35 39
Table 16
Find the assignment of salesman to districts that will result in maximum
sales.
Solution:
Step-I. This is an assignment problem of profit maximization type; we
convert it into an assignment problem of cost minimization type by
198 P. R. Sharma and S. Shukla
Salesman Districts
↓ A B C D E
1 9 3 1 13 1
2 1 17 13 20 5
3 0 14 8 11 4
4 19 3 0 5 5
5 12 11 1 6 2
Table 17
Step-II. First, we calculate the penalties for all rows and columns. They are
written below the table for the row difference and aside the table for the
column differences. We now select row 3 because it has the highest penalty
rating 4.we look at the cell with the least cost in the row 3 is to be identified.
Here it is the cell (3, A) with entry 0. So we assign 0 to (3, A). Hence row
and column are deleted corresponding to cell (3, A) and resulting data
shown in Table 19.
4 19 3 0 5 5 3
5 12 11 1 6 2 1
Penalty 1 0 1 1 1
Table 18
Step-III: We now select row 2 because it has the highest penalty rating
8.we look at the cell with the least cost in the row 2 is to be identified. Here
it is the cell (2, E) with entry 5. So we assign 5 to (2, E). Hence row and
column are deleted corresponding to cell (2, E) and resulting data shown in
Table 20.
4 3 0 5 5 5
5 11 1 6 2 1
Penalty 0 1 1 1
Table 19
Step-IV: We now select row 5 because it has the highest penalty rating 5.we
look at the cell with the least cost in the row 5 is to be identified. Here it is
A Least Cost Assignment Technique For Solving Assignment Problems 199
the cell (5, C) with entry 1. So we assign 1 to (5, C). Hence row and column
are deleted corresponding to cell (5, C) and resulting data shown in Table 21
Penalty 0 1 1
Table 20
Step-V: We now select row 1 because it has the highest penalty rating
10.we look at the cell with the least cost in the row 1 is to be identified.
Here it is the cell (1, B) with entry 3. So we assign 3 to (1, B). Hence row
and column are deleted corresponding to cell (1, B) and resulting data
shown in Table 22
4 3 5 2
Penalty 0 8
Table 21
Step-VI. Here we have only one cost so we assign 5 to (4, D), which is
shown in Table 23.
Salesman Districts
↓ D
4 5
Table 22
Step-VII. The whole procedure can be done in a single table as given below
Salesman Districts
↓ A B C D E
1 32 38 40 28 40
2 40 24 28 21 36
3 41 27 33 30 37
4 22 38 41 36 36
5 29 33 40 35 39
Table 23
Hence optimal solution is: 1→B, 2→E, 3→A, 4→D, 5→C,
200 P. R. Sharma and S. Shukla
4 - - 4 5 1
Penalty 1 1 2 1
Table 25
Step-II. We now select row 1 because it has the highest penalty rating 1.we
look at the cell with the least cost in the row 1 is to be identified. Here it is
the cell (1, 1) with entry 4. So we assign 4 to (1, 1). Hence row and column
are deleted corresponding to cell (1, 1) and resulting data shown in Table
27.
2 - 4 4 0
4 - - 5 -
Penalty - 1 1
Table 26
A Least Cost Assignment Technique For Solving Assignment Problems 201
Step-III. We now select column 2 because it has the highest penalty rating
1.we look at the cell with the least cost in the column 2 is to be identified.
Here it is the cell (4, 4) with entry 4. but we cannot assign this cost, in this
case we assign 4 to (2, 2) and 5 to (4, 4).
4 - 5 -
Penalty - 1
Table 27
Step-IV. The whole procedure can be done in a single table as given below
Company Bids
↓ Route 1 Route 2 Route 3 Route 4
1 4 5 - -
2 - 4 - 4
3 3 - 2 -
4 - - 4 5
Table 28
Hence optimal solution is: 1→1, 2→2, 3→3, 4→4
The minimum cost = 4+4+2+5= 15 Rs.
Conclusion
In this paper, a new technique namely least cost assignment technique is
introduced to solve assignment problem. This method is applicable for all
kind of assignment problems, whether maximize or minimize objective
function. In this method we do not require to mark any row or column to
draw minimum number of lines, so this technique is systematic, easy to
apply and consume less time in comparison to another techniques. This
technique gives better optimal solution in comparison with Hungarian
method.
References