Vous êtes sur la page 1sur 20

Travelling Salesman

Problem
By
Chintal Upendra Raval
140320723001
M.E.(Information Technology)
Table Of Contents
1. Introduction To The Travelling Salesman Problem

2. Detail Explanation About The Travelling Salesman


Problem
3. Applications Of The Travelling Salesman Problem

4. Details Of The Travelling Salesman Problem use in


Chosen Application.
5. Recent Research In The Travelling Salesman Problem.

6. References.
Introduction To The Travelling
Salesman Problem
 Let us look at a situation where there are five cities or five nodes.

 Let us say that there is a person who is right now in node 1,now, this person has to
visit each of the remaining nodes once and only once and come back to starting
point.
 The person may choose to start from 1 and from 1 to 2,and say from 2 to 4,
and from 4 to 5 and then to 3 and back to 1.

 So one feasible solution can be 1-2-4-5-3-1.


 Alternatively another feasible solution could be 1-4-3-3-5-1.
 So any permutation or order in which person starts from a particular node in
this case , the given node goes to every other node or vertex once and only
once and comes to the starting point is called The Travelling Salesman
Problem and particularly to find out that tour or circuit, which gives minimum
travelled or minimum cost travelled.
 The problem is : Given a network, given a set of points to visit every node
once and once and come back to starting point, traveling minimum distance
or incurring minimum cost. This is called The Travelling Salesman Problem.
Detail Explanation About The
Travelling Salesman Problem
 In a five city travelling salesman problem ,if we assume that the person start
with 1 and from 1 to 2,and say from 2 to 4, and from 4 to 5 and then to 3 and
back to 1.
 Let us say , a feasible solution could be 1-2-4-5-3-1.

Feasible Solution-1 Feasible Solution-2


 We also realize that this solution is same as 2-3-4-1-5-2.
 So effectively in a travelling salesman problem , it does not matter which city
or which node the travelling salesman starts . The only thing is from any node
the person can start , but the person has to visit every other only node once
and come back to starting node.
 There are n nodes , we realize that there are (n-1)! Feasible solutions ,
because corresponding to this solutions, which we say 1-5-2-3-4-1 is same as
2-3-4-1-5-2.

 The Question is to find the best or optimal solution.

 There are different approaches to find optimal solution:-


1. Branch and Bound Algorithm.
2. Heuristic Approach.
 Constraints of the travelling Salesman Solution : Subtours .
 We need to eliminate subtours as the person has to visit every other node
only once and come back to starting node.
 Let us find the best/optimal solution of travelling salesman for the given
example using Branch Bound algorithm.
 Example:-

Distance Node 1 Node 2 Node 3 Node 4 Node 5


Matrix
Node 1 - 10 8 9 7
Node 2 10 - 10 5 6
Node 3 8 10 - 8 9
Node 4 9 5 8 - 6
Node 5 7 6 9 6 -
 One thing is that if the person is at city 1 , then the person has to leave city 1
by going to one of these four.
 Therefore person has to travel a minimum distance of 7(by selecting minimum
value from the row) to leave city 1.
 Similarly , for all rows given by taking row minima , we get Lower Bound=31.
 Similarly , for all columns given by taking column minima , we get Lower
Bound=31.
 This 31 is some kind of bare minimum that the person has to travel the total
distance.
 This 31 is a Lower Bound to actual distance that the person has to travel at
least this much distance.
 Ordinarily , travelling salesman matrices or distance matrices are symmetric
because they represent distance .
 Distances usually satisfies symmetry and triangle inequality.
 The Travelling Salesman matrix is usually square symmetric, satisfies triangle
inequality.
 Which means given any three distances dij + djk >= dik
 We create 4 branches or (n-1) branches and say x12=1 , x13=1 , x14=1 x15=1 ,we
do not have x11=1 because x11 is subtour length 1.

 When we fix x12=1 , means we are assuming that this person is going to go
from 1 to 2 . We temporarily leave out this first row and the second column
and then see the additional minimum distance this person has to travel.
 The moment we fix x12=1 , we leave out first row and second column and for
the reduced 4*4 matrix we try to add row minima along with the fixed value
that is 10 .
 Similarly , we fix x13=1 , we leave out first row and second column and for the
reduced 4*4 matrix we try to add row minima along with the fixed value .
 Similarly , we fix x14=1 , we leave out first row and second column and for
the reduced 4*4 matrix we try to add row minima along with the fixed value.
 Similarly , we fix x15=1 , we leave out first row and second column and for
the reduced 4*4 matrix we try to add row minima along with the fixed value.
Fixing x13=1

Fixing x14=1
Fixing x15=1

 We get the following Solution:


 Further Branching and repeating the above step for the another node we will
