Splitting a Delaunay Triangulation in Linear Time - Princeton ...

Algorithmica (2002) 34: 39–46DOI: 10.1007/s00453-002-0939-8Algorithmica© 2002 Spr**in**ger-Verlag New York Inc.**Splitt ing** a

40 B. Chazelle, O. Devillers, F. Hurtado, M. Mora, V. Sacristán, and M. TeillaudBreak**in**g a lower bound by us**in**g additional **in**formation arises similarly **in** some otherproblems. One of the most famous is the triangulation of a simple polygon **in** l**in**ear time[6], [18], [2]. Other related problems are the constra**in**ed **Delaunay** triangulation of asimple polygon **in** O(n) time [17]; the medial axis of a simple polygon **in** l**in**ear time[10]; the computation of one cell **in** the **in**tersection of two polygons **in** O(n(log ⋆ n) 2 )time [12]; and the L ∞ **Delaunay** triangulation of po**in**ts sorted along the x and y axes **in**O(n log log n) time [9]. Also, given the three-dimensional convex hull of a set of bluepo**in**ts and the convex hull of the set of red po**in**ts, the convex hull of all po**in**ts can becomputed **in** l**in**ear time [7].The problem we address **in** this paper is the follow**in**g: given the **Delaunay** triangulationDT (S) of a po**in**t set S **in** E 2 and a partition of S **in**to S 1 , S 2 , can we compute bothDT (S i ) **in** o(n log n) time?The reverse problem, given a partition of S **in**to S 1 , S 2 , to reconstruct DT (S) fromDT (S i ), can be solved **in** l**in**ear time [7]. Indeed, the three-dimensional convex hull ofthe vertices of two convex polyhedra can be computed **in** l**in**ear time [7] and, by standardtransformation of the **Delaunay** triangulation to the convex hull, we get the result. Thisreverse operation can be used as the merg**in**g step of a divide and conquer algorithm.In this paper we propose an O(n) randomized algorithm **in** the spirit of Chew’salgorithm for the **Delaunay** triangulation of a convex polygon.In some applications, we need to simplify a triangulation by remov**in**g several verticesat the same time (see for example [20]), this is usually done by choos**in**g an **in**dependentset of small degree vertices to ensure good complexity. This paper allows us to relax thatconstra**in**t and to have more flexibility to choose the vertices to remove accord**in**g to theneed of the application.2. Prelim**in**aries. We assume **in** what follows that a triangulation allows constanttime access from a triangle to its three neighbors and to its three vertices, and from avertex to one **in**cident triangle. This is provided by any reasonable representation of atriangulation, either based on triangles [4] or as **in** the DCEL or w**in**ged-edge structure[13, pp. 31–33].2.1. Classical Randomized Incremental Constructions. Randomized **in**cremental constructionshave been widely used for geometric problems [11], [3] and specifically forthe **Delaunay** triangulation [5], [16], [14]. These algorithms **in**sert the po**in**ts one byone **in** a random order **in** some data structure to locate the new po**in**t and update thetriangulation. The location step has an O(log n) expected complexity. The update stephas constant expected complexity as can easily be proved by backwards analysis [19].Indeed, the update cost of **in**sert**in**g the last po**in**t **in** the triangulation is proportional toits degree **in** the f**in**al triangulation. S**in**ce the last po**in**t is chosen randomly, its **in**sertioncost is the average degree of a planar graph, which is less than 6.2.2. Chew’s Algorithm for the **Delaunay** **Triangulation** of a Convex Polygon . Chew’salgorithm [8] for the **Delaunay** triangulation of a convex polygon uses the ideas abovefor the analysis of the **in**sertion of the last po**in**t. The ma**in** idea is to avoid the locationcost us**in**g the additional **in**formation of the convex polygon.

**Splitt ing** a

