An Application of Assignment Problem in Traveling Salesman Problem (TSP)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Ghadle Kirtiwant P et al Int. Journal of Engineering Research and Applications www.ijera.

com
ISSN : 2248-9622, Vol. 4, Issue 1( Version 3), January 2014, pp.169-172

RESEARCH ARTICLE OPEN ACCESS

An Application of Assignment Problem in Traveling Salesman


Problem (TSP)
Ghadle Kirtiwant P, Muley Yogesh M
Department of Mathematics, Dr. Babasaheb Ambedkar Marathwada University, Aurangabad - 431004. MS.
India.

Abstract
Assignment problem (AP) is completely degenerate form of a transportation problem. It appears in some
decision-making situations, this paper focused on TSP for finding the shortest closed route. By using „ROA
Method‟ and „Ghadle and Muley Rule‟ will get optimal solution for TSP within few steps.
Keyword- Assignment problem, TSP, linear integer programming, Revised Ones Assignment Method (ROA).

I. Introduction III. ASSIGNMENT BASED


The Traveling Salesman Problem (TSP) FORMULATION
is a classical combinatorial optimization problem, Starting from his home, a salesman wishes
which is simple to state but very difficult to solve. to visit each of (n−1) other cities and return home at
The problem is to find the shortest possible tour minimal cost. He must visit each city exactly once
through a set of N vertices so that each vertex is and it costs Cij to travel from city i to city j.
visited exactly once. We may be tempted to formulate his problem as the
In this paper traveling salesman problem assignment problem:
solved like assignment problem using linear
programming approach. The constraints require that  1 ; if he goes from city i to city j.
Xij = 
the salesman must enter and leave each city  0 ; otherwise.
exactly once.
Then the mathematical formulation of the assignment
II. Mathematical Formulation of problem is,
Traveling Salesman Problem (TSP) Subject to the constraints,
Let 1, 2 … n be the labels of the n cities and n n
C = Ci,j be an n x n cost matrix where Ci,j denotes the Minimize Z =   CijX ij .......(1)
cost of traveling from city i to city j. Then, the i=1 j=1
general formulation of the traveling salesman n n
problem (TSP), as described by Assignment Problem,  Xij =1 and  Xij =1 : Xij =0 or 1 .......(2)
is shown below. i=1 j=1
1 2 3 … n for all i=1,2,....n and j=1,2,.....n.
1 C12 C13 … C1n
8

IV. Revised Ones Assignment Method


2 C21 C23 … C2n
8

(ROA) for Solving Assignment


3 C31 C32 … C3n Problem. [1, 2]
8

This section presents a method to solve the


assignment problem which is different from the


8

preceding method. We call it “Revised Ones


n Cn1 Cn2 Cn3 … Assignment Method” because of making assignment
8

in terms of ones.
If Ci,j = Cj,i , the problem is called symmetric This method is based on creating some ones
traveling salesman problem (STSP). in the assignment matrix and then tries to find a
complete assignment in terms of ones. By a complete
assignment we mean an assignment plan containing
exactly n assigned independent ones, one in each row
and one in each column.

www.ijera.com 169 | P a g e
Ghadle Kirtiwant P et al Int. Journal of Engineering Research and Applications www.ijera.com
ISSN : 2248-9622, Vol. 4, Issue 1( Version 3), January 2014, pp.169-172

Now, consider the assignment matrix where C ij is the possible, while if the number of lines is exactly equal
to n, then the complete assignment is obtained.
cost or effectiveness of assigning ith machine.
1 2  n Step 4
If a complete assignment program is not
1  C11 C12  C1n 
  possible in step 3, then select the smallest (largest)
2  C 21 C 22  C 2n  element (say dij) out of those which do not lie on
      any of the lines in the above matrix. Then divide by
  
C C  C  dij each element of the uncovered rows or columns,
n  n1 n2 nn  which dij lies on it. This operation creates some new
ones to this row or column.
The new algorithm is as follows. If still a complete optimal assignment is not achieved
Let (1-2) be an assignment problem in which the in this new matrix, then use step 4 and 3 iteratively.
objective function can be minimized or maximized. By repeating the same procedure the optimal
assignment will be obtained.
Step 1 (To assign one we have add Step 5 which is
In a minimization (maximization) case, find mentioned below.)
the minimum (maximum) element of each row in the
assignment matrix (say ai) and write it on the right Step 5 (Ghadle and Muley Rule) [3]
hand side of the matrix. i) For minimization problem select max number
1 2  n from calculated matrix and write it on right
hand side as well as bottom side.
 C11 C12  C1n  a1
   To assign one, start from min number of
 C 21 C 22  C 2n  a 2 columns (bottom side) and select ones.
        If there are more than one ones in any
 
C C  C nn  a n column then ignore temporarily, and give
 n1 n2  last priority to that column.
 If still there are identical ones in column
Then divide each element of ith row of the
then give the priority to max number of
matrix by ai. These operations create at least one ones
rows (right hand side).
in each rows.
 If there are more than one ones in any
