SlideShare a Scribd company logo
1 of 13
Project Based Learning
On
“Implementation of Travelling Salesman
Problem with Complexity”
Design and Analysis of Algorithms( CS – 14.301 )
Contents
 Introduction
 Hamiltonian Graph
 Algorithm : Travelling Salesman Problem
 Time Complexity
 Simple Example
 Applications
 Conclusion
 References
Introduction
 Travelling salesman route will be plan in such a way that in a
given N number of cities cost of travelling from one city to any
other city what is the minimum round trip route that visit each
city once and then return to the starting place. The goal is to find
the shortest tour that visit each city in a given cities exactly ones
and then return to the starting city. The only solution to the
travelling salesman problem is to calculate and compare the
length of all possible ordered combinations.
Graph Representation
 Adjacency Matrix: An adjacency matrix is a matrix which describes a graph by
representing which vertices are adjacent to which other vertices. If G is a graph of order
n, then its adjacency matrix is an n×n square matrix, where each row and column
corresponds to a vertex of G. The element aij of such a matrix specifies the number of
edges from vertex i to vertex j.
 Adjacency List: An adjacency list represents a graph as an array of linked list. The
index of the array represents a vertex and each element in its linked list represents the
other vertices that form an edge with the vertex.
Hamiltonian graph
 A Hamiltonian path or traceable path is a path that visits
each vertex of the graph exactly once. A graph that
contains a Hamiltonian path is called a traceable graph.
A graph is Hamiltonian-connected it for every pair of
vertices there is a Hamiltonian path between the two
vertices.
Dynamic Programming
 Dynamic Programming is also used in optimization problems.
Like divide-and-conquer method, Dynamic Programming solves
problems by combining the solutions of subproblems. Moreover,
Dynamic Programming algorithm solves each sub-problem just
once and then saves its answer in a table, thereby avoiding the
work of re-computing the answer every time.
Algorithm: Traveling-Salesman-
Problem
1. 𝐶 ({1}, 1) = 0
2. for 𝑠 = 2 to n do
3. for all subsets 𝑆 Є {1, 2, 3, … , 𝑛} of size s and containing 1
4. 𝐶 (𝑆, 1) = ∞
5. for all 𝑗 Є 𝑆 and 𝑗 ≠ 1
6. 𝐶 (𝑆, 𝑗) = 𝑚𝑖𝑛 {𝐶 (𝑆 – {𝑗}, 𝑖) + 𝑑(𝑖, 𝑗) 𝑓𝑜𝑟 𝑖 Є 𝑆 𝑎𝑛𝑑 𝑖 ≠ 𝑗}
7. Return 𝑚𝑖𝑛𝑗 𝐶 ({1, 2, 3, … , 𝑛}, 𝑗) + 𝑑(𝑗, 𝑖)
Time Complexity
 There are at the most 2 𝑛 .n sub-problems and each one
takes linear time to solve. Therefore, the total running
time is 𝑂(2 𝑛 . 𝑛 2 ).
Simple Example
IS there a route that
takes you through every
city and back to the
starting point 1 for less
than 7.
The solution is : 13241
Applications
 A real-world application that calculates the
route of the Travelling Salesman Problem using
the current traffic intensity information from
Google Maps is prepared.
 A user-friendly interface, displaying the
shortest route in distance or duration on Google
Maps, has been developed by adding different
features.
Conclusion
• It can be concluded that on application of TSP
algorithm with dynamic programming is able to
produce optimal route tour to serve a customers
including the shortest or minimum length of
travel time or optimal travel time.
Reference
 http://en.wikipedia.org/wiki/Travelling_salesman_problem
 https://xkcd.com/399/
 http://www.forbes.com/sites/alexkonrad/2013/11/01/meet-orion-
software-that-will-save-ups-millions-by-improving-drivers-
routes/
 http://www.theprojectspot.com/tutorial-post/applying-a-genetic-
algorithm-to-the-travelling-salesman-problem/5
THANK
YOU

More Related Content

