0% found this document useful (0 votes)
70 views5 pages

Paper Publication in IJARIT

travelling salesman problem

Uploaded by

Rahul Verma
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)
70 views5 pages

Paper Publication in IJARIT

travelling salesman problem

Uploaded by

Rahul Verma
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
You are on page 1/ 5

Verma Rahul et.

al; International Journal of Advance Research, Ideas and Innovations in Technology

ISSN: 2454-132X
Impact factor: 4.295
(Volume 4, Issue 3)
Available online at: www.ijariit.com

Optimal path finder using genetic algorithm


Rahul Verma Nimesh Khawas
rahulvermahllo12345@gmail.com nimeshkhawas1994@gmail.com
Centre for Computers and Communication Technology, Centre for Computers and Communication Technology,
Namchi, Sikkim Namchi, Sikkim

Anup Rai Arvind Lal


anupfullbuster123@gmail.com arvindlal21@gmail.com
Centre for Computers and Communication Technology, Centre for Computers and Communication Technology,
Namchi, Sikkim Namchi, Sikkim
ABSTRACT
In a large scale network, shortest distance query is a primary operation. Travelling salesman problem is a major problem faced
by salesman. Through this paper we describe how the travelling salesman problem is solved by the method of genetic
algorithms. Genetic algorithms are the evolutionary techniques for finding the fittest gene amongst all the combination of
chromosomes using crossover and mutations over the chromosomes. The purpose is to find the most approximate solution that
gives us the least distance, which is the shortest route for traversing the cities.

This problem a salesman has to traverse n number of cities in such way that it gives a ‘uni’ directed graph and each city is
visited only once. We accomplish this by carrying out the algorithm through generating a fitness formula and with the help of
genetic operators like selection, crossover and mutation.

Keywords: Genetic Algorithm, Genetic Operators, Travelling Salesman Problem.


1. INTRODUCTION
Genetic Algorithm (GA) is an algorithm which is basically used in the optimization tasks. This algorithm follows the theory,
given by Charles Darwin which is “Survival of the fittest”. GA consists of many functions which are similar to the processes
which occurs in genetics.
Travelling Salesman Problem (TSP) is one of the most popular optimization problem studied in the world, it is a nondeterministic
polynomial time (NP) –hard problem which cannot be exactly solved in polynomial time. In TSP a salesman has to choose a
shortest path for traversing n number of cities without repeating any path and without visiting any city more than once. TSP can
be solved easily when the number of cities are less in number, whereas the complexity increases as increase in number of cities.
TSP can be used in many fields like circuit designing, military, traffic etc.
This project is to code the GA in order to satisfy the need of Travelling Salesman Problem and to find an optimal path for the
salesman or the user that he/she can used to traverse. GA is used to perform all the computations for finding the optimal path. We
have used MATLAB as platform as it only work with matrices and mathematical problem. All the data of nodes, displacement,
gene combination, node coordinates are stored in 2 dimensional matrix, even the calculated data is stored in matrix format.

Following are the important factors of this project:

 NP-hard Problem
 Matrix
 MATLAB
 Roulette Wheel
 Chromosomes
© 2018, www.IJARIIT.com All Rights Reserved Page | 609
Verma Rahul et.al; International Journal of Advance Research, Ideas and Innovations in Technology
 Fitness Function
 Selection
 Mutation
 Crossover

NP-hard Problem: It stands for nondeterministic polynomial time. A decision problem H comes under NP-hard problems which
is not possible to solve in polynomial-time which means exact solution cannot be found by a computer. Only an optimal solution
can be obtained.

Matrix: Matrix are mathematical method for keeping a similar kind of data together. Matrices are of various type, but the matrix
used here is 2Dimensional matrix.

MATLAB: The name MATLAB stands for Matrix


Laboratory. MATLAB was written originally to provide easy access to matrix software which was developed by the LINPACK
(linear system package) and EISPACK (Eigen system package) projects. MATLAB is a high-performance language for technical
computing. It integrates computation, visualization, and programming environment. Furthermore MATLAB is a modern
programming language environment; it has sophisticated data structures, contains built-in editing and debugging tools, and
supports object-oriented programming. These factors make MATLAB an excellent tool for teaching and research.