42 B. Chazelle, O. Devillers, F. Hurtado, M. Mora, V. Sacristán, and M. Teillaudwe **in**vestigate how this choice **in**fluences the mean value of some variable depend**in**gon p.Let X (p) be a positive random variable depend**in**g on a po**in**t p chosen uniformly atrandom among n po**in**ts. X (p) is bounded by n and E(X) is the expected value of X. Yis an **in**dependent, identically distributed copy of X.LEMMA 1.E(max{X, Y }) ≤ 2 · E(X).PROOF.This is a direct consequence ofE(m**in**{X, Y }) ≥ 0 (s**in**ce X and Y are positive),E(max{X, Y }+m**in**{X, Y }) = E(X + Y )= E(X) + E(Y )=2 · E(X).LEMMA 2.If f is a nonnegative concave nondecreas**in**g function, thenE(m**in**{X, Y }· f (m**in**{X, Y })) ≤ E(X) · f (E(X)).PROOF.2·E(m**in**{X, Y }· f (m**in**{X, Y }))≤ E(m**in**{X, Y }· f (max{X, Y })+max{X, Y }· f (m**in**{X, Y }))= E(X · f (Y )+Y · f (X))= E(X)·E( f (Y ))+E(Y )·E( f (X)) (s**in**ce X and Y are **in**dependent)= 2·E(X)·E( f (X))≤ 2·E(X)· f (E(X)) (by concavity of f ).3.3. Algorithmic Details and Randomized Analysis. Referr**in**g to the six different stepsof the algorithm, here is a detailed cost analysis:Step 1. Done **in** time O(1).Step 2. The nearest neighbor **in** S i of a po**in**t p ∈ S i can be found **in** the follow**in**g way.Start consider**in**g all the **Delaunay** edges **in**cident to p **in** DT (S). Put them **in** a priorityqueue by **in**creas**in**g order of their distance to p. Explore the queue **in** the follow**in**g way:each time that we consider a po**in**t q, there are two possibilities:• If q ∈ S i , we are done: q is p’s nearest neighbor **in** S i .• If q ∉ S i , **in**sert **in** the queue all its **Delaunay** neighbors, delete q, and proceed to thefollow**in**g po**in**t **in** the queue.The correctness of this process is based on the fact that it simulates the way **in** which acircle centered **in** p would grow. In other words, if q ∈ S i is the po**in**t we are look**in**g for,the algorithm computes and orders all the po**in**ts that are closer to p than q (obviously,none of them belongs to S i ). The proof is based on the follow**in**g observation.

**Splitt ing** a

44 B. Chazelle, O. Devillers, F. Hurtado, M. Mora, V. Sacristán, and M. TeillaudS**in**ce the algorithm requires a priority queue, the cost of search**in**g for q is O(T log T )if we use a balanced priority queue or even O(T 2 ) if we use a simple list to implementthe queue and E(T 2 ) cannot be bounded by a constant. However, the time for decid**in**gwhich of p α and p β will be p is the m**in**imum of the times for f**in**d**in**g the neighborsof p α and p β and thus expected to be constant by Lemma 2. This step has expectedcost O(1).Step 3. It is known that it can be done **in** time proportional to the degree of p **in**DT (S) with Chew’s algorithm. S**in**ce for a random po**in**t, the expected degree is 6, theexpected degree of p is smaller than 12 by Lemma 1. Hence, this step has expectedcost O(1).Step 4. If the cost of the algorithm is denoted C(n), this step can be done **in** C(n − 1).Step 5. Explor**in**g all the triangles **in**cident to q takes time proportional to the degreeof q **in** DT (S i \{p}). However, q is not a random po**in**t, but the nearest neighbor of p,itself chosen among two random po**in**ts. We prove below that the degree of the nearestneighbor **in** S i of a random po**in**t p ∈ S i is at most 42, and thus by Lemma 1 the expecteddegree of q is less than 84 and this step can be done **in** time O(1).FACT. Given a random po**in**t p **in** a set of po**in**ts R, the expected degree **in** DT (R\{p})of the nearest neighbor of p **in** R is at most 42.PROOF. We have to consider the degree of a po**in**t **in** several graphs. Let deg NN (q) bethe **in**degree of q **in** the nearest neighbor graph of R, let deg(q) be the degree of q **in**DT (R), and let deg p (q) be the degree of q **in** DT (R\{p}). It is known that deg NN (q) isat most 6. When p is removed from DT (R) the new neighbors of q are former neighborsof p, thus deg p (q) ≤ deg(p) + deg(q). The expected value of deg p (NN(p)) isE(deg p (NN(p))) = 1 ∑degn p (NN(p))p∈R≤ 1 ∑(deg(p) + deg(NN(p)))np∈R≤ 6 + 1 n∑p,q∈Rq=NN(p)deg(q)= 6 + 1 ∑(degnNN (q) deg(q))q∈R≤ 6 + 1 ∑(6deg(q))nq∈R≤ 6 + 36 = 42.

**Splitt ing** a

