0% found this document useful (0 votes)
129 views20 pages

Optimal Method for Assignment Problem

The document presents a new optimal method for solving the Assignment problem, which is a type of Maximum weighted bipartite matching problem. It discusses classical methods like the Hungarian algorithm and introduces various types of Assignment problems, emphasizing the new method's reduced time and calculation complexity. The paper includes mathematical formulations and examples to illustrate the solution process.

Uploaded by

Rajesh Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
129 views20 pages

Optimal Method for Assignment Problem

The document presents a new optimal method for solving the Assignment problem, which is a type of Maximum weighted bipartite matching problem. It discusses classical methods like the Hungarian algorithm and introduces various types of Assignment problems, emphasizing the new method's reduced time and calculation complexity. The paper includes mathematical formulations and examples to illustrate the solution process.

Uploaded by

Rajesh Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Mathematics in Computer Science manuscript No.

(will be inserted by the editor)

An optimal new method to solve an Assignment problem

Received: date / Accepted: date

Abstract The Assignment problem is introduced as the Maximum weighted bipartite match-
ing problem. Also, this problem nominates as a Minimization problem that comprises a set
of positive edge cost instead of edge weight where is at least as large as the maximum of
the weight of edge [1]. It should be considered that classical solution to the Assignment
problem is proposed which is called Hungarian method[1]. This algorithm and other meth-
ods like Simplex method [2], Enumeration method [3] and Transportation method[2] for
solving the Assignment problem assures the prior existence of a matrix of edge weights or
costs and consequently the problem is addressed with related method. The problem it self
may change during the procedure of computing solution. Also new nodes may be added or
deleted from related graph or even weight of edges could change.
The Assignment problem also has miscellaneous types such as: Bottleneck Assignment
problem [4], Unbalanced Assignment problem [5], Minimum P
deviation Assignment prob-
lem [6], Lexicographic bottleneck Assignment problem [7], k -Assignment problem, Semi
Assignment problem [8], Categorized Assignment problem [10], Multi-criteria Assignment
problem [10], Fractional Assignment problem [10], Assignment problem with side con-
straints [10], Quadratic Assignment problem [10]. In this paper a new optimal method to
solve an Assignment problem is presented which has less time and calculation complexity
in comparison with other classical methods.

Keywords Assignment problem · Maximum weighted matching problem · Linear


programming · Transportation problem · Enumeration method · Hungarian algorithm

Shima Zarei
UIVERSITA DEGLI STUDI DI SIENA
Rettorato,Via Banchi di Sotto 55,53100,Siena,ITALIA
Tel.: 0577 232111
E-mail: [Link]@[Link]
ORCID ID: 0000-0003-1098-6152
2

1 Introduction

The Assignment problem is defined as minimization Linear programming problem [9]. Also,
Assignment problem is expressed in mathematical form[10]:

XX
cij xij (1)
i∈A j∈T

Subject to the constraint :

X
xij = 1 , for j = 1, ...., n, (2)
j∈T

X
xij = 1 , for i = 1, ...., n, (3)
i∈A

xij ≥ 0 (4)

In these equations variable cij refers to weight or cost of performance related to tasks
and xij also indicates the Assignment of agent i to task j , taking value 1 if the Assignment
is done and 0 otherwise [10].
This problem can be defined in form of a table as well. Suppose there are m jobs and n
devices which are available, if the cost of doing jth work by ith person is cij , then all costs
regarding to this issue can be demonstrated as a table 1 :

Devices/Jobs 1 2 3 ...j ...m


1 c11 c12 c13 ...c1j ...c1m
2 c21 c22 c23 ...c2j ...c2m
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. ci1 ci2 ci3 ...cij ...cim
n cn1 cn2 cn3 ...cnj ...cnm

Table 1 Tabular of Assignment problem[10]

2 Solution Methodes:

In order to solve an Assignment problem there are different methods such as Hungarian
algorithm [1], Simplex method [11], Enumeration method [3] and Transportation method
[2]. These methods are introduced as following:.
An optimal new method to solve an Assignment problem 3


2.1 Hungarian Algorithm

