Abstract 1 Introduction 2 A deterministic 𝑶(𝒏+𝑫𝐥𝐨𝐠𝟑𝒏) algorithm 3 A randomized 𝑶((𝒏+𝑫𝐥𝐨𝐠𝒏)𝐥𝐨𝐠𝒏) algorithm 4 An optimal randomized 𝑶(𝒏+𝑫𝐥𝐨𝐠𝒏) algorithm 5 An 𝑶(𝒏𝐥𝐨𝐠𝒏+𝒏𝐥𝐨𝐠𝒅cross) algorithm 6 An 𝑶(𝒏𝐥𝐨𝐠𝐥𝐨𝐠𝒏+𝒏𝐥𝐨𝐠(𝟏/𝝆)) algorithm in the probabilistic model 7 An 𝑶(𝒏𝐥𝐨𝐠𝒏+𝒏𝐥𝐨𝐠𝒅vio) algorithm References

Delaunay Triangulations with Predictions

Sergio Cabello ORCID Faculty of Mathematics and Physics, University of Ljubljana, Slovenia
Institute of Mathematics, Physics and Mechanics, Ljubljana, Slovenia
Timothy M. Chan ORCID Siebel School of Computing and Data Science, University of Illinois at Urbana-Champaign, IL, USA Panos Giannopoulos ORCID Department of Computer Science, City St George’s, University of London, UK
Abstract

We investigate algorithms with predictions in computational geometry, specifically focusing on the basic problem of computing 2D Delaunay triangulations. Given a set P of n points in the plane and a triangulation G that serves as a “prediction” of the Delaunay triangulation, we would like to use G to compute the correct Delaunay triangulation DT(P) more quickly when G is “close” to DT(P). We obtain a variety of results of this type, under different deterministic and probabilistic settings, including the following:

  1. 1.

    Define D to be the number of edges in G that are not in DT(P). We present a deterministic algorithm to compute DT(P) from G in O(n+Dlog3n) time, and a randomized algorithm in O(n+Dlogn) expected time, the latter of which is optimal in terms of D.

  2. 2.

    Let R be a random subset of the edges of DT(P), where each edge is chosen independently with probability ρ. Suppose G is any triangulation of P that contains R. We present an algorithm to compute DT(P) from G in O(nloglogn+nlog(1/ρ)) time with high probability.

  3. 3.

    Define dvio to be the maximum number of points of P strictly inside the circumcircle of a triangle in G (the number is 0 if G is equal to DT(P)). We present a deterministic algorithm to compute DT(P) from G in O(nlogn+nlogdvio) time.

We also obtain results in similar settings for related problems such as 2D Euclidean minimum spanning trees, and hope that our work will open up a fruitful line of future research.

Keywords and phrases:
Delaunay Triangulation, Minimum Spanning Tree, Algorithms with Predictions
Copyright and License:
[Uncaptioned image] © Sergio Cabello, Timothy M. Chan, and Panos Giannopoulos; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Computational geometry
Acknowledgements:
The authors would like to thank Kostas Tsakalidis for suggesting the area of algorithmic problems with predictions.
Funding:
This research was funded in part by the Slovenian Research and Innovation Agency (P1-0297, J1-2452, N1-0218, N1-0285) and in part by the European Union (ERC, KARST, project number 101071836). Views and opinions expressed are however those of the authors only and do not necessarily reflect those of the European Union or the European Research Council. Neither the European Union nor the granting authority can be held responsible for them.
Related Version:
Full Version: https://doi.org/10.48550/arXiv.2601.08106
Editor:
Shubhangi Saraf

1 Introduction

1.1 Towards computational geometry with predictions

Algorithms with predictions have received considerable attention in recent years. Given a problem instance and a prediction for the solution, we would like to devise an algorithm that solves the problem in such a way that the algorithm performs “better” when the prediction is “close” to the correct solution. “Better” may be in terms of running time, or approximation factor (for optimization problems), or competitive ratio (for on-line problems). Different measures of “closeness” may be used depending on the problem, or alternatively we may assume that predictions obey some probabilistic models. The paradigm has been applied to problems in diverse areas, such as scheduling, classical graph problems, resource allocation, mechanism design, facility location, and graph searching to name a few; see the survey in [52] and the regularly updated online list of papers in [1].

In contrast, work on algorithms with predictions in computational geometry have been few and far between. The goal of this paper is to promote this direction of research. Primarily, we concentrate on the use of predictions to improve the running time of geometric algorithms.

As many fundamental problems in classical computational geometry may be viewed as two- or higher-dimensional generalizations of standard one-dimensional problems like sorting and searching, we start our discussion with the 1D sorting problem. Here, algorithms with predictions are related to the historically well-explored topic of adaptive sorting algorithms [32] – if we are given a sequence that is already close to sorted, we can sort faster. There are different ways to measure distance to sortedness. For example:

  • Consider Dinv, the number of inversions in the given sequence (i.e., the number of out-of-order pairs). In terms of this parameter, good old insertion-sort runs in O(n+Dinv) time and already beats O(nlogn) algorithms when Dinv=O(n). Better algorithms are known running in Θ(nlog(1+Dinv/n)) time, which is optimal in comparison-based models.

  • Or consider Drem, the minimum number of elements to remove (the “wrong” elements) so that the remaining list is sorted. Here, the optimal time bound is known to be Θ(n+Dremlogn).

  • Or consider Druns, the number of runs (i.e., the number of increasing contiguous subsequence that the input can be partitioned into). Here, the optimal time bound is known to be Θ(nlogDruns). Unfortunately, even when Druns is as low as n0.1, it is not possible to beat nlogn under this distance measure.

The survey in [32] gives an extensive background and a (long) list of other parameters that have been considered in the algorithms literature. Adaptive sorting has continued to be studied (some random recent examples include [7, 53, 4]), and some recent papers [6, 47] examine newer models for sorting with predictions.

1.2 The 2D Delaunay triangulation problem

Can we obtain similar results for geometric problems in 2D? In this paper, we pick arguably one of the most basic problems in computational geometry to start this study: namely, the computation of the Delaunay triangulation, denoted DT(P), of a set P of n points in the plane [27]. One way to define DT(P) is via the empty circle property: three points p,p,p′′P form a Delaunay triangle iff the circumcircle through p,p,p′′ does not have any points of P strictly inside. (Throughout this paper, we assume for simplicity that the input is in general position, e.g., no 4 input points are co-circular.)

Delaunay triangulations are combinatorially equivalent to Voronoi diagrams (under the Euclidean metric) by duality. (It is a little more convenient to work with Delaunay triangulations than Voronoi diagrams when specifying the prediction G or defining closeness, and so all our results will be stated in terms of the former.) Delaunay triangulations and Voronoi diagrams are among the most ubiquitous geometric structures, with countless applications, and lie at the very core of computational geometry.

In the prediction setting, we are given not just the input point set P, but also a triangulation G of P (i.e., a decomposition of the convex hull of P into nonoverlapping triangles, using all the points of P as vertices, but no Steiner points). The goal is to devise an algorithm to compute DT(P) faster, when the “distance” between G and DT(P) is small. In the traditional setting, several standard textbook algorithms are known for computing the Delaunay triangulation in O(nlogn) time, e.g., via divide-and-conquer, plane sweep, and randomized incremental construction [8, 27, 5, 34], which is optimal in the worst case. Without closeness, an arbitrary triangulation G of P still provides some extra information about the input, but not enough to beat nlogn: it is not difficult to see that Ω(nlogn) remains a lower bound by reduction from 1D sorting (see Figure 1). We want to do better than nlogn when G is close. As we will see, designing faster adaptive algorithms for 2D Delaunay triangulations is technically more difficult, and so more interesting, than for 1D sorting.

Figure 1: Sorting the x-coordinates of p1,,pn reduces to computing the Delaunay triangulation of the O(n) vertices of the triangulation shown (assuming a rescaling to compress the y-coordinates).

1.3 Two specific questions

Table 1: Different measures of closeness between a given triangulation G and the Delaunay triangulation DT(P).
parameter definition
D number of edges in G that are not in DT(P)
(or equivalently, number of edges in DT(P) that are not in G)
Dflip minimum number of edge-flips to transform G into DT(P)
(in a flip, an edge pp incident to triangles ppp′′ and ppp′′′ is replaced
by a new edge p′′p′′′, assuming that pp′′pp′′′ is a convex quadrilateral)
Dcross number of edge crossings between G and DT(P)
dcross maximum number of edges of DT(P) crossed by an edge of G
Dvio number of violations, i.e., (p′′′,ppp′′) with p′′′P and ppp′′ in DT(P)
such that p′′′ lies strictly inside the circumcircle through p,p,p′′
dvio maximum number of points of P strictly inside
the circumcircle through a triangle in G
Dlocal number of non-locally-Delaunay edges in G
(i.e., edges pp incident to triangles ppp′′ and ppp′′′ in G such that
p′′′ is inside the circumcircle through p,p,p′′)

There are a number of natural parameters to measure distance to the Delaunay triangulation, as we define in Table 1. Some of these definitions (e.g., D,Dflip,Dcross) may be used to compare any two triangulations, while others (e.g., Dvio,Dlocal) are specific to the Delaunay triangulation. For all these parameters, the value is 0 if and only if G=DT(P). Some relationships between these parameters are obvious, e.g., DcrossO(ndcross) and DvioO(ndvio), and it is known that

