Professional Documents
Culture Documents
The Traveling Salesman Problem
The Traveling Salesman Problem
1
The Mission:
A Tour Around the World
2
The Problem:
Traveling Costs Money
1795$
3
Introduction
Objectives:
4
TSP
1 2 10
3 4
5
5
Polynomial Algorithm for TSP?
6
The Greedy $trategy Fails
10
12 5
2 3
1 0
7
The Greedy $trategy Fails
10
12 5
2 3
1 0
8
TSP as decision problem
The corresponding decision problem:
Instance: a complete weighted undirected graph
G=(V,E) and a number k.
Problem: to find a Hamiltonian path whose cost
is at most k.
9
TSP is NP-hard
verify!
Theorem: HAM-CYCLE p TSP.
Proof: By the straightforward efficient reduction
illustrated below:
0
0 1
0 1 k=0
HAM-CYCLE TSP
10
What Next?
11
The Triangle Inequality
12
Approximation Algorithm
1. Grow a Minimum Spanning Tree (MST)
for G.
2. Return the cycle resulting from a
preorder walk on that tree.
13
abcbhbadefegeda
a d T a d T a d
e e e
b f g b f g b f g
c h c h c h
optimal
T a d a d solution
e e
b f g b f g
c h H c h H*
abchdefga
Theorem 35.2. APPROX_TSP_TOUR is an approximation
algorithm with ratio bound of 2 for TSP with triangular
inequality.
Proof.
c(T ) c( H *)
c( H ) c(W )
c( H ) 2c( H *)
Demonstration and Analysis
C(T) ≤ C(H*)
The cost of a
minimal hamiltonian
cycle the cost of a
MST
16
Demonstration and Analysis
preorder walk is
twice the cost of
the tree
17
Demonstration and Analysis