Upload
others
View
2
Download
0
Embed Size (px)
Citation preview
Approximation Algorithms
Lecture 7
11/23/10
1
2
Euclidean TSP
Given n points with coordinates , find a minimum cost TSP tour visiting all points, where the distance between two points is their Euclidean distance,
Problem: Euclidean TSP.
(x1, y1), . . . , (xn, yn) ∈ Q2
(xi, yi), (xj , yj)
dij = �(xi − xj , yi − yj)�2 =�
(xi − xj)2 + (yi − yj)2.
3
Euclidean TSP
Given n points with coordinates , find a minimum cost TSP tour visiting all points, where the distance between two points is their Euclidean distance,
Problem: Euclidean TSP.
(x1, y1), . . . , (xn, yn) ∈ Q2
(xi, yi), (xj , yj)
dij = �(xi − xj , yi − yj)�2 =�
(xi − xj)2 + (yi − yj)2.
4
Euclidean TSP
Given n points with coordinates , find a minimum cost TSP tour visiting all points, where the distance between two points is their Euclidean distance,
Problem: Euclidean TSP.
We restrict ourselves to the 2-dimensional case here. However, the presented ideas generalize to Euclidean TSP in for any fixed constant value of d.
(x1, y1), . . . , (xn, yn) ∈ Q2
(xi, yi), (xj , yj)
dij = �(xi − xj , yi − yj)�2 =�
(xi − xj)2 + (yi − yj)2.
Qd
5
Euclidean TSP
Literature for this topic:
• Chapter 10 of “The Design of Approximation Algorithms” by David Shmoys and David Williamson. Preprint available online at www.designofapproxalgs.com.
• “Polynomial Time Approximation Schemes for Euclidean Traveling Salesman and other Geometric Problems” by Sanjeev Arora, JACM 45(5), 1998.
6
Euclidean TSP
We call an instance of the Euclidean TSP an integral grid instance, if
(x1, y1), . . . , (xn, yn) ∈ Q2
• all points are pairs of integers in and
• all non-zero distances between points are .
(xi, yi) [0,O(n)]2
≥ 4
Given a PTAS for integral grid instances of the Euclidean TSP, we obtain a PTAS for the general Euclidean TSP.
Proposition 1
So we can focus on integral grid instances from here on.
7
Euclidean TSP
L ⇒ opt ≥ L
8
Euclidean TSP
L ⇒ opt ≥ L
ε
2nLgrid size:
9
Euclidean TSP
L ⇒ opt ≥ L
ε
2nLgrid size:
Shift points to closest grid point: length of any TSP tour is distorted by at most
n · 2ε
2nL = εL ≤ ε · opt.
10
Euclidean TSP
For integrality, scale by factor , then shift bounding box into origin.
8n/(εL)
Point coordinates are of the formfor some
x�i = k
�εL
2n
�8n
εL= 4k
k ∈ N.
(8/ε)n
11
Euclidean TSP
To set up the dynamic programming, we need to dissect the instance into smaller parts:
Consider a square of side length L containing all input points, where is a power of 2. Say this square is at level 0.
L = O(n)
Divide the square into 4 squares of side length L/2 each. These squares are at level 1.
Recursively, divide each square of side length on level i into 4 squares of side length on level i+1.
L/2i
L/2i+1
Stop when squares have side length 1. Note, that the number of levels is .O(log n)
12
Euclidean TSP
Level 0:
13
Euclidean TSP
Level 1:
14
Euclidean TSP
Level 2:
15
Euclidean TSP
Level 3:
16
Euclidean TSP
We add extra points, called portals, to the borders of squares of the dissection.
Let m be a power of 2. On each side of each square, we place m+1 portals at equal distance:
Level i, m=4:
L/2i
m+1 points at distanceL
2im
17
Euclidean TSP
Note that, because m is a power of 2, the portals of a level i square are in the same positions as some of the portals of the level i+1 squares it contains:
level i portal
level i+1 portal
18
Euclidean TSP
We say a line l is at level i, if it contains the side of a level i square of the dissection, but no side of a level i-1 square.
The portals of a level i line are the portals of the sides of level i squares it contains.
l: level 2 line with portals ( )
m=2
19
Euclidean TSP
A p-tour is a TSP tour on the input points and any subset of the portals. We call a p-tour
• portal-respecting, if the tour enters and exits every square of the dissection only through its portals, and
• r-light, if it crosses each side of each square of the dissection at most r times.
Idea for an algorithm: Find an optimal r-light portal-respecting p-tour via dynamic programming.
Note, that the first point is the same as saying that the p-tour crosses lines defining the dissection only at their portals.
20
Euclidean TSP
The following view of tours and portals is helpful:
Lines have thickness, tours following a line follow either side of it. Crossing means switching from one side to the other.
tour
crossing
crossing at portal
21
Euclidean TSP
A 1-light portal-respecting p-tour (m=2):
The key to proving existence of r-light portal-respecting tours is to add some randomness to the dissection.
22
Euclidean TSP
Shift the dissection by random values a,b uniformly distributed in (-L/2,0].
12
3
4
1
3
3
3
41 2
3 4
a
b
An (a,b)-dissection:
1 - 4: level 1 squares
23
Euclidean TSP
Let a,b be integers picked uniformly at random from (-L/2,0]. With probability at least 1/2, the (a,b)-dissection contains an r-light portal-respecting p-tour of cost at most for portal parameters and .
Theorem 16
(1 + ε)optm = O((1/ε) log L) r = O(1/ε)
Given an optimal TSP tour of length d, let t(l) be the number of times it crosses line l and define . It holds that .
Lemma 12
T =�
l
t(l)T ≤ 2d
24
Euclidean TSP
Given a line segment R of length l, if a tour crosses R three or more times, we can modify the tour so that it crosses R at most twice while increasing the cost by at most 6l.
Lemma 13 (Patching Lemma)
split
25
Euclidean TSP
Given a line segment R of length l, if a tour crosses R three or more times, we can modify the tour so that it crosses R at most twice while increasing the cost by at most 6l.
Lemma 13 (Patching Lemma)
add edges
to obtain Eulerian graph
26
Euclidean TSP
Given a line segment R of length l, if a tour crosses R three or more times, we can modify the tour so that it crosses R at most twice while increasing the cost by at most 6l.
Lemma 13 (Patching Lemma)
fix tour