DlocalDDflipDcross.

The inequality DlocalD holds because all non-locally Delaunay edges can’t be actual Delaunay edges, while the last inequality DflipDcross is nontrivial and was proved by Hanke et al. [36].

There are examples when Dlocal is a constant and D is Ω(n). In a very vague sense, Dlocal is more similar to Druns (the number of runs) for sorting, while D is more similar to Drem and Dflip and Dcross are more similar to Dinv. Indeed, it is not difficult to prove an Ω(nlogDlocal) lower bound for computing the Delaunay triangulation in terms of Dlocal, by reduction from sorting with Θ(Dlocal) runs, or equivalently, merging Θ(Dlocal) sorted lists (see Figure 2). So, Dlocal may not be an ideal parameter for the problem (even when Dlocal is as small as n0.1, we can’t hope to beat nlogn).

Figure 2: Merging k x-sorted lists p1,1,,p1,n/k, …, pk,1,,pk,n/k reduces to computing the Delaunay triangulation of the O(n) vertices of the triangulation shown (assuming a rescaling to compress the y-coordinates). This triangulation has Dlocal=Θ(k) non-locally-Delaunay edges shown in dotted lines.

Arguably the simplest and most natural of all these parameters is D, the number of “wrong” edges in G that are not in DT(P) (which is the same as the number of edges in DT(P) that are in G, since all triangulations of the same point set have the same number of edges). To initiate the study of algorithms with predictions for the Delaunay triangulation, we thus begin with the following simple question:

Question 1: what is the best 2D Delaunay triangulation algorithm with running time analyzed as a function of n and the parameter D?

This simple question already turns out to be quite challenging. An upper bound on time complexity in terms of D would automatically imply an upper bound in terms of Dflip and Dcross by the above inequalities. We can ask a similar question for other parameters such as dcross and dvio.

Although Question 1 provides one way to model predictions, often errors are probabilistic in nature. Thus, for various problems, algorithms with predictions have sometimes been studied under probabilistic models. To define a simple probabilistic model of prediction for the Delaunay triangulation, one could just consider tossing an independent coin to determine whether an edge of DT(P) should be placed in G (similar to a model studied by Cohen-Addad et al. [26] for the max-cut problem). But there is one subtlety for our problem: the input G is supposed to be a triangulation, containing wrong edges (but not containing self-crossings). We propose the following 2-stage model: first, each edge of DT(P) is placed in a set R independently with a given probability ρ; second, R is completed to a triangulation of P, but we make no assumption about how this second step is done, i.e., R can be triangulated adversarially (this makes results in this model a bit more general).

Question 2: under the above probabilistic model, what is the best 2D Delaunay triangulation algorithm with running time analyzed as a function of n and ρ?

In this model, the expected number of “wrong” edges D is upper-bounded by (1ρ)m, where m3n6 is the number of edges in any triangulation of P. The hope is that the problem may be solved faster under the probabilistic model than by applying a worst-case algorithm in terms of the parameter D.

We could consider other probabilistic models too. For example, one variant is to pick a random edge in DT(P), perform a flip if its two incident triangles form a convex quadrilateral (or do nothing otherwise), and repeat for (1ρ)m steps. In this model, the flip distance Dflip is guaranteed to be at most (1ρ)m; in contrast, the above model allows for potentially larger flip distances and so is in some sense stronger.

1.4 Our contributions

We obtain a number of results addressing Questions 1 and 2 and related questions:

  1. 1.

    We present several different algorithms for computing DT(P) from G in time sensitive to the parameter D. One deterministic algorithm runs in O(n+Dlog3n) time. A randomized algorithm runs in O((n+Dlogn)logn) time, where log is the (very slow-growing) iterated logarithmic function. Our final randomized algorithm eliminates the logn factor and runs in O(n+Dlogn) expected time, which is optimal since an Ω(max{n,DlogD})=Ω(n+Dlogn) lower bound follows by reduction from sorting D numbers (we can just embed the configuration in Figure 1 on Θ(D) points into a larger Delaunay triangulation). Thus, we have completely answered Question 1 (modulo the use of randomization). All of our algorithms do not require knowing the value of D a priori.

    It is interesting to note that our optimal randomized algorithm runs in linear time even when the number D of “wrong” edges is as large as n/logn.

    An immediate consequence is that the problem can be solved in O(n+Dfliplogn) expected time – we get linear running time as long as the flip distance is at most n/logn.

  2. 2.

    On the probabilistic model in Question 2, we obtain another algorithm for computing DT(P) from G in O(nloglogn+nlog(1/ρ)) time with high probability (the algorithm is always correct). For any constant ρ, the running time is thus almost linear except for the small loglogn factor. This is notable when compared against our O(n+Dlogn) algorithm, since in this probabilistic setting, D is expected to be near (1ρ)m. For example, if we set ρ=0.1 (or even ρ=1/logn), we can still substantially beat nlogn even though a majority of the edges are wrong!

    We can also get a similar result for the random flip model mentioned earlier.

  3. 3.

    We also obtain results sensitive to other parameters. For example, in terms of dvio, we describe a deterministic algorithm for computing DT(P) from G in O(nlogn+nlogdvio) time. Note that there are examples where dvio=1 but D=Ω(n) (i.e., a fraction of the edges are wrong!), so our D-sensitive algorithms can’t be used directly. The parameter dvio is related to a notion called order-k Delaunay triangulation111The name is somewhat misleading as it is not equivalent to the order-k Voronoi diagram in the dual. The set of all candidate triangles for order-k Delaunay triangulations does correspond to the vertices of the order-k Voronoi diagram, but an order-k Delaunay triangulation is not unique, comprising of a subset of the candidate triangles. in the literature [35] (with motivation very different from ours): a triangulation G is an “order-k Delaunay triangulation” precisely when dviok. Our result implies the following interesting consequence: given an order-O(1) Delaunay triangulation, we can recover the actual Delaunay triangulation in almost linear (O(nlogn)) time!

  4. 4.

    We similarly describe an O(nlogn+nlogdcross)-time deterministic algorithm for computing DT(P) from G. Again, there are examples where dcross=1 but D=Ω(n). Although the parameter dcross may not appear to be the most natural at first, it turns out to be the key that allows us to obtain items 2 and 3 above in an elegant, unified way: it is not difficult to show that dcross=O((1/ρ)logn) with high probability in the probabilistic model, and we are also able to show that dcrossO(dvio2) always holds.

  5. 5.

    Although we have focused on the Delaunay triangulation problem, we can obtain similar results for a few related problems. For example, consider the problem of computing the Euclidean minimum spanning tree EMST(P) of a set P of n points in 2D. Given a spanning tree T, we can compute EMST(P) from T in O((n+Demstlogn)logn) expected time, where Demst is the number of “wrong” edges in T that are not in EMST(P). In fact, this result, and the idea of using a spanning tree in the first place, will be instrumental to the eventual design of our O(n+Dlogn)-time randomized algorithm for Delaunay triangulations.

    We get similar results for EMST in the probabilistic model or in terms of other parameters, and also for computing other related geometric graphs such as the relative neighborhood graph and the Gabriel graph in the plane [38]. We also get similar results for the problem of computing the convex hull of n points in 3D that are in convex position (by a standard lifting map, Delaunay triangulations in 2D maps to convex hulls in 3D) – the convex position assumption is necessary since one could show an Ω(nlogn) lower bound for checking whether n/2 points are all inside the convex hull of another n/2 points, even when we are given the correct convex hull.

1.5 Related work in computational geometry

We are not aware of any prior work in computational geometry that explicitly addresses the paradigm of algorithms with predictions, except for a recent paper by Cabello and Giannopoulos [10] on an on-line geometric search problem (where predictions are used to obtain competitive ratio bounds). Implicitly related are adaptive data structures, and these have been studied in computational geometry; as one example, see Iacono and Langerman’s work [37] on “proximate” planar point location (where a query can be answered faster when given a finger near the answer).

Our work is related to, and may be regarded as a generalizaton of, work on the verification of geometric structures: how to check whether a given answer is indeed correct, using a simpler or faster algorithm than an algorithm for computing the answer. This line of work has received much attention from computational geometers in the 1990s [29, 50, 51], motivated by algorithm engineering. For the Delaunay triangulation problem, it is easy to verify whether G is equal to DT(G) in linear time, by checking that all edges are locally Delaunay. Verifying correctness corresponds to the case D=0, and our results provides more powerful extensions: we can correct errors (as many as n/logn wrong edges) in linear time. Viewing our results in the lens of correcting errors in the output provides further motivation, even for readers not necessarily interested in learning-augmented algorithms.

