apx lecture 07...traveling salesman and other geometric problems ” by sanjeev arora, jacm 45(5),...

26
Approximation Algorithms Lecture 7 11/23/10 1

Upload: others

Post on 18-Mar-2021

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: APX Lecture 07...Traveling Salesman and other Geometric Problems ” by Sanjeev Arora, JACM 45(5), 1998. 6 Euclidean TSP We call an instance of the

Approximation Algorithms

Lecture 7

11/23/10

1

Page 2: APX Lecture 07...Traveling Salesman and other Geometric Problems ” by Sanjeev Arora, JACM 45(5), 1998. 6 Euclidean TSP We call an instance of the

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.

Page 3: APX Lecture 07...Traveling Salesman and other Geometric Problems ” by Sanjeev Arora, JACM 45(5), 1998. 6 Euclidean TSP We call an instance of the

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.

Page 4: APX Lecture 07...Traveling Salesman and other Geometric Problems ” by Sanjeev Arora, JACM 45(5), 1998. 6 Euclidean TSP We call an instance of the

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

Page 5: APX Lecture 07...Traveling Salesman and other Geometric Problems ” by Sanjeev Arora, JACM 45(5), 1998. 6 Euclidean TSP We call an instance of the

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.

Page 6: APX Lecture 07...Traveling Salesman and other Geometric Problems ” by Sanjeev Arora, JACM 45(5), 1998. 6 Euclidean TSP We call an instance of the

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.

Page 7: APX Lecture 07...Traveling Salesman and other Geometric Problems ” by Sanjeev Arora, JACM 45(5), 1998. 6 Euclidean TSP We call an instance of the

7

Euclidean TSP

L ⇒ opt ≥ L

Page 8: APX Lecture 07...Traveling Salesman and other Geometric Problems ” by Sanjeev Arora, JACM 45(5), 1998. 6 Euclidean TSP We call an instance of the

8

Euclidean TSP

L ⇒ opt ≥ L

ε

2nLgrid size:

Page 9: APX Lecture 07...Traveling Salesman and other Geometric Problems ” by Sanjeev Arora, JACM 45(5), 1998. 6 Euclidean TSP We call an instance of the

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.

Page 10: APX Lecture 07...Traveling Salesman and other Geometric Problems ” by Sanjeev Arora, JACM 45(5), 1998. 6 Euclidean TSP We call an instance of the

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

Page 11: APX Lecture 07...Traveling Salesman and other Geometric Problems ” by Sanjeev Arora, JACM 45(5), 1998. 6 Euclidean TSP We call an instance of the

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)

Page 12: APX Lecture 07...Traveling Salesman and other Geometric Problems ” by Sanjeev Arora, JACM 45(5), 1998. 6 Euclidean TSP We call an instance of the

12

Euclidean TSP

Level 0:

Page 13: APX Lecture 07...Traveling Salesman and other Geometric Problems ” by Sanjeev Arora, JACM 45(5), 1998. 6 Euclidean TSP We call an instance of the

13

Euclidean TSP

Level 1:

Page 14: APX Lecture 07...Traveling Salesman and other Geometric Problems ” by Sanjeev Arora, JACM 45(5), 1998. 6 Euclidean TSP We call an instance of the

14

Euclidean TSP

Level 2:

Page 15: APX Lecture 07...Traveling Salesman and other Geometric Problems ” by Sanjeev Arora, JACM 45(5), 1998. 6 Euclidean TSP We call an instance of the

15

Euclidean TSP

Level 3:

Page 16: APX Lecture 07...Traveling Salesman and other Geometric Problems ” by Sanjeev Arora, JACM 45(5), 1998. 6 Euclidean TSP We call an instance of the

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

Page 17: APX Lecture 07...Traveling Salesman and other Geometric Problems ” by Sanjeev Arora, JACM 45(5), 1998. 6 Euclidean TSP We call an instance of the

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

Page 18: APX Lecture 07...Traveling Salesman and other Geometric Problems ” by Sanjeev Arora, JACM 45(5), 1998. 6 Euclidean TSP We call an instance of the

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

Page 19: APX Lecture 07...Traveling Salesman and other Geometric Problems ” by Sanjeev Arora, JACM 45(5), 1998. 6 Euclidean TSP We call an instance of the

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.

Page 20: APX Lecture 07...Traveling Salesman and other Geometric Problems ” by Sanjeev Arora, JACM 45(5), 1998. 6 Euclidean TSP We call an instance of the

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

Page 21: APX Lecture 07...Traveling Salesman and other Geometric Problems ” by Sanjeev Arora, JACM 45(5), 1998. 6 Euclidean TSP We call an instance of the

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.

Page 22: APX Lecture 07...Traveling Salesman and other Geometric Problems ” by Sanjeev Arora, JACM 45(5), 1998. 6 Euclidean TSP We call an instance of the

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

Page 23: APX Lecture 07...Traveling Salesman and other Geometric Problems ” by Sanjeev Arora, JACM 45(5), 1998. 6 Euclidean TSP We call an instance of the

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

Page 24: APX Lecture 07...Traveling Salesman and other Geometric Problems ” by Sanjeev Arora, JACM 45(5), 1998. 6 Euclidean TSP We call an instance of the

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

Page 25: APX Lecture 07...Traveling Salesman and other Geometric Problems ” by Sanjeev Arora, JACM 45(5), 1998. 6 Euclidean TSP We call an instance of the

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

Page 26: APX Lecture 07...Traveling Salesman and other Geometric Problems ” by Sanjeev Arora, JACM 45(5), 1998. 6 Euclidean TSP We call an instance of the

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