The Traveling Salesperson Problem - PowerPoint PPT Presentation

About This Presentation
Title:

The Traveling Salesperson Problem

Description:

The Traveling Salesperson Problem Algorithms and Networks A&N: TSP * Problem Instance: n vertices (cities), distance between every pair of vertices Question: Find ... – PowerPoint PPT presentation

Number of Views:76
Avg rating:3.0/5.0
Slides: 9
Provided by: HansB155
Category:

less

Transcript and Presenter's Notes

Title: The Traveling Salesperson Problem


1
The Traveling Salesperson Problem
  • Algorithms and Networks

2
Problem
  • Instance n vertices (cities), distance between
    every pair of vertices
  • Question Find shortest (simple) cycle that
    visits every city

4
4
1
2
1
2
3
3
2
5
2
5
2
2
3
4
2
3
4
2
11
3
Assumptions
  • Lengths are non-negative (or positive)
  • Symmetric w(u,v) w(v,u)
  • Not always painting machine application
  • Triangle inequality for all x, y, z
  • w(x,y) w(y,z) ³ w(x,z)
  • Always valid?

4
Construction heuristicNearest neighbor
  • Start at some vertex s vs
  • While not all vertices visited
  • Select closest unvisited neighbor w of v
  • Go from v to w
  • vw
  • Go from v to s.

Can have performance ratio O(log n)
5
Closest insertion heuristic
  • Build tour by starting with one vertex, and
    inserting vertices one by one.
  • Always insert vertex that is closest to a vertex
    already in tour.

6
  • A dynamic programming algorithm

7
Held-Karp algorithm for TSP
  • O(n22n) algorithm for TSP
  • Uses Dynamic programming
  • Take some starting vertex s
  • For set of vertices R (s Î R), vertex w Î R, let
  • B(R,w) minimum length of a path, that
  • Starts in s
  • Visits all vertices in R (and no other vertices)
  • Ends in w

8
TSP Recursive formulation
  • B(s,s) 0
  • If S gt 1, then
  • B(S,w) minv Î S xB(S-x, v) w(v,x)
  • If we have all B(V,v) then we can solve TSP.
  • Gives requested algorithm using DP-techniques.
Write a Comment
User Comments (0)
About PowerShow.com