Some recent work such as [31] studies geometric algorithms in models that tolerate errors in the computation process itself (e.g., noisy or faulty comparisons), but our work seems orthogonal to this research direction. On the other hand, there has been considerable prior work in computational geometry on models that capture errors or imprecisions in the input. For example, in one result by Löffler and Snoeyink [46], an imprecise input point is modelled as a range, specifically, a unit disk (whose center represents its estimated position); it is shown that n disjoint unit disks in the plane can be preprocessed in O(nlogn) time, so that given n actual points lying in these n disks, their Delaunay triangulation can be computed in O(n) time. Similar results have been obtained for different types of regions and different problems. Our model provides an alternative way to address imprecise input: in the preprocessing phase, we can just compute the Delaunay triangulation G of the estimated points; when the actual points P are revealed, we can correct G to obtain DT(P) using our algorithms.222One technical issue is that G may have self-crossings when re-embedded into the actual point set P, but at least one of our algorithms works even when G has self-crossings (see Corollary 6). An advantage of our model is its simplicity: we don’t need to be given any geometric range or distribution for each input point; rather, accuracy is encapsulated into a single parameter D.

Even without relevance to algorithms with paradigms or coping with errors in the input/output, Question 1 is appealing purely as a classical computational geometry problem. In the literature, a number of papers have explored conditions under which Delaunay triangulations can be computed in linear or almost linear time. For example, Devillers [28] showed that given the Euclidean minimum spanning tree of a 2D point set, one can compute the Delaunay triangulation in O(nlogn) expected time (this was later improved to deterministic linear time [22]); two Delaunay triangulations DT(P1) and DT(P2) can be merged into DT(P1P2) in linear time [40]; conversely, a Delaunay triangulation DT(P1P2) can be split into DT(P1) and DT(P2) in linear time (by Chazelle et al. [15]); the Delaunay triangulation of the vertices of a convex polygon can be computed in linear time (by Aggarwal et al. [2, 21]); the Delaunay triangulation for 2D points with integer coordinates can be computed in the same time complexity as sorting in the word RAM model (by Buchin and Mulzer [9]); etc. A powerful work by Löffler and Mulzer [45] unifies many of these results by showing equivalence of 2D Delaunay triangulations with quadtree construction and related problems. Although some of these tools will be useful later, it isn’t obvious how they can used to resolve Questions 1 and 2.

1.6 Our techniques

Although we view our main contributions to be conceptual (introducing a new research direction in computational geometry), our algorithms are also technically interesting in our opinion. The solutions turn out to be a lot more challenging than 1D adaptive sorting algorithms or the standard textbook Delaunay triangulation algorithms:

  • Our deterministic O(n+Dlog3n)-time algorithm (given in Section 2) uses planar graph separators or r-divisions in the given graph G (for classical computational geometry problems, Clarkson–Shor-style sampling-based divide-and-conquer [23, 24, 19] is more commonly used than planar graph separators).

  • Our randomized O((n+Dlogn)logn)-time algorithm (given in Section 3) is obtained via an adaptation of the abovementioned randomized O(nlogn)-time algorithm for computing the Delaunay triangulation from the EMST, by Devillers [28] (which in turn was based on the randomized O(nlogn)-time algorithms by Seidel [54] and Clarkson, Tarjan, and Van Wyck [25] for the polygon triangulation problem). The adaptation is more or less straightforward, but our contribution is in realizing that these randomized O(nlogn)-time algorithms are relevant in the first place.

  • Our final randomized O(n+Dlogn)-time algorithm (given in Section 4) eliminates the extra logn factor by incorporating a more complicated divide-and-conquer involving planar graph separators or r-divisions, this time applied to actual Delaunay triangulations, not the input graph G. (Curiously, ideas from certain output-sensitive convex hull algorithms [30, 12] turn out to be useful.)

  • For our deterministic O(nlogn+nlogdcross)-time algorithm (given in Section 5), which as mentioned is the key to our result in the probabilistic model as well as our dvio-sensitive result, we return to using r-divisions in the given graph G. The way the logn factor comes up is interesting – it arises not from the use of known randomized O(nlogn) algorithms like Seidel’s, but from an original recursion. Although our D-sensitive algorithm does not directly yield a dcross-sensitive result, it will turn out to be an important ingredient in the final algorithm.

1.7 Open questions

Many interesting questions remain from our work (which we see as a positive, as our goal is to inspire further work in this research direction):

  • Could the extra logn factors be eliminated in some of our results?

  • Could the extra loglogn factor in our result in the probabilistic model be removed?

  • Could we get a time bound in terms of Dflip better than O(n+Dfliplogn)? For example, is there a Delaunay triangulation algorithm that runs in O(n+Dflip) time?

  • Similarly, is there a Delaunay triangulation algorithm that runs in O(n+Dcross) time? Or, better still, O(nlog(1+Dcross/n)) time? Or O(n+Dvio) or O(nlog(1+Dvio/n)) time?

More generally, we hope that our work will prompt other models of prediction to be studied for the Delaunay triangulation problem, or similar models for other fundamental problems in computational geometry and beyond.

2 A deterministic 𝑶(𝒏+𝑫𝐥𝐨𝐠𝟑𝒏) algorithm

We begin by presenting a deterministic algorithm for computing the Delaunay triangulation in O(n+Dlog3n) time. The algorithm uses planar graph separators, or more generally, r-divisions, on the input triangulation G. (A different deterministic algorithm is given in the full version of the paper; it is slightly slower but does not require separators.)

An 𝒓-division of a planar graph G with n vertices is a partition of G into O(n/r) regions (edge-induced subgraphs) such that each region has at most O(r) vertices and at most O(r) boundary vertices, i.e., vertices shared by more than one region. An r-division can be computed in O(n) time; see, for example, the classical result by Federickson [33] or the more recent, improved result by Klein, Mozes, and Sommer [42]. Note that the regions may have holes (i.e., faces that are not faces of G). We may also assume that each region is connected.

Theorem 1.

Given a triangulation G of a set P of n points in the plane, the Delaunay triangulation DT(P) can be constructed in O(n+Dlog3n) deterministic time, where D is the (unknown) number of edges in G that are not in DT(P).

Proof.

Our algorithm proceeds in the following steps:

  1. 1.

    First we compute, in O(n) time, a t-division Γ of the dual graph of the input triangulation G, for some t to be chosen later. Each region γ of Γ is a connected set of O(t) triangles. Let Vγ denote the set of vertices of all the triangles in γ and Bγ denote the set of all the triangles surrounding γ (here, it is more convenient to work with boundary triangles instead of boundary edges). Then |Vγ|=O(t) and |Bγ|=O(t). Also, let B be the set of all boundary triangles in Γ and VB be the set of the vertices of the edges in B. Then |VB|=O(n/t).

  2. 2.

    We compute the Delaunay triangulation DT(VB) of VB, in O(|VB|log|VB|)O((n/t)logn) time.

  3. 3.

    We call a region γ of Γ good if (i) all boundary triangles in Bγ are in DT(VB), and (ii) the triangles of γ and their immediate neighborhood are locally Delaunay (i.e., for every neighboring pair of triangles p1p2p3 and p1p2p4 in G with at least one inside γ (the other may be inside or be a boundary triangle), we have p4 outside the circumcircle through p1,p2,p3); we call it bad otherwise. Let

    Vgood=(γisgoodVγ)VBandVbad=(γisbadVγ)VB.

    Note that condition (i) can be tested using standard data structures, while condition (ii) can be tested in linear total time.

  4. 4.

    We compute DT(VBVgood). This can be done by modifying DT(VB). Namely, for each good region γ, we replace what is inside Bγ (by definition, Bγ belongs to DT(VB)), with the triangles of γ. Then the resulting triangulation is locally Delaunay, and thus must coincide with DT(VBVgood) (since the local Delaunay property holding for the entire triangulation implies that it is the Delaunay triangulation [27]). This step takes linear time.

  5. 5.

    We compute DT(Vbad). We will do this step from scratch, in O(|Vbad|log|Vbad|) time. For each bad region γ, there is at least one non-Delaunay edge of G inside γ or on its boundary triangles. So, the number of bad regions is at most O(D), implying that |Vbad|O(Dt). So, this step takes O(Dtlogn) time.

  6. 6.

    Finally, we merge DT(VBVgood) and DT(Vbad), in linear time by standard algorithms for merging Delaunay triangulations (Chazelle [14], and later Chan [11], showed more generally that two convex hulls in 3 can be merged in linear time, but an earlier result by Kirkpatrick [40] suffices for the case of Delaunay triangulations in 2).

The total running time is O(n+(n/t+Dt)logn). Choosing t=log2n gives the desired O(n+Dlog3n) bound.

3 A randomized 𝑶((𝒏+𝑫𝐥𝐨𝐠𝒏)𝐥𝐨𝐠𝒏) algorithm

In this section, we present a completely different, and faster, randomized algorithm for computing the Delaunay triangulation in terms of the parameter D, which is just a logn factor from optimal. The algorithm is an adaptation of an algorithm by Devillers [28], which uses the Euclidean minimum spanning tree to construct the Delaunay triangulation in almost linear (O(nlogn)) expected time. Slightly more generally, the Delaunay triangulation can be constructed from any given spanning tree of DT(P) of maximum degree O(1) in O(nlogn) expected time. We generalize his result further to show that the same can be achieved even if the given spanning tree has some wrong edges, and even if the maximum degree requirement is dropped.