Roulette Wheel: Fitness proportionate selection, also known as roulette wheel selection, is a genetic operator used in genetic
algorithms for selecting potentially useful solutions for recombination. In fitness proportionate selection, as in all selection
methods, the fitness function assigns a fitness to possible solutions or chromosomes.

Chromosomes: In genetic algorithms, a chromosome (also sometimes called a genotype) is a set of parameters which define a
proposed solution to the problem that the genetic algorithm is trying to solve. The set of all solutions is known as the population.
The chromosome is often represented as a binary string, although a wide variety of other data structures are also used.

Fitness Function: The main motive of fitness function is to choose if a chromosome is good. The criteria in the travelling
salesman problem for good chromosome are its length. The fitness function will be the total cost of the tour represented by each
chromosome. This can be calculated as the sum of the distances traversed in each travel segment. Lesser the sum, fitter is the
solution.

Selection: It is used to select the chromosome whose fitness value is small. We have used the tournament selection by using
Sorting method. Selection is used to pick the chromosome whose fitness value is less. Here we have used the tournament selection.
As the name reflects tournaments are played between two solutions and the superior solution is selected and placed in the mating
pool.

Mutation: A few number of cities or genes from a chromosomes are selected and then are exchanged with each he exchange
process is done only when the exchange process is done only when the exchange of this genes or cities increases the fitness value
of chromosomes. This process is done only to the most fit chromosome in order to get the most fit path or chromosomes.

Crossover: One point - part of the first parent is copied and the rest is taken in the same order as in the second parent.

Two point - two parts of the first parent are copied and the rest between is taken in the same order as in the second parent.

2. GENETIC ALGORITHM

Genetic Algorithm was proposed by John Holland in 1970. This algorithm mainly came in use at middle of 1980’s. This is the
algorithm which is based on the principle of Charles Darwin which stated that “select the best and discard the rest”.
This algorithm generates n number of offspring depending upon the parents with the help of mutation and crossover and the
selects the best chromosome which is most fit amongst all.
For Example: If there are certain number of animals of same species and in which some of them are more fit physically and
mentally and due some factor the resources to them are limited, then the chances of the survival for the less fit animals becomes
harder and leads to extinction. The same above concept is used in the genetic algorithm.

© 2018, www.IJARIIT.com All Rights Reserved Page | 610


Verma Rahul et.al; International Journal of Advance Research, Ideas and Innovations in Technology

Figure 1: Flowchart of Applied GA

3. LITERATURE SURVEY

[1] Gilbert Laporte, “The Traveling Salesman Problem: An overview of exact and approximate algorithms”,European Journal of
Operational Research 59 (1992) 231-247 North-Holland, Centre de recherche sur les transports, Universit~ de Montr&l, C.P. 6128,
Station A, Montreal, Canada H3C M7 Received May 1991; received July 1991.

This paper surveys on some of the main known algorithms for the traveling salesman problem. It presents an integrated overview
of some of the best exact and approximate algorithms which includes Integrated Linear Programming and Branch and Bound
algorithm. The paper concludes that problems involving a few hundred vertices can be solved routinely to an optimal solution.
The instances involving more than 2000 vertices have also been solved exactly by means of these algorithms.