able to get optimal solution .
 The final solutions appears like this after performing branching operations for
every node.
X12=1
31
X15=1
X21=1 36
X13=1
35
X14=1
X23=1
36
32 31 X24=1
X25=1
X21=1 34
34
X24=1
X34=1 37

37
33
33
X32=1

X35=1 39
X35=1

36 37
From the above figure we can conclude
that the best path is 1-3-4-2-5-1.
Applications Of The Travelling
Salesman Problem
 Genome
 Starlight
 Scan Chains
 DNA
 Whizzkids
 Baseball
 Coin Collection
 Airport Tours
 USA Trip
 Sonet Rings
 Power Cables
Details Of The Travelling Salesman
Problem use in Chosen Application.

 A group at AT&T used Concorde to compute DNA sequences in a genetic


engineering research project. In the application, a collection of DNA strings,
each of length k, were embedded in one universal string (that is, each of the
target strings is contained as a substring in the universal string), with the goal
of minimizing the length of the universal string. The cities of the TSP are the
target strings, and the cost of travel is k minus the maximum overlap of the
corresponding strings.
 The technique applied here was Open Loop Travelling Salesman Problem using
Genetic Algorithm.
 Genetic algorithm is an optimization technique based on crossover and
mutation operators using a survival of the fittest idea. They have been used
successfully in a variety of different problems. Travelling salesman problem is
one of the commonly studied optimization problem.
 The travelling salesman problem is finding a shortest possible cycle visiting
every city in a map given the set of cities and pair wise distances between
them. Modeling of this problem can also be done with an undirected weighted
graph. The vertices of the graph are cities. The edges of the graph are
distances.
 The travelling salesman problem is one the toughest and fundamental
problems inreal world application. Genetic Algorithms have proven efficient
in solving the Travelling Salesman Problem in last 30 years or so. Travelling
Salesman is an NP-Hard problem. In this paper we compared and concluded
the solution of TSP using Exchange Mutation, Inversion Mutation and Scramble
Mutation and we found that, the using of Inversion Mutation operator will
always gives better solution based on our experiments.
Working of Genetic algorithm to solve
Travelling Salesman Problem
 GAs work on a population of individuals represents candidate solutions to the
optimization problem. These individual are consists of a strings (called
chromosomes) of genes. The genes are a practical allele (gene could be a bit,
an integer number, a real value or an alphabet character,…, etc depending on
the nature of the problem). GAs applying the principles of survival of the
fittest, selection, reproduction, Genetic algorithm maintains a population of
individuals, say P(t),for generation t.

 Each individual represents a potential solution to the problem at hand. Each


individual is evaluated to give some measure of its fitness. Some individuals
undergo stochastic transformations by means of genetic operations to form
new individuals. There are two type of transformation:- 1) Mutation, which
creates new individuals by making changes in a single individual.

 2) Crossover, which creates new individuals by combining parts from two


individuals. The new individuals, called offspring C(t), are then evaluated. A
new population is formed by selecting the more fit individuals from the
parent population and offspring population.
Recent Research In The Travelling
Salesman Problem.
 Ant algorithms are a recently developed, population-based approach which
has been successfully applied to several N P-hard combinatorial optimization
problems.
 As the name suggests, ant algorithms have been inspired by the behavior of
real ant colonies, in particular, by their foraging behavior.
 One of the main ideas of ant algorithms is the indirect communication of a
colony of agents, called (artificial) ants, based on pheromone trails
(pheromones are also used by real ants for communication). The (artificial)
pheromone trails are a kind of distributed numeric information which is
modified by the ants to reflect their experience while solving a particular
problem.
 The first ACO algorithm, called Ant System (AS) has been applied to the
Traveling Salesman Problem (TSP).
References.

[1] International Journal of Innovative Research in Computer and Communication


Engineering. Vol. 1, Issue 1, March 2013.
[2] ACO Algorithms for the Traveling Salesman Problem Thomas STUTZLE ¨ ‡ and
Marco DORIGO IRIDIA, Universit´e Libre de Bruxelles, Belgium.
[3] Unraveling Travelling Salesman Problem By Genetic Algorithm Using M-
Crossover Operator , Devasenathipathi N. Mudaliar, Dr. Nilesh K. Modi.
[4] A perspective view on Travelling Salesman Problem using genetic algorithm
, Dept. of Inf. Technol., Pondicherry Univ., Pondicherry, India .
[5] An Ant Colony Optimization Algorithm for Multiple Travelling Salesman
Problem, Pan Junjie ; Sch. of Inf. Sci. & Eng., Northeastern Univ., Shenyang
; Wang Dingwei

Vous aimerez peut-être aussi