Devillers’ algorithm is similar to the more well-known O(nlogn) randomized algorithms for polygon triangulation by Seidel [54] and Clarkson, Tarjan, and Van Wyk [25], which are variants of standard O(nlogn) randomized incremental or random sampling algorithms [23, 24, 19], but with the point location steps sped up. We will describe our algorithm based on random sampling.

In this and subsequent sections, we will sometimes work with the more general notion of a plane straight-line graph, shortened to PSLG, i.e., a planar embedding of a graph where all edges are drawn as straight-line edges. Thus, a triangulation of a planar point set P is a connected PSLG such that: (i) its vertex set is precisely P, (ii) all its bounded faces are triangles, and (iii) the unbounded face is the complement of the convex hull CH(P).

It will also be more convenient to work in 3D, where 2D Delaunay triangulations and Voronoi diagrams are mapped to 3D convex hulls and lower envelopes of planes. We begin with some standard terminologies:

For a set of planes Π in 3, let LE(Π) denote the lower envelope of Π, that is, the set of points lying on some plane of Π but with no plane of Π below it. The vertical decomposition of LE(Π), denoted Decomp(Π), is a partition of the space below LE(Π) into vertical, truncated prisms that are unbounded from below and are bounded from above by a triangular face contained in LE(Π). The triangles bounding the prisms have vertices on LE(Π) and are defined by some canonical rule, such as triangulating each face of LE(Π) with diagonals from the point in the face with the smallest x-coordinate. (Since the faces are convex, such a triangulation is possible.) We also have to “triangulate” the infinite faces of LE(Π), that is, to split them into regions defined by three edges. We will refer to these prisms as cells.

For each point p=(α,β)2, let p denote the plane in 3 defined by z=2αx2βy+α2+β2. The plane p is tangent to the paraboloid z=x2y2 at the point p. For any set P of points, define P={ppP}.

For a set P of points in the plane, the xy-projection of the lower envelope of P is the Voronoi diagram of P (dual to the Delaunay triangulation DT(P)). The vertices and edges of LE(P) correspond to the vertices and edges of the Voronoi diagram of P in the plane. Since we assume general position, each vertex of LE(P) is contained in three planes of P. The xy-projection of a cell in Decomp(P) is a triangle contained in a Voronoi cell and defined by three Voronoi vertices.

For a vertex v=p1p2p33, the conflict list of 𝒗, denoted Pv, refers to the list of all planes in P strictly below v. Observe that p is in the conflict list Pv iff p is strictly inside the circumcircle through p1,p2,p3.

Lemma 2.

Let p1,p2,p3 be the vertices of the triangle , and let p,q be points such that pq intersects the interior of the triangle . If pq is an edge of DT({p1,p2,p3,p,q}), then p or q must be in the conflict list of p1p2p3.

Proof.

Figure 3: Proof of Lemma 2.

See Figure 3. If p and q are not inside the circumcircle of , then the edges of are edges of DT({p1,p2,p3,p,q}). Since the endpoints of pq are not inside , pq crosses some edge of . This would contradict the planarity of DT({p1,p2,p3,p,q}).

For a cell τ3, the conflict list of 𝝉, denoted Pτ, refers to the list of all planes in P intersecting τ. Observe that the conflict list of τ is just the union of the conflict lists of the three vertices of τ.

Before describing our main algorithm, we first present the following lemma, which uses a given spanning tree T to speed up conflict list computations. To deal with the scenario when the maximum degree of T is not bounded, we will work with weighted samples, or equivalently, samples of multisets.

Lemma 3.

Let P be a set of n points, and T be a spanning tree of P, where the edges around each vertex have been angularly sorted. Let P^ be the multiset where each point pP has multiplicity degT(p). Let R^ be a random (multi)subset of P^ of a given size r, and let R be the set R^ with duplicates removed. Suppose LE(R) is given. Then we can compute the conflict lists of all the cells in Decomp(R) in O(n+DTlogn) expected time, where DT is the number of edges of T that are not in DT(P).

Proof.

We preprocess DT(R) for point location [41]. The preprocessing takes O(r) time and a point location query can be answered in O(logr)O(logn) time.

For each point pP, let γp be the number of vertices of Decomp(R) whose conflict lists contain p.

We first describe how to compute, for each point pP, the triangle pDT(R) containing p. (Technically, we should add 3 vertices of a sufficiently large bounding triangle to both R and P, to ensure that p always exists, and to deal with vertices of Decomp(R) “at infinity”.)

To this end, we traverse the edges of the spanning tree T. For each edge pq of T, knowing p we can get to q by performing a linear walk in DT(R). However, if we cross more than logn triangles of DT(R), we switch to performing a point location query for q. This takes O(min{cpq,logn}) time, where cpq is the number of triangles of DT(R) crossed by pq. Iterating over all edges in T, we get p for all pP. The total time is

O(pqTmin{cpq,logn}). (1)

If pq is an edge of DT(P), then Lemma 2 implies that cpq is bounded by γp+γq. Therefore

pqTDT(P)cpqpP(γpdegT(p)),

which is proportional to the total conflict list size, with multiplicities included. By Clarkson and Shor’s analysis [24], the expected total conflict list size, with multiplicities included, is O(r|P^|/r)=O(n), where we are using the fact that |P^|=O(pdegT(p))=O(n).

On the other hand,

pqTDT(P)min{cpq,logn}O(DTlogn).

Plugging these in Equation 1, we get the claimed expected time bound.

One case not considered above is when pR. To begin the walk from p to q for a given edge pq in T, we need to find the triangle pqDT(R) incident to p that is crossed by the ray pq. To this end, during preprocessing, we can merge the sorted list of the edges of T around p with the sorted list of edges of DT(R) around p, for every pR; the total cost of merging is linear. Afterwards, each triangle pq can be identified in constant time.

Now, p maps to a vertex of LE(P) whose conflict list contains p. By a graph search, we can generate all vertices of LE(P) whose conflict lists contain p, for each pP. By inversion, we obtain the conflict lists of all vertices of LE(P), from which we get the conflict lists of all cells in Decomp(P). All this takes additional time linear in the total conflict list size, which is O(n) in expectation as mentioned by Clarkson and Shor’s bound.

Theorem 4.

Given a spanning tree T of a set P of n points in the plane, the Delaunay triangulation DT(P) can be constructed in O((n+DTlogn)logn) expected time, where DT is the number of edges of T that are not in DT(P).

Proof.

Let P^ be the multiset where each point pP has multiplicity degT(p); note that |P^|=O(n). Define a sequence of random samples R^1R^2R^P^, where R^i has size |P^|/si for a sequence s1,s2,,s to be chosen later. Let Ri be the set R^i with duplicates removed.

Given LE(Ri), we describe how to compute LE(Ri+1). First, we compute the conflict lists of all cells in Decomp(Ri) by Lemma 3 in O(n+DTlogn) expected time. For each cell τDecomp(Ri), we compute LE((Ri+1)τ)τ by a standard lower envelope algorithm in O(|(Ri+1)τ|log|(Ri+1)τ|) time. Finally, we glue all these envelopes to obtain LE(Ri+1). The running time is

O(τDecomp(Ri)|(Ri+1)τ|log|(Ri+1)τ|),

which by Clarkson and Shor’s bound [24] has expected value at most

O(|R^i|(|R^i+1|/|R^i|)log(|R^i+1|/|R^i|))=O((n/si+1)log(si/si+1)).

The total expected time is upper-bounded by O((n+DTlogn)+i=11(n/si+1)logsi). Setting s1=n, si+1=logsi, …, s=1, with =O(logn) yields the theorem.

Corollary 5.

Given a triangulation G of a set P of n points in the plane, the Delaunay triangulation DT(P) can be constructed in O((n+Dlogn)logn) expected time, where D is the (unknown) number of edges in G that are not in DT(P).

Proof.

Let T be any spanning tree of G. We just apply Theorem 4, noting that DTD (since TG, and edges in G around each vertex are already sorted).

(Chazelle and Mulzer [17] obtained a similar expected time bound O(nlogn+klogn) for a different problem, on computing the Delaunay triangulation of a subset of n edges with k connected components, given the Delaunay triangulation of a possibly much larger point set.)

Since Theorem 4 holds even if T has self-crossings, our result holds even if the given G is a combinatorial triangulation that may have self-crossings.

Corollary 6.

Given a set P of n points in the plane and a combinatorial triangulation G with vertex set P that may have self-crossings, the Delaunay triangulation DT(P) can be constructed in O((n+Dlogn)logn) expected time, where D is the (unknown) number of edges in G that are not in DT(P).

Proof.

Let dp be the number of triangular faces in G incident to p that are not triangles in DT(P). The neighbors of each vertex p in G are almost sorted correctly except possibly for O(dp) displaced elements; they can be sorted in O(degG(p)+dplogdp) time by known adaptive sorting algorithms [32]. The total sorting time is thus O(n+pdplogn)=O(n+Dlogn).

Let T be any spanning tree of G. We can now apply Theorem 4 to T as before.

Incidentally, we also obtain an algorithm for EMST sensitive to the number of wrong edges:

Corollary 7.

Given a spanning tree T of a set P of n points in the plane, the Euclidean minimum spanning tree EMST(P) can be constructed in O((n+Demstlogn)logn) expected time, where Demst is the (unknown) number of edges of T that are not in EMST(P).