Hungarian method [1] is one of the classical solutions of Assignment problem which aim to
detect minimum costs for tasks allocation. This algorithm is defined in following steps:
Step 1: Subtract the smallest entry in each row from all the entries of corresponding row.
Step 2: Subtract the smallest entry in each column from all the entries of corresponding
column.
Step 3: Draw vertical and horizontal lines through rows and columns in which all the
zero entries of the cost matrix are covered with minimum number of lines.
Step 4: (Optimality test): If the minimum number of lines is equal to number of row=n
then optimal Assignment is achieved and if minimum number of lines is less than n go to
next step 5.
Step 5: Subtract minimum value which is not covered by lines from all uncovered values
and add it to those values which are covered twice. Then go to step 3 [12].
For more simplicity let’s examine this algorithm through an example [13]. Suppose a
building firm encompasses 4 cranes each of which has a distance(km) from 4 different con-
struction sites as shown in matrix:
 
90 75 75 80
 35 85 55 65 
Costs = 
125

95 90 105
45 110 95 115
Step 1: Subrtact minimum value of each row from corresponding row values. So, we
have result matrix:
 
15 0 0 5
0 50 20 30
Costs = 
35

5 0 15
0 65 50 70
Step 2: Subtract minimum value of each column from corresponding column [Link]
result matrix is:
 
15 0 0 0
0 50 20 25
Costs = 
35

5 0 10
0 65 50 65
Step 3: Draw line across rows and columns in which all zeros are covered with minimum
number of lines. The result matrix is:
 
15 0 0 0
0 50 20 25
Costs = 
35

5 0 10
0 65 50 65
Step 4: Perform test for optimality; If number of lines drawn are equal to n (number
of rows) then algorithm is finished. If number of lines are smaller than n then go to step 5.
Here, number of lines is equal to 3 ≤ n.
4

Step 5: Subtract smallest value of uncovered values from each entry not covered by the
lines and add it to values which are covered by horizontal and vertical lines. Then check if
there is any assignment otherwise repeat step 3.

 
20 0 5 0
0 45 20 20
Costs = 
35

0 0 5
0 60 50 60

In this matrix there is not any assignment. So repeat step [Link] lines across zeros.

 
20 0 5 0
0 45 20 20
Costs = 
35

0 0 5
0 60 50 45

Number of lines is 3 which is smaller than n. So subtract minimum value among non-
covered values (here is 20) from those values and add it to covered values by lines twice.

 
40 0 5 0
0 25 0 0
Costs = 
55

0 0 5
0 40 30 40

In the result matrix there are 2 option of correct assignment:


Crane1 - Construction site4, Crane2 - Construction site3, Crane3 - Construction site2,
Crane4 - Construction site1 ( => overall distance 275 km).
OR
Crane1 - Construction site2, Crane2 - Construction site4, Crane3 - Construction site3,
Crane4 - Construction site1 ( => overall distance 275 km) [13].
Example 2: A company wants to offer 5 different job position to 5 employee in which the
jobs performance durations(months) are specified in the following matrix:

11 7 10 17 10
 
13 21 7 11 13
 
13 13 15 13 14
 
18 10 13 16 14
12 8 16 19 10

Solution:
¯
Step 1: Subtract minimum value of each row from corresponding row.

4 0 3 10 3
 
6 14 0 4 6
 
0 0 2 0 1
 
8 0 3 6 4
4 0 8 11 2

Step 2: Subtract minimum value of each column from corresponding column.


An optimal new method to solve an Assignment problem 5

4 0 3 10 2
 
6 14 0 4 5
 
0 0 2 0 0
 
8 0 3 6 3
4 0 8 11 1
Step 3: Draw line through rows and columns which contains zero:

4 0 3 10 2
 
6 14 0 4 5
 
0 0 2 0 0
 
8 0 3 6 3
4 0 8 11 1
Subtract minimum value which is not covered by lines from those values( here is 1)
and add this minimum value to values that are covered by lines twice. Check if there is an
Assignment, otherwise repeat step 3 again:

3 0 2 9 1
 
5 15 0 4 5
 
0 1 2 0 0
 