What's hot (20)

Greedy Algorihm
Greedy AlgorihmGreedy Algorihm
Greedy Algorihm
 
Dijkstra's Algorithm
Dijkstra's Algorithm Dijkstra's Algorithm
Dijkstra's Algorithm
 
Greedymethod
GreedymethodGreedymethod
Greedymethod
 
Solving the traveling salesman problem by genetic algorithm
Solving the traveling salesman problem by genetic algorithmSolving the traveling salesman problem by genetic algorithm
Solving the traveling salesman problem by genetic algorithm
 
BackTracking Algorithm: Technique and Examples
BackTracking Algorithm: Technique and ExamplesBackTracking Algorithm: Technique and Examples
BackTracking Algorithm: Technique and Examples
 
Traveling Salesman Problem
Traveling Salesman Problem Traveling Salesman Problem
Traveling Salesman Problem
 
The n Queen Problem
The n Queen ProblemThe n Queen Problem
The n Queen Problem
 
Graph coloring using backtracking
Graph coloring using backtrackingGraph coloring using backtracking
Graph coloring using backtracking
 
Branch and bound
Branch and boundBranch and bound
Branch and bound
 
Dynamic programming
Dynamic programmingDynamic programming
Dynamic programming
 
Greedy Algorithms
Greedy AlgorithmsGreedy Algorithms
Greedy Algorithms
 
Tsp branch and-bound
Tsp branch and-boundTsp branch and-bound
Tsp branch and-bound
 
9. chapter 8 np hard and np complete problems
9. chapter 8   np hard and np complete problems9. chapter 8   np hard and np complete problems
9. chapter 8 np hard and np complete problems
 
Lecture28 tsp
Lecture28 tspLecture28 tsp
Lecture28 tsp
 
P, NP, NP-Complete, and NP-Hard
P, NP, NP-Complete, and NP-HardP, NP, NP-Complete, and NP-Hard
P, NP, NP-Complete, and NP-Hard
 
0/1 knapsack
0/1 knapsack0/1 knapsack
0/1 knapsack
 
Lecture optimal binary search tree
Lecture optimal binary search tree Lecture optimal binary search tree
Lecture optimal binary search tree
 
The Traveling Salesman Problem
The Traveling Salesman ProblemThe Traveling Salesman Problem
The Traveling Salesman Problem
 
Greedy algorithm
Greedy algorithmGreedy algorithm
Greedy algorithm
 
Local search algorithm
Local search algorithmLocal search algorithm
Local search algorithm
 

Similar to implementation of travelling salesman problem with complexity ppt

Dynamic programming1
Dynamic programming1Dynamic programming1
Dynamic programming1debolina13
 
Optimal Vacation Itinerary Modeling
Optimal Vacation Itinerary ModelingOptimal Vacation Itinerary Modeling
Optimal Vacation Itinerary ModelingGerard Trimberger
 
Traveling Salesman Problem in Distributed Environment
Traveling Salesman Problem in Distributed EnvironmentTraveling Salesman Problem in Distributed Environment
Traveling Salesman Problem in Distributed Environmentcsandit
 
TRAVELING SALESMAN PROBLEM IN DISTRIBUTED ENVIRONMENT
TRAVELING SALESMAN PROBLEM IN DISTRIBUTED ENVIRONMENTTRAVELING SALESMAN PROBLEM IN DISTRIBUTED ENVIRONMENT
TRAVELING SALESMAN PROBLEM IN DISTRIBUTED ENVIRONMENTcscpconf
 
LP linear programming (summary) (5s)
LP linear programming (summary) (5s)LP linear programming (summary) (5s)
LP linear programming (summary) (5s)Dionísio Carmo-Neto
 
DAA - UNIT 4 - Engineering.pptx
DAA - UNIT 4 - Engineering.pptxDAA - UNIT 4 - Engineering.pptx
DAA - UNIT 4 - Engineering.pptxvaishnavi339314
 
Data structure - traveling sales person and mesh algorithm
Data structure - traveling sales person and mesh algorithmData structure - traveling sales person and mesh algorithm
Data structure - traveling sales person and mesh algorithmlavanya marichamy
 
Cs6402 design and analysis of algorithms may june 2016 answer key
Cs6402 design and analysis of algorithms may june 2016 answer keyCs6402 design and analysis of algorithms may june 2016 answer key
Cs6402 design and analysis of algorithms may june 2016 answer keyappasami
 
Applied Algorithms and Structures week999
Applied Algorithms and Structures week999Applied Algorithms and Structures week999
Applied Algorithms and Structures week999fashiontrendzz20
 
Lecture 8 dynamic programming
Lecture 8 dynamic programmingLecture 8 dynamic programming
Lecture 8 dynamic programmingOye Tu
 
Introducción al Análisis y diseño de algoritmos
Introducción al Análisis y diseño de algoritmosIntroducción al Análisis y diseño de algoritmos
Introducción al Análisis y diseño de algoritmosluzenith_g
 

Similar to implementation of travelling salesman problem with complexity ppt (20)

Combinatorial Optimization
Combinatorial OptimizationCombinatorial Optimization
Combinatorial Optimization
 
Dynamic programming1
Dynamic programming1Dynamic programming1
Dynamic programming1
 
Optimal Vacation Itinerary Modeling
Optimal Vacation Itinerary ModelingOptimal Vacation Itinerary Modeling
Optimal Vacation Itinerary Modeling
 
Traveling Salesman Problem in Distributed Environment
Traveling Salesman Problem in Distributed EnvironmentTraveling Salesman Problem in Distributed Environment
Traveling Salesman Problem in Distributed Environment
 
TRAVELING SALESMAN PROBLEM IN DISTRIBUTED ENVIRONMENT
TRAVELING SALESMAN PROBLEM IN DISTRIBUTED ENVIRONMENTTRAVELING SALESMAN PROBLEM IN DISTRIBUTED ENVIRONMENT
TRAVELING SALESMAN PROBLEM IN DISTRIBUTED ENVIRONMENT
 
LP linear programming (summary) (5s)
LP linear programming (summary) (5s)LP linear programming (summary) (5s)
LP linear programming (summary) (5s)
 
Daa chapter11
Daa chapter11Daa chapter11
Daa chapter11
 
DAA - UNIT 4 - Engineering.pptx
DAA - UNIT 4 - Engineering.pptxDAA - UNIT 4 - Engineering.pptx
DAA - UNIT 4 - Engineering.pptx
 
Data structure - traveling sales person and mesh algorithm
Data structure - traveling sales person and mesh algorithmData structure - traveling sales person and mesh algorithm
Data structure - traveling sales person and mesh algorithm
 
Cs6402 design and analysis of algorithms may june 2016 answer key
Cs6402 design and analysis of algorithms may june 2016 answer keyCs6402 design and analysis of algorithms may june 2016 answer key
Cs6402 design and analysis of algorithms may june 2016 answer key
 
Chapter 16
Chapter 16Chapter 16
Chapter 16
 
Slide2
Slide2Slide2
Slide2
 
Applied Algorithms and Structures week999
Applied Algorithms and Structures week999Applied Algorithms and Structures week999
Applied Algorithms and Structures week999
 
Analysis of Algorithm
Analysis of AlgorithmAnalysis of Algorithm
Analysis of Algorithm
 
Presentation.pdf
Presentation.pdfPresentation.pdf
Presentation.pdf
 
Alg1
Alg1Alg1
Alg1
 
Lecture 8 dynamic programming
Lecture 8 dynamic programmingLecture 8 dynamic programming
Lecture 8 dynamic programming
 
Approximation
ApproximationApproximation
Approximation
 
Introducción al Análisis y diseño de algoritmos
Introducción al Análisis y diseño de algoritmosIntroducción al Análisis y diseño de algoritmos
Introducción al Análisis y diseño de algoritmos
 
Backtracking
BacktrackingBacktracking
Backtracking
 

Recently uploaded

chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 

Recently uploaded (20)

chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 

implementation of travelling salesman problem with complexity ppt

  • 1. Project Based Learning On “Implementation of Travelling Salesman Problem with Complexity” Design and Analysis of Algorithms( CS – 14.301 )
  • 2. Contents  Introduction  Hamiltonian Graph  Algorithm : Travelling Salesman Problem  Time Complexity  Simple Example  Applications  Conclusion  References
  • 3. Introduction  Travelling salesman route will be plan in such a way that in a given N number of cities cost of travelling from one city to any other city what is the minimum round trip route that visit each city once and then return to the starting place. The goal is to find the shortest tour that visit each city in a given cities exactly ones and then return to the starting city. The only solution to the travelling salesman problem is to calculate and compare the length of all possible ordered combinations.
  • 4. Graph Representation  Adjacency Matrix: An adjacency matrix is a matrix which describes a graph by representing which vertices are adjacent to which other vertices. If G is a graph of order n, then its adjacency matrix is an n×n square matrix, where each row and column corresponds to a vertex of G. The element aij of such a matrix specifies the number of edges from vertex i to vertex j.  Adjacency List: An adjacency list represents a graph as an array of linked list. The index of the array represents a vertex and each element in its linked list represents the other vertices that form an edge with the vertex.
  • 5. Hamiltonian graph  A Hamiltonian path or traceable path is a path that visits each vertex of the graph exactly once. A graph that contains a Hamiltonian path is called a traceable graph. A graph is Hamiltonian-connected it for every pair of vertices there is a Hamiltonian path between the two vertices.
  • 6. Dynamic Programming  Dynamic Programming is also used in optimization problems. Like divide-and-conquer method, Dynamic Programming solves problems by combining the solutions of subproblems. Moreover, Dynamic Programming algorithm solves each sub-problem just once and then saves its answer in a table, thereby avoiding the work of re-computing the answer every time.
  • 7. Algorithm: Traveling-Salesman- Problem 1. 𝐶 ({1}, 1) = 0 2. for 𝑠 = 2 to n do 3. for all subsets 𝑆 Є {1, 2, 3, … , 𝑛} of size s and containing 1 4. 𝐶 (𝑆, 1) = ∞ 5. for all 𝑗 Є 𝑆 and 𝑗 ≠ 1 6. 𝐶 (𝑆, 𝑗) = 𝑚𝑖𝑛 {𝐶 (𝑆 – {𝑗}, 𝑖) + 𝑑(𝑖, 𝑗) 𝑓𝑜𝑟 𝑖 Є 𝑆 𝑎𝑛𝑑 𝑖 ≠ 𝑗} 7. Return 𝑚𝑖𝑛𝑗 𝐶 ({1, 2, 3, … , 𝑛}, 𝑗) + 𝑑(𝑗, 𝑖)
  • 8. Time Complexity  There are at the most 2 𝑛 .n sub-problems and each one takes linear time to solve. Therefore, the total running time is 𝑂(2 𝑛 . 𝑛 2 ).
  • 9. Simple Example IS there a route that takes you through every city and back to the starting point 1 for less than 7. The solution is : 13241
  • 10. Applications  A real-world application that calculates the route of the Travelling Salesman Problem using the current traffic intensity information from Google Maps is prepared.  A user-friendly interface, displaying the shortest route in distance or duration on Google Maps, has been developed by adding different features.
  • 11. Conclusion • It can be concluded that on application of TSP algorithm with dynamic programming is able to produce optimal route tour to serve a customers including the shortest or minimum length of travel time or optimal travel time.
  • 12. Reference  http://en.wikipedia.org/wiki/Travelling_salesman_problem  https://xkcd.com/399/  http://www.forbes.com/sites/alexkonrad/2013/11/01/meet-orion- software-that-will-save-ups-millions-by-improving-drivers- routes/  http://www.theprojectspot.com/tutorial-post/applying-a-genetic- algorithm-to-the-travelling-salesman-problem/5