SlideShare a Scribd company logo
1 of 45
Carthagène
A brief introduction to combinatorial optimization:
The Traveling Salesman Problem
Simon de GivrySimon de Givry
Thales Research & Technology, FranceThales Research & Technology, France
(minor modifications by Benny Chor)
Find a tour with minimum distance, visiting every city only once
Madiera Island (west of Morocco in Atlantic ocean)
Distance matrix (miles)
Distances Camara Caniço Funchal ...
Camara 0 15 7 ...
Caniço 15 0 8 ...
Funchal 7 8 0 ...
... ... ... ... ...
Find an order of all the markers with maximum likelihood
A similar task in the genomic domain
2-point distance matrix (Haldane)
Distances M1 M2 M3 ...
M1 0 14 7 ...
M2 14 0 8 ...
M3 7 8 0 ...
... ... ... ... ...
Link
M1 M2 M3 M4 M5 M6 M7
Mdummy
0 0…0…
∀i,j,k distance(i,j) ? distance(i,k) + distance(k,j)
=,≤
 Multi-point likelihood (with unknowns) ⇔
the distance between two markers depends on the order
Traveling Salesman Problem
 Complete graph
 Positive weight on every edge
 Symmetric case: dist(i,j) = dist(j,i)
 Triangular inequality: dist(i,j) ≤ dist(i,k) + dist(k,j)
 Euclidean distance (assume we got wings)
 Find the shortest Hamiltonian cycle
7
8
15
Total distance = xxx miles
Traveling Salesman Problem
 Theoretical interest
 Basic NP-complete problem ( not easy)
 1993-2001: +150 articles about TSP in
INFORMS & Decision Sciences databases
 Practical interest
 Vehicle Routing Problem
 Genetic/Radiated Hybrid Mapping Problem

NCBI/Concorde, Carthagène, ...
Variants
 Euclidean Traveling Salesman Selection Problem
 Asymmetric Traveling Salesman Problem
 Symmetric Wandering Salesman Problem
 Selective Traveling Salesman Problem
 TSP with distances 1 and 2, TSP(1,2)
 K-template Traveling Salesman Problem
 Circulant Traveling Salesman Problem
 On-line Traveling Salesman Problem
 Time-dependent TSP
 The Angular-Metric Traveling Salesman Problem
 Maximum Latency TSP
 Minimum Latency Problem
 Max TSP
 Traveling Preacher Problem
 Bipartite TSP
 Remote TSP
 Precedence-Constrained TSP
 Exact TSP
 The Tour Cover problem
 ...
Plan
 Introduction to TSP
 Building a new tour “from scratch”
 Improving an existing tour
 Finding the best tour (or almost)
Building a new tour from scratch
Nearest Neighbor heuristic
(greedy, order dependent,
some neighbors not so near)
A different greedy, multi-fragments heuristic
Savings heuristic (Clarke-Wright 1964): Details in
http://www.cs.uu.nl/docs/vakken/amc/lecture03-2.pdf
Heuristics
 Mean distance to the optimum
 Savings: 11%
 Multi-fragments: 12%
 Nearest Neighbor: 26%
Improving an existing tour
Which local modification can improve this tour?
Remove two edges and rebuild another tour
⇔ Invert a given sequence of markers
Remove three edges and rebuild another tour (7 possibilities)
⇒ Swap the order of two sequences of markers
“greedy” local search
 2-opt
 Note: a finite sequence of “2-change” can
generate any tour, including the optimum tour
 Strategy:

Select the best 2-change among N*(N-1)/2
neighbors (2-move neighborhood)

Repeat this process until a fix point is reached (i.e.
no local tour improvement can be made)
2-opt
Greedy local search
 Mean distance to the optimum
 2-opt : 9%
 3-opt : 4%
 LK (limited k-opt) :1%
 Complexity
 2-opt : ~N3
 3-opt : ~N4
 LK (limited k-opt) :~Nk+1
Complexity n = number of vertices
Algorithm Complexity
A-TSP (n-1)!
S-TSP (n-1)! / 2
2-change 1
3-change 7
k-change (k-1)! . 2k-1
k-move (k-1)! . 2k-1
. n! / (k! . (n-k)!)
~ O( nk
) k << n
In practice: o( n )
2-opt et 3-opt ~ O( nk+1
)
In practice: o( n1.2
)
time(3-opt) ~ 3 x time(2-opt)
For each edge (u,v), maintain the list of vertices w
such that dist(w,v) < dist(u,v). Consider only such
w for replacing (u,v) by (w,v).
u
v
2-opt implementation trick:
Is this 2-opt tour optimum?
2-opt + vertex reinsertion
(removing a city and reinserting it next to
one of its 5 nearest neighbors)
local versus global optimum
Local search &
« meta-heuristics »
 Tabu Search
 Select the best neighbor even if it decreases
the quality of the current tour
 Forbid previous local moves during a certain
period of time

List of tabu moves
 Restart with new tours

When the search goes to a tour already seen

Build new tours in a random way
Tabu Search
• Stochastic size of the tabu list
• False restarts
Experiments with CarthaGène
N=50 K=100 Err=30% Abs=30%
Legend: partial 2-opt = early stop , guided 2-opt 25% = early stop & sort with X = 25%
Experiments - next
Other meta-heuristics
 Simulated Annealing
 Local moves are randomly chosen
 Neighbor acceptance depends on its quality
Acceptance process is more and more greedy
 Genetic Algorithms
 Population of solutions (tours)
 Mutation, crossover,…
 Variable Neighborhood Search
 …
Simulated Annealing
Move from A to A’ accepted
if cost(A’) ≤ cost(A)
or with probability
P(A,A’) = e –(cost(A’) – cost(A))/T
Variable Neighborhood
Search
• Perform a move only if it improves the previous solution
• Start with V:=1. If no solution is found then V++ else V:=1
Local Search
Demonstration
Finding the best tour
Search tree
M2M1 M3
M2 M3 M1 M3 M1 M2
M3 M2 M3 M1 M2 M1
M1,M2,M3
depth 1:
depth 2:
depth 3:
leaves
node
branch
root
= choice point
= alternative
= solutions
Tree search
 Complexity : n!/2 different orders
 Avoid symmetric orders (first half of the tree)
 Can use heuristics in choice points to order
possible alternatives
 Branch and bound algorithm
 Cut all the branches which cannot lead to a better
solution
 Possible to combine local search and tree
search
Lower bound to TSP:
Minimum weight spanning tree
Prim algorithm (1957)
Held & Karp algorithm (modified spanning trees) (1971)
MST ≤ TSP
Christofides approximation algorithm (1976):
Start with MST. Find shortcircuits, and rearrange
=> A(I) / OPT(I) ≤ 3/2 (requires triangular inequalities)
Exact methods, some benchmarks
 1954 : 49 cities
 1971 : 64 cities
 1975 : 100 cities
 1977 : 120 cities
 1980 : 318 cities
 1987 : 2,392 cities
 1994 : 7,397 cities
 1998 : 13,509 cities
 2001 : 15,112 cities (585936700 sec. ≈ 19 years of CPU!)

More Related Content

What's hot

A Hybrid Bat Algorithm
A Hybrid Bat AlgorithmA Hybrid Bat Algorithm
A Hybrid Bat AlgorithmXin-She Yang
 
Bat Algorithm: Literature Review and Applications
Bat Algorithm: Literature Review and ApplicationsBat Algorithm: Literature Review and Applications
Bat Algorithm: Literature Review and ApplicationsXin-She Yang
 
presentation_final
presentation_finalpresentation_final
presentation_finalSushanta Roy
 
An improved ant colony algorithm based on
An improved ant colony algorithm based onAn improved ant colony algorithm based on
An improved ant colony algorithm based onIJCI JOURNAL
 
Cuckoo Search Algorithm: An Introduction
Cuckoo Search Algorithm: An IntroductionCuckoo Search Algorithm: An Introduction
Cuckoo Search Algorithm: An IntroductionXin-She Yang
 
Metaheuristic Algorithms: A Critical Analysis
Metaheuristic Algorithms: A Critical AnalysisMetaheuristic Algorithms: A Critical Analysis
Metaheuristic Algorithms: A Critical AnalysisXin-She Yang
 
M.sc. presentation t.bagheri fashkhami
M.sc. presentation t.bagheri fashkhamiM.sc. presentation t.bagheri fashkhami
M.sc. presentation t.bagheri fashkhamitaherbagherif
 
Robot Three Dimensional Space Path-planning Applying the Improved Ant Colony ...
Robot Three Dimensional Space Path-planning Applying the Improved Ant Colony ...Robot Three Dimensional Space Path-planning Applying the Improved Ant Colony ...
Robot Three Dimensional Space Path-planning Applying the Improved Ant Colony ...Nooria Sukmaningtyas
 
Nature-Inspired Optimization Algorithms
Nature-Inspired Optimization Algorithms Nature-Inspired Optimization Algorithms
Nature-Inspired Optimization Algorithms Xin-She Yang
 
Approximation of Real Impulse Response Using IIR Structures
Approximation of Real Impulse Response Using IIR Structures Approximation of Real Impulse Response Using IIR Structures
Approximation of Real Impulse Response Using IIR Structures a3labdsp
 
Fourier transforms
Fourier transformsFourier transforms
Fourier transformsIffat Anjum
 

What's hot (20)

A Hybrid Bat Algorithm
A Hybrid Bat AlgorithmA Hybrid Bat Algorithm
A Hybrid Bat Algorithm
 
Bat algorithm
Bat algorithmBat algorithm
Bat algorithm
 
Bat Algorithm
Bat AlgorithmBat Algorithm
Bat Algorithm
 
BAT Algorithm
BAT AlgorithmBAT Algorithm
BAT Algorithm
 
Bat algorithm
Bat algorithmBat algorithm
Bat algorithm
 
Bat Algorithm: Literature Review and Applications
Bat Algorithm: Literature Review and ApplicationsBat Algorithm: Literature Review and Applications
Bat Algorithm: Literature Review and Applications
 
Firefly algorithm
Firefly algorithmFirefly algorithm
Firefly algorithm
 
Travelling salesman problem
Travelling salesman problemTravelling salesman problem
Travelling salesman problem
 
presentation_final
presentation_finalpresentation_final
presentation_final
 
An improved ant colony algorithm based on
An improved ant colony algorithm based onAn improved ant colony algorithm based on
An improved ant colony algorithm based on
 
Lab Report pub
Lab Report pubLab Report pub
Lab Report pub
 
FK_icassp_2014
FK_icassp_2014FK_icassp_2014
FK_icassp_2014
 
Cuckoo Search Algorithm: An Introduction
Cuckoo Search Algorithm: An IntroductionCuckoo Search Algorithm: An Introduction
Cuckoo Search Algorithm: An Introduction
 
Metaheuristic Algorithms: A Critical Analysis
Metaheuristic Algorithms: A Critical AnalysisMetaheuristic Algorithms: A Critical Analysis
Metaheuristic Algorithms: A Critical Analysis
 
M.sc. presentation t.bagheri fashkhami
M.sc. presentation t.bagheri fashkhamiM.sc. presentation t.bagheri fashkhami
M.sc. presentation t.bagheri fashkhami
 
Robot Three Dimensional Space Path-planning Applying the Improved Ant Colony ...
Robot Three Dimensional Space Path-planning Applying the Improved Ant Colony ...Robot Three Dimensional Space Path-planning Applying the Improved Ant Colony ...
Robot Three Dimensional Space Path-planning Applying the Improved Ant Colony ...
 
Nature-Inspired Optimization Algorithms
Nature-Inspired Optimization Algorithms Nature-Inspired Optimization Algorithms
Nature-Inspired Optimization Algorithms
 
Approximation of Real Impulse Response Using IIR Structures
Approximation of Real Impulse Response Using IIR Structures Approximation of Real Impulse Response Using IIR Structures
Approximation of Real Impulse Response Using IIR Structures
 
Fourier transforms
Fourier transformsFourier transforms
Fourier transforms
 
Nabaa
NabaaNabaa
Nabaa
 

Similar to Helgaun's algorithm for the TSP

Mining of massive datasets
Mining of massive datasetsMining of massive datasets
Mining of massive datasetsAshic Mahtab
 
Digital Distance Geometry
Digital Distance GeometryDigital Distance Geometry
Digital Distance Geometryppd1961
 
Branch and bounding : Data structures
Branch and bounding : Data structuresBranch and bounding : Data structures
Branch and bounding : Data structuresKàŕtheek Jåvvàjí
 
DSP2_slides_04_adaptievefiltering.pdf
DSP2_slides_04_adaptievefiltering.pdfDSP2_slides_04_adaptievefiltering.pdf
DSP2_slides_04_adaptievefiltering.pdfRakuoane
 
Random Matrix Theory and Machine Learning - Part 3
Random Matrix Theory and Machine Learning - Part 3Random Matrix Theory and Machine Learning - Part 3
Random Matrix Theory and Machine Learning - Part 3Fabian Pedregosa
 
My presentation all shortestpath
My presentation all shortestpathMy presentation all shortestpath
My presentation all shortestpathCarlostheran
 
Three rotational invariant variants of the 3SOME algorithms
Three rotational invariant variants of the 3SOME algorithmsThree rotational invariant variants of the 3SOME algorithms
Three rotational invariant variants of the 3SOME algorithmsFabio Caraffini
 
Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWER
Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWERUndecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWER
Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWERmuthukrishnavinayaga
 
20070823
2007082320070823
20070823neostar
 
EC8553 Discrete time signal processing
EC8553 Discrete time signal processing EC8553 Discrete time signal processing
EC8553 Discrete time signal processing ssuser2797e4
 
Tucker tensor analysis of Matern functions in spatial statistics
Tucker tensor analysis of Matern functions in spatial statistics Tucker tensor analysis of Matern functions in spatial statistics
Tucker tensor analysis of Matern functions in spatial statistics Alexander Litvinenko
 
Tree distance algorithm
Tree distance algorithmTree distance algorithm
Tree distance algorithmTrector Rancor
 

Similar to Helgaun's algorithm for the TSP (20)

Optimisation random graph presentation
Optimisation random graph presentationOptimisation random graph presentation
Optimisation random graph presentation
 
Mining of massive datasets
Mining of massive datasetsMining of massive datasets
Mining of massive datasets
 
Digital Distance Geometry
Digital Distance GeometryDigital Distance Geometry
Digital Distance Geometry
 
NP-Completeness - II
NP-Completeness - IINP-Completeness - II
NP-Completeness - II
 
Branch and bounding : Data structures
Branch and bounding : Data structuresBranch and bounding : Data structures
Branch and bounding : Data structures
 
Pairing scott
Pairing scottPairing scott
Pairing scott
 
DSP2_slides_04_adaptievefiltering.pdf
DSP2_slides_04_adaptievefiltering.pdfDSP2_slides_04_adaptievefiltering.pdf
DSP2_slides_04_adaptievefiltering.pdf
 
Random Matrix Theory and Machine Learning - Part 3
Random Matrix Theory and Machine Learning - Part 3Random Matrix Theory and Machine Learning - Part 3
Random Matrix Theory and Machine Learning - Part 3
 
Unit 3 daa
Unit 3 daaUnit 3 daa
Unit 3 daa
 
Approximation Algorithms TSP
Approximation Algorithms   TSPApproximation Algorithms   TSP
Approximation Algorithms TSP
 
My presentation all shortestpath
My presentation all shortestpathMy presentation all shortestpath
My presentation all shortestpath
 
Three rotational invariant variants of the 3SOME algorithms
Three rotational invariant variants of the 3SOME algorithmsThree rotational invariant variants of the 3SOME algorithms
Three rotational invariant variants of the 3SOME algorithms
 
Daa chapter11
Daa chapter11Daa chapter11
Daa chapter11
 
Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWER
Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWERUndecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWER
Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWER
 
20070823
2007082320070823
20070823
 
Cs345 cl
Cs345 clCs345 cl
Cs345 cl
 
EC8553 Discrete time signal processing
EC8553 Discrete time signal processing EC8553 Discrete time signal processing
EC8553 Discrete time signal processing
 
Tucker tensor analysis of Matern functions in spatial statistics
Tucker tensor analysis of Matern functions in spatial statistics Tucker tensor analysis of Matern functions in spatial statistics
Tucker tensor analysis of Matern functions in spatial statistics
 
Tree distance algorithm
Tree distance algorithmTree distance algorithm
Tree distance algorithm
 
adaptive equa.ppt
adaptive equa.pptadaptive equa.ppt
adaptive equa.ppt
 

Recently uploaded

Pests of castor_Binomics_Identification_Dr.UPR.pdf
Pests of castor_Binomics_Identification_Dr.UPR.pdfPests of castor_Binomics_Identification_Dr.UPR.pdf
Pests of castor_Binomics_Identification_Dr.UPR.pdfPirithiRaju
 
User Guide: Magellan MX™ Weather Station
User Guide: Magellan MX™ Weather StationUser Guide: Magellan MX™ Weather Station
User Guide: Magellan MX™ Weather StationColumbia Weather Systems
 
Davis plaque method.pptx recombinant DNA technology
Davis plaque method.pptx recombinant DNA technologyDavis plaque method.pptx recombinant DNA technology
Davis plaque method.pptx recombinant DNA technologycaarthichand2003
 
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptxSTOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptxMurugaveni B
 
BUMI DAN ANTARIKSA PROJEK IPAS SMK KELAS X.pdf
BUMI DAN ANTARIKSA PROJEK IPAS SMK KELAS X.pdfBUMI DAN ANTARIKSA PROJEK IPAS SMK KELAS X.pdf
BUMI DAN ANTARIKSA PROJEK IPAS SMK KELAS X.pdfWildaNurAmalia2
 
Four Spheres of the Earth Presentation.ppt
Four Spheres of the Earth Presentation.pptFour Spheres of the Earth Presentation.ppt
Four Spheres of the Earth Presentation.pptJoemSTuliba
 
Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024AyushiRastogi48
 
Call Girls in Majnu Ka Tilla Delhi 🔝9711014705🔝 Genuine
Call Girls in Majnu Ka Tilla Delhi 🔝9711014705🔝 GenuineCall Girls in Majnu Ka Tilla Delhi 🔝9711014705🔝 Genuine
Call Girls in Majnu Ka Tilla Delhi 🔝9711014705🔝 Genuinethapagita
 
Citronella presentation SlideShare mani upadhyay
Citronella presentation SlideShare mani upadhyayCitronella presentation SlideShare mani upadhyay
Citronella presentation SlideShare mani upadhyayupadhyaymani499
 
REVISTA DE BIOLOGIA E CIÊNCIAS DA TERRA ISSN 1519-5228 - Artigo_Bioterra_V24_...
REVISTA DE BIOLOGIA E CIÊNCIAS DA TERRA ISSN 1519-5228 - Artigo_Bioterra_V24_...REVISTA DE BIOLOGIA E CIÊNCIAS DA TERRA ISSN 1519-5228 - Artigo_Bioterra_V24_...
REVISTA DE BIOLOGIA E CIÊNCIAS DA TERRA ISSN 1519-5228 - Artigo_Bioterra_V24_...Universidade Federal de Sergipe - UFS
 
Neurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trNeurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trssuser06f238
 
Transposable elements in prokaryotes.ppt
Transposable elements in prokaryotes.pptTransposable elements in prokaryotes.ppt
Transposable elements in prokaryotes.pptArshadWarsi13
 
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
User Guide: Orion™ Weather Station (Columbia Weather Systems)
User Guide: Orion™ Weather Station (Columbia Weather Systems)User Guide: Orion™ Weather Station (Columbia Weather Systems)
User Guide: Orion™ Weather Station (Columbia Weather Systems)Columbia Weather Systems
 
Microphone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxMicrophone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxpriyankatabhane
 
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCRCall Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCRlizamodels9
 
RESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptx
RESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptxRESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptx
RESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptxFarihaAbdulRasheed
 
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptxLIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptxmalonesandreagweneth
 
Pests of jatropha_Bionomics_identification_Dr.UPR.pdf
Pests of jatropha_Bionomics_identification_Dr.UPR.pdfPests of jatropha_Bionomics_identification_Dr.UPR.pdf
Pests of jatropha_Bionomics_identification_Dr.UPR.pdfPirithiRaju
 

Recently uploaded (20)

Pests of castor_Binomics_Identification_Dr.UPR.pdf
Pests of castor_Binomics_Identification_Dr.UPR.pdfPests of castor_Binomics_Identification_Dr.UPR.pdf
Pests of castor_Binomics_Identification_Dr.UPR.pdf
 
User Guide: Magellan MX™ Weather Station
User Guide: Magellan MX™ Weather StationUser Guide: Magellan MX™ Weather Station
User Guide: Magellan MX™ Weather Station
 
Davis plaque method.pptx recombinant DNA technology
Davis plaque method.pptx recombinant DNA technologyDavis plaque method.pptx recombinant DNA technology
Davis plaque method.pptx recombinant DNA technology
 
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptxSTOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
 
BUMI DAN ANTARIKSA PROJEK IPAS SMK KELAS X.pdf
BUMI DAN ANTARIKSA PROJEK IPAS SMK KELAS X.pdfBUMI DAN ANTARIKSA PROJEK IPAS SMK KELAS X.pdf
BUMI DAN ANTARIKSA PROJEK IPAS SMK KELAS X.pdf
 
Four Spheres of the Earth Presentation.ppt
Four Spheres of the Earth Presentation.pptFour Spheres of the Earth Presentation.ppt
Four Spheres of the Earth Presentation.ppt
 
Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024
 
Call Girls in Majnu Ka Tilla Delhi 🔝9711014705🔝 Genuine
Call Girls in Majnu Ka Tilla Delhi 🔝9711014705🔝 GenuineCall Girls in Majnu Ka Tilla Delhi 🔝9711014705🔝 Genuine
Call Girls in Majnu Ka Tilla Delhi 🔝9711014705🔝 Genuine
 
Citronella presentation SlideShare mani upadhyay
Citronella presentation SlideShare mani upadhyayCitronella presentation SlideShare mani upadhyay
Citronella presentation SlideShare mani upadhyay
 
REVISTA DE BIOLOGIA E CIÊNCIAS DA TERRA ISSN 1519-5228 - Artigo_Bioterra_V24_...
REVISTA DE BIOLOGIA E CIÊNCIAS DA TERRA ISSN 1519-5228 - Artigo_Bioterra_V24_...REVISTA DE BIOLOGIA E CIÊNCIAS DA TERRA ISSN 1519-5228 - Artigo_Bioterra_V24_...
REVISTA DE BIOLOGIA E CIÊNCIAS DA TERRA ISSN 1519-5228 - Artigo_Bioterra_V24_...
 
Neurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trNeurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 tr
 
Transposable elements in prokaryotes.ppt
Transposable elements in prokaryotes.pptTransposable elements in prokaryotes.ppt
Transposable elements in prokaryotes.ppt
 
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
 
User Guide: Orion™ Weather Station (Columbia Weather Systems)
User Guide: Orion™ Weather Station (Columbia Weather Systems)User Guide: Orion™ Weather Station (Columbia Weather Systems)
User Guide: Orion™ Weather Station (Columbia Weather Systems)
 
Microphone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxMicrophone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptx
 
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCRCall Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
 
Volatile Oils Pharmacognosy And Phytochemistry -I
Volatile Oils Pharmacognosy And Phytochemistry -IVolatile Oils Pharmacognosy And Phytochemistry -I
Volatile Oils Pharmacognosy And Phytochemistry -I
 
RESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptx
RESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptxRESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptx
RESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptx
 
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptxLIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
 
Pests of jatropha_Bionomics_identification_Dr.UPR.pdf
Pests of jatropha_Bionomics_identification_Dr.UPR.pdfPests of jatropha_Bionomics_identification_Dr.UPR.pdf
Pests of jatropha_Bionomics_identification_Dr.UPR.pdf
 

Helgaun's algorithm for the TSP

  • 1. Carthagène A brief introduction to combinatorial optimization: The Traveling Salesman Problem Simon de GivrySimon de Givry Thales Research & Technology, FranceThales Research & Technology, France (minor modifications by Benny Chor)
  • 2. Find a tour with minimum distance, visiting every city only once Madiera Island (west of Morocco in Atlantic ocean)
  • 3. Distance matrix (miles) Distances Camara Caniço Funchal ... Camara 0 15 7 ... Caniço 15 0 8 ... Funchal 7 8 0 ... ... ... ... ... ...
  • 4. Find an order of all the markers with maximum likelihood A similar task in the genomic domain
  • 5. 2-point distance matrix (Haldane) Distances M1 M2 M3 ... M1 0 14 7 ... M2 14 0 8 ... M3 7 8 0 ... ... ... ... ... ...
  • 6. Link M1 M2 M3 M4 M5 M6 M7 Mdummy 0 0…0… ∀i,j,k distance(i,j) ? distance(i,k) + distance(k,j) =,≤  Multi-point likelihood (with unknowns) ⇔ the distance between two markers depends on the order
  • 7. Traveling Salesman Problem  Complete graph  Positive weight on every edge  Symmetric case: dist(i,j) = dist(j,i)  Triangular inequality: dist(i,j) ≤ dist(i,k) + dist(k,j)  Euclidean distance (assume we got wings)  Find the shortest Hamiltonian cycle
  • 9. Total distance = xxx miles
  • 10. Traveling Salesman Problem  Theoretical interest  Basic NP-complete problem ( not easy)  1993-2001: +150 articles about TSP in INFORMS & Decision Sciences databases  Practical interest  Vehicle Routing Problem  Genetic/Radiated Hybrid Mapping Problem  NCBI/Concorde, Carthagène, ...
  • 11. Variants  Euclidean Traveling Salesman Selection Problem  Asymmetric Traveling Salesman Problem  Symmetric Wandering Salesman Problem  Selective Traveling Salesman Problem  TSP with distances 1 and 2, TSP(1,2)  K-template Traveling Salesman Problem  Circulant Traveling Salesman Problem  On-line Traveling Salesman Problem  Time-dependent TSP  The Angular-Metric Traveling Salesman Problem  Maximum Latency TSP  Minimum Latency Problem  Max TSP  Traveling Preacher Problem  Bipartite TSP  Remote TSP  Precedence-Constrained TSP  Exact TSP  The Tour Cover problem  ...
  • 12. Plan  Introduction to TSP  Building a new tour “from scratch”  Improving an existing tour  Finding the best tour (or almost)
  • 13. Building a new tour from scratch
  • 14.
  • 15. Nearest Neighbor heuristic (greedy, order dependent, some neighbors not so near)
  • 16. A different greedy, multi-fragments heuristic
  • 17. Savings heuristic (Clarke-Wright 1964): Details in http://www.cs.uu.nl/docs/vakken/amc/lecture03-2.pdf
  • 18. Heuristics  Mean distance to the optimum  Savings: 11%  Multi-fragments: 12%  Nearest Neighbor: 26%
  • 19.
  • 21. Which local modification can improve this tour?
  • 22. Remove two edges and rebuild another tour ⇔ Invert a given sequence of markers
  • 23. Remove three edges and rebuild another tour (7 possibilities) ⇒ Swap the order of two sequences of markers
  • 24. “greedy” local search  2-opt  Note: a finite sequence of “2-change” can generate any tour, including the optimum tour  Strategy:  Select the best 2-change among N*(N-1)/2 neighbors (2-move neighborhood)  Repeat this process until a fix point is reached (i.e. no local tour improvement can be made)
  • 25. 2-opt
  • 26. Greedy local search  Mean distance to the optimum  2-opt : 9%  3-opt : 4%  LK (limited k-opt) :1%  Complexity  2-opt : ~N3  3-opt : ~N4  LK (limited k-opt) :~Nk+1
  • 27. Complexity n = number of vertices Algorithm Complexity A-TSP (n-1)! S-TSP (n-1)! / 2 2-change 1 3-change 7 k-change (k-1)! . 2k-1 k-move (k-1)! . 2k-1 . n! / (k! . (n-k)!) ~ O( nk ) k << n In practice: o( n ) 2-opt et 3-opt ~ O( nk+1 ) In practice: o( n1.2 ) time(3-opt) ~ 3 x time(2-opt)
  • 28. For each edge (u,v), maintain the list of vertices w such that dist(w,v) < dist(u,v). Consider only such w for replacing (u,v) by (w,v). u v 2-opt implementation trick:
  • 29. Is this 2-opt tour optimum?
  • 30. 2-opt + vertex reinsertion (removing a city and reinserting it next to one of its 5 nearest neighbors)
  • 32. Local search & « meta-heuristics »  Tabu Search  Select the best neighbor even if it decreases the quality of the current tour  Forbid previous local moves during a certain period of time  List of tabu moves  Restart with new tours  When the search goes to a tour already seen  Build new tours in a random way
  • 33. Tabu Search • Stochastic size of the tabu list • False restarts
  • 34. Experiments with CarthaGène N=50 K=100 Err=30% Abs=30% Legend: partial 2-opt = early stop , guided 2-opt 25% = early stop & sort with X = 25%
  • 36. Other meta-heuristics  Simulated Annealing  Local moves are randomly chosen  Neighbor acceptance depends on its quality Acceptance process is more and more greedy  Genetic Algorithms  Population of solutions (tours)  Mutation, crossover,…  Variable Neighborhood Search  …
  • 37. Simulated Annealing Move from A to A’ accepted if cost(A’) ≤ cost(A) or with probability P(A,A’) = e –(cost(A’) – cost(A))/T
  • 38. Variable Neighborhood Search • Perform a move only if it improves the previous solution • Start with V:=1. If no solution is found then V++ else V:=1
  • 41. Search tree M2M1 M3 M2 M3 M1 M3 M1 M2 M3 M2 M3 M1 M2 M1 M1,M2,M3 depth 1: depth 2: depth 3: leaves node branch root = choice point = alternative = solutions
  • 42. Tree search  Complexity : n!/2 different orders  Avoid symmetric orders (first half of the tree)  Can use heuristics in choice points to order possible alternatives  Branch and bound algorithm  Cut all the branches which cannot lead to a better solution  Possible to combine local search and tree search
  • 43. Lower bound to TSP: Minimum weight spanning tree Prim algorithm (1957) Held & Karp algorithm (modified spanning trees) (1971) MST ≤ TSP
  • 44. Christofides approximation algorithm (1976): Start with MST. Find shortcircuits, and rearrange => A(I) / OPT(I) ≤ 3/2 (requires triangular inequalities)
  • 45. Exact methods, some benchmarks  1954 : 49 cities  1971 : 64 cities  1975 : 100 cities  1977 : 120 cities  1980 : 318 cities  1987 : 2,392 cities  1994 : 7,397 cities  1998 : 13,509 cities  2001 : 15,112 cities (585936700 sec. ≈ 19 years of CPU!)

Editor's Notes

  1. Savings : un sommet e1 est choisi comme le hub et on cree n-1 tours élémentaires e1-ei -e1. On fusionne (met bout a bout) en N-2 etapes deux sous tours e1-ei1-eik-e1 et e1-ej1-ejl-e1 en e1-ei1-eik-ej1-ejl-e1 tel que d(eik,1) + d(1,ej1) - d(eik,ej1) soit maximum