Top Banner
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
17

Solving the traveling salesman problem by genetic algorithm

Apr 15, 2017

Download

Software

Alex Bidanets
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Solving the traveling salesman problem by genetic algorithm

Genetic Algorithms

Ministry of Education and Science of the Russian Federation

Crimean Federal V.I. Vernadsky UniversityTaurida academy

(structural subdivision)

Author: Alexander Bidanets3-d - year student

Bachelor courseMathematics and informatics departmentMajor in: applied mathematics and informatics

Language instructor: Associate Professor Oksana Vladimirovna Yermolenko

Page 2: Solving the traveling salesman problem by genetic algorithm

Table of contentsThe traveling salesman

problemWhat is the genetic algorithm?

Conclusion

Page 3: Solving the traveling salesman problem by genetic algorithm

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. 

Main idea:

Page 4: Solving the traveling salesman problem by genetic algorithm

Traveling salesman problemThe 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.

Page 5: Solving the traveling salesman problem by genetic algorithm
Page 6: Solving the traveling salesman problem by genetic algorithm

What is the genetic algorithm?Individual (chromosome)

Any possible solution of a problem

Population Group of all individualsSearch space All possible solutions to the problemLocus The position of a gene on the chromosomethe 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:

Page 7: Solving the traveling salesman problem by genetic algorithm

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).

Main idea:

Page 8: Solving the traveling salesman problem by genetic algorithm

Basic Operators of Genetic Algorithm

•Encoding and Initialization•Crossover (also called recombination)•Mutation•Selection and Fitness function•Decoding

Page 9: Solving the traveling salesman problem by genetic algorithm

Initialization

Page 10: Solving the traveling salesman problem by genetic algorithm
Page 11: Solving the traveling salesman problem by genetic algorithm
Page 12: Solving the traveling salesman problem by genetic algorithm

Initialization

Population of solutions

Page 13: Solving the traveling salesman problem by genetic algorithm

Crossover

Page 14: Solving the traveling salesman problem by genetic algorithm

Mutation

Page 15: Solving the traveling salesman problem by genetic algorithm

Selection and Fitness function

Page 16: Solving the traveling salesman problem by genetic algorithm

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.

Page 17: Solving the traveling salesman problem by genetic algorithm

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.