7 0 2 5 2
3 0 7 10 0
In matrix there is not any assignment. In this iteration minimum value of uncovered rows
and columns is 2 and subtract it from uncovered values and add it to covered values by lines.

1 0 0 7 1
 
5 17 0 4 7
 
0 3 2 0 2
 
5 0 0 3 2
1 0 5 8 0
As matrix showes there is not any Assignment so repeat step 3 with minimum value equal
to 1 .

0 0 1 6 0
 
4 17 0 3 6
 
0 4 3 0 2
 
4 0 0 2 1
1 1 6 8 0
In the result matrix there is an Assignment which specifies by green color. Hence, in
original matrix the values related to this highlighted zeros are 11, 7, 13, 10, 10 and minimum
total time for performing jobs by employees are:
11 + 7 + 13 + 10 + 10 = 51
In the innovation section 3 this problem is solved in optimal way which reduced time
and calculation complexity.
Example 3: A company tends to assign 5 project to 5 engineer for supervising on them.
The time of projects supervision by each engineer is shown in matrix:
6

15 5 9 8 17
 
11 16 19 6 3
 
9 18 5 20 25
 
17 10 8 21 20
7 14 12 9 10
Then problem is how assign projects to engineers that minimum time spends for projects
supervision?
Solution:
Step 1: Subtract minimum value of each row from corresponding row:

10 0 4 3 12
 
8 13 16 3 0
 
4 13 0 15 20
 
9 2 0 13 12
0 7 5 2 3
Step 2: Subtract minimum value of each column from corresponding column :

10 0 4 1 12
 
8 13 16 1 0
 
4 13 0 13 20
 
9 2 0 11 12
0 7 5 0 3
Step 3: Draw minimum number of lines through rows and columns in which covers all
zero values :

10 0 4 1 12
 
8 13 16 1 0
 
4 13 0 13 20
 
9 2 0 11 12
0 7 5 0 3
Subtract minimum value which is not covered by lines from all uncoverd values and add
it to values which are covered by lines twice and here it is 1 :

10 0 6 1 12
 
8 13 18 1 0 
 
2 11 0 11 218
 
7 0 0 9 10 
0 7 7 0 3
As matrix shows there is not any assignment and repeat step 3 .

10 0 6 1 12
 
8 13 18 1 0
 
2 11 0 11 18
 
7 0 0 9 10
0 7 7 0 3
Then subtract minimum value of uncovered values from those values and add it to one
which are covered twice and check it for optimality. After subtracting minimum uncovered
An optimal new method to solve an Assignment problem 7

value which is equal to 1 from those values and adding it to covered twice values, the result
matrix is:

9 0 6 0 11
 
8 14 19 1 0
 
1 11 0 10 17
 
6 0 0 8 9
0 8 8 0 3
As it is highlighted in matrix there is a correct assignment. The actual value from origin
matrix which is corresponded to those highlighted values are:
8+3+5+10+7=33
Therefore, the total cost of this problem is equal to 33.


2.2 Simplex Method

Simplex method [11] is used for solving Linear programming problems in standard form
where objective function was to be maximized and it is extended to the form where objec-
tive function is to be minimized. It is noted that in case of solving an Assignment problem
objective function must be minimized. This procedure is written as below: A minimization
problem is in standard form if the objective function:
W = c1 x1 + c2 x2 + ... + cn xn is to be minimized, subject to the constraints:

a11 x1 + a12 x2 + ... + a1n xn ≥ b1 (5)

a21 x1 + a22 x2 + ... + a2n xn ≥ b2 (6)


.
.

am1 x1 + am2 x2 + ... + amn xn ≥ bm (7)


where xi ≥ 0 and bi ≥ 0 . After adding slack variables, the corresponding system of
constraint equations are:

a11 x1 + a12 x2 + ... + a1n xn + s1 = b1 (8)

a21 x1 + a22 x2 + ... + a2n xn + s2 = b2 (9)


.
.

am1 x1 + am2 x2 + ... + amn xn + sm = bm (10)

where si ≥ 0 [11].
For instance, the objective function is : z = 4x1 + 6x2 and constraints are as following:
−x1 + x2 + s1 = 11
x1 + x2 + +s2 = 27
2x1 + 5x2 + +s3 = 90
secondly, set up the initial tableau as following 2:
8

