SlideShare a Scribd company logo
1 of 17
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
Table of contents
The traveling salesman problem
What is the genetic algorithm?
Conclusion
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.
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.
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:
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).
Basic Operators of Genetic
Algorithm
•Encoding and Initialization
•Crossover (also called recombination)
•Mutation
•Selection and Fitness function
•Decoding
Initialization
Initialization
Population of solutions
Crossover
Mutation
Selection and
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.
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.

More Related Content

What's hot

Traveling salesman problem(tsp)
Traveling salesman problem(tsp)Traveling salesman problem(tsp)
Traveling salesman problem(tsp)
Viraj Patil
 
What Is Dynamic Programming? | Dynamic Programming Explained | Programming Fo...
What Is Dynamic Programming? | Dynamic Programming Explained | Programming Fo...What Is Dynamic Programming? | Dynamic Programming Explained | Programming Fo...
What Is Dynamic Programming? | Dynamic Programming Explained | Programming Fo...
Simplilearn
 

What's hot (20)

Travelling salesman problem
Travelling salesman problemTravelling salesman problem
Travelling salesman problem
 
Travelling salesman problem
Travelling salesman problemTravelling salesman problem
Travelling salesman problem
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
Genetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial IntelligenceGenetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial Intelligence
 
Traveling salesman problem: Game Scheduling Problem Solution: Ant Colony Opti...
Traveling salesman problem: Game Scheduling Problem Solution: Ant Colony Opti...Traveling salesman problem: Game Scheduling Problem Solution: Ant Colony Opti...
Traveling salesman problem: Game Scheduling Problem Solution: Ant Colony Opti...
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
Greedy Algorithm
Greedy AlgorithmGreedy Algorithm
Greedy Algorithm
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
Uninformed search /Blind search in AI
Uninformed search /Blind search in AIUninformed search /Blind search in AI
Uninformed search /Blind search in AI
 
Tsp branch and-bound
Tsp branch and-boundTsp branch and-bound
Tsp branch and-bound
 
Travelling salesman problem
Travelling salesman problemTravelling salesman problem
Travelling salesman problem
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
Greedy algorithm
Greedy algorithmGreedy algorithm
Greedy algorithm
 
The Travelling Salesman Problem
The Travelling Salesman ProblemThe Travelling Salesman Problem
The Travelling Salesman Problem
 
Game Playing in Artificial Intelligence
Game Playing in Artificial IntelligenceGame Playing in Artificial Intelligence
Game Playing in Artificial Intelligence
 
AI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction ProblemAI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction Problem
 
Traveling salesman problem(tsp)
Traveling salesman problem(tsp)Traveling salesman problem(tsp)
Traveling salesman problem(tsp)
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithms
 
Uninformed Search technique
Uninformed Search techniqueUninformed Search technique
Uninformed Search technique
 
What Is Dynamic Programming? | Dynamic Programming Explained | Programming Fo...
What Is Dynamic Programming? | Dynamic Programming Explained | Programming Fo...What Is Dynamic Programming? | Dynamic Programming Explained | Programming Fo...
What Is Dynamic Programming? | Dynamic Programming Explained | Programming Fo...
 

Similar to Solving the traveling salesman problem by genetic algorithm

CSA 3702 machine learning module 4
CSA 3702 machine learning module 4CSA 3702 machine learning module 4
CSA 3702 machine learning module 4
Nandhini S
 
Review And Evaluations Of Shortest Path Algorithms
Review And Evaluations Of Shortest Path AlgorithmsReview And Evaluations Of Shortest Path Algorithms
Review And Evaluations Of Shortest Path Algorithms
Pawan Kumar Tiwari
 
Bra a bidirectional routing abstraction for asymmetric mobile ad hoc networks...
Bra a bidirectional routing abstraction for asymmetric mobile ad hoc networks...Bra a bidirectional routing abstraction for asymmetric mobile ad hoc networks...
Bra a bidirectional routing abstraction for asymmetric mobile ad hoc networks...
Mumbai Academisc
 

Similar to Solving the traveling salesman problem by genetic algorithm (20)

CSA 3702 machine learning module 4
CSA 3702 machine learning module 4CSA 3702 machine learning module 4
CSA 3702 machine learning module 4
 
Sample Paper (1).pdf
Sample Paper (1).pdfSample Paper (1).pdf
Sample Paper (1).pdf
 
Genetic algorithms mahyar
Genetic algorithms   mahyarGenetic algorithms   mahyar
Genetic algorithms mahyar
 
