The Traveling Salesman Problem - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

The Traveling Salesman Problem

Description:

For example, the optimal tour of 33,810 points on a circuit ... do not guarantee anything, but are likely to produce a reasonable solution. Greedy algorithms ... – PowerPoint PPT presentation

Number of Views:120
Avg rating:3.0/5.0
Slides: 16
Provided by: VasileiosH9
Category:

less

Transcript and Presenter's Notes

Title: The Traveling Salesman Problem


1
The Traveling Salesman Problem
  • Vasileios Hatzivassiloglou
  • University of Texas at Dallas

2
Review questions
  • Solve the red baron and bishop extensions to the
    bridges of Krönisberg problem.
  • For which values of n does the cycle Cn have an
    Euler circuit? What about the wheel Wn (with n1
    total vertices)?
  • Find an Euler circuit (or show that none exists)
    in the graph of exercise 9.5-35 (page 645).

3
Quiz 2 and Final exam
  • Quiz 2 Wednesday, December 2, 7pm
  • Final Monday, December 14, 7pm
  • Duration 2 hours
  • Focus on topics covered after our midterm, i.e.,
    from (and including) generating functions and
    later
  • You can bring a two-sided reference sheet

4
Hamilton circuits and paths
  • A Hamilton circuit (path) is a simple circuit
    (path) that contains all vertices and passes
    through each vertex of the graph exactly once.
  • How can we tell if a graph has a Hamilton circuit
    or path?
  • Not easily, i.e., in general, in not less than
    exponential time in the number of vertices
  • There are some tests that can exclude or include
    graphs based on density of edges.

5
Number of Hamilton paths
  • Consider the complete graph Kn with n gt 2. How
    many Hamilton circuits are there?
  • Select any vertex as the start vertex (because
    all vertices will belong to the circuit the
    choice doesnt matter). From this vertex we can
    choose n-1 successor vertices, from each of them
    n-2 vertices, and so on, for a total of (n-1)!
    circuits. Because direction doesnt matter, the
    distinct circuits are (n-1)!/2.

6
Weighted graphs
  • A weighted graph is a graph where numbers
    (weights or costs) have been attached to each
    edge.
  • Example In a graph for flight connections,
    weights could represent time needed for each
    flight, distance traveled, or cost of traveling
    on that flight. In a computer network, costs
    could represent the delay for a message to travel
    through a link.

7
Path length
  • In a graph without weights, we define the length
    of a path as the number of edges in it.
  • In a weighted graph, the path length is a
    function of the weights of the edges in the path,
    usually the sum of those weights.

8
The Traveling Salesman problem
  • A traveling salesman needs to visit n cities,
    going to each city exactly once, and return to
    his starting city. Assume every city is connected
    to every other city, but the cost of traveling
    differs for each city pair. What is the sequence
    of cities that minimizes the overall cost?
  • Equivalent formulation Find the Hamilton circuit
    in Kn with shortest length.

9
Solving the TSP
  • No algorithm is known that will guarantee finding
    the best solution except by examining all
    possible circuits (or equivalent approaches).
  • For n 25, (n 1)! / 2 24! / 2 3 1023. If
    we take one nanosecond to calculate the cost of
    each circuit, we still need 3 1014 seconds, or
    about 10 million years.
  • The problem is provably NP-complete.

10
TSP Problems
  • Planning routes
  • 980 cities in Luxembourg
  • 24,978 cities in Sweden (solved May 2004)
  • 1,904,711 cities in the world
  • Drilling printed circuit boards
  • cost of moving the drill and possibly changing
    drills because of different hole sizes
  • Genome sequencing
  • edges represent likelihood that a fragment of DNA
    follows another fragment

11
Example tour on circuit board
3,038 points to visit
12
Exact methods for TSP
  • We can find exact solutions with techniques that
    remember previous partial results and re-use them
    rather than redoing the work. Techniques from
    linear programming are applicable here.
  • For example, the optimal tour of 33,810 points on
    a circuit board was found in 2005 using multiple
    computers and a total of only 15.7 CPU-years.

13
Approximate solutions
  • Reasonably fast algorithms that
  • guarantee an error bound, i.e., a solution with
    cost at most c times of the original cost
  • We can achieve c 1.5 if the costs obey the
    triangle inequality, i.e.,
  • guarantee an error bound with certain
    probability, typically 97-98
  • Based on random walks and Markov chains
  • do not guarantee anything, but are likely to
    produce a reasonable solution
  • Greedy algorithms

d(A, C) d(A, B) d(B, C)
14
Shortest paths
  • Can we find the shortest path between two
    vertices without examining all possible paths?
  • It is possible to achieve this efficiently if the
    weights obey certain constraints, for example,
    non-negative weights.
  • Many applications
  • scheduling
  • pathfinding in gaming

15
Reading
  • Section 9.5 (from Hamilton Paths and Circuits
    to Example 7)
  • Section 9.6 (Introduction and from The
    Traveling Salesman Problem to the end of the
    section)
Write a Comment
User Comments (0)
About PowerShow.com