SlideShare a Scribd company logo
9
Most read
Travelling and Salesman Problem
Using Ant colony optimization
AKASH SETHIYA
ALGORITHMS FOR ARTIFICIAL INTELLIGENCE (SPRING 2017)
COMPUTER SCIENCE GRADUATE
MISSISSIPPI STATE UNIVERSITY
TSP (Travelling and Salesman)
 One salesman, visiting all cities in a route exactly once and come back to
same city where he started.
 Problem to find the path for salesman in which cost is minimum.
 TSP can be modelled as an undirected weighted graph, in which cities are
represent by vertices and path’s are graph edges and distance between
cities are edge weights.
 The goal in TSP is to find a minimum length Hamiltonian circuit of the
graph
 NP-hard problem (Permutation problem)
ACO (Ant colony optimization)
 Probabilistic technique for solving computation problem which can be
reduced to finding shortest path through graphs.
 Initially proposed by Marco Dorigo in 1992 in his PhD thesis.
 Inspired by the approach of real ants to find the shortest path from nest to
food source.
 Ants communicate with each other via a chemical substance called
Pheromone.
 Trail which has high amount of pheromone, other ants follow the same
trail to find food otherwise use a random path to search for food source.
Ant Colony Optimization
Natural behaviors of Ants
https://www.slideshare.net/MeenakshiDevi/ant-colony-optimization-11696728
Pseudocode of ACO
Loop
Randomly position m artificial ants on n cities
for city=1 to n
for ant=1 to m
{Each ant builds a solution by adding one city after other}
Select probabilistically the next city
Apply local trail updating rule
end for
end for
Apply the global trail updating rule using best ant
Until end condition
Flow chart of ACO for TSP
Initialize
Place each ant in a randomly chosen city
Choose NextCity(For Each Ant)
more cities
to visit
For Each Ant
Return to the initial cities
Update pheromone level using the tour cost for each ant
Print Best tour
yes
No
Stopping
criteria
yes
No
Image credit: Ant colony optimization by Ahmad Elshamli, Daniel Asmar, Fadi Elmasri
Results
No of Cities Brute Force (TSP) (ms) ACO (TSP) (ms)
10 95.2
20 2407
30 2888.4
40 2609.4
50 4328.8
60 6880.6
70 10345
80 14706
90 20704
100 28313
Result Analysis
0
5000
10000
15000
20000
25000
30000
0 20 40 60 80 100 120
TIME(MS)
NUMBER OF CITIES
ACO RUNTIME ANALYSIS - CITY VS
Complexities
 TSP – Brute force – O(n!)
 TSP – Dynamic Programming – O(2n n2)
 TSP – ACO - O(mn3)
References
 The Ant System: Optimization by a colony of cooperating agents by Marco
Dorigo, Member, IEEE, Vittorio Maniezzo and Alberto Colorni
 An Ant colony optimization Algorithm for Solving Travelling Salesman
Problem, Krishna H. Hingrajiya, Ravindra Kumar Gupta, Gajendra Singh
Chandel
 https://github.com/lukedodd/ant-tsp
 https://en.wikipedia.org/wiki/Ant_colony_optimization_algorithms
 http://www.geeksforgeeks.org/travelling-salesman-problem-set-1/
 https://en.wikipedia.org/wiki/Travelling_salesman_problem
THANK YOU

More Related Content

PPTX
Ant Colony Optimization (ACO)
PPTX
ant colony optimization
PPT
Ant Colony Optimization - ACO
PPT
Ant Colony Optimization presentation
PPSX
Show ant-colony-optimization-for-solving-the-traveling-salesman-problem
PPT
Particle Swarm Optimization - PSO
PPT
Ant colony optimization
PPTX
Ant Colony Optimization
Ant Colony Optimization (ACO)
ant colony optimization
Ant Colony Optimization - ACO
Ant Colony Optimization presentation
Show ant-colony-optimization-for-solving-the-traveling-salesman-problem
Particle Swarm Optimization - PSO
Ant colony optimization
Ant Colony Optimization

