You are on page 1of 7

Applied Mathematics and Computation 176 (2006) 76–82

www.elsevier.com/locate/amc

A modified method for solving the unbalanced


assignment problems
Avanish Kumar
Department of Mathematical Sciences and Computer Applications, Bundelkhand University, Jhansi 284 128, UP, India

Abstract

It has been noticed that in real life situations, one finds it difficult to balance between jobs and machines, therefore most
of the time we face unbalanced assignment problems. The methods suggested in the literature is based on the assumption to
assign some of the jobs to dummy or fictitious machines, those jobs are executed on dummy machines which later may be
ignored. The present paper suggests a modified method for solving the unbalanced assignment problems. The method is
capable of assigning all the jobs to machine optimally. The method is presented in an algorithmic form and implemented
on the several sets of input data to test the performance and effectiveness of the algorithm. The developed algorithm is
coded into C++. A comparison is also made with the existing approach and it is recorded that our algorithm gives better
results.
 2005 Elsevier Inc. All rights reserved.

Keyword: Unbalanced assignment problems

1. Introduction

During the last 1930s in England and early 1940s in United States, the use of scientific methods was exten-
sively made to analyze optimization problems. World War II challenged both countries at that time to develop
optimal solution for assignment, transportation and multi-variable type problems. The modeling techniques
studied by operation researchers in 1940s and 1950s usually required algebra or calculus for solution purposes.
The term ‘‘Mathematical programming’’ was used then, and is still used today, to describe the structuring of
mathematical symbols into a model or program [2,3]. The assignment problem is a special case of the linear
programming problem. It has been discussed with the situation in which jobs are to be assigned to a machine
for execution. The linear programming formulation of the assignment problem and systematic method of solu-
tion was given by Hungarian mathematician D. König [1]. When we deal with real life situation, it becomes
quite difficult to ensure that jobs are exactly equal to machines. Thus the need arises to solve the unbalanced
assignment problem in such a way that total assignment cost may be optimized along with the other con-
straints. The mathematical formulation of the assignment problem is as follows:

E-mail address: dravanishkumar@yahoo.com

0096-3003/$ - see front matter  2005 Elsevier Inc. All rights reserved.
doi:10.1016/j.amc.2005.09.056
A. Kumar / Applied Mathematics and Computation 176 (2006) 76–82 77

Minimize (Maximize):
m X
X n
Z¼ C ij X ij
i¼1 j¼1

Subject to

P
n
X ij ¼ 1; for i ¼ 1; 2; . . . ; m;
j¼1
where X ij ¼ 0; 1; 8i; j.
P
m
X ij ¼ 1; for j ¼ 1; 2; . . . ; n;
i¼1

2. Definitions

• To assign various jobs to different machines, in such a way that the total assignment cost is to be minimum,
known as the assignment problem.
• If the number jobs are not equal to number of the machines, then it is known to be unbalanced assignment
problem.

3. Assumptions

• The completion of a program from computational point of view means that all the jobs have been assigned
to the various machines and the final optimal assignment cost has been obtained.
• The number of jobs is more than number of machines.

4. Problem definition

Consider a problem which consists of a set of ‘‘n’’ machines M = {M1, M2, . . ., Mn}. A set of ‘‘m’’ jobs
J = {J1, J2, . . ., Jm} is considered which are to be assigned for execution on ‘‘n’’ available machines. The exe-
cution cost of each job on all the machines is known and mentioned in the matrix, namely, ACM (,) of order
m · n. The objective is to determine the optimal assignment cost. A method is devised to obtain the said costs
in such a way that all the jobs are to be allotted on the available machines.

5. Proposed method