-1 1 1 0 0 11
1 1 0 1 0 27
2 5 0 0 1 90
-4 -6 0 0 0 0

Table 2 cost table [11]

from this initial tabaleau


 a basic feasible solution is:
x1 , x2 , s1 , s2 , s3 = 0, 0, 11, 27, 90
To perform an optimality check for a solution represented by a simplex tableau, look at
the enteries in the bottom row of the tableau. If any of the enteries are negative 2 then the
current solution is not optimal [11][17].


2.3 Enumeration Method

The Enumeration method [3] for Assignment problem is used for small set of data. In this
method all possible Assignments are selected from set of data and then the one with minimum
cost is selected as a solution of Assignment problem. For instance we have a matrix of 3
processor and 3 applications and we want to assign each application to each processor to
run applications with minimum time. The matrix of data is as following :
 
532
T imes : 6 8 4
197
The possible Assignment is as following:
5+8+7=20
3+6+7=16
2+8+1=11
5+4+9=18
3+4+1=8
2+9+6=17
Therefore, the solution is to assign application 1 to processor 2 and application 2 to
processor 3 and application 3 to processor 1 with total time equal to 8 minutes [3].
If this method apply on example 3 of Hungarain method 2.1 the procedure and result
are as following:

15 5 9 8 17
 
11 16 19 6 3
 
9 18 5 20 25
 
17 10 8 21 20
7 14 12 9 10
Then it is possible to consider:
15 + 16 + 5 + 21 + 10 = 67
15 + 19 + 20 + 10 + 10 = 74
15 + 6 + 5 + 10 + 10 = 45
15 + 6 + 25 + 8 + 14 = 68
15 + 3 + 20 + 8 + 14 = 60
An optimal new method to solve an Assignment problem 9

15 + 9 + 20 + 5 + 16 = 65
15 + 12 + 21 + 18 + 3 = 69
5 + 11 + 5 + 21 + 10 = 52
5 + 19 + 9 + 20 + 9 = 62
5 + 6 + 5 + 17 + 10 = 43
.
.
.
8 + 3 + 5 + 10 + 7 = 33
Therefore, after consideration of all possible assignmenst the one which has minimum
cost is last one with total cost equal to 33. As it is indicated this method has more time com-
plexity than Hungarian method. Nevetheless, it presents equal answer on each assignment
problem as other solutions.


2.4 Transportation Method

Transportation method is one type of linear programming problem that is solved by a simpli-
fied version of the simplex method [14]. This problem is concerned with finding the minimum
cost of transporting a single commodity from a given number of sources to number of desti-
nations. These type of problems can be solved by general network methods.
In the following equations Xij indicates the quantity of transported goods from source
i to destination j. The cost associated with this movement is X = Cij Xij . The cost of
transporting the commodity from source i to all destinations is given by [15]:
n
X
Cij Xij = Ci1 Xi1 + Ci2 Xi2 + ... + Cin Xin (11)
i=1

Therefore, total cost of transportation is:


m X
X n
cij xij (12)
i=1 j=1

= c11 x11 + c12 x12 + ... + c1n x1n + (13)


c21 x21 + c22 x22 + ... + c2n x2n + (14)
cm1 xm1 + cm2 xm2 + ... + cmn xmn (15)
[15]
For purpose of transportation cost minimization, the following problem must be solved
[15]:
m X
X n
M inimize Z= cij xij , (16)
i=1 j=1

n
X
Subject to xij ≤ ai f or i = 1, ..., m (17)
j=1

m
X
xij ≥ bj f or j = 1, ..., n (18)
i=1
10

where xij ≥ 0 f or i = 1, ..., m and j = 1, ..., n (19)


In terms of balanced transportation problem for each constraints must have following equa-
tion:
n
X
xij = ai f or i = 1, ..., m, (20)
j=1

m
X
xij = bj f or j = 1, ..., n (21)
i=1

[15] The transportation problem will have feasible solution if and only if:
m
X n
X
ai = bj (22)
i=1 j=1

