Traveling Salesman Problem By Susan Ott for 252. Overview of Presentation Brief review of TSP Examples of simple Heuristics Better than Brute Force Algorithm.

Slides:



Advertisements
Similar presentations
Great Theoretical Ideas in Computer Science
Advertisements

Great Theoretical Ideas in Computer Science for Some.
Lecture 24 Coping with NPC and Unsolvable problems. When a problem is unsolvable, that's generally very bad news: it means there is no general algorithm.
Reducibility Class of problems A can be reduced to the class of problems B Take any instance of problem A Show how you can construct an instance of problem.
AMDM UNIT 7: Networks and Graphs
Combinatorial Algorithms
Algorithm Strategies Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Rohit Ray ESE 251. The goal of the Traveling Salesman Problem (TSP) is to find the most economical way to tour of a select number of “cities” with the.
Great Theoretical Ideas in Computer Science.
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
Branch and Bound Searching Strategies
Approximation Algorithms: Combinatorial Approaches Lecture 13: March 2.
Branch and Bound Similar to backtracking in generating a search tree and looking for one or more solutions Different in that the “objective” is constrained.
Approximation Algorithms Lecture for CS 302. What is a NP problem? Given an instance of the problem, V, and a ‘certificate’, C, we can verify V is in.
Great Theoretical Ideas in Computer Science.
Approximation Algorithms
The Theory of NP-Completeness
CSE 326: Data Structures NP Completeness Ben Lerner Summer 2007.
1 Branch and Bound Searching Strategies 2 Branch-and-bound strategy 2 mechanisms: A mechanism to generate branches A mechanism to generate a bound so.
Ch 13 – Backtracking + Branch-and-Bound
Backtracking.
The Travelling Salesman Problem (TSP)
Programming & Data Structures
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
The Traveling Salesperson Problem Algorithms and Networks.
EECS 203: It’s the end of the class and I feel fine. Graphs.
Scott Perryman Jordan Williams.  NP-completeness is a class of unsolved decision problems in Computer Science.  A decision problem is a YES or NO answer.
CS 312: Algorithm Design & Analysis Lecture #34: Branch and Bound Design Options for Solving the TSP: Tight Bounds This work is licensed under a Creative.
University of Texas at Arlington Srikanth Vadada Kishan Kumar B P Fall CSE 5311 Solving Travelling Salesman Problem for Metric Graphs using MST.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 6 The Mathematics of Touring 6.1Hamilton Paths and Hamilton Circuits.
Graph Theory Topics to be covered:
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
MCS 312: NP Completeness and Approximation algorithms Instructor Neelima Gupta
Advanced Algorithm Design and Analysis (Lecture 13) SW5 fall 2004 Simonas Šaltenis E1-215b
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 8: Complexity Theory.
Combinatorial Optimization Chapter 1. Problems and Algorithms  1.1 Two Problems (representative problems)  The Traveling Salesman Problem 47 drilling.
6.1 Hamilton Circuits and Paths: Hamilton Circuits and Paths: Hamilton Path: Travels to each vertex once and only once… Hamilton Path: Travels to each.
Cliff Shaffer Computer Science Computational Complexity.
The Traveling Salesman Problem Over Seventy Years of Research, and a Million in Cash Presented by Vladimir Coxall.
Thursday, May 9 Heuristic Search: methods for solving difficult optimization problems Handouts: Lecture Notes See the introduction to the paper.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
Erdal Kose CC30.10 These slides are based of Prof. N. Yanofsky Lecture notes.
1 Branch and Bound Searching Strategies Updated: 12/27/2010.
Lecture 6 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
EXCURSIONS IN MODERN MATHEMATICS SIXTH EDITION Peter Tannenbaum 1.
Types of Algorithms. 2 Algorithm classification Algorithms that use a similar problem-solving approach can be grouped together We’ll talk about a classification.
CIRCUITS, PATHS, AND SCHEDULES Euler and Königsberg.
Graphs and MSTs Sections 1.4 and 9.1. Partial-Order Relations Everybody is not related to everybody. Examples? Direct road connections between locations.
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
Lecture 25 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
David Luebke 1 2/18/2016 CS 332: Algorithms NP Completeness Continued: Reductions.
CSC 413/513: Intro to Algorithms
Branch and Bound Searching Strategies
Management Science 461 Lecture 7 – Routing (TSP) October 28, 2008.
1 Euler and Hamilton paths Jorge A. Cobb The University of Texas at Dallas.
Mathematical modeling To describe or represent a real-world situation quantitatively, in mathematical language.
Traveling Salesman Problem DongChul Kim HwangRyol Ryu.
More NP-Complete and NP-hard Problems
Routing Through Networks - 1
School of Computing Clemson University Fall, 2012
Week 11 - Monday CS221.
Great Theoretical Ideas in Computer Science
1 The Travelling Salesman Problem (TSP) H.P. Williams Professor of Operational Research London School of Economics.
Discrete Mathematics for Computer Science
Route Optimization Problems and Google Maps
Heuristic Algorithms via VBA
Backtracking and Branch-and-Bound
Heuristic Algorithms via VBA
Heuristic Algorithms via VBA
Approximation Algorithms
Presentation transcript:

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 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.

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.

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 distinct routes are possible. -One of the first TSP papers was published in the 1920s.