To determine the assignment cost as well as combination of job(s) vs. machine(s) of an unbalanced assign-
ment problem, we concentrate on a problem which consists of a set of ‘‘n’’ machines M = {M1, M2, . . ., Mn}. A
set of ‘‘m’’ jobs J = {J1, J2, . . ., Jm} is considered which are to be assigned for execution on the ‘‘n’’ available
machines and the execution cost Cij, where i = 1, 2, . . ., m and j = 1, 2, . . ., n are mentioned in the assignment
cost matrix ACM (,), where m > n. First of all, we obtain the sum of each row and each column of the
ACM (,), store the results in the array, namely, Sum_Row () and Sum_Column (). Then we select the first
m rows (jobs) on the basis of Sum_Row (), i.e., starting with most minimums to next minimum to the array
Sum_Row () and deleting rows (jobs) corresponding to the remaining (m  n) jobs. Store the results in the new
array that should be the array for the first sub-problem. Repeat this process until remaining jobs become less
than machine, when remaining jobs are less than n, then, deleting (n  m) columns (machines) on the basis of
Sum_Column (), i.e., corresponding to value(s) most maximum to next maximum to form the last sub-prob-
lem. Store the results in the new array that shall be the array for the last sub-problem. Apply Hungarian
method to obtain the optimum solution [1,4] of each sub-problem, which are now becoming balanced assign-
ment problem. Finally, add the total assignment cost of each sub-problem to obtain the optimal assignment
cost along with assignment sets.
78 A. Kumar / Applied Mathematics and Computation 176 (2006) 76–82

5.1. Computational algorithm

The method discussed in the present paper is to determine the following components:

– Determine criterion to assign the excess jobs.


– Determine the process of assignment.
– Compute the optimal assignment cost.

5.2. Algorithm

To give an algorithmic representation to the method, let us consider a problem which consists of a set of
‘‘n’’ machines M = {M1, M2, . . ., Mn}. A set of ‘‘m’’ jobs J = {J1 J2, . . ., Jm} is considered which are to be
assigned for execution on ‘‘n’’ available machines and the execution cost Cij, where i = 1, 2, . . ., m and
j = 1, 2, . . ., n, where m > n, i.e., the number of jobs is more than number of machines.

Step-1: Input: m, n, ACM (,).


Step-2: If number of rows and columns are equal, i.e., balanced assignment problem, then, use Hungarian
method, else, partition the matrix to form sub-problems.
Step-3:
Step-3.1: Obtain the sum of each row and each column of the ACM (,), store the results in the array,
namely, Sum_Row () and Sum_Column ().
Step-3.2: Select the first m rows (jobs) on the basis of Sum_Row (), i.e., starting with most minimums
to next minimum to the array Sum_Row () and deleting rows (jobs) corresponding to the
remaining (m  n) jobs. Store the results in the new array that shall be the array for the first
sub-problem.
Step-3.2.1: If there is not any remaining jobs, i.e., (m  n = 0), then go to Step-3.4.
Step-3.2.2: If the remaining (m  n) jobs are still more than n, then repeat Step-3.2 for the
remaining jobs to form next sub-problem(s), else, Step-3.3.
Step-3.3: If remaining jobs are less than n, then, delete (n  m) columns (machines) on the basis of
Sum_Column (), i.e., corresponding to value(s) most maximum to next maximum to form
the last sub-problem. Store the results in the new array that shall be the array for the last
sub-problem.
Step-3.4: List sub-problems and repeat Step-4 to Step-16 to solve each sub-problem.
Step-4: If the total effectiveness is to be maximized, change the sign of each element in the effectiveness
matrix and go to Step-5; otherwise go directly to Step-5.
Step-5: If the minimum element in the row i is not zero, then subtract this minimum element from each ele-
ment in the row i (i = 1, 2, . . ., m).
Step-6: If the minimum element in the column j is not zero, then subtract this minimum element from each
element in the column j (j = 1, 2, . . ., m).
Step-7: Examine rows successively, beginning with row 1, for a row with exactly one unmarked zero. If at
least one exists, mark this zero with the symbol (D) to denote an assignment. Cross out (X) the other
zeros in the same column so that additional assignment will not be made to that column. Repeat the
process until each row has no unmarked zeros or at least two unmarked zeros.
Step-8: Examine columns successively, beginning with column 1, for a column with exactly one unmarked
zero. If at least one exists, mark this zero with the symbol (D) to denote an assignment. Cross out
(X) the other zeros in the same row so additional assignment will not be made to that row. Repeat
the process until each column has no unmarked zeros or at least two unmarked zeros.
Step-9: Repeat Steps 7 and 8 successively (if necessary) until one of the three things occurs:
Step-9.1: Every row has an assignment (D). Go to Step-16.
Step-9.2: There are at least two unmarked zeros in each row and each column. Go to Step-7.
A. Kumar / Applied Mathematics and Computation 176 (2006) 76–82 79

Step-9.3: There are no zeros left unmarked and a complete assignment has not been made. Go to
pStep-10.
Step-10: Check (p ) all rows for which assignment (D) has not been made.
Step-11: Check (p ) columns not already checked which have a zero in checked rows.
Step-12: Check ( ) rows not already checked which have assignments in the checked column.
Step-13: Repeat Steps 11 and 12 until the chain of checking ends.
Step-14: Draw lines through all unchecked rows and through all checked columns. This will necessarily give
the minimum number of lines needed to cover each zero at least one time.
Step-15: Examine the elements that do not have at least one line through them. Select the smallest of these and
subtract it from every element in each row that contains at least one uncovered element. Add the
same element to every element in each column that has a vertical line through it. Return to Step-7.
Step-16: List the assignment cost and combination corresponding to sub problem.
Step-17: Add assignment cost of each sub-problem to obtain the total assignment cost of the main problem,
which shall be the optimal cost, and also rearrange the combinations.
Step-18: Stop.

6. Illustration of an example

Let us consider a problem in which a set of 3 machines M = {M1, M2, M3}, and a set of 8 jobs
J = {J1, J2, J3, J4, J5, J6, J7, J8}. The assignment matrix ACM (,) contains the execution costs of every job to
each machine.

Steps-1 to 2: Input: 5, 8,

M1 M2 M3 M4 M5
J1 300 290 280 290 210
J2 250 310 290 300 200
J3 180 190 300 190 180
ACMð; Þ ¼ J 4 320 180 190 240 170
J5 270 210 190 250 160
J6 190 200 220 190 140
J7 220 300 230 180 160
J8 260 190 260 210 180.

Step-3: Obtain the sum of each row and column of ACM (,), i .e., the sum of each row and each column is as
follows:
J1 J2 J3 J4 J5 J6 J7 J8
Sum Rowð Þ ¼
1370 1350 1040 1100 1080 0940 1090 1100;
M1 M2 M3 M4 M5
Sum Columnð Þ ¼
1990 1870 1960 1850 1400.
We partitioned the matrix ACM (,) to define the first sub-problem N1ACM (,) by selecting rows correspond-
ing to J3, J4, J5, J6, J7 and second sub-problem N2ACM (,) by selecting rows corresponding to the jobs J1, J2, J8
and by deleting columns corresponding to M1, M3. Then the modified matrices are as follows:
Sub-Problem-I:
M1 M2 M3 M4 M5
J3 180 190 300 190 180
J4 320 180 190 240 170
N1ACMð; Þ ¼
J5 270 210 190 250 160
J6 190 200 220 190 140
J7 220 300 230 180 160
80 A. Kumar / Applied Mathematics and Computation 176 (2006) 76–82

and, Sub-Problem-II:

M2 M4 M5
J1 290 290 210
N2ACMð; Þ ¼
J2 310 300 200
J 8 190 210 180.
Steps-4 to 16: The solution of the Sub-Problem-I, i.e., N1ACM (,) is mentioned below,

Job ! Machine Cost


J3 ! M1 180
J4 ! M2 180
J5 ! M3 190
J6 ! M5 140
J7 ! M4 180
Total assignment cost = 870