A transportation model in which the total supplies and total demands are unequal is
called unbalanced transportation problem. It is always possible to balance an unbalanced
transportation problem [15].
Example: Powerco has 3 electric power plant that supply the needs of 4 cities. Each
power plant can supply the following numbers of kilowatt-hours (kwh) of electricity:power
plant 1-35 million;power plant 2-50 million;power plant 3-40 million, table2.4. The peak
power demands in these cities, which occurs at the same time (2pm), are as following (in
kwh): city 1-45 million; city 2-20 million; city 3-30 million; city 4-30 million. The costs of
sending 1 million kwh of electricity from power plant to city depend on the distance the
electricity must travel. Formulate an LP to minimize the cost of meeting each city’s peak
power demand [15].

From city1 city2 city3 city4 supply(kwh)


Plant1 $8 $6 $10 $9 $35
Plant2 $9 $12 $13 $7 $50
Plant3 $14 $9 $16 $5 $40
Demand(kwh) 45 20 30 30
Table 3 cost of transportation [15]

Decision Variables:
xij # of (million) kwh produced at power palnt i and send to city j.
¯ ¯
Constraints: Supply constraints and Demand constraints.
¯
Then problem formulates as below:
Minimize total shipping cost:
Min 8x11 + 6x12 + 10x13 + 9x14 +
9x21 + 12x22 + 13x23 + 7x24 +
14x31 + 9x32 + 16x33 + 5x34
Supply constraints:
x11 + x12 + x13 + x14 ≤ 35
x21 + x22 + x23 + x24 ≤ 50
x31 + x32 + x33 + x34 ≤ 40
Demand constraints
x11 + x21 + x13 ≥ 45
An optimal new method to solve an Assignment problem 11

x12 + x22 + x32 ≥ 20


x13 + x23 + x33 ≥ 30
x14 + x24 + x34 ≥ 30
xij ≥ 0 (i= 1,2,3 ; j=1,2,3,4)
Then optimal solution is :
z = 1020, x12 = 10, x13 = 10, x21 = 45, x23 = 5, x32 = 10, x34 = 34 , all other
variables are equal to zero [15].

3 Innovated Technique

In this paper a New and Optimal method for solving Assignment problem is presented in
which can detect minimum cost or time or path for an Assignment problem. This optimal
algorithm defines as below:
Algorithm : Optimal Method
Procedure Optimal algorithm(M: n*n Matrix of integers)
for i = 0 to n do
begin
ui = Minimum integer in row i of M
¯ ¯
for j = 1 to n do
M̂= cij - ui
end for
end for
for j = 1 to n do
begin
vj = Minimum integer in column j of M̂
for i = 1 to n do ¯
M̂ = M̂ij - vj
end for
end for{M̂ is now the reduced Matrix}
S = a set of non-zero values with maximum sum among all rows with non-zero values on
same columns in matrix M̂ .
h = |S|
while M̂ does not contains any minimized assignment do
cover (h in M̂)
D = Minimum entry in h covered by a line
for i = 1 to n do
for j = 1 to n do
begin
if h in M̂ is covered then M̂ = M̂ - D
end for
end for
end while
for i = 1 to n do
for j = 1 to n do
if M̂∈ S then
Xij = 1
else
Xij = 0
12

end if
end for
end for
This new algorithm is defined in more simple way as following:
Step 1 :Subtract minimum value of each row from corresponding row.
¯ 2 :Subtract minimum value of each column from corresponding column. Then check
Step
if there¯ is correct Assignment, otherwise go to next step.
Step 3: Select rows with non-zero values on same columns in which those values have
maximum ¯ summation among all summation of rows with non-zero values on same columns.
Then subtract minimum value of those values from all of them. Finally check if there is a
correct Assignment, otherwise repeat step 3 until reach a correct Assignment.

3.1 Optimal algorithm in terms of bipartit graph

A complete bipartit graph is denoted by G = (U , V ; E) with n devices vertices (U) and


