slides
Transcription
slides
Randomised algorithms Week 8, Euclidean TSP Today 1. Few’s algorithm (1955) 2. Karp’s algorithm (1977) 3. Arora’s algorithm (1998) Arora’s PTAS Definition A polynomial time approximation scheme (PTAS) gives for any fixed > 0 a polynomial time (1 + )-approximation algorithm. Theorem (Arora, 1998) There is a PTAS for the TSP in the Euclidean plane. Sanjeev Arora: Polynomial Time Approximation Schemes for Euclidean Traveling Salesman and other Geometric Problems. J. ACM 45 (1998) - Cited 767 times by today (Google) 1. Few’s algorithm (1955) Few’s algorithm Few’s algorithm ⇒ Theorem For any set of n point in a 1 × 1 square, there exists a TSP tour of √ length O( n). 2. Karp’s algorithm (1977) Karp’s algorithm Karp’s algorithm Karp’s algorithm TSP solvable in O(n3 2n ) time. Choose s = log2 n. Theorem p Karp’s algorithm finds a tour of length O( (n/ log2 n)) + OPT . Random points Place n points uniformly at random in a 1 × 1 square. Theorem √ The expected length is Θ( n) Corollary For n random points: 16 ZKARP 6 1 + o(1). Opt (i.e., Karp is optimal in the limit for random points.) 3. Arora’s algorithm (1998) Euclidean TSP Theorem (Arora, 1998) There is a PTAS for the TSP in the Euclidean plane. Main ingredients I Roundig the instance. I Restricting the solution space. I Dynamic programming. I Randomization. Euclidean TSP The algorithm 1. Take a random box B that covers all points. 2. Move points to grid points. 3. Build quad tree. 4. Define portals. 5. Define the subproblems for the DP. 6. Fill the DP table. Step 1, Random box B Let k = dlog2 (n/)e. Take a, b ∈ {0, 1, . . . , 2k−1 − 1} at random. Step 2, Rounding Move each point to the middle of its 1 × 1 cell. Step 3, Quad trees Iteratively divide the square in 4 squares until smallest are 1 × 1. Step 4, Portals Each gridline gets a number of regularly distributed points. Step 5, Subproblems A subproblems is given by (X , Y , Z ): X : A square of the quadtree. Y : An even subset of portals of X . Z : A pairing of the portals Y . Store in the D.P. : F (X , Y , Z ) = minimum length of set of paths inside X that cross the boundary at Y and obey the pairing Z . Step 6, Fill the DP table. A value F (X , Y , Z ) can be computed from all possible values F (X1 , Y1 , Z1 ), F (X2 , Y2 , Z2 ), F (X3 , Y3 , Z3 ), and F (X4 , Y4 , Z4 ), where X1 , X2 , X3 , and X4 are the childeren of X . Analysis Need to show that the 1 approximation ratio is at most 1 + , and 2 running time is polynomial. Analysis 1 approximation ratio. Analysis, approx. ratio Rounding. Note that I I Opt > L = 2k > n/ (k = dlog2 (n/)e.) √ Difference per point 6 2 Rounding error: 6 √ 2n 6 √ 2L 6 √ 2Opt. Let Opt0 be optimal value for rounded instance √ Opt0 6 (1 + 2)Opt Analysis, approx. ratio Restriction to portals. Let δi be interportal distance of a level i line. δi = 2k L = . m2i m2i Detour per crossing: 6 δi . May be too large if random (a, b)-shift was not used!!! Analysis, approx. ratio Restriction to portals. Let l be arbitrary grid line. Pr(l is of level 1) = 21−k . Pr(l is of level 2) = 21−k . Pr(l is of level 3) = 22−k . ... Pr(l is of level i) = 2i−1−k , i > 2. ⇒ Pr(l is of level i) 6 2i−k . i > 1. Analysis, approx. ratio Restriction to portals. Expected length of detour for one crossing with gridline l: 6 6 k X i=1 k X i=1 Pr(l is of level i) · δi 2i−k · 2k k k = = 6 . i m2 m dk/e Choose m = dk/e = ddlog2 (n/)e/e = O( log n ). Analysis, approx. ratio Claim: At most √ 2Opt0 crossings with gridlines in total. ⇒ √ Total detour for portals 2Opt0 . Let Opt00 be optimal value for a portal respecting tour for rounded instance √ E[Opt00 ] 6 (1 + 2)Opt 0 Analysis, approx. ratio Summarizing: Opt is optimal length original instance and, Opt0 is optimal for rounded instance and, Opt00 is optimal portal respecting tour for rounded instance. √ E[Opt00 ] 6 (1 + 2)Opt 0 √ √ 6 (1 + 2)(1 + 2)Opt = (1 + O())Opt. Analysis 2 running time. Analysis, running time Number of subproblems (X , Y , Z ): I I I X : Size of quadtree: (2k )2 leaves. ⇒ O(n2 /2 ) squares X . Y : nO(1/) ways to cross portals at X . Z : nO(1/) ways to pair crossings of Y . ⇒ Number of subproblems (X , Y , Z ) = nO(1/) Computing one value F (X , Y , Z ) takes nO(1/) time. ⇒ Total time and space is nO(1/) . Extensions This technique has been used to get a PTAS for the Euclidean version of I Minimum Steiner tree. I Mimimum k median. I k-TSP I k-MST I mincost k-connected subgraph. I many others .... Some open problems Only Quasi-PTAS known: (nO(log n) time) I Capacitated vehicel routing. (QPTAS by A. Das and C. Mathieu, 2010) I Mimimum weight triangulation (QPTAS by Remy and Steger, 2006) I Traveling repairman problem (QPTAS by Arora and Karakostas, 2003) I Prize collecting TSP (QPTAS by Arora) No scheme known: I Mimimum weight Steiner triangulation.