Muzammil Adulrahman ppt on travelling salesman Problem Based On Mutation Genetic Algorithms
The task of finding the shortest possible path that visits each city
exactly once and returns to the initial city has been suggested by
Travelling Salesman Problem (TSP) is among the extensively
studied optimization problem that has been used to find the
shortest possible route.
The TSP has many applications including the following :
Manufacture of microchips
The routing of trucks for packet post pickup
Packet routing in GSM
The delivery of meals to home bound persons etc.
GA at a glANCE
GA is an empirical search that mimics the process of natural
GA generate solutions to optimization problems using
techniques inspired by natural evolution, such as inheritance,,
mutation, selection and crossover
In GA a space of hypotheses is searched to identify the best
The best hypothesis is defined as the one that optimizes a
predefined numerical measure for the problem at hand, called
the hypothesis fitness
GA operates by iteratively updating a pool of hypotheses, called
Select: Randomly select members of Population
Crossover: Randomly select pairs of hypotheses from P, to
produce offspring by applying the Crossover operator. Add all
offspring to new P1.
Mutate: Choose m percent of the members of P, with uniform
probability. For each, invert one randomly selected bit in its
Update: P ← P1.
Evaluate: compute Fitness function
Return the hypothesis from P that has the highest fitness.
Genetic Algorithm is another technique which can also find
solution to TSP due to the following reasons :
Due to their flexibility and robustness
They are also readily amenable to parallel implementation
They are able to solve problems knowing nothing about the
problem from the start
Population Size - The population size is the initial number of
random tours that are created when the algorithm starts.
Neighborhood / Group Size – In each generation the best 2 tours
are the parents. The worst 2 tours get replaced by the children.
Mutation % - The percentage that each child after crossover will
undergo mutation when a tour is mutated.
Nearby Cities - As part of a greedy initial population, the GA will
prefer to link cities that are close to each other to make the initial
Nearby City Odds % - This is the percent chance that any one
link in a random tour in the initial population will prefer to use a
nearby city instead of a completely random city.
6. Maximum Generations – Number of crossovers are run before
the algorithm is terminated
Fıtness functıon= Least tour dıstance ın a group.
Selectıon method- Determınıstıcs wıth a probabılıty of 1.
Cross over- skıpped.
Recıprocal exchange Mutatıon- Two cıtıes are randomly selected and
theır posıtıons ın chromosomes are exchanged.
Flıp Mutatıon- The two cıtıes selected are flıpped over, example ıf theır
are sıx cıtıes 1, 2, 3, 4, 5, 6 ın the chromosomes and cıtıes at posıtıon 2
and 5 are chosen as a mutatıon poınts, then the new chromosomes
after flıpıng posıtıon the gıven posıtıons are 1, 5, 4, 3, 2, 6.
Backward slıde Mutatıon- As the name ımplıes, two mutatıon posıtıons
are move to the next posıtıons ın a backward dırectıonwıthın the span
of the Mutatıon poınts. Example ıf the above cıtıes posıtıon ın the
chromosomes are used and posıtıon 2 and 5 are slıded then the cıtıes
posıtıon ın the new chromosomes are1, 3, 4, 5, 2, 6.
Inıtıalıze the populatıon
Randomly generate the populatıon members.
Calculate the total dıstance for each tour.
Evaluate each tour fıtness ın each group.
Select the tour wıth the least dıstance ıe hıghest fıtness.
Apply Mutatıon to the best offsrıng to get the three new routes.
Set the best route as your new global mınımızer
Iterate whıle number of ıteratıon ıs less than the maxımum
ıteratıon untıl the optımal route ıs dıscovered (convergence
An N by N distance matrix was used where N stands for the
number of cities.
All the cities were assumed to be points in space and their
respective Euclidean distance were computed using the
Euclidean equations to get the inputs of the distance matrix
For a real and more practical situation, the exact distances
between the cities in consideration can be directly inputed into
the distance matrix.
In asymmetric TSP the approach mentioned might not work
since the distance travelled to get to city B from A might not
necesssarily be the same when coming back to A from B.
The simulation results showed that with a higher number of
iterations a better route is discovered but it takes more time to
converge to an optimal solution.
With lower population size and a less number of cities little time
is required to get the optimal route.
The optimal tour distance at a given population and iteration
might vary when the same population size and iteration number
is used at a different run.
It is so because the vertexes of the cities used in Euclidean
computation are randomly generated.
It can also be proven that to get the best population size that
takes little time, a range within Number of Cities * 3 <
Population Size < Number of Cities * 5 should be used as
suggested by by Nilesh Gambhava and Gopi Sanghani in their
papers. Below are the figures of simulation result at different
Genetic algorithm has been quite an exciting tool for solving
Its flexibility is astonishingly remarkable. This paper has
indicated that mutation in genetic is a powerful operator which
makes GA to stand tall among its fellow optimization
The Mutation operator ensures that trap of local minimum is
avoided which is one of the major advantage of GA.
With a better manupilation of this tool in a suitable problem, it
is always possible that GA will remained in the mainstrem in the
field of optimization.