n jobs vertices (V) and each edge has non-negative ¯ costs C(i , j) and the aim is to find a
perfect matching with minimum cost. Therefore, function y : (U ¯ ∪ V ) ⇒ R is a potential if
P
y(i)+y(j) ≤ c(i, j) for each i ∈ U and j ∈ V . The value of potential y is v∈U ∪V y(V ).
¯ of each potential.
It can be detected that cost of each perfect matching is at least the value
The new optimal algorithm tries to find perfect matching. This algorithm detects the perfect
matching of tight edges [16].
For more simpilicity draw the Bipartit graph [16] corresponding to matrix with con-
sideration of correponding cost for each edge. Then U nodes refers to rows and V nodes
refers to columns and edges weights refers to values of data from nodes U to nodes V. Then
algorithm defines as below:
Step 1: Subtract minimum value of edges which goes out from U nodes from all of cor-
responding edges.
Step 2: Subtract minimum value of edges which goes out from V nodes from all of cor-
responding edges.
Step 3: If it is perfect matching then problem is finished. Otherwise, select edges from U
to V in which they have termination on same V nodes with maximum sum of edges weights
among those one with same termination on V nodes.
Step 4: Subtract minimum value of selected edges in previous step from all of them. Then
check if it is perfect matching. Otherwise, repeat step 3 until reach perfect matching.

3.2 Time Complexity of Optimal algorithm

Time complexity of Innovated algorithm is less than Hungarian algorithm by Kuhn [1] in
some problems, because this algorithm takes less number of iterations to solve the assign-
ment problem than Hungarian method. So it has lower time complexity in comparison with
Hungarian method. It expresses in implemenation part 3.3 through some examples.

3.3 Implementation of Optimal algorithm on some examples

Let’s explain this algorithm more explicit through some examples of Assignment problem;
An optimal new method to solve an Assignment problem 13

The matrix of costs which is corresponded to distances of 4 cranes from 4 construction


sites is presented as below:

 
90 75 75 80
 35 85 55 65 
Costs = 
125

95 90 105
45 110 95 115

Solution:
Step 1: Subtract minimum value of each row from its values .
¯

 
15 0 0 5
0 50 20 30
Costs = 
35

5 0 15
0 65 50 70

The bipartit graph of cost edges is shown as below that red edges implies zero cost
edges:
U
V
1
1
2
2
3
3
4
4

Step 2: Subtract minimum value of each column from its values .


¯

 
15 0 0 0
 0 50 20 25
Costs = 
35 5 0 10

0 65 50 65

As matrix shows there is not any Assignment and bipartit graph of edges are as below
in which zero edges are highlighted with red color:
14

U
V
1
1
2
2
3
3
4
4

In this bipartit graph also there is not perfect matching. Therefore, go to step 3.
Step 3: In this step must choose rows 2 and 4 and columns 2, 3, 4 because these rows
¯
and columns have maximum sum of values among all rows that have non-zero values on
same columns. These values are highlighted in matrix as below:

 
15 0 0 0
0 50 20 25
Costs = 
35

5 0 10
0 65 50 65

and the bipartit graph of matrix is as following:


U
V
1
1
2
2
3
3
4
4

Then subtract minimum value of these values that is 20 from related values. Therefore,
the cost matrix is as below :

 
15 0 0 0
0 30 0 5
Costs = 
35

5 0 10
0 45 30 45
An optimal new method to solve an Assignment problem 15

In this step there is not any Assignment. So repeat step 3: Select rows 2, 3, 4 and columns
2, 4 from cost matrix which have maximum sum of costs among rows which has non-zero
value on same columns .
 
15 0 0 0
0 30 0 5
Costs = 
35

5 0 10
0 45 30 45
and draw the bipartit graph of matrix :
U
V
1
1
2
2
3
3
4
4

Then subtract 5 which is minimum value of selected rows and columns from all values
of corresponding rows and columns. As you can see in bipartit graph nodes 2, 3, 4 of U set
have edges with same termination on nodes 2, 4 of V set and have maximum some of cost
among all edges from U set to V set. Consequently the cost matrix is as below:
 
15 0 0 0
0 25 0 0
Costs = 
35

0 0 5
0 40 30 40
Also bipartit graph corresponding to matrix is as following:
U
V
1
1
2
2
3
3
4
4
16