In 1962 a TSP contest was held.

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

Is there any hope for getting reasonable solutions for the TSP?

What are Heuristics? “Algorithms that construct feasible solutions, and thus upper bounds for the optimal value.”, Hoffman and Padberg

Insertion Heuristics Cheapest Farthest Insertion Heuristics start with a tour on a small set of nodes, and then increase the tour by inserting the remaining nodes one at a time until there are n nodes in the tour

Cheapest and Farthest Insertion Heuristic The verticies given

The Starting Tour is the Tour that Follows the Convex Hull

CheapestFarthest

CheapestFarthest

CheapestFarthest

CheapestFarthest

CheapestFarthest

CheapestFarthest The optimal tour is achieved in both cases!

One of the good attributes of these 2 heuristics is that they avoid the possibility of edge- crossing. The crossing of edges guarantees that the solution is not optimal. There exists an algorithm that removes all the edge-crossings in at most n^3 time.

While good solutions may be obtained using heuristics, it is difficult to prove if those solutions are optimal. Perhaps there is a way that is smarter than brute force that gives the optimal solution.

Branch-and-Bound Algorithm T(k) = a tour on k cities Search(k,T(k-1)) if k=n record the tour details the bound B=length of the tour else Find the k-1 possibilities of adding k to all of the possible places in the tour For every tour where the tour length is less then B, Search(k+1,T(k))

In 1993 Bixby, Applegate, Chvatal, and Cook found a solution for 3,038 cities using the Branch-and-Bound technique, a world record at the time! The computations were done on 50 SGI workstations, and took a year and a half.

6 Cities using Branch-and-Bound Boston New Orleans Santa Fe Denver Seattle San Diego

Here is a pretty good tour we could use for our bound. Boston New Orleans Santa Fe Denver Seattle San Diego

This Tour has a length of 8,972 miles. We assign this value to the bound B. Boston New Orleans Santa Fe Denver Seattle San Diego

Start of with your first 3 cities. The tour length here is 6,063 miles. Ok so far! Boston Denver San Diego Bound B=8,972 miles

Now we try out the 3 different ways to add New Orleans to the tour. Boston Denver San Diego Bound B=8,972 miles New Orleans

Trial 1: 8,113.6 miles. Less then or equal to the bound, so we will not terminate it. Boston Denver San Diego Bound B=8,972 miles New Orleans

Trial 2: 6,308.2 miles. Less then or equal to the bound, so we will not terminate it. Boston Denver San Diego Bound B=8,972 miles New Orleans

Trial 3: 6,921.6 miles. Less then or equal to the bound, so we will not terminate it. Boston Denver San Diego Bound B=8,972 miles New Orleans

Now adding Seattle, modify Trial 1. Boston Denver San Diego Bound B=8,972 miles New Orleans Seattle

Trial 1a: 10,776.4 miles, over the bound so we will not pursue it. Boston Denver San Diego Bound B=8,972 miles New Orleans Seattle

Trial 1b has a tour length of 10,200.6 miles, more then the bound. Boston Denver San Diego Bound B=8,972 miles New Orleans Seattle

Trial 1c has a tour length of 9,401.3 miles, more than the bound. Boston Denver San Diego Bound B=8,972 miles New Orleans Seattle

Trial 1d has a tour length of 10,518.5 miles, more than the bound again. Boston Denver San Diego Bound B=8,972 miles New Orleans Seattle

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.

Trial 2a:7,888.2 miles. Less then the bound! Boston Denver San Diego Bound B=8,972 miles New Orleans Seattle

Trial 2b: 8,467 miles. Less than the bound. Boston Denver San Diego Bound B=8,972 miles New Orleans Seattle

Trial 2c:10,556.1 miles. More than the bound. Consider it terminated. Boston Denver San Diego Bound B=8,972 miles New Orleans Seattle

Trial 2d: 8,785.1 miles, and under the bound. Boston Denver San Diego Bound B=8,972 miles New Orleans Seattle

So from trial 2 we will move on with 2a, 2b, and 2d. First, though, lets check out 3a, 3b, 3c, and 3d.

Trial 3a: 8,429.6 miles. Less then the bound! Boston Denver San Diego Bound B=8,972 miles New Orleans Seattle

Trial 3b: 8,209.3 miles. Less then the bound! Boston Denver San Diego Bound B=8,972 miles New Orleans Seattle

Trial 3c: 11,097.5 miles. More than the bound! Boston Denver San Diego Bound B=8,972 miles New Orleans Seattle

Trial 3d: 9,584 miles. More than the bound! Boston Denver San Diego Bound B=8,972 miles New Orleans Seattle

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.

2a (7,888.2) -> *8106.6* b (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 we know that 8,106.6 miles is the answer, and we need not look at the results that 2b, 2d, 3a, and 3b give.

The optimal solution! Tour length =8,106.6, a branch off of tour 1b. Boston New Orleans Santa Fe Denver Seattle San Diego

The green nodes are the tours that are less than the bound. The red nodes are the tours that exceed the bound

The same researchers went on to find the optimal path for 13,509 cities in 1998!

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

Contribution -Web Research -Branch and Bound Experiment on the 6 cities -Understanding Branch and Bound

References The Traveling Salesman Problem Edited by Lawler, Lenstra, Rinnoy Kan, Shmoys