Presentation is loading. Please wait.

Presentation is loading. Please wait.

A linear time algorithm for the weighted lexicographic rectilinear 1-center problem in the plane Nir Halman, Technion, Israel This work is part of my Ph.D.

Similar presentations


Presentation on theme: "A linear time algorithm for the weighted lexicographic rectilinear 1-center problem in the plane Nir Halman, Technion, Israel This work is part of my Ph.D."— Presentation transcript:

1 A linear time algorithm for the weighted lexicographic rectilinear 1-center problem in the plane Nir Halman, Technion, Israel This work is part of my Ph.D. thesis, held in Tel Aviv University, under the supervision of Professor Arie Tamir

2 Planar 1-center problems Input: a set P={p 1,…,p n } of n points p i =(x i,y i ) a set W={w 1,…,w n } of positive weights Output: a center p=(x,y) which minimizes f(p)=Max i {w i d(p,p i )} where d is a distance function Motivation: customers, service center, 1/w i =speed d=l 2 : solvable in linear time [M83],[D86],[SW96]

3 Rectilinear 1-center (d=l 1 ) c = Min p Max i {w i (|x i -x|+|y i -y|)} Min c s.t. w i (|x i -x|+|y i -y|)  c, i=1,…,n Min c s.t. w i ((x i -x)+(y i -y))  c, i=1,…,n, w i (-(x i -x)+(y i -y))  c, i=1,…,n, w i ((x i -x)-(y i -y))  c, i=1,…,n, w i (-(x i -x)-(y i -y))  c, i=1,…,n. Transform the problem into one where d=l 

4 1-center problem with d=l  c = Min p Max i {w i Max{|x i -x|,|y i -y|}} Min c s.t. w i |x i -x|  c, i=1,…,n, w i |y i -y|  c, i=1,…,n. Decomposition into 2 one-dimensional problems Min c x s.t. w i |x i -x|  c x i=1,…,n. Min c y s.t. w i |y i -y|  c y i=1,…,n. c=Max{c x, c y }

5 Lex 1-center problem [O97] Unique solutions to 1-dimensional problems and Euclidean planer 1-center This is not the case for planar 1-center with l 1, l  Input: a set P={p 1,…,p n } of n points p i =(x i,y i ) a set W={w 1,…,w n } of positive weights Output: a center p=(x,y) which lex-minimizes lf(p)=q(w 1 d(p,p 1 ),…,w n d(p,p n )) where q is the non-decreasing ordering of a multi-set

6 Example X Y p 1= (-4,1) p 2= (6,-1) p 4= (2,-3) p 3= (3,2) p 5= (5,0) The distances vector is lf(p)=(5,5,4,2½, 2½) No O(n log n) time algorithm exists

7 Talk outline Introduction An  (n log n) lower bound for calculating the optimal value of the optimal solution A restricted problem, the min rays problem and the relations between them Solving the min rays problem in linear time Putting it all together 

8 Lower bound Obs 1: it takes  (n log n) time to compute the distances vector of a given set of n real points Proof: reduction from sorting Given is a set R={r 1,…,r n } of n real numbers Suppose the minimal element is 0 Set P={r 1,…,r n,2r max } Center is r max Distances vector yields sorting of R

9 Talk outline Introduction An  (n log n) lower bound for calculating the optimal value of the optimal solution A restricted problem, the min rays problem and the relations between them Solving the min rays problem in linear time Putting it all together  

10 Restricted problem Input: P={p 1,…,p n }, W={w 1,…,w n } as before and a real number x @ Output: a center p @ =(x @,y) which lex-minimizes lf(p @ )=q(w 1 d(p @,p 1 ),…,w n d(p @,p n )) Set a i = w i |x @ - x i |, g i (y)=max{a i, w i |y-y i |}, then lf(p @ )=q(g 1 (y),…,g n (y )) Obs 2: Each g i (y) has ashape

11 Min rays problem Let u(y) be upper envelop of {r - i (y),r + i (y) | i=1,…,n} Goal: calculate c = min u(y)  g i (y) define r - i (y) as and r + i (y) as X Y p 1= (-4,1) p 2= (6,-1) p 4= (2,-3) p 3= (3,2) p 5= (5,0)  Y C r+3r+3 r+2r+2 r+5r+5 r+1r+1 r+4r+4 r-4r-4 r-1r-1 r-2r-2 r-3r-3

12 Restricted vs. min rays Thm 1: y $, c $ an optimal solution of the min rays problem  (x @, y $ ) is an optimal center in the corresponding restricted problem Proof: C Y C Y

13 Talk outline Introduction An  (n log n) lower bound for calculating the optimal value of the optimal solution A restricted problem, the min rays problem and the relations between them Solving the min rays problem in linear time Putting it all together   

14 Solving min rays problem Lem 1: the test oracle can be implemented in linear time Let y $, c $ be an optimal solution of the min rays problem, p @ =(x @, y $ ) be an optimal center for the corresponding restricted problem. Oracle: Input: same as for min rays problem with an additional point p =(x @, y) Output: y $ =y or y $ >y, or y $ <y

15 Solving min rays problem (cont’) Proof: partition the given 2n rays into n pairs. Group the pairs of rays into the 12 distinct sets: Thm 2: the min rays problem is solvable in linear time inc mix 4321 index type rr’ r r r r r r r

16 Solving min rays problem (cont’) Proof (cont’): r r’ r r ½ of the rays are dropped ¼ of rays are dropped 1 / 8 of rays are dropped

17 Talk outline Introduction An  (n log n) lower bound for calculating the optimal value of the optimal solution A restricted problem, the min rays problem and the relations between them Solving the min rays problem in linear time Putting it all together    

18 Algorithm: transform the input to l  solve non-lex problem solve min rays problem Generalizes to (in the same time bound): lex 1-center in R d with l  norm (quadratic dependency in d ) different weights on each of the axes all centers

19 Thank you !


Download ppt "A linear time algorithm for the weighted lexicographic rectilinear 1-center problem in the plane Nir Halman, Technion, Israel This work is part of my Ph.D."

Similar presentations


Ads by Google