In this matrix we can find Assignment explicitly. So the solution with total cost of trans-
portation with cosidearation of original cost matrix is:
80+55+95+45=275
or
75+65+90+45=275
Example 2: A company offers 5 different job position to 5 employee in which the jobs
performance durations are specified in the following matrix:

11 7 10 17 10
 
13 21 7 11 13
 
13 13 15 13 14
 
18 10 13 16 14
12 8 16 19 10
Step 1: Subtract minimum value of each row from corresponding values.

4 0 3 10 3
 
6 14 0 4 6
 
0 0 2 0 1
 
8 0 3 6 4
4 0 8 11 2
Step 2: Subtract minimum value of each column from corresponding values.

4 0 3 10 2
 
6 14 0 4 5
 
0 0 2 0 0
 
8 0 3 6 3
4 0 8 11 1
Step 3: Select rows 1, 2, 4, 5 and columns 1, 4, 5 which have maximum sum of values
among rows with non-zero values on same columns:

4 0 3 10 2
 
6 14 0 4 5
 
0 0 2 0 0
 
8 0 3 6 3
4 0 8 11 1
Now subtract minimum value of these values from all of them. Then, check if there is an
Assignment, otherwise repeat step 3.
Therefore, the matrix after calculation is:

3 0 3 9 1
 
5 14 0 3 4
 
0 0 2 0 0
 
7 0 3 5 2
3 0 8 10 0
Now draw the bipartit graph corresponding to elements of this matrix and highlight zero
edges:
An optimal new method to solve an Assignment problem 17

U
V

1
1
2
2
3
3
4
4
5
5

Because in this matrix there is not any Assignment, repeat step 3. So, select rows 1, 2, 4,
5 and columns 1, 4 which has maximum sum of values among rows with non-zero values on
same columns.

3 0 3 9 1
 
5 14 0 3 4
 
0 0 2 0 0
 
7 0 3 5 2
3 0 8 10 0

Then subtract 3 that is minimum of these values from them. Consequently, the matrix of
values is as below:

0 0 3 6 1
 
5 14 0 0 4
 
0 0 2 0 0
 
4 0 3 2 2
0 0 8 7 0

and corresponding bipartit graph is such as below:


18

U
V

1
1
2
2
3
3
4
4
5
5

In this matrix there is a correct Assignment which values related to those highlited zeros
in original matrix are as following with total amount of cost:
11 + 13 + 10 + 10 + 7 = 51
In comparison with solution of this example by Hungarian Algorithm which has O(n4 )
time complexity, this solution earns lower time complexity that is equal to O(n3 ). This
is because of lower number of iteration of new algorithm on matrix of data to reach the
correct assignment in contrast to Hungarian method. Therefore, this new method is useful
and optimal because it has lower time complexity in some problem than Hungarian Methods.
Example 3: A company tends to assign 5 project to 5 engineer for supervising on them.
The times of projects supervision by each engineer are shown in matrix as below:

15 5 9 8 17
 
11 16 19 6 3
 
9 18 5 20 25
 
17 10 8 21 20
7 14 12 9 10

The problem is how assign projects to engineers that minimum time spends for projects
supervision?
Solution:
Step1: Subtract minimum value of each row from related values.

10 0 4 3 12
 
9 10 13 3 0
 
4 13 0 15 20
 
9 2 0 13 12
0 7 5 2 3

Step2: Subtract minimum value of each column from related values.


An optimal new method to solve an Assignment problem 19

10 0 4 1 12
 
9 10 13 1 0
 
4 13 0 13 20
 
9 2 0 11 12
0 7 5 0 3
Step3: select non-zero values of rows 3 and 4 which contains non-zero values on same
columns among all rows with non-zero values on same columns(are highlighted).

10 0 4 1 12
 
9 10 13 1 0
 
4 13 0 13 20
 
9 2 0 11 12
0 7 5 0 3
Then subtract minimum value of those highlighted value in matrix from those values.
The result matrix is as below:

10 0 4 1 12
 
9 10 13 1 0
 
2 11 0 11 18
 
7 0 0 9 10
0 7 5 0 3
In this matrix there is not any correct assignment and repeat step 3. Therefore, select
non-zero values of rows 3,4 which has non-zero value on columns 1,4,5 with maximum
sum of values among rows with non-zero values on same columns. The result matrix is as
following:

10 0 4 1 12
 
 9 10 13 1 0 
 
 2 11 0 11 18
 
 7 0 0 9 10
0 7 5 0 3
Then subtract minimum value of those selected values which is equal to 2 from those
values. The result matrix is:

9 0 4 0 11
 
9 10 13 1 0
 
1 11 0 10 17
 
6 0 0 8 9
0 7 5 0 3
As it is indicated in previous matrix there is a correct assignment (highlighted values)
in this matrix and with refer to original matrix the total cost of this problem is equal to :
8 + 3 + 5 + 10 + 7 = 33
Complexity of this new method as a solution for this example is O(n4 ) which is equal to
complexity of Hungarian method in this case.
In conclusion, Linear programming problem which has several techniques like solutions
that are mentioned in this paper has some difficulties for solving Assignment problem such
as time complexity and calculation complexity. Therefore, for ease of solving this problem
20

the innovated method which is presented in this paper is introduced and implemented. By
using this new algorithm, Assignment problem is solved in shorter period of time and very
precisely for small size and huge data sets as well. Also in a case when previous classical
methods are not efficient this new technique is well suitable.

Acknowledgements I appreciate all of scientists and authors that are cited in this paper as my scientific
references. Thanks for all of their relevant papers and books which guided me to write this paper.

References

1. , Kuhn, Harold W, The hungarian method for the Assignment problem, 50 Years of Integer Programming
1958-2008, 29–47, Springer, (2010)
2. , Balinski, ML and Gomory, RE, A primal method for the Assignment and transportation problems, Man-
agement Science, 10(3):578–593, INFORMS, (1964)
3. , Thomas, Jech, Set Theory: Third Millennium Edition, Springer Monographs in Mathematics, Springer,
642, (2002)
4. , Aggarwal, Vijay and Tikekar, VG and Hsu, Lie-Fern, Bottleneck Assignment problems under categoriza-
tion, Computers & operations research, 13,1,11–26, Elsevier, (1986)
5. , Kumar, Avanish, A modified method for solving the unbalanced Assignment problems, Applied mathe-
matics and computation, 176,1,76–82, Elsevier, (2006)
6. , Gupta, SK and Punnen, AP, Minimum deviation problems, Operations research letters, 7,4,201–204,
Elsevier, (1988)
7. , Burkard, Rainer E and Rendl, Franz, Lexicographic bottleneck problems, Operations Research Letters,
10,5,303–308, Elsevier, (1991)
8. , Volgenant, A, Linear and semi-Assignment problems: a core oriented approach, Computers & Operations
Research, 23,10,917–932, Elsevier, (1996)
9. , Ferguson, Thomas S, Linear programming: A concise introduction. [Link] math. ucla.
edu/˜tom/[Link], (2002)
10. , Pentico, David W, Assignment problems: A golden anniversary survey, European Journal of Opera-
tional Research, 176,2,774–793, Elsevier, (2007)
11. , Ferguson, Robert O and Sargent, Lauren F, Linear programming, McGraw-Hill, (1958)
12. , Munkres, James, Algorithms for the Assignment and transportation problems, Journal of the society for
industrial and applied mathematics, 5,1,32–38, SIAM, (1957)
13. , Bruff, Derek, The Assignment problem and the hungarian method, 20,29–47, Notes for Math, (2005)
14. , Heineman, George T and Pollice, Gary and Selkow, Stanley, Algorithms in a nutshell: a practical guide,
” O’Reilly Media, Inc.”, (2016)
15. , Winston, Wayne L and Venkataramanan, Munirpallam and Goldberg, Jeffrey B, Introduction to mathe-
matical programming, 1, Thomson/Brooks/Cole Duxbury; Pacific Grove, CA, (2003)
16. , Asratian, Armen S and Denley, Tristan MJ and Häggkvist, Roland, Bipartite graphs and their applica-
tions, 131, Cambridge University Press, (1998)
17. , Balinski, Michel L, A competitive (dual) simplex method for the Assignment problem, Mathematical
Programming, 34,2,125–141, Springer, (1986)

You might also like