46 B. Chazelle, O. Devillers, F. Hurtado, M. Mora, V. Sacristán, and M. Teillauddegree, and to generalize the algorithm we would need to def**in**e a neighbor**in**g relationwhich is a subgraph of the convex hull; several possibilities for such a subgraph existbut they do not provide bounded degree and thus the analysis does not generalize.Acknowledgments.this problem.The authors thank Osw**in** Aichholzer for various discussions aboutReferences[1] A. Aggarwal, L. J. Guibas, J. Saxe, and P. W. Shor. A l**in**ear-time algorithm for comput**in**g the Voronoidiagram of a convex polygon. Discrete Comput. Geom., 4(6):591–604, 1989.[2] N. M. Amato, M. T. Goodrich, and E. A. Ramos. L**in**ear-time triangulation of a simple polygon madeeasier via randomization. In Proc. 16th Annu. ACM Sympos. Comput. Geom., pages 201–212, 2000.[3] J.-D. Boissonnat, O. Devillers, R. Schott, M. Teillaud, and M. Yv**in**ec. Applications of random sampl**in**gto on-l**in**e algorithms **in** computational geometry. Discrete Comput. Geom., 8:51–71, 1992.[4] J.-D. Boissonnat, O. Devillers, M. Teillaud, and M. Yv**in**ec. **Triangulation**s **in** CGAL. In Proc. 16thAnnu. ACM Sympos. Comput. Geom., pages 11–18, 2000.[5] J.-D. Boissonnat and M. Teillaud. On the randomized construction of the **Delaunay** tree. Theoret.Comput. Sci., 112:339–354, 1993.[6] B. Chazelle. Triangulat**in**g a simple polygon **in** l**in**ear time. Discrete Comput. Geom., 6(5):485–524,1991.[7] B. Chazelle. An optimal algorithm for **in**tersect**in**g three-dimensional convex polyhedra. SIAM J. Comput.,21(4):671–696, 1992.[8] L. P. Chew. Build**in**g Voronoi diagrams for convex polygons **in** l**in**ear expected time. Technical ReportPCS-TR90-147, Dept. Math. Comput. Sci., Dartmouth College, Hanover, NH, 1986.[9] L. P. Chew and S. Fortune. Sort**in**g helps for Voronoi diagrams. Algorithmica, 18:217–228, 1997.[10] F. Ch**in**, J. Snoey**in**k, and C. A. Wang. F**in**d**in**g the medial axis of a simple polygon **in** l**in**ear time.Discrete Comput. Geom., 21(3):405–420, 1999.[11] K. L. Clarkson and P. W. Shor. Applications of random sampl**in**g **in** computational geometry, II. DiscreteComput. Geom., 4:387–421, 1989.[12] M. de Berg, O. Devillers, K. Dobr**in**dt, and O. Schwarzkopf. Comput**in**g a s**in**gle cell **in** the overlay oftwo simple polygons. Inform. Process. Lett., 63(4):215–219, August 1997.[13] M. de Berg, M. van Kreveld, M. Overmars, and O. Schwarzkopf. Computational Geometry: Algorithmsand Applications. Spr**in**ger-Verlag, Berl**in**, 1997.[14] O. Devillers. Randomization yields simple O(n log ∗ n) algorithms for difficult (n) problems. Internat.J. Comput. Geom. Appl., 2(1):97–111, 1992.[15] H. Djidjev and A. L**in**gas. On comput**in**g Voronoi diagrams for sorted po**in**t sets. Internat. J. Comput.Geom. Appl., 5:327–337, 1995.[16] L. J. Guibas, D. E. Knuth, and M. Sharir. Randomized **in**cremental construction of **Delaunay** and Voronoidiagrams. Algorithmica, 7:381–413, 1992.[17] R. Kle**in** and A. L**in**gas. A l**in**ear-time randomized algorithm for the bounded Voronoi diagram of asimple polygon. Internat. J. Comput. Geom. Appl., 6:263–278, 1996.[18] R. Seidel. A simple and fast **in**cremental randomized algorithm for comput**in**g trapezoidal decompositionsand for triangulat**in**g polygons. Comput. Geom. Theory Appl., 1(1):51–64, 1991.[19] R. Seidel. Backwards analysis of randomized geometric algorithms. In J. Pach, editor, New Trends **in**Discrete and Computational Geometry, volume 10 of Algorithms and Comb**in**atorics, pages 37–68.Spr**in**ger-Verlag, New York, 1993.[20] J. Snoey**in**k and M. van Kreveld. Good orders for **in**cremental (re)constructions. In Proc. 13th Annu.ACM Sympos. Comput. Geom., pages 400–402, 1997.