In term of ones for each row and column, do
row then give first come priority.
assignment. Otherwise go to step 2.
Or
ii) For maximization problem select min number
Step 2
from calculated matrix and write it on right
Find the minimum (maximum) element of
hand side as well as bottom side.
each column in assignment matrix (say bj), and write
it below jth column. Then divide each element of jth  To assign one, start from max number of
column of the matrix by bj. columns (bottom side) and select ones.
These operations create at least one ones in each  If there are more than one ones in any
columns. Make assignment in terms of ones. If no column then ignore temporarily, and give
feasible assignment can be achieved from step (1) last priority to that column.
and (2) then go to step 3.  If still there are identical ones in column
then give the priority to min number of
1 2  n rows (right hand side).
1  C11 a1 C12 a1  C1n a1   If there are more than one ones in any row
  then give first come priority.
2  C 21 a 2 C 22 a 2  C 2n a 2 
     
   Priority rule
n  C n1 a n C n2 a n  C nn a n 

One question arises here. What to do with
non square matrix? To make square, a non square
b1 b2  bn matrix, we add one artificial row or column which all
elements are one. Thus we solve the problem with the
Step 3 new matrix, by using the new method. The matrix
Draw the minimum number of lines to cover after performing the steps reduces to a matrix which
all the ones of the matrix. If the number of drawn has ones in each rows and columns. So, the optimal
lines less than n, then the complete assignment is not assignment has been reached.

www.ijera.com 170 | P a g e
Ghadle Kirtiwant P et al Int. Journal of Engineering Research and Applications www.ijera.com
ISSN : 2248-9622, Vol. 4, Issue 1( Version 3), January 2014, pp.169-172

V. Applications Some of these deities are described as 'Swayambhu'


The Ashtavinayaka Yatra is the most figurines. This is to point to that no human created
important worship yatra in these deities; they were formed completely by
Maharashtra. Ashtavinayaka means "Eight Ganeshas" nature.
when translated in Sanskrit. Lord Ganesha is the According to Hindu Shastra, you will have
Hindu God of unity, remover of obstacles, learning to visit the Moreshwar temple at Morgaon first and
and prosperity. then in sequence visit the temples at Siddhatek, Pali,
This yatra covers the eight holy temples of Mahad, Thevur, Lenyandri, Ozar, and
Lord Ganesha which are located around Pune . Each Ranjangaon and in last visit the Moreshwar temple
temple has its own individuality and mythology. The again. This will complete your Ashtavinayak-Yatra.
deities in each temple are distinct from each other.

City Aurangabad Lenyadri Mahad Morgaon Ozar Pali Ranjangaon Sidhatek Theur
Aurangabad - 225 304 236 213 339 187 197 226
Lenyadri 225 - 140 153 15 175 84 160 110
Mahad 304 140 - 152 132 41 121 190 108
Morgaon 236 153 152 - 143 188 70 73 63
Ozar 213 15 132 143 - 166 74 145 102
Pali 339 175 41 188 166 - 157 226 144
Ranjangaon 187 84 121 70 74 157 - 81 43
Sidhatek 197 160 190 73 145 226 81 - 90
Theur 226 110 108 63 102 144 43 90 -

By using „Revised Ones Assignment Method (ROA)‟ and „Ghadle and Muley rule‟ the final solution
obtained was,

www.ijera.com 171 | P a g e
Ghadle Kirtiwant P et al Int. Journal of Engineering Research and Applications www.ijera.com
ISSN : 2248-9622, Vol. 4, Issue 1( Version 3), January 2014, pp.169-172

1 2 3 4 5 6 7 8 9
City Aurangabad Lenyadri Mahad Morgaon Ozar Pali Ranjangaon Sidhatek Theur
1 Aurangabad - 225 304 236 213 339 187 197 226
2 Lenyadri 225 - 140 153 15 175 84 160 110
3 Mahad 304 140 - 152 132 41 121 190 108
4 Morgaon 236 153 152 - 143 188 70 73 63
5 Ozar 213 15 132 143 - 166 74 145 102
6 Pali 339 175 41 188 166 - 157 226 144
7 Ranjangaon 187 84 121 70 74 157 - 81 43
8 Sidhatek 197 160 190 73 145 226 81 - 90
9 Theur 226 110 108 63 102 144 43 90 -

The solution consist in three cycle which are [3] Ghadle Kirtiwant P, Muley Yogesh M
(1,7),(7,9),(9,4),(4,8),(8,1) ; (2,5),(5,2); (3,6),(6,3) (2013), Revised Ones Assignment Method
and minimum distance is 675 km. for Solving Assignment Problem, Journal of
If we again find next minimum values from Statistics and Mathematics, ISSN: 0976-
column 7th, 5th and 6th , which will cover whole 8807 & E-ISSN: 0976-8815, Volume 4,
journey of Ashtavinayak Yatra in 987 km. Issue 1, 147-150.

VI. Conclusions
In this paper, a Revised Ones Assignment
Method (ROA) used to assign ones directly and for
solving assignment problem as well as for Traveling
Salesman Problem. This method can be used for
maximize as well as minimized objective functions of
Assignment problem.

References
[1] Hadi Basirzadeh, (2012). Ones Assignment
Method for solving Assignment Problems,
Applied Mathematical Sciences, Vol. 6,
2012, No. 47, 2345-2355.
[2] Shweta singh, G.C.Dubey, Rajesh
Shrivastava, (August 2012). A
Comparative Analysis of Assignment
Problem, IOSR Journal of Engineering
(IOSRJEN), ISSN: 2250-3021, Volume 2,
Issue 8, 01-15.

www.ijera.com 172 | P a g e

You might also like