[2] X.H. Shi a, Y.C. Liang a,b,∗, H.P. Lee b,c, C. Lu b, Q.X. Wang a, “Particle swarm optimization-based algorithm for TSP and
generalized TSP”, a College of Computer Science and Technology, Jilin University, Key Laboratory of Symbol Computation and
Knowledge Engineering of the Ministry of Education, Changchun 130012, China, b Institute of High Performance Computing,
Singapore 117528, Singapore, c Department of Mechanical Engineering, National University of Singapore, 9 Engineering Drive 1,
Singapore 119260, Singapore, Received 31 July 2005; received in revised form 10 February 2007.
This paper surveys on particle swarm optimization (PSO)-based algorithm for the traveling salesman problem. It presents an
overview of solving TSP using an uncertain searching strategy in which crossover is eliminated to accelerate the convergence
speed. The paper concludes that the modified PSO algorithm is effective and can solve the larger size problems than the existing
PSO algorithm.
[3] Elizabeth F. G. Goldbarg, Marco C. Goldbarg and Givanaldo R. de Souza, “Particle Swarm Optimization Algorithm for the
Traveling Salesman Problem”, University Campus STeP Ri Slavka Krautzeka 83/A 51000 Rijeka, Croatia, Published online 01,
September, 2008.
This paper provides an overview for the optimization of Particle Swarm Optimization algorithm by using a new velocity operator
for discrete PSO by which the positions of cities or nodes are updated by means of velocity operators that direct the search to exact
(promising) regions of the space of solutions. The unary and a binary concept of velocity operators also solves the problem for
distinguishing pbest or gbest which the particle requires to know.
[4] Khushboo Arora, Mamta Arora, “Better Result for Solving TSP: GA versus ACO”, International Journal of Advanced
Research in Computer Science and Software Engineering, Volume 6, Issue 3, March 2016.
This paper surveys on the comparison on some main heuristic algorithms for travelling salesman problem. It presents an overview
of the Genetic Algorithm and Ant Colony Optimization algorithms. The GA uses the fitness function whereas the ACO use the
pheromone concept. This paper states that Genetic Algorithm gives better results in terms of the distance travelled whereas the
ACO gives the better result when the complexity increases or the number of nodes increases.
[5] Naixue Xiong 1,2, Wenliang Wu 1 and Chunxue Wu 1*, “An Improved Routing Optimization Algorithm Based on Travelling
Salesman Problem for Social Networks”, 1 School of Optical-Electrical and Computer Engineering, University of Shanghai for
Science and Technology, Military Road, No. 516, Shanghai 200093, China; xiongnaixue@gmail.com (N.X.); wwl@st.usst.edu.cn
(W.W.) 2 Department of Mathematics and Computer Science, Northeastern State University Address: 611 N, Grand Ave,
Tahlequah, OK 74464, USA, Received: 5 April 2017; Accepted: 6 June 2017; Published: 8 June 2017.
This paper focuses on a routing optimization algorithm. This paper provides an improved scheme for considering the about
searching next better city, even new parameters are introduced to improve the probability of selection. It states that Ant colony

© 2018, www.IJARIIT.com All Rights Reserved Page | 611


Verma Rahul et.al; International Journal of Advance Research, Ideas and Innovations in Technology
algorithm is proposed to solve this problem effectively, but random selection strategy of the traditional algorithm causes evolution
speed to be slow. This paper discusses on the new parameters for the pheromone in Ant Colony Optimization algorithm to
increase the selection probability. Improvement in the sensitivity of the shortest path to find the shortest path is done and hence
Ant Colony algorithm is optimized in it selection optimization and to find the short path.
Table 3: Literature survey with Limitations

Serial
Author name and publisher Title of the paper Technique used Limitation
no.
Gilbert Laporte. The Traveling Salesman Complexity analysis, Exact solution of path
Problem: An overview of Exact algorithms, is present up to 2000
1. European Journal of Operational exact and approximate Heuristic Algorithms. nodes.
Research 59 (1992) 231-247 North- algorithms.
Holland
X.H. Shi a, Y.C. Liang a,b,∗, H.P. Lee Particle swarm An uncertain It is only effective in
b,c
, C. Lu b, Q.X. Wang a, optimization-based searching strategy in larger problems in
algorithm for TSP and which crossover is terms of number of
“Particle swarm optimization-based generalized TSP eliminated to cities.
algorithm for TSP and generalized accelerate the
TSP”, a College of Computer Science convergence speed.
and Technology, Jilin University, Key Generalized
Laboratory of Symbol Computation chromosome
and Knowledge Engineering of the technique has been
Ministry of Education, Changchun used.
2. 130012, China, b Institute of High
Performance Computing, Singapore
117528, Singapore, c Department of
Mechanical Engineering, National
University of Singapore, 9
Engineering Drive 1, Singapore
119260, Singapore, Received 31 July
2005; received in revised form 10
February 2007.

Elizabeth F. G. Goldbarg, Marco C. Particle Swarm It uses new velocity The unary and a
Goldbarg and Givanaldo R. de Souza Optimization Algorithm operator to direct the binary concept of
for the Traveling search. velocity operators
University Campus STeP Ri Slavka Salesman Problem does not solve the
3. Krautzeka 83/A 51000 Rijeka, problem for
Croatia, Published online 01, distinguishing pbest
September, 2008 or gbest effectively.