and the solution of the Sub-Problem-II, i.e., N2ACM (,) is,

Job ! Machine Cost


J1 ! M4 290
J2 ! M5 200
J8 ! M2 190
Total assignment cost = 680.

Step-17: Thus, the total assignment cost of the main problem, i.e., ACM (,) is 1550. The final optimal assign-
ments are as follows:
Job ! Machine Cost
J1 ! M4 290
J2 ! M5 200
J3 ! M1 180
J4 ! M2 180
J5 ! M3 190
J6 ! M5 140
J7 ! M4 180
J8 ! M2 190.

Step-18: Stop.

7. Conclusion

The present paper suggests a modified method for solving the unbalanced assignment problems. The Hun-
garian method [1] gives us total assignment cost 870 along with the other three jobs assigned to dummy
machine, in other words that these three jobs are ignored for further processing, while, when the original prob-
lem is divided in the sub-problems, which are balanced assignment problems in nature. With the use of Hun-
garian method, the total assignment cost 870 recorded for the first sub-problem along with that of none of the
jobs assigned to dummy machine and total assignment cost 680 for the second sub-problem along with that of
A. Kumar / Applied Mathematics and Computation 176 (2006) 76–82 81

none of the jobs assigned to dummy machine. The solution of the unbalanced assignment problem, ACM (,)
obtained with the help of Hungarian method is mentioned below:

Job ! Machine Cost


J1 ! M6(Dm) 000
J2 ! M7(Dm) 000
J3 ! M1 180
J4 ! M2 180
J5 ! M3 190
J6 ! M5 140
J7 ! M4 180
J8 ! M8(Dm) 000
Total assignment cost = 870.

The present method which modifies the assignment cost matrix to form the sub-problems that give optimal
assignment cost, which is the sum of total assignment costs of all sub-problems, i.e., 1550 along with neither of
the jobs assigned to dummy machine nor ignored for further processing. The reasoning behind the increase in
cost is that the present method executes all the jobs, while the original method does not execute all the jobs. If
we take the total minimum assignment cost and total average assignment cost of those jobs, which were
assigned to dummy machines in Hungarian method are 590 and 764, respectively. So that if we add this cost
to the Hungarian solution then the total assignment costs would have become 1460 and 1634. The above
method can also be verified by modifying the ACM (,) on the basis of above assignment of the two sub-prob-
lems N1ACM (,) and N2ACM (,), i.e., to club the costs of jobs J1, J2, J8 with J4, J6, J7 on various machines. So
that modify matrix of ACM (,) is NACM (,), i.e.,
M1 M2 M3 M4 M5
J1  J7 520 590 510 470 370
J2  J6 440 510 510 490 340
NACMð; Þ ¼
J3 180 190 300 190 180
J4  J8 580 370 450 450 350
J5 270 210 190 250 160.
The solution of the NACM (,) obtained with the help of Hungarian method is mentioned below,

Machine Job Cost


M1 J3 180
M2 J4 * J8 370
M3 J5 190
M4 J1 * J7 470
M5 J2 * J6 340
Total assignment cost = 1550.

The method is presented in algorithmic form and implemented on the several sets of input data to test the
performance and effectiveness of the algorithm. The developed algorithm is coded into C++ and implemented
on RISC based DEC-2000 mini computer.

References

[1] E. Gillett Billy, Introduction to Operations Research – A Computer Oriented Algorithmic Approach, Tata Mc-Graw Hill, New Delhi,
2000.
82 A. Kumar / Applied Mathematics and Computation 176 (2006) 76–82

[2] K.V. Mittal, C. Mohan, Optimization Methods in Operations Research and System Analysis, New Age International Pvt. Ltd., New
Delhi, 1996.
[3] S.S. Rao, Optimization Theory and Applications, Wiley Eastern Ltd., New Delhi, 1991.
[4] H.A. Taha, Operation Research: An Introduction, MacMillan Inc., New York, 1971.

You might also like