Successfully reported this slideshow.
Upcoming SlideShare
×

# Solving the traveling salesman problem by genetic algorithm

2,153 views

Published on

The traveling salesman problem
Genetic Algorithm
Conclusion

Published in: Software
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

### Solving the traveling salesman problem by genetic algorithm

1. 1. Genetic Algorithms Ministry of Education and Science of the Russian Federation Crimean Federal V.I. Vernadsky University Taurida academy (structural subdivision) Author: Alexander Bidanets 3-d - year student Bachelor course Mathematics and informatics department Major in: applied mathematics and informatics Language instructor: Associate Professor Oksana Vladimirovna Yermolenko
3. 3. What is known to be the optimization problem? In mathematics and computer science, an optimization problem is the problem of finding the best solution from all feasible solutions. In optimization problems we are looking for the largest value or the smallest value that a function can take.
4. 4. Traveling salesman problem The travelling salesman problem (TSP) asks the following question: Given a list of cities and the distances between each pair of cities, what is the shortest possible route that visits each city exactly once and returns to the origin city? It is an problem in combinatorial optimization, important in theoretical computer science.
5. 5. What is the genetic algorithm? Individual (chromosome) Any possible solution of a problem Population Group of all individuals Search space All possible solutions to the problem Locus The position of a gene on the chromosome the genes value is the number of variable slots on a chromosome; the codes value is the number of possible values for each gene; Now, before we start, we should understand some key terms:
6. 6. What is the genetic algorithm? Algorithm is started with a set of solutions (represented by chromosomes) called population. Solutions from one population are taken and used to form a new population. This is motivated by a hope, that the new population will be better than the old one. Solutions which are selected to form new solutions (offspring) are selected according to their fitness - the more suitable they are the more chances they have to reproduce. This is repeated until some condition is satisfied (for example number of populations or improvement of the best solution).
7. 7. Basic Operators of Genetic Algorithm •Encoding and Initialization •Crossover (also called recombination) •Mutation •Selection and Fitness function •Decoding
8. 8. Initialization
9. 9. Initialization Population of solutions
10. 10. Crossover
11. 11. Mutation
12. 12. Selection and
13. 13. Relevance • The traveling salesman problem has many different real world applications, making it a very popular problem to solve. The problem of computer wiring can also be modeled as a TSP. We have several modules. These modules have got a number of pins. We need to connect a subset of pins with wires in such a way that no pin hasn’t to more than two wires attached to it and the length of the wire is minimized. • The traveling salesman problem is a kind of testing ground for the algorithms which solved optimization problems, because TSP is a good representative of this class problems. Therefore, the study of the genetic algorithm for the traveling salesman problem gives a hope that genetic algorithm allows to solve other optimization problems as well. • So, investigations of the travelling salesman problem is very important for computer science, Computer Engineering, web, radio-electronics, business and transport industry. • The method of genetic algorithm allows to solve the traveling salesman problem quite effectively. The relative error of the result of this algorithm is quite little.
14. 14. Conclusion• We has been observed how GA creates solution without having any prior knowledge about the problem. Unlike other heuristic methods, it uses natural techniques as like crossover, mutation and selection to make the computation easier and many times faster. • Genetic algorithms can be used when no information is available about the gradient of the function at the evaluated points. • The function itself does not need to be continuous or differentiable. • Genetic algorithms can still achieve good results even in cases in which the function has several local minima or maxima. • These properties of genetic algorithms have their price: unlike traditional random search, the function is not examined at a single place, constructing a possible path to the local maximum or minimum, but many different places are considered simultaneously. • The function must be calculated for all elements of the population. • GAs are useful optimization procedure • Easy to parallelize.