A New Approach To Solving The Multiple Traveling Salesperson Problem Using Ge...
A New Approach To Solving The Multiple Traveling Salesperson Problem Using Ge...A New Approach To Solving The Multiple Traveling Salesperson Problem Using Ge...
A New Approach To Solving The Multiple Traveling Salesperson Problem Using Ge...
 
T01732115119
T01732115119T01732115119
T01732115119
 
Artificial Intelligence in Robot Path Planning
Artificial Intelligence in Robot Path PlanningArtificial Intelligence in Robot Path Planning
Artificial Intelligence in Robot Path Planning
 
Clonal Selection Algorithm Parallelization with MPJExpress
Clonal Selection Algorithm Parallelization with MPJExpressClonal Selection Algorithm Parallelization with MPJExpress
Clonal Selection Algorithm Parallelization with MPJExpress
 
The Optimizing Multiple Travelling Salesman Problem Using Genetic Algorithm
The Optimizing Multiple Travelling Salesman Problem Using Genetic AlgorithmThe Optimizing Multiple Travelling Salesman Problem Using Genetic Algorithm
The Optimizing Multiple Travelling Salesman Problem Using Genetic Algorithm
 
E034023028
E034023028E034023028
E034023028
 
With saloni in ijarcsse
With saloni in ijarcsseWith saloni in ijarcsse
With saloni in ijarcsse
 
Optimal combination of operators in Genetic Algorithmsfor VRP problems
Optimal combination of operators in Genetic Algorithmsfor VRP problemsOptimal combination of operators in Genetic Algorithmsfor VRP problems
Optimal combination of operators in Genetic Algorithmsfor VRP problems
 
Genetic algorithms in Data Mining
Genetic algorithms in Data MiningGenetic algorithms in Data Mining
Genetic algorithms in Data Mining
 
Bio-Inspired Optimization Algorithms_BasicAlgorithms.pdf
Bio-Inspired Optimization Algorithms_BasicAlgorithms.pdfBio-Inspired Optimization Algorithms_BasicAlgorithms.pdf
Bio-Inspired Optimization Algorithms_BasicAlgorithms.pdf
 
Review And Evaluations Of Shortest Path Algorithms
Review And Evaluations Of Shortest Path AlgorithmsReview And Evaluations Of Shortest Path Algorithms
Review And Evaluations Of Shortest Path Algorithms
 
Review and evaluations of shortest path algorithms
Review and evaluations of shortest path algorithmsReview and evaluations of shortest path algorithms
Review and evaluations of shortest path algorithms
 
Comparison Study of Multiple Traveling Salesmen Problem using Genetic Algorithm
Comparison Study of Multiple Traveling Salesmen Problem using Genetic AlgorithmComparison Study of Multiple Traveling Salesmen Problem using Genetic Algorithm
Comparison Study of Multiple Traveling Salesmen Problem using Genetic Algorithm
 
Geneticalgorithms 100403002207-phpapp02
Geneticalgorithms 100403002207-phpapp02Geneticalgorithms 100403002207-phpapp02
Geneticalgorithms 100403002207-phpapp02
 
A heuristic approach for optimizing travel planning using genetics algorithm
A heuristic approach for optimizing travel planning using genetics algorithmA heuristic approach for optimizing travel planning using genetics algorithm
A heuristic approach for optimizing travel planning using genetics algorithm
 
A heuristic approach for optimizing travel planning using genetics algorithm
A heuristic approach for optimizing travel planning using genetics algorithmA heuristic approach for optimizing travel planning using genetics algorithm
A heuristic approach for optimizing travel planning using genetics algorithm
 
Bra a bidirectional routing abstraction for asymmetric mobile ad hoc networks...
Bra a bidirectional routing abstraction for asymmetric mobile ad hoc networks...Bra a bidirectional routing abstraction for asymmetric mobile ad hoc networks...
Bra a bidirectional routing abstraction for asymmetric mobile ad hoc networks...
 

Recently uploaded

AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 

Recently uploaded (20)

W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide Deck
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 

Solving the traveling salesman problem by genetic algorithm

  • 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
  • 2. Table of contents The traveling salesman problem What is the genetic algorithm? Conclusion
  • 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. 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.
  • 6. 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:
  • 7. 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).
  • 8. Basic Operators of Genetic Algorithm •Encoding and Initialization •Crossover (also called recombination) •Mutation •Selection and Fitness function •Decoding
  • 10.
  • 11.
  • 16. 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.
  • 17. 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.

Editor's Notes

  1. 1