the traveling salesman problem over seventy years of research, and a million in cash presented by...

19
The Traveling Salesman Problem Over Seventy Years of Research, and a Million in Cash Presented by Vladimir Coxall

Upload: hollie-mcgee

Post on 04-Jan-2016

224 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: The Traveling Salesman Problem Over Seventy Years of Research, and a Million in Cash Presented by Vladimir Coxall

The Traveling Salesman Problem

Over Seventy Years of Research, and a Million in Cash

Presented by Vladimir Coxall

Page 2: The Traveling Salesman Problem Over Seventy Years of Research, and a Million in Cash Presented by Vladimir Coxall

Formulation

The Traveling Salesman Problem is a deceptively simple combinatorial problem:

“Given a set of cities and the distances between them, how can a salesman visit them minimizing the distance traveled?”

In terms of graph theory, it means finding the shortest Hamiltonian cycle of a graph G.

Page 3: The Traveling Salesman Problem Over Seventy Years of Research, and a Million in Cash Presented by Vladimir Coxall

History of the TSP

The general form of TSP problem was considered by mathematicians in the 1930's

During 1950's and 1960's it gained popularity in scientific circles

Researchers from RAND Corporation create a method to optimally solve TSP for 49 cities

In 1972, Karp proves that TSP is NP complete

Page 4: The Traveling Salesman Problem Over Seventy Years of Research, and a Million in Cash Presented by Vladimir Coxall

Applications

Transportation School Bus Routes Traveling Salesman

Technology Microchip Manufacturing Network Engineering

Biological Genome Sequencing

Page 5: The Traveling Salesman Problem Over Seventy Years of Research, and a Million in Cash Presented by Vladimir Coxall

Finding a Solution

Given a problem that has such wide reaching applications, how can we come up with an optimal solution?

Recall that Karp proved that the Traveling Salesman Problem is NP Complete...

Page 6: The Traveling Salesman Problem Over Seventy Years of Research, and a Million in Cash Presented by Vladimir Coxall

NP Complete

A problem C is NP Complete if C is in NP and also NP Hard

NP ~ Verifying “yes” answers in polynomial time If the TSP can be solved in polynomial time, so

can all NP problems! Furthermore, this would mean P = NP

Page 7: The Traveling Salesman Problem Over Seventy Years of Research, and a Million in Cash Presented by Vladimir Coxall

Finding a Solution

There are a few general methods for finding solutions for the TSP:

Brute ForceDynamic ProgrammingApproximation

Page 8: The Traveling Salesman Problem Over Seventy Years of Research, and a Million in Cash Presented by Vladimir Coxall

Brute Force

Seems to be the obvious solution Computationally expensive - turns out to be

O(n!) For n total cities, start from any city, there are

n-1 choices for a second city, n-2 choices for a third...

As a point of reference, 20! = 2.43290201 × 1018

Page 9: The Traveling Salesman Problem Over Seventy Years of Research, and a Million in Cash Presented by Vladimir Coxall

Dynamic Programming

Here's the subproblem: Let S be a subset of the cities containing 1

and at least one other city, and let j be a city in S other than one. Define C(S; j) to be the shortest path that starts from 1, visits all nodes in S, and ends up in j

Page 10: The Traveling Salesman Problem Over Seventy Years of Research, and a Million in Cash Presented by Vladimir Coxall

Dynamic Programming

for all j do C({1,j}, j) := d1j

for s := 3 to n do (the size of the subsets considered this round) for all subsets S of {1,…,n} of size n and containing

1 do for all j S; j ∈ ≠ 1 do {C(S,j) := min

i≠ j,i S∈ [C(S - { j }, i)+ dij]}

opt:= minj≠1

[C({1, 2, … , n} , j)+ d1j.

O(n2) (Exponential but better than brute force)

Page 11: The Traveling Salesman Problem Over Seventy Years of Research, and a Million in Cash Presented by Vladimir Coxall

Approximation

An approximation ratio (APR) is a measure of how costly an approximation of the solution is compared to the optimal solution in polynomial time

Two TSP approximation methods are: Nearest Neighbor (Greedy) 2 Approximation

Page 12: The Traveling Salesman Problem Over Seventy Years of Research, and a Million in Cash Presented by Vladimir Coxall

Nearest Neighbor

Choose the next unvisited city that is closest (simple)

On average, has an APR of 1.25 There exist graphs for which NN yields the

worst route (Gutin, Yeo, and Zverovich, 2002) - both in for G symmetric and asymmetric (Gutin and Yeo, 2007)

Page 13: The Traveling Salesman Problem Over Seventy Years of Research, and a Million in Cash Presented by Vladimir Coxall

2-Approximation

2-Approximation works for Metric TSPs A TSP problem is metric if:

For any two vertices, d(u,v) = d(v,u) The triangle inequality holds for all triples

of vertices

d(u,w) ≤ d(u,v) + d(v,w)

Page 14: The Traveling Salesman Problem Over Seventy Years of Research, and a Million in Cash Presented by Vladimir Coxall

2-Approximation

2-MST algorithm:

Find the minimum spanning tree MST(G) Take MST(G) twice: T = 2 * MST(G) The graph T is Eulerian - we can traverse it

visiting each edge exactly once Make shortcuts

APR of 2-MST is at most 2

Page 15: The Traveling Salesman Problem Over Seventy Years of Research, and a Million in Cash Presented by Vladimir Coxall

Find the MST and double it!

Page 16: The Traveling Salesman Problem Over Seventy Years of Research, and a Million in Cash Presented by Vladimir Coxall

Find shortcuts

Page 17: The Traveling Salesman Problem Over Seventy Years of Research, and a Million in Cash Presented by Vladimir Coxall

Example

Page 18: The Traveling Salesman Problem Over Seventy Years of Research, and a Million in Cash Presented by Vladimir Coxall

Summary

The TSP is a graph theory minimization problem

The complexity of the problem (NP Complete) makes it difficult to solve optimally

Numerous methods for approximation Solving TSP optimally sheds light on other

problems (P=NP) Optimal solution carries a prize of $1 Million

(Millennium Prize)

Page 19: The Traveling Salesman Problem Over Seventy Years of Research, and a Million in Cash Presented by Vladimir Coxall

References• http://members.pcug.org.au/~dakin/tsp.htm

• www.cs.biu.ac.il/~davidon1/Spring2008/89322/files/Tirgul3.ppt

• www.cs.gsu.edu/~cscazz/CS4520/ps15.ppt

• www.lsi.upc.edu/~mjserna/docencia/algofib/P07/dynprog.pdf

• www.cs.berkeley.edu/~vazirani/s99cs170/notes/dynamic3.pdf

• http://en.wikipedia.org/wiki/Travelling_salesman_problem