Proof.

Since the maximum degree of EMST(P) is at most 6, every vertex p of degree at least 7 in T is adjacent to at least degT(p)6 edges not in EMST(P). This implies that pmax{degT(p)6,0}O(Demst). We can sort the edges of T around each vertex, in total time O(pdegT(p)logdegT(p))O(n+pmax{degT(p)6,0}logn)=O(n+Demstlogn). We can now apply Theorem 4, noting that DTDemst (since EMST(P)DT(P)).

Having computed DT(P), we can then obtain EMST(P) by computing a minimum spanning tree of DT(P). For this, we can use the linear-time algorithms for planar graphs by Matsui [49] or by Cheriton and Tarjan [20] (the general, linear-time randomized algorithm of Karger, Klein and Tarjan [39] is not necessary).

We can also obtain a similar result for the relative neighborhood graph [38]: pq forms an edge iff the intersection of the two disks centered at p and q of radius pq does not have any points of P inside. The relative neighborhood graph contains the Euclidean minimum spanning tree and is thus connected.

Corollary 8.

Given a set P of n points in the plane and a connected PSLG G with vertex set P, the relative neighborhood graph RNG(P) can be constructed in O((n+Drnglogn)logn) expected time, where Drng is the (unknown) number of edges of G that are not in RNG(P).

Proof.

Let T be any spanning tree of G. We just apply Theorem 4, noting that DTDrng (since TG and RNG(G)DT(G), and edges in G around each vertex are already sorted). Having computed DT(P), we can then obtain RNG(G) in linear time [44].

A similar result holds for the Gabriel graph or, more generally, the β-skeleton for any β[1,2] [38].

4 An optimal randomized 𝑶(𝒏+𝑫𝐥𝐨𝐠𝒏) algorithm

In this section, we present our optimal randomized algorithm for computing the Delaunay triangulation in terms of the parameter D, eliminating the extra logn factor from the algorithm in the previous section. This is interesting since for related problems such as polygon triangulation, removing the extra logn factor from Clarkson, Tarjan, and Van Wyk’s or Seidel’s algorithm [25, 54] is difficult to do (cf. Chazelle’s linear-time polygon triangulation algorithm [13]).

Our new approach is to stop the iterative algorithm in the proof of Theorem 4 earlier after a constant number of rounds, when the conflict list sizes gets sufficiently small (say, O(loglogn)), and then switch to a different strategy. For this part, we use planar graph separators (t-divisions) on actual Delaunay triangulations (of random subsets).

Theorem 9.

Given a triangulation G of a set P of n points in the plane, the Delaunay triangulation DT(P) can be constructed in O(n+Dlogn) expected time, where D is the (unknown) number of edges in G that are not in DT(P).

Proof.

Note that at most O(D) of the triangles of G are not in DT(P), or equivalently, at most O(D) of the triangles of DT(P) are not in G (since G and DT(P) have the same number of triangles).

Call a triangle of DT(P) good if it is in G, and bad otherwise.

Let T be any spanning tree of G. Since T has at most D edges not in DT(P), we can apply the algorithm in Theorem 4. However, we will stop the algorithm after iterations with a nonconstant choice of s instead of s=1. Once we have computed LE(R), we will switch to a different strategy to finish the computation of LE(P), as described below.

First, we construct the conflict lists of Decomp(R) by Lemma 3 in O(n+Dlogn) expected time.

Call a cell exceptional if it has conflict list size more than bs for some parameter b to be set later. We directly construct the lower envelope LE(Pτ)τ in O(|Pτ|log|Pτ|) time for all exceptional cells τDecomp(R). By Chazelle and Friedman’s “Exponential Decay Lemma” [16], the expected number of cells with conflict list size more than is is O(2Ω(i)n/s), and thus the expected total cost of this step is at most O(ib2Ω(i)(n/s)(is)log(is))=O(2Ω(b)nlogs).

We compute a t-division of the dual planar graph of the xy-projection of Decomp(R) in O(n) time for some parameter t. This yields O(n/(st)) regions, which we will call supercells, each of which consists of O(t) cells in Decomp(R) and has O(t) boundary walls.

We compute LE(Pβ)β for each boundary wall β. This costs O(n/(st)t(bs)log(bs)) time (since exceptional cells have already been taken care of).

The vertices of LE(P) at its boundary walls map to chains of edges in DT(P) when returning to 2. (Some past output-sensitive convex hull algorithms also used these kinds of chains for divide-and-conquer [30, 12, 3], but we will use them in a different way.) These edges divide DT(P) into regions, where each region is associated to one supercell (although one supercell could be associated with multiple regions). We can remove “spikes” (i.e., an edge where both sides bound the same region). For each such region, we check whether all its boundary edges appear in G, and if so, check whether all triangles in G inside the region are locally Delaunay (i.e., for every neighboring pair of triangles p1p2p3 and p1p2p4 in G inside the region, we have p4 outside the circumcenter through p1,p2,p3). If the checks are true, then we know that all triangles in G inside the region are correct Delaunay triangles,333If a triangulation G satisfies the local Delaunay property inside a region γ, and all the boundary edges of γ are correct Delaunay edges, then the part of G inside γ are correct Delaunay triangles. This fact follows immediately, for example, from known properties on constrained Delaunay triangulations [43], with γ as constrained edges. and will mark the region as such. All these checks take linear total time.

For each supercell γ, if its corresponding regions are marked correct, then we have all the vertices in LE(P)γ for free, and we say that the supercell γ is good. Otherwise, the supercell γ is bad, and we just compute the vertices in LE(P)γ by computing LE(Pτ)τ for each cell τ of γ, in time O(t(bs)log(bs)) (again, exceptional cells have already been taken care of).

Observe that if the Delaunay triangles corresponding to all vertices in LE(P)γ are all good, then the supercell γ must be good. Thus, each bad supercell contains at least one vertex in LE(P) whose Delaunay triangle is bad. So, the number of bad supercells is at most O(D).

We conclude that from LE(P), we can compute LE(P) in expected time

O(n+Dlogn+n/(st)t(bs)log(bs)+Dt(bs)log(bs)+2Ω(b)nlogs).

For example, we can choose b=s and t=s4 and obtain the time bound O(n+Dlogn+DsO(1)).

Recall that the algorithm from the proof of Theorem 4 has expected time bound O((n+Dlogn)+i=11(n/si+1)logsi). Setting s1=n, s2=logn, s3=loglogn with =3 yields overall time bound O(n+Dlogn+D(loglogn)O(1))=O(n+Dlogn).

The same result holds also when the given graph G is not a triangulation but just a PSLG (possibly disconnected), with missing edges.

Corollary 10.

Given a set P of n points in the plane and a PSLG G with vertex set P, the Delaunay triangulation DT(P) can be constructed in O(n+Dlogn) expected time, where D is redefined as the (unknown) number of edges in DT(G) that are not in G.

Proof.

The number of missing edges is at most D, and one can easily first triangulate the non-triangle faces of G in O(DlogD) time and then run our algorithm in Theorem 9.

5 An 𝑶(𝒏𝐥𝐨𝐠𝒏+𝒏𝐥𝐨𝐠𝒅cross) algorithm

In this section, we present an algorithm for computing the Delaunay triangulation which is sensitive to the parameter dcross. The algorithm uses planar graph separators or r-divisions in the input graph G, like in the deterministic algorithm in Section 2, but the divide-and-conquer is different. The difficulty is that even when dcross is small, the number D of wrong edges could be large. Our idea is to recursively compute the correct Delaunay triangulation of each region, and combine them to obtain a new triangulation where the number of wrong edges is smaller (O(n/polylogn)); afterwards, we can apply our earlier D-sensitive algorithm to fix this triangulation. The depth of the recursion is O(logn) (but this is not related to the logn factor in the randomized algorithm in Section 3).

We begin with known subroutines on ray shooting:

Lemma 11.

Given h disjoint simple polygons with a total of n vertices in the plane, we can build a data structure in O(n+h2logO(1)h) time so that a ray shooting query can be answered in O(logn) time.

More generally, given a parameter δ[0,1], we can build a data structure in O(n+h2δlogO(1)h) time so that a ray shooting query can be answered in O(hδlogn) time.

Proof.

The first part is due to Chen and Wang [18]. The second part follows by dividing the input into hδ subcollection of h1δ polygons each, and applying the data structure to each subcollection: the preprocessing time becomes O(n+hδ(h1δ)2logO(1)h) and the query time becomes O(hδlogn) (since ray shooting is a “decomposable” problem – knowing the answers to a query for each of the hδ subcollections, we would know the overall answer).

Lemma 12.

Given a connected PSLG G with n vertices and a set Q of line segments, we can compute the subset A of all edges of G that cross Q, in O(n+(|Q|+|A|)2δlogO(1)n) time for a sufficiently small constant δ>0.

Proof.

Let r[1,|Q|] be a parameter to be chosen later. Let R be a (1/r)-net of Q of size O(rlogr), i.e., a subset RQ such that every line segment crossing at least |Q|/r segments of Q must cross at least one segment of R. By known results on (1/r)-nets [48], this takes O(|Q|rO(1)) deterministic time (if randomization is allowed, a random sample already satisfies the property with good probability).

