traveling salesman problem (tsp)

15
Traveling Salesman Problem (TSP) Chris Seto Andrea Smith

Upload: ronat

Post on 24-Feb-2016

48 views

Category:

Documents


2 download

DESCRIPTION

Traveling Salesman Problem (TSP). Chris Seto Andrea Smith. Problem description. Given a list of a cities and distance between each pair of cities, what is the shortest possible route that visits each? NP-hard problem Problem usually modeled as an undirected graph - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Traveling Salesman Problem (TSP)

Traveling Salesman Problem (TSP)Chris SetoAndrea Smith

Page 2: Traveling Salesman Problem (TSP)

Problem description Given a list of a cities and distance

between each pair of cities, what is the shortest possible route that visits each?

NP-hard problem Problem usually modeled as an

undirected graph Produces a Hamiltonian Cycle

Page 3: Traveling Salesman Problem (TSP)

History Studies started in the 1800s by Sir William

Hamilton and Thomas Kirkman of related problems

Icosian game invented in 1857 TSP first studied in 1930s by Karl Menger,

Hassler Whitney, and Merrill Flood Solutions appeared in papers in mid-1950s Determined to be NP-hard in 1972 by

Richard M. Karp

Page 4: Traveling Salesman Problem (TSP)

Application: Pick And Place Printed circuit board (PCB) with locations

where chips must be placed by robot The faster the robot can place all

components, the faster the PCB will be assembled

The faster the PCB can be assembled, the more PCBs can be made in the same amount of time

Page 5: Traveling Salesman Problem (TSP)

Application: Logistics Warehouse with many parts in various

locations Order is received for several parts which

must be picked by robot or employee What path should the picker follow to

ensure that they fill the order in smallest amount of time?

Any number of TSP solutions can be applied and compared in parallel

Page 6: Traveling Salesman Problem (TSP)

Application: UPS ORION Route optimization used by UPS Implementation started in 2008 Saves ~35 million miles per year Increased projected annual savings

Page 7: Traveling Salesman Problem (TSP)

NP Hard Solution Methods Devise an algorithm for an exact

solution, even though it may only work efficiently for a small problem

Devise “Suboptimal” heuristic algorithms to yield good, but inexact solutions.

Find special cases for the problem for which better or exact heuristics are developed.

Page 8: Traveling Salesman Problem (TSP)

Possible ApproachesBrute-force Method

Best for small number of nodesGreedy Algorithm

Simplest algorithm for larger number of nodes

Genetic Algorithm Generates “close to optimal” solutions

Page 9: Traveling Salesman Problem (TSP)

Approach: Brute Force• Best for small number of nodes• Number of Hamiltonian Circuits = (n-1)!• Guaranteed an Optimal Solution• Complexity: ((n-1)!)• Tries all possible permutations and

compares costNode Count Approximate Completion Time

20 2 Minutes25 20 Years30 284 Million Years

Page 10: Traveling Salesman Problem (TSP)

Brute Force Demo

Page 11: Traveling Salesman Problem (TSP)

Approach: Greedy• Prim’s Algorithm, Kruskal’s Algorithm• Not guaranteed the optimal solution• “Close enough” solution• Prim’s Complexity: O()• Kruskal’s Complexity: O()

Page 12: Traveling Salesman Problem (TSP)

Approach: Genetic Algorithm New approach which uses natural

selection to create close to optimal solutions

Hamiltonian cycles are continually “bred” with mutations

Crossover occurs between solutions Relatively quickly produces a solution

which is probably close to optimal

Page 13: Traveling Salesman Problem (TSP)

Conclusion Studies originally began 1800s, again in

1950s Optimal solution found in ((n-1)!) time Close enough solution found in O() Used by…

UPS in ORION system Pick and place Many other graph representable systems

Page 14: Traveling Salesman Problem (TSP)

Questions?