What's hot (20)

PDF
Genetic Algorithms
PPT
Ant colony optimization
PPTX
Ant colony optimization
PPTX
Optimization by Ant Colony Method
PPT
Ant colony optimization
PPTX
Classification with ant colony optimization
PPTX
Particle Swarm Optimization by Rajorshi Mukherjee
PDF
Ant Colony Optimization
PPTX
Ant colony optimization (aco)
PPTX
Practical Swarm Optimization (PSO)
PPTX
Particle swarm optimization
PPT
Artificial bee colony (abc)
PDF
Particle Swarm Optimization: The Algorithm and Its Applications
PPTX
Travelling Salesman Problem
PPTX
ant colony algorithm
PPT
Ant colony Optimization
PDF
Lecture 9 Markov decision process
PDF
Unit3:Informed and Uninformed search
PPTX
Genetic algorithm
PPTX
Crow search algorithm
Genetic Algorithms
Ant colony optimization
Ant colony optimization
Optimization by Ant Colony Method
Ant colony optimization
Classification with ant colony optimization
Particle Swarm Optimization by Rajorshi Mukherjee
Ant Colony Optimization
Ant colony optimization (aco)
Practical Swarm Optimization (PSO)
Particle swarm optimization
Artificial bee colony (abc)
Particle Swarm Optimization: The Algorithm and Its Applications
Travelling Salesman Problem
ant colony algorithm
Ant colony Optimization
Lecture 9 Markov decision process
Unit3:Informed and Uninformed search
Genetic algorithm
Crow search algorithm
Ad

Similar to Travelling and salesman problem using ant colony optimization (20)

PDF
A Survey of Solving Travelling Salesman Problem using Ant Colony Optimization
PPTX
Travelling salesman problem
PDF
K046036367
PPTX
Ant colony optimization in multiple travelling salesman problem
PDF
Swarm Intelligence Technique ACO and Traveling Salesman Problem
PPT
53564379-Ant-Colony-Optimization.ppt
PPTX
Swapnil Shahade
PDF
An improved ant colony algorithm based on
PDF
antcolonyoptimization-130619020831-phpapp01.pdf
PPT
Ant Colony Optimization algorithms in ADSA
PPTX
Solving TSP using Hybrid GACO
PPTX
Acoseminar
PPTX
Ant Colony Optimization(ACO) (Swarm intelligence)pptx
PDF
Ant colony optimization
PPT
ant colony optimization for solving travelling sp
PPT
aco-3a.ppt
PPT
aco-3a.ppt
PPT
aco-3a.ppt
PDF
A hybrid optimization algorithm based on genetic algorithm and ant colony opt...
PPT
An overview of antcolonyoptimization.ppt
A Survey of Solving Travelling Salesman Problem using Ant Colony Optimization
Travelling salesman problem
K046036367
Ant colony optimization in multiple travelling salesman problem
Swarm Intelligence Technique ACO and Traveling Salesman Problem
53564379-Ant-Colony-Optimization.ppt
Swapnil Shahade
An improved ant colony algorithm based on
antcolonyoptimization-130619020831-phpapp01.pdf
Ant Colony Optimization algorithms in ADSA
Solving TSP using Hybrid GACO
Acoseminar
Ant Colony Optimization(ACO) (Swarm intelligence)pptx
Ant colony optimization
ant colony optimization for solving travelling sp
aco-3a.ppt
aco-3a.ppt
aco-3a.ppt
A hybrid optimization algorithm based on genetic algorithm and ant colony opt...
An overview of antcolonyoptimization.ppt
Ad

Recently uploaded (20)

PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PDF
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPT
Mechanical Engineering MATERIALS Selection
PPTX
Artificial Intelligence
PPTX
Geodesy 1.pptx...............................................
PPT
Project quality management in manufacturing
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PPTX
additive manufacturing of ss316l using mig welding
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PDF
PPT on Performance Review to get promotions
PDF
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PDF
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Embodied AI: Ushering in the Next Era of Intelligent Systems
Operating System & Kernel Study Guide-1 - converted.pdf
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
UNIT-1 - COAL BASED THERMAL POWER PLANTS
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Foundation to blockchain - A guide to Blockchain Tech
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Mechanical Engineering MATERIALS Selection
Artificial Intelligence
Geodesy 1.pptx...............................................
Project quality management in manufacturing
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
additive manufacturing of ss316l using mig welding
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPT on Performance Review to get promotions
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx

Travelling and salesman problem using ant colony optimization

  • 1. Travelling and Salesman Problem Using Ant colony optimization AKASH SETHIYA ALGORITHMS FOR ARTIFICIAL INTELLIGENCE (SPRING 2017) COMPUTER SCIENCE GRADUATE MISSISSIPPI STATE UNIVERSITY
  • 2. TSP (Travelling and Salesman)  One salesman, visiting all cities in a route exactly once and come back to same city where he started.  Problem to find the path for salesman in which cost is minimum.  TSP can be modelled as an undirected weighted graph, in which cities are represent by vertices and path’s are graph edges and distance between cities are edge weights.  The goal in TSP is to find a minimum length Hamiltonian circuit of the graph  NP-hard problem (Permutation problem)
  • 3. ACO (Ant colony optimization)  Probabilistic technique for solving computation problem which can be reduced to finding shortest path through graphs.  Initially proposed by Marco Dorigo in 1992 in his PhD thesis.  Inspired by the approach of real ants to find the shortest path from nest to food source.  Ants communicate with each other via a chemical substance called Pheromone.  Trail which has high amount of pheromone, other ants follow the same trail to find food otherwise use a random path to search for food source.
  • 4. Ant Colony Optimization Natural behaviors of Ants https://www.slideshare.net/MeenakshiDevi/ant-colony-optimization-11696728
  • 5. Pseudocode of ACO Loop Randomly position m artificial ants on n cities for city=1 to n for ant=1 to m {Each ant builds a solution by adding one city after other} Select probabilistically the next city Apply local trail updating rule end for end for Apply the global trail updating rule using best ant Until end condition
  • 6. Flow chart of ACO for TSP Initialize Place each ant in a randomly chosen city Choose NextCity(For Each Ant) more cities to visit For Each Ant Return to the initial cities Update pheromone level using the tour cost for each ant Print Best tour yes No Stopping criteria yes No Image credit: Ant colony optimization by Ahmad Elshamli, Daniel Asmar, Fadi Elmasri
  • 7. Results No of Cities Brute Force (TSP) (ms) ACO (TSP) (ms) 10 95.2 20 2407 30 2888.4 40 2609.4 50 4328.8 60 6880.6 70 10345 80 14706 90 20704 100 28313
  • 8. Result Analysis 0 5000 10000 15000 20000 25000 30000 0 20 40 60 80 100 120 TIME(MS) NUMBER OF CITIES ACO RUNTIME ANALYSIS - CITY VS
  • 9. Complexities  TSP – Brute force – O(n!)  TSP – Dynamic Programming – O(2n n2)  TSP – ACO - O(mn3)
  • 10. References  The Ant System: Optimization by a colony of cooperating agents by Marco Dorigo, Member, IEEE, Vittorio Maniezzo and Alberto Colorni  An Ant colony optimization Algorithm for Solving Travelling Salesman Problem, Krishna H. Hingrajiya, Ravindra Kumar Gupta, Gajendra Singh Chandel  https://github.com/lukedodd/ant-tsp  https://en.wikipedia.org/wiki/Ant_colony_optimization_algorithms  http://www.geeksforgeeks.org/travelling-salesman-problem-set-1/  https://en.wikipedia.org/wiki/Travelling_salesman_problem