We preprocess G in O(n) time so that a ray shooting query can be answered in O(logn) time by Lemma 11 (since G can be turned into a tree by introducing cuts, and a tree can be viewed as a simple polygon by traversing each edge twice). For each segment qR, we find all edges of G crossing q in time O(logn) times the number of crossings, by repeated ray shooting. The total time of this step is at most O(n+(rlogr)|A|logn).

Let AR denote the subset of all edges of G that cross R. We next preprocess GAR in O(n+|A|2δlogO(1)n) time so that a ray shooting query can be answered in O(|A|δlogn) time by Lemma 11 (since GAR has at most O(|AR|)O(|A|) components and can be viewed as O(|A|) simple polygons). For each segment qQ, we find all edges of GAR crossing q in time O(|A|δlogn) times the number of crossings, by repeated ray shooting. Each edge in GAR can cross at most |Q|/r segments of Q because R is a (1/r)-net; thus, the total number of crossings between GAR and Q is at most O(|A||Q|/r). The total time of this step is at most O(n+|A|2δlogO(1)n+|A||Q|/r|A|δlogn). The lemma follows by setting r=|Q|2δ and choosing a sufficiently small δ>0 (in our application, it is not important to optimize the value of δ).

Lemma 13.

Every (not necessarily connected) planar graph with n vertices has at most 3n6 edges and at least 3n6O(z) edges, where z is the number of edges appearing in non-triangular faces plus the number of isolated vertices.

Proof.

By adding O(z) edges, we can turn the graph into a fully triangulated (i.e., maximal planar) graph, which has exactly 3n6 edges.

Theorem 14.

Given a triangulation G of a set P of n points in the plane, the Delaunay triangulation DT(P) can be constructed in O(nlogn+nlogdcross) deterministic time, where dcross is the (unknown) maximum number of edges of DT(P) that an edge of G may cross.

Proof.

Consider a region γ0, which is the union of a connected set of at most μ triangles of G, with at most cμ boundary edges, for a sufficiently large constant c. (Initially, γ0 is the entire convex hull of P.) Let Vγ0 denote the set of vertices of all triangles in γ0. We describe a recursive algorithm to compute DT(Vγ0):

  1. 1.

    First we compute, in O(μ) time, a t-division Γ of the dual graph of the part of G inside γ0, for some t to be chosen later. Each region γ of Γ is the union of a connected set of at most t triangles, with at most ct boundary edges. Let Vγ denote the set of vertices of all triangles in γ.

  2. 2.

    For each region γ, we compute DT(Vγ) recursively.

  3. 3.

    For each region γ, let Xγ be the set of all edges in DT(Vγ) that cross the boundary γ, and let Yγ be the set of all edges in DT(Vγ) that are contained in γ.

    We bound the number of “wrong” edges in Yγ via an indirect argument, by considering DT(P): We know that the number of edges and triangles of DT(P) crossing γ is at most O(dcrosst). The number of edges of DT(P) contained in γ must then be at least 3|Vγ|O(dcrosst) by Lemma 13. Since all edges of DT(P) contained in γ are in both Yγ and in DT(Vγ0), there are at least 3|Vγ|O(dcrosst) edges of Yγ that are in DT(Vγ0). This implies that there are at most 3|Vγ|(3|Vγ|O(dcrosst))=O(dcrosst) “wrong” edges of Yγ that are not in DT(Vγ0).

    In particular, we also have |Yγ|3|Vγ|O(dcrosst), and |Xγ|3|Vγ||Yγ|=O(dcrosst).

    We can compute Xγ by applying Lemma 12 to the triangulation DT(Vγ) and the line segments in γ, in O(t+(dcrosst)2δlogO(1)t) time. We can then generate Yγ in O(t) additional time by a graph traversal. The total running time for this step is O(μ/t(t+(dcrosst)2δlogO(1)t))=O(μ+(dcross2δμ/tδ/2)logO(1)t).

  4. 4.

    For each region γ, we extend Yγ to obtain a complete triangulation Gγ of γ using all the vertices in Vγ (but no Steiner points), by triangulating the non-triangular faces in Yγγ inside γ. Since γ has size O(t) and |Yγ|3|Vγ|O(dcrosst), the non-triangular faces have complexity O(dcrosst) and can be triangulated in O(dcrosstlog(dcrosst)) time. This cost is absorbed by the cost of other steps.

  5. 5.

    We combine the triangulations Gγ for all γ in Γ to get a complete triangulation G of DT(Vγ0), by triangulating the non-triangular faces in Yγ0CH(Vγ0). These non-triangular faces have total complexity O(μ), and so can be triangulated in O(μlogμ) time.

  6. 6.

    Finally, apply our previous algorithm from Theorem 1 to obtain DT(Vγ0) from G.

    The total number of “wrong” edges of G that are not in DT(Vγ0) is at most O(μ/tdcrosst+μ)=O(dcrossμ/t+μ). So, this step takes O(μ+(dcrossμ/t+μ)log3μ) deterministic time.

The total time satisfies the following recurrence:

T(μ)=maxμ1,μ2,t:μ1+μ2+μ(iT(μi)+O(μ+(dcross2δ/tδ/2+dcross/t)μlogO(1)μ)).

Let b be a parameter to be chosen later. Setting t=max{logcμ,bc} for a sufficiently large constant c (depending on δ) gives

T(μ)=maxμ1,μ2,max{logcμ,bc}:μ1+μ2+μ(iT(μi)+O((1+dcross2/b2)μ)).

Combined with the naive bound T(μ)O(μlogμ)O(μlogb) for the base case when μbc, the recurrence solves to T(μ)=O((1+dcross2/b2)μlogμ+μlogb).

If we know dcross, we can simply set b=dcross. If not, we can “guess” its value using an increasing sequence. More precisely, for j=log(logμ),log(logμ)+1,, we set b=22j and run the algorithm with running time capped at O(μ2j). The algorithm succeeds at the latest when j reaches max{log(logμ),loglogdcross}, and the total running time is dominated by that of the last iteration, which is O(μlogμ+μlogdcross).

The same approach can be applied to EMSTs:

Theorem 15.

Given a triangulation G of a set P of n points in the plane, the Euclidean minimum spanning tree EMST(P) and the Delaunay triangulation DT(P) can be constructed in O(n(logn)2+nlogdcross-emst) expected time, where dcross-emst is the (unknown) maximum number of edges of EMST(P) that an edge of G may cross.

Proof.

We modify the algorithm in the proof of Theorem 14, replacing DT() with EMST() and “triangulations” with “spanning trees”. All the coefficients 3 are replaced with 1. In step 6, we invoke Corollary 7 instead (which causes the extra logn factor). When guessing dcross-emst, if we cap the running time at Cμ2j for a sufficiently large constant C, the probability that j needs to reach max{log(logμ),loglogdcross-emst+s} for a given s is O(1/C)s, so the expected total running time is

s0O(1/C)sC(μlogμ+2sμlogdcross-emst)=O(μlogμ+μlogdcross-emst).

After computing EMST(P), we can obtain DT(P) e.g. by Devillers’ algorithm [28] in O(nlogn) additional expected time.

We can also obtain results involving multiple parameters; for example, it is not difficult to adapt the proof of Theorem 14 to get a Delaunay triangulation algorithm with running time O(nlogn+Dlogdcross).

6 An 𝑶(𝒏𝐥𝐨𝐠𝐥𝐨𝐠𝒏+𝒏𝐥𝐨𝐠(𝟏/𝝆)) algorithm in the probabilistic model

Using our dcross-sensitive algorithm, we can immediately obtain an efficient algorithm for Delaunay triangulations in the probabilistic model.

Lemma 16.

Given a set P of n points in the plane and ρ(0,1), let R be a subset of the edges of DT(P) where each edge is selected independently with probability ρ. Let G be any triangulation of P that contains R. Let dcross be the maximum number of edges of DT(P) that an edge of G may cross. Then dcrossO((1/ρ)logn) with high probability.

Proof.

This follows from a standard sampling-based hitting set or epsilon-net argument: None of the edges of G cross R. For a fixed p,qP such that pq crosses more than (c/ρ)lnn edges of DT(P), the probability that pq does not cross R is at most (1ρ)(c/ρ)lnn(eρ)(c/ρ)lnn=nc. By a union bound, the probability that dcross>(c/ρ)lnn is at most nc+2.

Corollary 17.

Given a set P of n points in the plane and ρ(0,1), let R be a subset of the edges of DT(P) where each edge is selected independently with probability ρ. Let G be any triangulation of P that contains R. Given G, the Delaunay triangulation DT(P) can be constructed in O(nloglogn+nlog(1/ρ)) time with high probability.

Proof.

We just apply Theorem 14 in combination with the preceding lemma.

A similar approach works for EMST:

Lemma 18.

Given a set P of n points in the plane and ρ(0,1), let R be a subset of the edges of EMST(P) where each edge is selected independently with probability ρ. Let T be any spanning tree that contains R and does not have any crossings. Let dcross-emst be the maximum number of edges of EMST(P) that an edge of T may cross. Then dcross-emstO((1/ρ)logn) with high probability.

Corollary 19.

