You are on page 1of 7

Applied Mathematics and Computation 176 (2006) 7682 www.elsevier.

com/locate/amc

A modied 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 nds it dicult 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 ctitious machines, those jobs are executed on dummy machines which later may be ignored. The present paper suggests a modied 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 eectiveness 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 scientic methods was extensively 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 solution was given by Hungarian mathematician D. Ko nig [1]. When we deal with real life situation, it becomes quite dicult 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 constraints. 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) 7682

77

Minimize (Maximize): Z
m X n X i1 j 1

C ij X ij

Subject to
n P j 1 m P i1

X ij 1; X ij 1;

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

2. Denitions To assign various jobs to dierent 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 nal optimal assignment cost has been obtained. The number of jobs is more than number of machines.

4. Problem denition 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 execution 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 assignment 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 rst 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 rst 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-problem. 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 assignment 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) 7682

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 rst 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 rst 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 eectiveness is to be maximized, change the sign of each element in the eectiveness 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 element 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) 7682

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 300 250 180 320 270 190 220 260 M2 290 310 190 180 210 200 300 190 M3 280 290 300 190 190 220 230 260 M4 290 300 190 240 250 190 180 210 M5 210 200 180 170 160 140 160 180.

J1 J2 J3 ACM; J 4 J5 J6 J7 J8

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: J2 J3 J4 J5 J6 J7 J8 J1 Sum Row 1370 1350 1040 1100 1080 0940 1090 1100; M2 M3 M4 M5 M1 Sum Column 1990 1870 1960 1850 1400. We partitioned the matrix ACM (,) to dene the rst sub-problem N1ACM (,) by selecting rows corresponding 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 modied matrices are as follows: Sub-Problem-I: J3 J4 N1ACM; J5 J6 J7 M1 180 320 270 190 220 M2 190 180 210 200 300 M3 300 190 190 220 230 M4 190 240 250 190 180 M5 180 170 160 140 160

80

A. Kumar / Applied Mathematics and Computation 176 (2006) 7682

and, Sub-Problem-II: M2 N2ACM; J1 J2 290 310 M4 290 300 M5 210 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 nal optimal assignments are as follows: Job J1 J2 J3 J4 J5 J6 J7 J8 ! ! ! ! ! ! ! ! ! Machine M4 M5 M1 M2 M3 M5 M4 M2 Cost 290 200 180 180 190 140 180 190.

Step-18: Stop.

7. Conclusion The present paper suggests a modied method for solving the unbalanced assignment problems. The Hungarian 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 problem is divided in the sub-problems, which are balanced assignment problems in nature. With the use of Hungarian method, the total assignment cost 870 recorded for the rst 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) 7682

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 J1 J2 J3 J4 J5 J6 J7 J8 Total ! Machine Cost ! M6(Dm) 000 ! M7(Dm) 000 ! M1 180 ! M2 180 ! M3 190 ! M5 140 ! M4 180 ! M8(Dm) 000 assignment cost = 870.

The present method which modies 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 veried by modifying the ACM (,) on the basis of above assignment of the two sub-problems 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 J1 J7 NACM; J2 J6 J3 J4 J8 J5 M2 M3 M4 470 490 190 450 250 M5 370 340 180 350 160. 520 590 510 440 510 510 180 190 300 580 370 450 270 210 190

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 eectiveness 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) 7682

[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