Beruflich Dokumente
Kultur Dokumente
D.Moshkovitz Complexity
D.Moshkovitz Complexity
D.Moshkovitz Complexity
Introduction
Objectives: To explore the Traveling Salesman Problem. Overview:
TSP: Formal definition & Examples TSP is NP-hard Approximation algorithm for special cases Inapproximability result
D.Moshkovitz Complexity
TSP
Instance: a complete weighted undirected graph G=(V,E) (all weights are non-negative). Problem: to find a Hamiltonian cycle of minimal cost.
3 2
3
5
10
D.Moshkovitz Complexity
D.Moshkovitz Complexity
12
5
3
D.Moshkovitz Complexity
12
5
3
D.Moshkovitz Complexity
TSP is NP-hard
The corresponding decision problem: Instance: a complete weighted undirected graph G=(V,E) and a number k. Problem: to find a Hamiltonian cycle whose cost is at most k.
D.Moshkovitz Complexity
TSP is NP-hard
Theorem: HAM-CYCLE p TSP. Proof: By the straightforward efficient reduction illustrated below:
1 verify!
1 2 1
1 2
k=|V|
HAM-CYCLE
D.Moshkovitz Complexity
TSP
10
What Next?
Well show an approximation algorithm for TSP, with approximation factor 2 for cost functions that satisfy a certain property.
D.Moshkovitz Complexity
11
D.Moshkovitz Complexity
12
COR(B) 525-527
Approximation Algorithm
1. Grow a Minimum Spanning Tree (MST) for G. 2. Return the cycle resulting from a preorder walk on that tree.
D.Moshkovitz Complexity
13
D.Moshkovitz Complexity
14
D.Moshkovitz Complexity
15
D.Moshkovitz Complexity
16
MST
D.Moshkovitz Complexity
17
COR(B) 528
D.Moshkovitz Complexity
18
gap-TSP[]
Instance: a complete weighted undirected graph G=(V,E). Problem: to distinguish between the following two cases:
There exists a Hamiltonian cycle, whose cost is at most |V|. The cost of every Hamiltonian cycle is more than |V|.
D.Moshkovitz Complexity
19
Instances
1 1 1
|V| 0 +1
D.Moshkovitz Complexity
20
NO!
min cost
gap
21
D.Moshkovitz Complexity
D.Moshkovitz Complexity
22
gap-TSP is NP-hard
Theorem: For any constant 1, HAM-CYCLE p gap-TSP[]. Proof Idea: Edges from G cost 1. Other edges cost much more.
D.Moshkovitz Complexity
23
|V|+1
1 HAM-CYCLE gap-TSP
24
D.Moshkovitz Complexity
Summary
Weve studied the Traveling Salesman Problem (TSP). Weve seen it is NP-hard. Nevertheless, when the cost function satisfies the triangle inequality, there exists an approximation algorithm with ratio-bound 2.
D.Moshkovitz Complexity
26
Summary
For the general case weve proven there is probably no efficient approximation algorithm for TSP. Moreover, weve demonstrated a generic method for showing approximation problems are NP-hard.
D.Moshkovitz Complexity
27