Given a set P of n points in the plane and ρ(0,1), let R be a subset of the edges of EMST(P) where each edge is selected independently with probability ρ. Let T be any spanning tree that contains R and does not have any crossings. Given T, the Euclidean minimum spanning tree EMST(P) and the Delaunay triangulation DT(P) can be constructed in O(nloglogn+nlog(1/ρ)) time with high probability.

Proof.

We can compute a triangulation G of P from T, e.g., by Chazelle’s algorithm in linear time [13] or Seidel’s algorithm in O(nlogn) expected time [54]. We can then apply Theorem 15 in combination with the preceding lemma.

A similar result holds in a random flip model:

Lemma 20.

Given a set P of n points in the plane and ρ(0,1), consider the following process:

() Initialize G=DT(P). Let m be the number of edges in G. For i=1,,(1ρ)m: pick a random edge ei from G, and if the two triangles incident to ei in G forms a convex quadrilateral, flip ei in G.

At the end of the process, let dcross be the maximum number of edges of DT(P) that an edge of G may cross. Then dcrossO((1/ρ)logn) with high probability.

Proof.

Let t=(1ρ)m. For the analysis, it is helpful to assign a distinct label (e){1,,m} to each edge e in G. When an edge is flipped, we give the new edge the same label as the old edge, to maintain the invariant. Then (e1),,(et) are independent, uniformly distributed random variables from {1,,m}. Consider a fixed p,qP such that pq crosses more than b:=(c/ρ)lnn edges of DT(P). Let B be the labels of a fixed subset of b of these edges. The probability that pq is in the final G is at most the probability that {(e1),,(et)} contains B, which is equal to (tb)b!mb=t!(tb)!mbtbmb=(1ρ)beρb=nc. By a union bound, the probability that dcross>(c/ρ)lnn is at most nc+2.

Corollary 21.

Given a set P of n points in the plane and ρ(0,1), let G be a triangulation of P generated by the process () above. Given G, the Delaunay triangulation DT(P) can be constructed in O(nloglogn+nlog(1/ρ)) time with high probability.

7 An 𝑶(𝒏𝐥𝐨𝐠𝒏+𝒏𝐥𝐨𝐠𝒅vio) algorithm

Using our dcross-sensitive algorithm, we can also immediately obtain a dvio-sensitive algorithm for Delaunay triangulations, after proving that dcross is always upper-bounded by O(dvio2).

Lemma 22.

Given a triangulation G of a set P of n points in the plane, let dvio be the maximum number of points of P that the circumcircle of a triangle of G may contain. Consider a triangle qq′′q′′′ in G. The number of edges of DT(P) incident to q that cross q′′q′′′ is at most dvio.

Proof.

Suppose qq is an edge of DT(P) that crosses q′′q′′′. Then q must be inside the circumcircle of qq′′q′′′ (because otherwise, qq and q′′q′′′ would both be edges of DT({q,q,q′′,q′′′}), contradicting planarity of Delaunay triangulations). So, there are at most dvio choices of q.

Lemma 23.

Given a triangulation G of a set P of n points in the plane, let dcross be the maximum number of edges of DT(P) that an edge of G may cross, and let dvio be the maximum number of points of P that the circumcircle of a triangle of G may contain. Then dcrossO(dvio2).

Proof.

Consider an edge pp of G. Let ppp′′ be a triangle of G incident to this edge. Let C be the circumcircle of ppp′′. Let H be the subgraph of G induced by the points inside C.

Suppose qq is an edge of DT(P) that crosses pp. Then at least one of q and q must be inside C (because otherwise, pp and qq would both be edges of DT({p,p,q,q}), contradicting planarity of Delaunay triangulations). W.l.o.g., suppose q is inside C. Let qq′′q′′′ be the triangle in G incident to q such that q lies in the wedge between qq′′ and qq′′′. See Figure 4. Note that qq′′q′′′ does not intersect pp (since G is planar). Thus, qq must intersect q′′q′′′. By Lemma 22, there are at most dvio choices of q for each fixed qq′′q′′′.

Furthermore, we must have one of the following: (i) q′′ or q′′′ is inside C, or (ii) p and p lies in the wedge between qq′′ and qq′′′. In case (i), there are at most 2degH(q) choices of qq′′q′′′ for each fixed q. In case (ii), there is only one choice of qq′′q′′′ per q. Thus, the total number of choices of qq′′q′′′ is O(q2degH(q)+1)), which is O(dvio) (since H is a planar graph with at most dvio vertices). The total number of choices of qq is O(dvio2).

Figure 4: Proof of Lemma 23. The left example is in case (i); the right example is in case (ii).
Corollary 24.

Given a triangulation G of a set P of n points in the plane, the Delaunay triangulation DT(P) can be constructed in O(nlogn+nlogdvio) deterministic time, where dvio is the (unknown) maximum number of points of P that the circumcircle of a triangle of G may contain.

Alternatively, it is easier to prove the inequality dcross-emstO(dvio) (since the EMST has constant maximum degree); we can then apply Theorem 15 to obtain the almost same result, except with one more logn factor.