Khushboo Arora, Mamta Arora Better Result for Solving Phermone concept of Genetic algorithms
TSP: GA versus ACO Ant Colony result are not effective
International Journal of Advanced Optimization and when nodes increases
4. Research in Computer Science and Crossover, Mutation and ACO does not
Software Engineering, Volume 6, of Genetic Algorithm. provide effective
Issue 3, March 2016. result in terms of
distance travelled.
Naixue Xiong 1,2, Wenliang Wu 1 An Improved Routing New parameter for Effective results
and Chunxue Wu 1 Optimization Algorithm pheromone in Ant cannot be generated in
Based on Travelling Colony Optimization terms of the distance
School of Optical-Electrical and Salesman Problem for Algoritm. travelled.
Computer Engineering, University of Social Networks
Shanghai for Science and Technology,
Military Road, No. 516, Shanghai
200093, China;
5. xiongnaixue@gmail.com (N.X.);
wwl@st.usst.edu.cn (W.W.) 2
Department of Mathematics and
Computer Science, Northeastern State
University Address: 611 N, Grand
Ave, Tahlequah, OK 74464, USA,
Received: 5 April 2017; Accepted: 6
June 2017; Published: 8 June 2017

© 2018, www.IJARIIT.com All Rights Reserved Page | 612


Verma Rahul et.al; International Journal of Advance Research, Ideas and Innovations in Technology
4. CONCLUSION

This project is based Travelling Salesman Problem which is a NP-hard problem and cannot be exactly solved in polynomial time,
so an optimal result can only be found. The use of Genetic Algorithm promises to solve this problem more effectively than other
optimization algorithm due to its robustness. Genetic algorithm has the best combinational techniques which are crossover and
mutation which is based on natural selection. Travelling Salesman Problem is one of the hardest problem in NP-complete. The
implementation work is done in MATLAB software due to its inbuilt features like number generator and graph plotter.

5. REFERENCES

[1] Gilbert Laporte, “The Traveling Salesman Problem: An overview of exact and approximate algorithms”, European Journal of
Operational Research 59 (1992) 231-247 North-Holland, Centre de recherche sur les transports, Universit~ de Montr&l, C.P. 6128,
Station A, Montreal, Canada H3C M7 Received May 1991; received July 1991.
[2] X.H. Shi a, Y.C. Liang a,b,∗, H.P. Lee b,c, C. Lu b, Q.X. Wang a, “Particle swarm optimization-based algorithm for TSP and
generalized TSP”, a College of Computer Science and Technology, Jilin University, Key Laboratory of Symbol Computation and
Knowledge Engineering of the Ministry of Education, Changchun 130012, China, b Institute of High Performance Computing,
Singapore 117528, Singapore, c Department of Mechanical Engineering, National University of Singapore, 9 Engineering Drive 1,
Singapore 119260, Singapore, Received 31 July 2005; received in revised form 10 February 2007.
[3] Elizabeth F. G. Goldbarg, Marco C. Goldbarg and Givanaldo R. de Souza, “Particle Swarm Optimization Algorithm for the
Traveling Salesman Problem”, University Campus STeP Ri Slavka Krautzeka 83/A 51000 Rijeka, Croatia, Published online 01,
September, 2008.
[4] Khushboo Arora, Mamta Arora, “Better Result for Solving TSP: GA versus ACO”, International Journal of Advanced
Research in Computer Science and Software Engineering, Volume 6, Issue 3, March 2016.
[5] Naixue Xiong 1,2, Wenliang Wu 1 and Chunxue Wu 1*, “An Improved Routing Optimization Algorithm Based on Travelling
Salesman Problem for Social Networks”, 1 School of Optical-Electrical and Computer Engineering, University of Shanghai for
Science and Technology, Military Road, No. 516, Shanghai 200093, China; xiongnaixue@gmail.com (N.X.); wwl@st.usst.edu.cn
(W.W.) 2 Department of Mathematics and Computer Science, Northeastern State University Address: 611 N, Grand Ave,
Tahlequah, OK 74464, USA, Received: 5 April 2017; Accepted: 6 June 2017; Published: 8 June 2017.

© 2018, www.IJARIIT.com All Rights Reserved Page | 613

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy