traveling salesman problem
DESCRIPTION
Traveling Salesman Problem. By Susan Ott for 252. Overview of Presentation. Brief review of TSP Examples of simple Heuristics Better than Brute Force Algorithm. Traveling Salesman Problem. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/1.jpg)
Traveling Salesman Problem
By Susan Ott for 252
![Page 2: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/2.jpg)
Overview of Presentation
• Brief review of TSP
• Examples of simple Heuristics
• Better than Brute Force Algorithm
![Page 3: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/3.jpg)
Traveling Salesman Problem
• Given a complete, weighted graph on n nodes, find the least weight Hamiltonian cycle, a cycle that visits every node once.
• Though this problem is easy enough to explain, it is very difficult to solve.
• Finding all the Hamiltonian cycles of a graph takes exponential time. Therefore, TSP is in the class NP.
![Page 4: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/4.jpg)
If the TSP is so hard, why bother?
The TSP is interesting because it is in the class that is called NP-complete. If the TSP is found to have an algorithm that does not take exponential time, the other problems that are NP-complete will also be solved, and vice-a-versa.
![Page 5: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/5.jpg)
If the TSP is so hard, why bother?
The TSP has quite a history.-In the Odyssey by Homer, Ulysses has to travel to 16 cities. 653,837,184,000 distinctroutes are possible.-One of the first TSP papers was published in the 1920s.
![Page 6: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/6.jpg)
In 1962 a TSP contest was held.
![Page 7: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/7.jpg)
If the TSP is so hard, why bother?
The TSP has many practical applications-manufacturing-plane routing-telephone routing-networks-traveling salespeople-structure of crystals
![Page 8: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/8.jpg)
Is there any hopefor getting reasonablesolutions for the TSP?
![Page 9: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/9.jpg)
What are Heuristics?
“Algorithms that construct feasible solutions, and thus
upper bounds for the optimal value.”, Hoffman and Padberg
![Page 10: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/10.jpg)
Insertion Heuristics
• Cheapest• Farthest
Insertion Heuristics start with a tour ona small set of nodes, and then increase the
tour by inserting the remaining nodes one at atime until there are n nodes in the tour
![Page 11: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/11.jpg)
Cheapest and Farthest Insertion Heuristic
• The verticies given
![Page 12: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/12.jpg)
The Starting Tour isthe Tour that Follows the
Convex Hull
![Page 13: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/13.jpg)
Cheapest Farthest
![Page 14: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/14.jpg)
Cheapest Farthest
![Page 15: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/15.jpg)
Cheapest Farthest
![Page 16: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/16.jpg)
Cheapest Farthest
![Page 17: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/17.jpg)
Cheapest Farthest
![Page 18: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/18.jpg)
Cheapest Farthest
The optimal tour is achieved in both cases!
![Page 19: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/19.jpg)
One of the good attributes of these 2 heuristics is that theyavoid the possibility of edge-crossing. The crossing of edgesguarantees that the solution isnot optimal.
There exists an algorithm that removes all the edge-crossings in at most n^3 time.
![Page 20: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/20.jpg)
While good solutions may beobtained using heuristics, it isdifficult to prove if those solutions are optimal.
Perhaps there is a way that issmarter than brute force that gives the optimal solution.
![Page 21: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/21.jpg)
Branch-and-Bound Algorithm
T(k) = a tour on k citiesSearch(k,T(k-1))
if k=nrecord the tour detailsthe bound B=length of the tour
elseFind the k-1 possibilities of addingk to all of the possible places in thetour
For every tour where the tour length isless then B, Search(k+1,T(k))
![Page 22: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/22.jpg)
In 1993 Bixby, Applegate,Chvatal, and Cook found asolution for 3,038 cities usingthe Branch-and-Bound technique,a world record at the time!The computations were done on 50 SGI workstations, and tooka year and a half.
![Page 23: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/23.jpg)
6 Cities using Branch-and-Bound
Boston
New OrleansSanta Fe
DenverSeattle
San Diego
![Page 24: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/24.jpg)
Here is a pretty good tour we could use for our bound.
Boston
New OrleansSanta Fe
DenverSeattle
San Diego
![Page 25: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/25.jpg)
This Tour has a length of 8,972 miles.We assign this value to the bound B.
Boston
New OrleansSanta Fe
DenverSeattle
San Diego
![Page 26: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/26.jpg)
Start of with your first 3 cities. The tour length here is 6,063 miles. Ok so far!
Boston
DenverSan Diego
Bound B=8,972 miles
![Page 27: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/27.jpg)
Now we try out the 3 different ways to add New Orleans to the tour.
Boston
DenverSan Diego
Bound B=8,972 miles
New Orleans
![Page 28: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/28.jpg)
Trial 1: 8,113.6 miles. Less then or equal to the bound, so we will not terminate it.
Boston
DenverSan Diego
Bound B=8,972 miles
New Orleans
![Page 29: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/29.jpg)
Trial 2: 6,308.2 miles. Less then or equal to the bound, so we will not terminate it.
Boston
DenverSan Diego
Bound B=8,972 miles
New Orleans
![Page 30: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/30.jpg)
Trial 3: 6,921.6 miles. Less then or equal to the bound, so we will not terminate it.
Boston
DenverSan Diego
Bound B=8,972 miles
New Orleans
![Page 31: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/31.jpg)
Now adding Seattle, modify Trial 1.
Boston
DenverSan Diego
Bound B=8,972 miles
New Orleans
Seattle
![Page 32: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/32.jpg)
Trial 1a: 10,776.4 miles, over the bound so we will not pursue it.
Boston
DenverSan Diego
Bound B=8,972 miles
New Orleans
Seattle
![Page 33: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/33.jpg)
Trial 1b has a tour length of 10,200.6 miles, more then the bound.
Boston
DenverSan Diego
Bound B=8,972 miles
New Orleans
Seattle
![Page 34: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/34.jpg)
Trial 1c has a tour length of 9,401.3 miles, more than the bound.
Boston
DenverSan Diego
Bound B=8,972 miles
New Orleans
Seattle
![Page 35: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/35.jpg)
Trial 1d has a tour length of 10,518.5 miles, more than the bound again.
Boston
DenverSan Diego
Bound B=8,972 miles
New Orleans
Seattle
![Page 36: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/36.jpg)
Since all of these branches off of trial one are already more than the bound, we will not pursue them since adding
another city will only increase the tour length!
Now lets see what happens in trial 2.
![Page 37: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/37.jpg)
Trial 2a:7,888.2 miles. Less then the bound!
Boston
DenverSan Diego
Bound B=8,972 miles
New Orleans
Seattle
![Page 38: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/38.jpg)
Trial 2b: 8,467 miles. Less than the bound.
Boston
DenverSan Diego
Bound B=8,972 miles
New Orleans
Seattle
![Page 39: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/39.jpg)
Trial 2c:10,556.1 miles. More than the bound. Consider it
terminated.
Boston
DenverSan Diego
Bound B=8,972 miles
New Orleans
Seattle
![Page 40: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/40.jpg)
Trial 2d: 8,785.1 miles, and under the bound.
Boston
DenverSan Diego
Bound B=8,972 miles
New Orleans
Seattle
![Page 41: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/41.jpg)
So from trial 2 we will move on with 2a, 2b, and 2d.
First, though, lets check out 3a, 3b, 3c, and 3d.
![Page 42: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/42.jpg)
Trial 3a: 8,429.6 miles. Less then the bound!
Boston
DenverSan Diego
Bound B=8,972 miles
New Orleans
Seattle
![Page 43: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/43.jpg)
Trial 3b: 8,209.3 miles. Less then the bound!
Boston
DenverSan Diego
Bound B=8,972 miles
New Orleans
Seattle
![Page 44: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/44.jpg)
Trial 3c: 11,097.5 miles. More than the bound!
Boston
DenverSan Diego
Bound B=8,972 miles
New Orleans
Seattle
![Page 45: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/45.jpg)
Trial 3d: 9,584 miles. More than the bound!
Boston
DenverSan Diego
Bound B=8,972 miles
New Orleans
Seattle
![Page 46: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/46.jpg)
Now we have 2a, 2b,2d, 3a, and 3b left as
tours less than the bound.
I could draw a map for all of these,but instead I will just give the
values of their tours.
![Page 47: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/47.jpg)
2a (7,888.2) -> 8415.1 8972.4 *8106.6* 9727 8504.2
2b (8,467.2)2d (8,785.1) 3a (8,429.6)3b (8,209.3)since 2a gave a full tour of length 8,106.6 miles,and this tour is less than 2b, 2d, 3a, and 3b weknow that 8,106.6 miles is the answer, and we need not look at the results that 2b, 2d, 3a, and 3b give.
![Page 48: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/48.jpg)
The optimal solution! Tour length =8,106.6, a
branch off of tour 1b.
Boston
New OrleansSanta Fe
DenverSeattle
San Diego
![Page 49: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/49.jpg)
The green nodesare the tours
that are less thanthe bound. The rednodes are the tours
that exceed the bound
![Page 50: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/50.jpg)
The same researchers went onto find the optimal path for 13,509
cities in 1998!
![Page 51: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/51.jpg)
Summary
-The TSP is in the class NP
-The TSP has good applications
-There are good ways of approximating solutions for TSP
-There are smarter ways of solving the TSP than brute-force
![Page 52: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/52.jpg)
Contribution
-Web Research-Branch and Bound Experiment
on the 6 cities-Understanding Branch and Bound
![Page 53: Traveling Salesman Problem](https://reader035.vdocument.in/reader035/viewer/2022062322/568146a6550346895db3c214/html5/thumbnails/53.jpg)
References
http://iris.gmu.edu/~khoffman/papers/trav_salesman.html
http://www.densis.fee.unicamp.br/~moscato/TSPBIB_home.html
http://riceinfo.rice.edu/projects/reno/m/19980625/tsp.html
http://www.pcug.org.au/dakin/tspbb.htm
The Traveling Salesman Problem Edited by Lawler, Lenstra, Rinnoy Kan, Shmoys