References

  • [1] Algorithms with predictions. https://algorithms-with-predictions.github.io/. Led and managed by Alexander Lindermayr and Nicole Megow.
  • [2] Alok Aggarwal, Leonidas J. Guibas, James B. Saxe, and Peter W. Shor. A linear-time algorithm for computing the Voronoi diagram of a convex polygon. Discret. Comput. Geom., 4:591–604, 1989. doi:10.1007/BF02187749.
  • [3] Nancy M. Amato, Michael T. Goodrich, and Edgar A. Ramos. Parallel algorithms for higher-dimensional convex hulls. In Proc. 35th Annual Symposium on Foundations of Computer Science (FOCS), pages 683–694, 1994. doi:10.1109/SFCS.1994.365724.
  • [4] Nicolas Auger, Vincent Jugé, Cyril Nicaud, and Carine Pivoteau. On the worst-case complexity of TimSort. In Proc. 26th Annual European Symposium on Algorithms (ESA), pages 4:1–4:13, 2018. doi:10.4230/LIPIcs.ESA.2018.4.
  • [5] Franz Aurenhammer and Rolf Klein. Voronoi diagrams. In Jörg-Rüdiger Sack and Jorge Urrutia, editors, Handbook of Computational Geometry, pages 201–290. North Holland / Elsevier, 2000. doi:10.1016/b978-044482537-7/50006-1.
  • [6] Xingjian Bai and Christian Coester. Sorting with predictions. In Advances in Neural Information Processing Systems 36 (NeurIPS), 2023. URL: http://papers.nips.cc/paper_files/paper/2023/hash/544696ef4847c903376ed6ec58f3a703-Abstract-Conference.html.
  • [7] Jérémy Barbay and Gonzalo Navarro. On compressing permutations and adaptive sorting. Theor. Comput. Sci., 513:109–123, 2013. doi:10.1016/J.TCS.2013.10.019.
  • [8] Jean-Daniel Boissonnat and Mariette Yvinec. Algorithmic Geometry. Cambridge University Press, 1998.
  • [9] Kevin Buchin and Wolfgang Mulzer. Delaunay triangulations in O(sort(n)) time and more. J. ACM, 58(2):6:1–6:27, 2011. doi:10.1145/1944345.1944347.
  • [10] Sergio Cabello and Panos Giannopoulos. Searching in Euclidean spaces with predictions. In Proceedings of the 22nd Workshop on Approximation and Online Algorithms (WAOA), volume 15269 of Lecture Notes in Computer Science, pages 31–45, 2024. doi:10.1007/978-3-031-81396-2_3.
  • [11] Timothy M. Chan. A simpler linear-time algorithm for intersecting two convex polyhedra in three dimensions. Discret. Comput. Geom., 56(4):860–865, 2016. doi:10.1007/s00454-016-9785-3.
  • [12] Timothy M. Chan, Jack Snoeyink, and Chee-Keng Yap. Primal dividing and dual pruning: Output-sensitive construction of four-dimensional polytopes and three-dimensional Voronoi diagrams. Discret. Comput. Geom., 18(4):433–454, 1997. doi:10.1007/PL00009327.
  • [13] Bernard Chazelle. Triangulating a simple polygon in linear time. Discret. Comput. Geom., 6:485–524, 1991. doi:10.1007/BF02574703.
  • [14] Bernard Chazelle. An optimal algorithm for intersecting three-dimensional convex polyhedra. SIAM J. Comput., 21(4):671–696, 1992. doi:10.1137/0221041.
  • [15] Bernard Chazelle, Olivier Devillers, Ferran Hurtado, Mercè Mora, Vera Sacristán, and Monique Teillaud. Splitting a Delaunay triangulation in linear time. Algorithmica, 34(1):39–46, 2002. doi:10.1007/S00453-002-0939-8.
  • [16] Bernard Chazelle and Joel Friedman. A deterministic view of random sampling and its use in geometry. Comb., 10(3):229–249, 1990. doi:10.1007/BF02122778.
  • [17] Bernard Chazelle and Wolfgang Mulzer. Computing hereditary convex structures. Discret. Comput. Geom., 45(4):796–823, 2011. doi:10.1007/S00454-011-9346-8.
  • [18] Danny Z. Chen and Haitao Wang. Visibility and ray shooting queries in polygonal domains. Comput. Geom., 48(2):31–41, 2015. doi:10.1016/J.COMGEO.2014.08.003.
  • [19] Otfried Cheong, Ketan Mulmuley, and Edgar Ramos. Randomization and derandomization. In Jacob E. Goodman, Joseph O’Rourke, and Csaba D. Tóth, editors, Handbook of Discrete and Computational Geometry. CRC Press, 2017. URL: https://www.csun.edu/˜ctoth/Handbook/chap44.pdf.
  • [20] David R. Cheriton and Robert Endre Tarjan. Finding minimum spanning trees. SIAM J. Comput., 5(4):724–742, 1976. doi:10.1137/0205051.
  • [21] L. Paul Chew. Building Voronoi diagrams for convex polygons in linear expected time. Technical Report PCS-TR90-147, Dept. Math. Comput. Sci., Darmouth College, Hanover, NH, 1986.
  • [22] Francis Y. L. Chin and Cao An Wang. Finding the constrained Delaunay triangulation and constrained Voronoi diagram of a simple polygon in linear time. SIAM J. Comput., 28(2):471–486, 1998. doi:10.1137/S0097539795285916.
  • [23] Kenneth L. Clarkson. Randomized geometric algorithms. In D.-Z. Du and F. K. Hwang, editors, Computing in Euclidean Geometry, pages 117–162. World Scientific, 1992.
  • [24] Kenneth L. Clarkson and Peter W. Shor. Application of random sampling in computational geometry, II. Discret. Comput. Geom., 4:387–421, 1989. doi:10.1007/BF02187740.
  • [25] Kenneth L. Clarkson, Robert Endre Tarjan, and Christopher J. Van Wyk. A fast Las Vegas algorithm for triangulating a simple polygon. Discret. Comput. Geom., 4:423–432, 1989. doi:10.1007/BF02187741.
  • [26] Vincent Cohen-Addad, Tommaso d’Orsi, Anupam Gupta, Euiwoong Lee, and Debmalya Panigrahi. Learning-augmented approximation algorithms for maximum cut and related problems. In Advances in Neural Information Processing Systems 38 (NeurIPS), 2024. URL: http://papers.nips.cc/paper_files/paper/2024/hash/2db08b94565c0d582cc53de6cee5fd47-Abstract-Conference.html.
  • [27] Mark de Berg, Otfried Cheong, Marc J. van Kreveld, and Mark H. Overmars. Computational geometry: Algorithms and Applications. Springer, 3rd edition, 2008.
  • [28] Olivier Devillers. Randomization yields simple O(nlogn) algorithms for difficult Ω(n) problems. Int. J. Comput. Geom. Appl., 2(1):97–111, 1992. doi:10.1142/S021819599200007X.
  • [29] Olivier Devillers, Giuseppe Liotta, Franco P. Preparata, and Roberto Tamassia. Checking the convexity of polytopes and the planarity of subdivisions. Comput. Geom., 11(3-4):187–208, 1998. doi:10.1016/S0925-7721(98)00039-X.
  • [30] Herbert Edelsbrunner and Weiping Shi. An O(nlog2h) time algorithm for the three-dimensional convex hull problem. SIAM J. Comput., 20(2):259–269, 1991. doi:10.1137/0220016.
  • [31] David Eppstein, Michael T. Goodrich, and Vinesh Sridhar. Computational geometry with probabilistically noisy primitive operations. In Proc. 19th International Symposium on Algorithms and Data Structures (WADS), pages 24:1–24:20, 2025. doi:10.4230/LIPIcs.WADS.2025.24.
  • [32] Vladimir Estivill-Castro and Derick Wood. A survey of adaptive sorting algorithms. ACM Comput. Surv., 24(4):441–476, 1992. doi:10.1145/146370.146381.
  • [33] Greg N. Federickson. Fast algorithms for shortest paths in planar graphs, with applications. SIAM Journal on Computing, 16(6):1004–1022, 1987. doi:10.1137/0216064.
  • [34] Steven Fortune. Voronoi diagrams and Delaunay triangulations. In Jacob E. Goodman and Joseph O’Rourke, editors, Handbook of Discrete and Computational Geometry, pages 705–721. Chapman and Hall/CRC, 3rd edition, 2017. URL: https://www.csun.edu/˜ctoth/Handbook/chap27.pdf.
  • [35] Joachim Gudmundsson, Mikael Hammar, and Marc J. van Kreveld. Higher order Delaunay triangulations. Comput. Geom., 23(1):85–98, 2002. doi:10.1016/S0925-7721(01)00027-X.
  • [36] Sabine Hanke, Thomas Ottmann, and Sven Schuierer. The edge-flipping distance of triangulations. J. Univers. Comput. Sci., 2(8):570–579, 1996. doi:10.3217/JUCS-002-08-0570.
  • [37] John Iacono and Stefan Langerman. Proximate planar point location. In Proceedings of the 19th ACM Symposium on Computational Geometry (SoCG), pages 220–226, 2003. doi:10.1145/777792.777826.
  • [38] Jerzy W. Jaromczyk and Godfried T. Toussaint. Relative neighborhood graphs and their relatives. Proc. IEEE, 80(9):1502–1517, 1992. doi:10.1109/5.163414.
  • [39] David R. Karger, Philip N. Klein, and Robert Endre Tarjan. A randomized linear-time algorithm to find minimum spanning trees. J. ACM, 42(2):321–328, 1995. doi:10.1145/201019.201022.
  • [40] David G. Kirkpatrick. Efficient computation of continuous skeletons. In Proc. 20th Annual Symposium on Foundations of Computer Science (FOCS), pages 18–27, 1979. doi:10.1109/SFCS.1979.15.
  • [41] David G. Kirkpatrick. Optimal search in planar subdivisions. SIAM J. Comput., 12(1):28–35, 1983. doi:10.1137/0212002.
  • [42] Philip N. Klein, Shay Mozes, and Christian Sommer. Structured recursive separator decompositions for planar graphs in linear time. In Proceedings of the 45th ACM Symposium on Theory of Computing (STOC), pages 505–514, 2013. doi:10.1145/2488608.2488672.
  • [43] D. T. Lee and A. K. Lin. Generalized Delaunay triangulation for planar graphs. Discret. Comput. Geom., 1:201–217, 1986. doi:10.1007/BF02187695.
  • [44] Andrzej Lingas. A linear-time construction of the relative neighborhood graph from the Delaunay triangulation. Comput. Geom., 4:199–208, 1994. doi:10.1016/0925-7721(94)90018-3.
  • [45] Maarten Löffler and Wolfgang Mulzer. Triangulating the square and squaring the triangle: Quadtrees and Delaunay triangulations are equivalent. SIAM J. Comput., 41(4):941–974, 2012. doi:10.1137/110825698.
  • [46] Maarten Löffler and Jack Snoeyink. Delaunay triangulation of imprecise points in linear time after preprocessing. Comput. Geom., 43(3):234–242, 2010. doi:10.1016/J.COMGEO.2008.12.007.
  • [47] Pinyan Lu, Xuandi Ren, Enze Sun, and Yubo Zhang. Generalized sorting with predictions. In Proc. 4th Symposium on Simplicity in Algorithms (SOSA), pages 111–117, 2021. doi:10.1137/1.9781611976496.13.
  • [48] Jiří Matoušek. Epsilon-nets and computational geometry. In János Pach, editor, New Trends in Discrete and Computational Geometry, pages 69–89. Springer, 1993. doi:10.1007/978-3-642-58043-7_4.
  • [49] Tomomi Matsui. The minimum spanning tree problem on a planar graph. Discret. Appl. Math., 58(1):91–94, 1995. doi:10.1016/0166-218X(94)00095-U.
  • [50] Ross M. McConnell, Kurt Mehlhorn, Stefan Näher, and Pascal Schweitzer. Certifying algorithms. Comput. Sci. Rev., 5(2):119–161, 2011. doi:10.1016/j.cosrev.2010.09.009.
  • [51] Kurt Mehlhorn, Stefan Näher, Michael Seel, Raimund Seidel, Thomas Schilz, Stefan Schirra, and Christian Uhrig. Checking geometric programs or verification of geometric structures. Comput. Geom., 12(1-2):85–103, 1999. Preliminary version in SoCG 1996. doi:10.1016/S0925-7721(98)00036-4.
  • [52] Michael Mitzenmacher and Sergei Vassilvitskii. Algorithms with predictions. In Tim Roughgarden, editor, Beyond the Worst-Case Analysis of Algorithms, pages 646–662. Cambridge University Press, 2020. doi:10.1017/9781108637435.037.
  • [53] J. Ian Munro and Sebastian Wild. Nearly-optimal mergesorts: Fast, practical sorting methods that optimally adapt to existing runs. In Proc. 26th Annual European Symposium on Algorithms (ESA), pages 63:1–63:16, 2018. doi:10.4230/LIPIcs.ESA.2018.63.
  • [54] Raimund Seidel. A simple and fast incremental randomized algorithm for computing trapezoidal decompositions and for triangulating polygons. Comput. Geom., 1:51–64, 1991. doi:10.1016/0925-7721(91)90012-4.