On the Fragile Complexity of Geometric Algorithms
Abstract
Surprisingly, the question of bounding the maximum number of operations undergone by each individual element in an algorithm – known as the fragile complexity of the algorithm – has not received much attention. In a foundational paper, Afshani et al. (2019) developed the concept of fragility and explored classic problems such as sorting and selection from this perspective. Motivated by a suggestion for future research by Afshani et al., we initiate a study of fragile complexity in computational geometry. We obtain bounds on several time-honored questions in 2D such as computing the maxima, closest pair, convex hull, triangulation, and approximate Euclidean Minimum Spanning Tree (apx-EMST). Our algorithms for the maxima, convex hull, and triangulation problems are competitive with the classical algorithms in terms of worst-case runtime and guarantee polylogarithmic fragility. We present an time algorithm that returns a -apx-EMST and achieves fragility, thus matching the best known performance up to polylogarithmic factors.
Keywords and phrases:
Fragile complexity, convex hull, maxima, closest pair, algorithmic complexityFunding:
Boris Aronov: Partially supported by NSF Grant CCF-20-08551.Copyright and License:
2012 ACM Subject Classification:
Theory of computation Computational geometryEditor:
Pierre FraigniaudSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
Comparison-based algorithms are a fundamental and well-researched topic in computer science, and comprise a good fraction of most introductory algorithms courses. The traditional measure of the complexity of an algorithm is the total number of comparisons performed. For an input of elements, however, the traditional algorithms typically do not care how these comparisons are spread across the elements. For example, in the sorting algorithm Quicksort, some pivots undergo many comparisons, which is higher than the average comparisons per element for any optimal comparison-based sorting algorithm. Can one sort in comparisons where every element participates in comparisons?
Questions of the above flavor were considered in the seminal work of Afshani et al. [1], who studied the fundamental problems of sorting, selection, and median via the lens of fragile complexity. A comparison-based algorithm has fragile complexity if, for every input of elements, any element participates in at most comparisons during the execution of on . The fragile complexity of a problem is the minimum fragile complexity of any comparison-based algorithm solving that problem. We will soon highlight (and later use) some results from this foundational paper.
There are several motivations for considering the fragile complexity of a problem. Sometimes a comparison with an element results in the element undergoing some destructive phenomenon. Consider athletes being ranked via matches (comparisons), or ranking consumable objects (smørrebrød, beer, etc.) by comparisons. Every comparison has a physical toll on the athlete and reduces the amount of the consumable object, and so it is reasonable to ask whether there are algorithms that spread the comparisons across the elements evenly. In addition to the above, there may be privacy advantages in not using an element too many times. Furthermore, a procedure that involves using every item roughly an equal number of times may be perceived to have a lower bias compared to a procedure where some elements are involved in many more operations than others.
The original paper [1] ends with a tantalizing open question: what about the fragile complexity of geometric problems? They state: “In particular, it would be interesting to study “geometric orthogonal problems” such as finding the maxima of a set of points, detecting intersections between vertical and horizontal line segments, kd-trees, axis-aligned point location and so on. All of these problems can be solved using algorithms that simply compare the coordinates of points.” Apart from another work on the fragile complexity of adaptive algorithms [5], we are not aware of other research on fragile complexity.
In this work we address the fragile complexity of fundamental geometric problems that are standard in textbooks [10] for an introductory course on computational geometry: the problems we study are maxima, closest pair, convex hull, triangulation, and approximate Euclidean Minimum Spanning Tree (apx-EMST) problems. In most cases, existing algorithms for these problems have at least linear fragility. For example, the classical divide-and-conquer algorithm for closest pair compares a candidate closest-pair distance to a linear number of distances, forcing linear fragility. One could imagine needing to compute the closest pair of battery-powered sensors, where each operation involving a sensor, such as requesting its coordinates, uses up its battery, and no location information can be stored for later processing. In this setup, a fragility-sensitive algorithm would help control battery drainage for all sensors. The Euclidean MST has recently found numerous applications in clustering high-dimensional data [14], and one can imagine that finding algorithms for EMST with low fragility may offer privacy and fairness advantages.
A number of our conclusions are somewhat surprising: we argue, for example, that a triangulation of a point set, potentially containing linear-degree vertices, can be constructed with polylogarithmic fragility. We also argue that any closest-pair algorithm in an algebraic decision tree model has to operate on the pair of closest points at least times.
2 Overview and Results
We first define the models in which we will derive our upper and lower bounds.
Computation model.
In this paper, every problem we consider takes as input an array or list of items, such as numbers, points, or lines, which have real-valued attributes such as coordinates. Unless otherwise stated, the algorithms use the real RAM model of computation (without floors or ceilings) where decisions are made based on the signs of bounded-degree polynomials in the input attributes. The lower bounds use algebraic decision trees; see [11] for an overview. For some problems, we use a more restricted model.
Fragile complexity model.
Fix a specific algorithm solving a given problem, which stays in the algebraic decision tree/real RAM model. Consider the tree representing all possible computation and decision paths of the execution of the algorithm. The fragility of an item along an execution path is the number of operations it is involved in. The worst-case fragility of an item is the maximum number of operations it is involved in, along all possible executions paths. The fragility of the algorithm is the maximum fragility of any of the input items.
As we are also interested in the total work (or “cost” or “running time”) of our algorithm, we additionally measure the total number of real RAM operations performed along a worst-case execution path. For a randomized algorithm, we also examine the expected cost and fragility. We summarize the prior work next, and then state our problems and results.
Prior Work.
Prior work on fragile complexity has focused on comparison-based algorithms [1] and adaptive algorithms [5]. We utilize the following results from [1] in our work:
Minimum: Given a list of numbers, find the smallest number, only allowing comparisons of the form ; more precisely, return . If numbers repeat, return the index of one smallest.
Theorem 2.1 (Afshani et al. [1]).
There is an algorithm that solves Minimum with fragile complexity and runtime. Solving Minimum requires fragile complexity. The minimum element itself requires fragility.
The upper bound in Theorem 2.1 comes from computing the minimum via tournament tree.
Sorting: Given a list of numbers, find a permutation of the indices so that .
Theorem 2.2 (Ajtai et al. [3]).
The AKS sorting network solves Sorting with fragile complexity. Sorting has fragile complexity.
As a warmup for fragility, here is a proof of the Sorting fragility lower bound: Sorting has a lower bound of comparisons in the algebraic decision tree model. By the pigeonhole principle, the fragility of some element must be .
Our results.
We obtain results on the following geometric problems on sets of points through the lens of fragile complexity. To our knowledge, this has not been done before.
Staircase: The staircase of a list of points is the -ordered sequence of points in where no other point has both a larger - and a larger -coordinate. Given a list of points, output the sequence of indices of the staircase of .
Closest Pair: Given a list of points in the plane, find the closest pair among them. More precisely, return a pair of indices so that .
Convex Hull: The convex hull is the smallest convex set enclosing a set of points. Given a list of points, produce the vertices of the convex hull of in counterclockwise order.
Triangulation: A triangulation of a point set is a subdivision of its convex hull into triangles whose edges form a maximal set of non-crossing segments connecting pairs of points. Given a set of points, produce a triangulation of the point set.
Approximate Euclidean MST: The Euclidean Minimum Spanning Tree (EMST) of a point set is a spanning tree of whose edges have minimum total length among all spanning trees on , where the length of an edge is the Euclidean () distance between its vertices. A -approximate EMST (apx-EMST) is a spanning tree of whose total length is at most times the length of the EMST. Given a set of points in the plane, find an approximate Euclidean MST, for some .
Our results are given in the table below. Our bounds for staircase are tight; a logarithmic gap remains in the other problems.
| Problem | Upper Bound | Lower Bound |
|---|---|---|
| Staircase | ||
| Closest Pair | ||
| Convex Hull | ||
| Triangulation | ||
| Approximate Euclidean MST |
Note that the last lower bound is for the exact Euclidean MST. Observe that, somewhat surprisingly, we can achieve polylogarithmic fragility for computing a triangulation potentially containing high-degree vertices.
3 Maxima and staircases
Let be a list of points in the plane. A point is dominant (or a maximum) if no other point of has both a larger - and a larger -coordinate. We define lexicographical order on points in the plane as follows: if , or and . We consider Staircase and a related problem Maxima, the difference being in whether we insist on outputting the maxima in their lexicographic order:
Maxima: Given as above identify all maxima, that is, compute the not necessarily ordered set of indices of the dominant elements of .
We propose a divide-and-conquer algorithm that solves the potentially harder Staircase problem in time with fragility and argue below that this is the best one can do even for Maxima.
Algorithm.
-
1.
Sort the points in in lexicographic order.
-
2.
We now proceed recursively.
-
(a)
Divide at the median into and .
-
(b)
Recursively find the staircase of and the staircase of .
-
(c)
Let be the point of corresponding to the first index of and the point of corresponding to the first index of . If , return .
-
(d)
Otherwise, binary search for (the key) among the points corresponding to . Return the section of containing points with -coordinate at least that of , followed by .
-
(a)
Lemma 3.1.
The above algorithm for Staircase achieves fragility with running time.
Proof.
Step 1, presorting, uses fragility [3] and costs running time (this step is the bottleneck).
We argue that each point of the set is involved in a logarithmic number of comparisons over the entire runtime of the recursive algorithm. Each point of participates in a logarithmic number of subproblems. Step 2(a) makes no comparisons. Step 2(c) involves one comparison between two points of the current subproblem and therefore causes at most logarithmic fragility.
It remains to bound the fragility arising from the binary search in Step 2(d). Each binary search comparison is between a key and an element of the current subproblem; the latter participates in one comparison per binary search and therefore a logarithmic number of comparisons overall. The key () is compared a logarithmic number of times in a fixed binary search. The binary search is only triggered once for each possible (when it is the topmost point of , but not the topmost point in ). It will no longer be at higher levels of recursion. Hence it only participates in a logarithmic number of comparisons in its capacity as a key, completing the proof of logarithmic fragility.
In [17, Lemma 2.2] it was argued that a comparison-model decision tree for solving the Maxima problem must have at least leaves and therefore requires comparisons. In the algebraic decision tree model, Kirkpatrick and Seidel give a lower bound of [15] for Maxima, where is the number of maxima. By the pigeonhole principle, and because in the worst case, we obtain a lower bound of on fragility of Maxima.
4 Closest Pair
We describe a randomized algorithm with expected fragility to solve this problem. We also prove a lower bound on fragility of any algorithm solving Closest Pair in a more restricted model of computation we call the CP-model, which only allows comparisons of the form , , between -coordinates of the input points, and between -coordinates.
Note that we can as well assume points are distinct, since identifying repeated points requires work (in all models we consider) and therefore fragility in our model and can be run as a preprocessing step.
Closest Pair: Algorithm.
We will follow the -time closest-pair divide-and-conquer algorithm from [8], with adjustments for fragility. Assume we are given an array of points . The following are the steps our algorithm takes.
-
0.
Pre-sort the points of , once by -coordinate and once by -coordinate, storing them in arrays and , respectively. Each point “knows” its position in these two arrays. That is, not only stores the point of with th largest -coordinate, but also its position in the array, and vice versa.
-
1.
Divide the array into two parts, and , of nearly equal size partitioned by the median -coordinate . Let and denote the corresponding array of points, sorted by -coordinate – they can be computed from in linear time using the cross links mentioned above.
-
2.
Recursively solve Closest Pair (starting at step 1) on and , which return closest pairs and , respectively. Let be the pair that defines the smaller distance between these two pairs and let .
-
3.
Consider the strip of width centered at the line . We identify the points of lying in this strip in the following fragility-sensitive manner (recall that we cannot store the value , but need to refer to and as necessary; we also need to watch the fragility of ). Specifically, we find the smallest index in so that (if it exists), by binary search. Similarly, we find the largest index in so that . The portion contains precisely the points of in the desired strip.
-
4.
We can extract the points of into an array ordered by -coordinate by scanning through once and collecting points whose position in lies in .
-
5.
As discussed in [8], any pair of points at distance less than from each other will appear at most seven places apart in . Therefore, we now collect the following list of point pairs: a point and a point at most 7 positions beyond it, i.e., with . This produces no more than pairs of points. We can now apply SampleMinimum from [1] to this list of pairs, to find the smallest distance defined by one them.
-
6.
We return the pair with smaller of two distances: and the closest pair from step 5.
Lemma 4.1.
The algorithm above runs in with expected fragile complexity.
Proof.
Step 0 (presorting) costs fragility using the AKS sorting network [3].
The algorithm then proceeds by divide and conquer with levels. Step 1 does not require access to point coordinates. We will show through analysis of the further steps that step 2 requires fragility. Step 3 (or computing and ) involves binary search, which costs fragility for points and and coordinate ; the other points potentially touched in binary search cost fragility per point. Step 4 (creating the array ) involves constant fragility per point. For step 5, each point in participates in pair comparisons (by the geometric analysis in [8]). Utilizing the minimum algorithm from [1] in step 5 allows us to calculate the overall minimum with expected fragile complexity – each value comparison in minimum computation translates to a comparison of two distances between points in . Generating the solution pair in step 6 involves fragility.
Since we can guarantee fragility at each level of recursion, and it is possible that the same pair of points is the closest at all levels of recursion, the overall fragile complexity is .
Note that the fragility analysis of the above algorithm is tight in the worst case. Some points will participate in operations. Indeed, consider a point set whose size is a power of 2, in which the leftmost two points define the smallest distance . Furthermore, make sure that that the -separation between any other pair of points is larger than . Then will be the solution of the leftmost subproblem on all levels of recursion and will be involved in a logarithmic number of binary search comparisons at each level.
Closest Pair: Lower Bound.
We give a fragility-preserving reduction from Minimum to Closest Pair in the CP-model. This will show not only that Closest Pair has fragile complexity, but also the closest pair of points experiences fragility.
We start with an instance of Minimum, which is a list consisting on distinct numbers , satisfying two additional constraints. We assume that and that, for any two values, and (with ), either or . Map each to two points and . This transforms an instance of Minimum, with numbers, to an instance of Closest Pair, with points.
Consider any algorithm that solves Closest Pair using only the comparisons mentioned. Note that we never need to actually compute the distance from a point to itself or compare the distance defined a pair of points to itself: the answer is known without performing the calculation. Consider an instance to Minimum subject to the above constraints, transform it into an instance of Closest Pair according to the mapping above, and run on . We start with an immediate fact.
Fact 4.2.
Let be the distance between two distinct points of . Then, there exist integers such that:
-
(a)
.
-
(b)
If , ,
-
(c)
if , , and
-
(d)
two such distances , defined by distinct pairs of exponents and , with and , can be compared based solely on the values of the exponents (the distances need not be computed nor compared).
Two points in are twins if they come from the same number in , i.e., they are points and for some , .
Claim 4.3.
The closest pair of points in must be the closest pair of twins. In symbols, it is the pair with .
Proof.
By ˜4.2(b)&(c), the smallest distance must correspond to some pair of twins. But , for all , and thus the smallest distance in corresponds to the minimum in , completing the proof.
Lemma 4.4.
Every comparison of the form among the points of can be resolved by examining the indices , and by making at most two comparisons of two values from .
Proof.
If , and are the same point, and the comparison can be resolved by one comparison, . If , the comparison evaluates to true. If both and , the comparison evaluates to false. So we assume and below.
Case 1: and are twins.
In other words, and , or vice versa. Then , and the comparison is equivalent to .
Recall that we assumed a “gap”: for any two numbers , if , then ; and if , then ; otherwise .
Suppose and therefore , is true. With one comparison of and exhausted, we compare and to check if (and therefore ). If this comparison returns true, adding the two inequalities gives us , implying that the original inequality of is false, so we are done in two comparisons. Otherwise, or . In both cases, is true; two comparisons are enough.
If is false, we check if by comparing and . Since , the original comparison evaluates to true. Otherwise , which we don’t need to check – the original comparison evaluates to true.
Case 2: and are not twins.
Suppose and are not twins. Then, by (c) of ˜4.2, . Since , the comparison evaluates to false.
Lemma 4.5.
Every distance comparison of the form among the points of can be resolved by just examining the values of the indices or is the result of making at most one comparison of two of the original numbers from .
Proof.
˜4.2 implies that if have three or four distinct -coordinates among them, the comparison can be resolved by just examining the -coordinates, which are determined by the indices . So it remains to handle cases where only two distinct -coordinates appear among these, not necessarily distinct points. Note that we do not need to address the case of one -coordinate, as that means at most two distinct points are involved in the distance comparison, which can be resolved without examining -coordinates. Additionally, if there are no twins and exactly two distinct -coordinates, the two pairs of points in the comparison are the same. Below are the remaining cases.
Case 1: Two Pairs of Twins.
Suppose and are twins ( and , or vice versa) and and are twins ( and , or vice versa). Then , , so the comparison is equivalent to , as claimed. Now suppose and are twins and and are twins. If and are even and and are odd, so that and and and , then is greater than as it involves a positive -coordinate difference, while does not, so is true. Now suppose is even and is odd and is odd and is even. Then , , , and the distance comparison is equivalent to . Similar reasoning applies if pairs are interchanged.
Case 2: One Pair of Twins.
If there is one pair of twins and two -coordinates, then the comparison involves the same point, , on both sides, and two other points. Suppose , , and : without loss of generality, and are twins, and with an odd index. Then the -coordinate differences cancel out on both sides, and the comparison of distances reduces to , which can be resolved by comparing to , since by our assumption, either or . If is even, we have , , and , which resolves to , which is true.
We call a comparison of the two forms above on useful if it reduces to at most two comparisons of two elements in ; refer to the lemmas above. Any other comparison does not depend on the values; we refer to these as useless comparisons.
An execution of for Closest Pair on can be used to solve Minimum on by removing useless comparisons (i.e., resolving them without accessing ) and turning useful distance comparisons into comparisons between numbers of . Note that the transformation preserves fragility as it does not require access to – we do not explicitly construct , but rather simulate each operation of on its points by translating them to operations on point indices and comparisons of elements in .
Theorem 4.6.
Closest Pair is at least as hard as Minimum and therefore has fragile complexity in the CP-model. Additionally, the closest pair itself has a fragile complexity of .
Note that we could also obtain an lower bound on fragility in the algebraic decision tree model (if we reduce, for example, from Element Uniqueness to Closest Pair in one dimension, to Closest Pair) [20], since this requires operations and thus fragility, by pigeonhole principle. However, such reasoning does not yield any information about the fragility of the closest pair itself, which is why we provided the alternate reduction above.
5 Convex hull
Computing the convex hull of a set of points is one of the time-honored problems in computational geometry with many algorithms described in the literature. However, on even casual examination, the best-known algorithms do not guarantee reasonable fragility. We observe that many (if not all) of the existing convex hull algorithms have fragile complexity. For example, Graham’s scan [12] requires linear fragility due to one point possibly being involved in an orientation test a linear number of times. Jarvis’ march, also known as the gift-wrapping algorithm [13], requires linear fragility due to a linear scan it performs. The ultimate planar convex hull algorithm of Kirkpatrick and Seidel [16] requires linear fragility due to how their marriage-before-conquest bridge-finding routine is implemented.
Note that if is a multiset, we can remove duplicates in time with fragility, and this does not affect the overall upper bounds. This preprocessing step allows us to assume that the points in are distinct. To further simplify the description, we assume that the set is in general position: no three points are collinear and no two lie on the same vertical line. We will adapt the algorithm of Preparata and Hong for computing the convex hull [19]. The upper hull of a point set is the set of points on the boundary of its convex hull with the property that an open upward vertical ray emanating from is disjoint from the convex hull. The upper convex hull of a finite point set can be conveniently represented as the sequence of its vertices, naturally ordered by the -coordinate. The lower hull is defined symmetrically. We compute the convex hull by computing the upper and the lower hull of a point set separately and combining them. The last step takes time and does not affect fragility, if the hulls are represented by suitable linked lists of indices.
We now describe the upper hull computation. We proceed by divide-and-conquer, so the interesting step is merging two upper hulls. Consider two upper hulls and , comprising points and , respectively, in this -order. A point is a tangent point (of ) for if all points of lie on or under the line supporting the segment . If is also a tangent point (of ) for , is the upper tangent of and .
Bridge-Finding: Find the upper tangent to the two upper hulls and , given as arrays of points and , where is left of and the points are sorted by the -coordinate.
Algorithm for Bridge-Finding.
We follow the exponential-then-binary search approach for the merge portion of mergesort used in [1], adapted to the geometry of convex hulls. In the exponential portion, we start with the rightmost point of and the leftmost point of , being a tentative bridge between the two upper hulls. The goal is to identify a tangent point for . In the exponential portion of the search, we fix and then, starting with , we examine points , for , until we find for which is oriented clockwise. If is also oriented clockwise, – we found the tangent for . Otherwise, the desired tangent point for lies between and and we use a binary search to identify it.
Let be the current candidate in the binary search for the tangent point for . Geometrically, if the segment goes through , (and also all points beyond it) lie below , and lies above , then overshot (i.e., ). Otherwise, lie below , lies above , and the binary search continues in the opposite direction.
When we finally identify the tangent for , if is not an upper tangent (meaning is a tangent point for , but is not the tangent for ), we can discard and the points .
We continue the exponential and binary search on and , swapping left and right and thus the roles of and , starting with a tentative bridge of (the details of undershooting, overshooting, and discarding are symmetric). The algorithm terminates when is the upper tangent.
Lemma 5.1.
No point during the execution of the algorithm Bridge-Finding participates as a non-key in more than exponential and/or binary searches.
Proof.
Suppose exponential search from begins at index , and binary search proceeds in the vertices beginning at index and ending at index . Suppose the tangent to is . Any point touched during exponential search is either discarded or becomes part of binary search. If is left of , it is discarded after the binary search and not touched again. Otherwise, if is right of , we will show that the distance between and , the starting point of exponential search, is halved each time.
In particular, we prove that . Since , . Subtracting from both sides, we get . Since , . Subtracting the right side, we get . Adding to both sides, and rearanging, we obtain . Since the distance to is at least halved at least in each step, this cannot happen more than a logarithmic number of times; thus can only be involved in a logarithmic number of binary searches.
Lemma 5.2.
The algorithm Bridge-Finding as described above achieves fragile complexity with runtime.
Proof.
Any point that acts as a key for exponential and/or binary search is touched times and discarded. It could also be touched a constant number of times in a single exponential and/or binary search. By Lemma 5.1, no point is involved in more than exponential and/or binary searches. The sidedness tests used to test the tangency and/or upper tangency condition can be implemented with fragility using orientation tests on triples of points. Each time an element is touched, the two elements next to it are touched, but this only increases the fragility by a factor of at most three.
As far as the runtime is concerned, the combination of exponential and binary searches are designed to cover (up to constant factors) the same region of the upper hull as the classical algorithm of Preparata and Hong [19] and therefore cannot be slower than their linear-scan procedure that takes total linear time.
We thank the anonymous reviewer for suggesting that the bridge-finding algorithm implemented by Overmars and van Leeuwen [18] also gives fragility.
Algorithm for Convex Hulls.
Presort the points of by -coordinate. Divide in half via the median -coordinate. Recursively compute the upper hull of both halves. Use Bridge-Finding to compute the upper tangent; this algorithm also discards points that do not appear on . Compute the lower hull separately using a symmetric process. Combine the upper and lower hulls to construct the entire convex hull.
Theorem 5.3.
The convex hull of a set of points in the plane can be computed in time with fragile complexity using the algorithms above.
Proof.
First, we address correctness. The algorithm is correct for the same reason as the classic divide and conquer algorithm, and the exponential and binary searches used in Bridge-Finding make upward progress for the same reason as this algorithm, which finds the bridge in linear time [19]. Now, we address fragility. Presorting uses fragility [3]. By Lemma 5.2, Bridge-Finding requires fragile complexity, and there are rounds of the algorithm. The final combine step uses zero fragility, as it consists of listing point indices.
Lemma 5.4.
The algorithm above has a lower bound of fragility. In other words, the above fragility analysis is tight.
Proof.
In Figure 1, we give an example of an input that forces high fragility. The leftmost point is part of the bridge at every level of recursion. At each level, it is touched a logarithmic number times in exponential search, and there are recursion levels.
In the algebraic decision tree model, Ben-Or [4] gave a lower bound of for the problem of determining if points in the plane are in convex position, that easily reduces to Convex Hull, which implies a lower bound of fragility due to the pigeonhole principle.
Extension to triangulating a point set.
In this section, we show that minor modifications to the algorithms above allow us to produce a triangulation of a point set with polylogarithmic fragility. This result is surprising because we would expect a linear lower bound due to fact that the resulting triangulation may have arbitrarily-high-degree vertices.
Algorithm.
Sort the point set by -coordinate and partition by the median -coordinate. Now, divide and conquer. Recursively compute triangulations of each half.
We now describe how to complete a triangulation by triangulating the region delimited by the bridge and the two upper hulls (which are part of the triangulation of each half). Run Bridge-Finding from the previous section with the following modifications. After each round of exponential/binary search is complete, draw a chord between the key element (symmetrically, ) and the tangent element of the other side (symmetrically, ). Output the vertices that are discarded, as chords from these to (or ) comprise a fan triangulation.
Continue exponential/binary search recursively as described in the previous section until is the upper tangent, stopping to fill in chords as described.
Consider the path formed by traversing in -order. The final result of the above algorithm is a list of chords that, triangulates the region between this path and . Run a symmetric process for the lower hull (which does not contain vertices of the upper hull except for the endpoints) to complete the triangulation of the convex hull of .
Theorem 5.5.
The algorithm above triangulates a point set with fragility in time .
Proof.
The proof from the previous section applies, and the only extra operation(s) are outputting the fans before discarding the vertices. This is done by listing the generated chords using vertex indices – these operations do not affect the fragility. Since this modification only adds a constant amount of work for every discarded vertex and does not affect fragility, the runtime and fragility bounds follow.
Note that Triangulation has a fragility lower bound of due to the pigeonhole principle and the application of the lower bound, [20, Theorem 5.2].
6 Approximate Euclidean minimum spanning tree
We describe an algorithm for computing a 1.0125-approximate EMST of a set of points in the plane with fragility. Our algorithm will do total work, where the operations performed are (a) comparisons between - or -coordinates of two points and , (b) projecting a point on a fixed direction , obtaining , and (c) performing comparisons between - or -coordinates of such projected points. However, if is used for any future comparisons, we increment the fragility of accordingly. Note that since the Euclidean MST contains the closest pair of points as an edge, a lower bound of on the fragility follows.
We briefly recall some foundational papers on computing the EMST, and show why they are not immediately fragility-friendly. Our algorithm will not be an adaptation of a single known algorithm, but instead we will use ideas from two algorithms.
First, a classic result by Shamos and Hoey [21] states that the EMST is a subgraph of the Delaunay triangulation. Given that the Voronoi diagram can be computed in time, one obtains the -sized Delaunay triangulation in the same time bound. We can then extract the EMST from the Delaunay triangulation by any MST algorithm, e.g., running Kruskal’s algorithm, in time. However, the Voronoi diagram and the Delaunay triangulation may contain high-degree vertices,111It is not obvious whether these can be constructed in a manner avoiding linear fragility, such as a fan structure allowing for a compact representation as exploited by our triangulation algorithm. and furthermore such high-degree vertices will experience heavy fragility during Kruskal’s algorithm, even if we used a fragility-sensitive sorting algorithm.
A similar high-degree issue arises even if one considers the relative neighborhood graph [10], or the Yao graph [22]. If an approximation of the EMST is allowed, one can replace the Yao graph by the Theta graph, but the same high-degree problem persists, as can be seen by an instance of one point opposing points on a chain;222The chain can be made slightly convex or concave, to get a point set in general position. has degree in both the Yao and Theta graphs.
Algorithm overview.
Our first building block will be the algorithm by Agarwal et al. [2], that is based on a reduction from EMST to a collection of bichromatic closest-pair problems (BCP). An instance of BCP is provided with a set of red and of blue points, and the goal is to find with minimum . Agarwal et al. show that the EMST is contained in the graph formed by connecting all pairs that are solutions to the obtained BCP instances. We will first show that this collection of BCP problems can be obtained in a fragility-sensitive manner, and that no point is involved in too many such subproblems. Another property of the BCP instances obtained after this reduction is that in each instance of BCP, there is a double-wedge so that is in one wedge and in the antipodal one, and the angle of the wedge is small (at most ).
The obvious approach would be to next solve the BCP instances in a fragility-sensitive manner, perhaps like we did for closest pair in Section 4. While there are several algorithms known for BCP, we again hit a block when trying to adapt them for fragility. As discussed earlier, we do not know how to build the Voronoi diagram in a fragility-sensitive way due to the potential for high-degree vertices. Hence we cannot adapt algorithms that start with a Voronoi diagram and find the closest red for a blue or vice-versa (in fact, there would be the additional task of making the associated point location or search data structures fragility-friendly). Given the instances produced by the reduction are separated by a line (a consequence of the double-wedge property mentioned above), one can consider an randomized algorithm [6] that (assume is left of the separating line and to the right) picks a random , finds the closest blue to , and discards all points in that are outside the left envelope of the disks of radii at points in . We do not know how to adapt this algorithm either. Finally, we remark that there are reductions from BCP to Closest Pair [9], but these only work in high () dimensions.
Instead of solving the BCP instances exactly, we will find an approximate bichromatic closest pair in each instance. We will then show that the graph formed by edges between such approximate bichromatic closest pairs (a) has degree for every vertex, (b) is connected, and (c) contains an approximate EMST. We can then extract an approximate EMST from this graph by running Kruskal’s algorithm after a fragility-sensitive sorting of the edge lengths. To find an approximate bichromatic closest pair, our idea is inspired by the Theta graph: we take the direction along the double-wedge (there will be many choices for ), project points in and on , and return the red with the rightmost projection and the blue with the leftmost projection, for which we solve Minimum in one dimension, in a fragility-sensitive manner using [1].
Step 1: Forming the bichromatic closest pair instances.
The reduction from EMST to BCP instances in Agarwal et al. [2] proceeds as follows. Let be the largest angle satisfying , and let . A unit vector with will be called a direction. Define the cone to be the region that is the union of all rays going through the origin that form an angle at most with . An instance of BCP is called -separated in direction if there exists a point and a direction such that and . All instances of BCP returned after the reduction will be -separated in some direction , where there will be at most choices for .
Define, for , the directions . Note that for every , the pair forms a basis of , and these basis pairs further define directions that are the bisector directions for each basis pair. The algorithm will successively consider the basis and for each , return a collection of -separated BCP instances in direction , with the pairs lying in the double wedge formed by and , with in one wedge of angle and in the antipodal wedge. In the following, we assume to be fixed, and express a point as in the basis . The algorithm takes as input two sets and (both initialized to originally), the dimensionality (initialized to two), and in calls itself recursively at most three times, where each recursive call either reduces the dimensionality, or halves the size of in the recursion.
The algorithm in [2] is as follows, and we present it with the needed twists for fragility. As a preprocessing step, we sort (using fragility) the points in by both coordinates, points in by both coordinates, and in both coordinates. Every point in and will know its position in the other lists where it resides, similar to our algorithm for closest pair in Section 4. If then output as an -separated pair. Otherwise if , we extract the median of the th coordinate of the points in (this is readily available as is already sorted in both coordinates). We then partition into and where contains points in whose th coordinate is at most , and contains those whose th coordinate is larger than . We similarly partition into and . Note that this partitioning can be performed without comparisons as in Section 4, since the lists are already sorted. Finally, we make at most three recursive calls: (1) if and , we recurse with dimensionality , and , (2) if and , we recurse with dimensionality , and , and (3) if and , we recurse with dimensionality , and . Note that in (1) the dimensionality is reduced by one, and in (2) and (3) the size of the union is halved.
Lemma 6.1.
There exists an algorithm that, given with returns a collection of -separated BCP instances , such that
-
(a)
each instance is -separated in one of the directions for ,
-
(b)
every point in occurs in many instances of BCP,
-
(c)
every point in has fragility,
-
(d)
each edge in the EMST on is the solution to one of the returned BCP instances.
Proof.
The bound on the number of instances follows from a standard recursion, since either the dimensionality is reduced or the problem size is halved. This also proves assertion (b) in the lemma above, since each point participates in at most two recursive calls of type (1) and many recursive calls of type (2) or (3).
The algorithm outputs a pair only when dimensionality 0 is reached, which means that the algorithm has succeeded in finding a double wedge such that and are in the two opposing wedges of angle . This double wedge is in the direction , and this implies assertion (a). To prove assertion (c), note that the sorting performed as preprocessing in each call induces fragility, and since each point is in recursive calls, we get a fragility bound of . Note that the sizes of the recursive problems decreases, but this only reduces the total fragility by a constant factor, hence we ignore this effect. Finally, assertion (d) follows from [2, Lemma 4].
Step 2: Approximate bichromatic closest pair and apx-EMST.
Consider an instance of BCP that is -separated in direction , for some . Without loss of generality, assume that and that lies in the left wedge of angle and lies in the right wedge of angle . We project and on direction (in this case the -axis), and run a fragility-sensitive Maximum algorithm for and a fragility-sensitive Minimum algorithm for , as in [1]. Let the point in achieving the maximum be and the minimum in be . For every returned BCP instance, we add the corresponding edge to form a graph on . This pair may be different from the bichromatic closest pair for this instance, which we will denote by .
Because each point is involved in at most BCP instances (assertion (b) in Lemma 6.1), and it experiences fragility during the projection and min/max algorithms in each instance, the total fragility of any point is bounded by . More importantly, the degree of any vertex in is again , since at worst it could be the endpoint of an added edge of the type in all instances it belongs to. Thus has many edges, and sorting all edges in by their lengths takes time. Let us consider the fragile complexity of this step. Each vertex in (that is, each point in ) experiences a fragility of at most , since each of its many incident edges experiences fragility during sorting.
The above considerations imply that if the following lemma is true, then running Kruskal’s algorithm on after sorting the costs gives us an approximate EMST.
Lemma 6.2.
Consider the graph formed by adding edges between the pair of vertices as described above, and let be the bichromatic closest pair in the corresponding instance. Then
-
(a)
and ,
-
(b)
is connected,
-
(c)
-
(d)
the edges of contain a -approximate EMST.
Proof.
Clearly, (d) follows from (b) and (c), since every edge of the EMST is of the form for some instance, we replace it with an edge of approximate length, and is connected. In the remainder, we prove (a)–(c).
For this, we will first make the simplifying assumption that no two points in share a coordinate in any of the bases , and that no two points have the same projection in any of the directions , for any . It is not hard to remove this assumption by randomly perturbing the basis vectors above, as the argument does not hinge on them being uniformly distributed; it just relies on all angles being at most and on the union of the double wedges covering .
Refer to Figure 2. Since is the red point with maximum projection on the direction (without loss of generality considered here to be horizontal), must lie to the left of the line segment . Similarly must lie to the right of the line segment . Let the horizontal distance between the projections of and be , and we break this up into , with being the portion of it in the left wedge and being the portion of it in the right wedge. Also note that since the direction is the bisector of the wedge, the interior angles between the direction of the -axis and either of the lines defining the wedge, are .
We first prove (c). Since is constrained to lie on the line and on , the maximum distance between them is obtained when and . This distance is . Thus . On the other hand, is at least , as otherwise either is to the right of or is to the left of , contradicting that and were the points with the extremal projections. Therefore, . Recall that , plus some minor perturbation to make the above assumption hold, if necessary, which proves (c).
Next we prove (a). Assume the wedge is centered at the origin, so that has x-coordinate equal to and has -coordinate , for some , . We claim that . To see this, assume the contrary. Then the distance is at least , which is larger than , and therefore by the assumption is larger than . However, we just showed that , and this contradicts that is the exact solution to the BCP instance.
Next, let us assume that the -coordinate of is and that of is . Thus and . Note that , since that is the -coordinate of and must lie on . Similarly, we get that , since is constrained to lie in the left wedge.
We obtain that the distance . Using the bounds on , and , this is at least
In the above we have used that , , and that for , . Finally, we use that . A similar argument can be used to prove that and this finishes the proof of (a).
Finally, we prove (b). Our proof is inspired by an argument by Callahan [7]. Consider any pair of points . We want to show that there is a path between them in . Let denote the Euclidean MST. We will show that contains such a path by using induction on the length of the longest edge in the path connecting to in . Let be the longest edge in the path in connecting to , and because is an MST edge, it must be of the type for some bichromatic closest pair in one of the instances. Assume that is encountered first on this path when walking from to . This edge is replaced by the approximate edge in . We claim that there is a path connecting to in that only uses edges cheaper than – one goes from to in using edges cheaper than , and by (a), . Applying the induction hypothesis we get that there is such a path from to in too. Similarly there is path in from to such that all edges have length at most . Since the edge is in , this implies that there is path from to in , and hence is connected. This finishes the proof of correctness and the approximation guarantee of our algorithm, summarized as follows.
Theorem 6.3.
Given a set of points in , there exists an time algorithm with fragility that returns a tree whose total length is at most times that of the EMST.
Open Problems.
Several open problems emerged as a result of this research and at the suggestion of the anonymous referees. Is it possible to solve Convex Hull in fragility, where is the number of hull vertices? Does there exist an algorithm to compute a Voronoi Diagram or Delaunay Triangulation in sublinear fragility? Is it possible to obtain a lower bound on any problem addressed in this paper?
References
- [1] Peyman Afshani, Rolf Fagerberg, David Hammer, Riko Jacob, Irina Kostitsyna, Ulrich Meyer, Manuel Penschuck, and Nodari Sitchinava. Fragile Complexity of Comparison-Based Algorithms. In 27th Annual European Symposium on Algorithms (ESA 2019), volume 144 of Leibniz International Proceedings in Informatics (LIPIcs), pages 2:1–2:19, Dagstuhl, Germany, 2019. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.ESA.2019.2.
- [2] Pankaj K Agarwal, Herbert Edelsbrunner, Otfried Schwarzkopf, and Emo Welzl. Euclidean minimum spanning trees and bichromatic closest pairs. In Proceedings of the Sixth Annual Symposium on Computational Geometry, pages 203–210, 1990. doi:10.1145/98524.98567.
- [3] Miklós Ajtai, János Komlós, and Endre Szemerédi. An O(n log n) sorting network. In Proceedings of the 15th Annual ACM Symposium on Theory of Computing, 25-27 April, 1983, Boston, Massachusetts, USA, pages 1–9. ACM, 1983. doi:10.1145/800061.808726.
- [4] Michael Ben-Or. Lower bounds for algebraic computation trees. In Proceedings of the Fifteenth Annual ACM Symposium on Theory of Computing, pages 80–86, 1983.
- [5] Prosenjit Bose, Pilar Cano, Rolf Fagerberg, John Iacono, Riko Jacob, and Stefan Langerman. Fragile complexity of adaptive algorithms. In International Conference on Algorithms and Complexity, pages 144–157. Springer, 2021. doi:10.1007/978-3-030-75242-2_10.
- [6] Prosenjit Bose, Anil Maheshwari, Pat Morin, Jason Morrison, Michiel Smid, and Jan Vahrenhold. Space-efficient geometric divide-and-conquer algorithms. Computational Geometry, 37(3):209–227, 2007. doi:10.1016/J.COMGEO.2006.03.006.
- [7] Paul B Callahan. Dealing with higher dimensions: the well-separated pair decomposition and its applications. The Johns Hopkins University, 1995.
- [8] Thomas H Cormen, Charles E Leiserson, Ronald L Rivest, and Clifford Stein. Introduction to algorithms. MIT press, 2022.
- [9] Karthik C.S. and Pasin Manurangsi. On closest pair in Euclidean metric: Monochromatic is as hard as bichromatic. Combinatorica, 40(4):539–573, 2020. doi:10.1007/S00493-019-4113-1.
- [10] Mark De Berg, Otfried Cheong, Marc Van Kreveld, and Mark Overmars. Computational Geometry: Algorithms and Applications. Springer, 2008.
- [11] Jeff Erickson. Lecture notes for cs 497: Concrete models of computation, spring 2003.
- [12] Ronald L. Graham. An efficient algorithm for determining the convex hull of a finite planar set. Info. Proc. Lett., 1:132–133, 1972. doi:10.1016/0020-0190(72)90045-2.
- [13] Ray A Jarvis. On the identification of the convex hull of a finite set of points in the plane. Information Processing Letters, 2(1):18–21, 1973. doi:10.1016/0020-0190(73)90020-3.
- [14] Rajesh Jayaram, Vahab Mirrokni, Shyam Narayanan, and Peilin Zhong. Massively parallel algorithms for high-dimensional euclidean minimum spanning tree. In Proceedings of the 2024 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 3960–3996. SIAM, 2024. doi:10.1137/1.9781611977912.139.
- [15] David G Kirkpatrick and Raimund Seidel. Output-size sensitive algorithms for finding maximal vectors. In Proceedings of the First Annual Symposium on Computational Geometry, pages 89–96, 1985. doi:10.1145/323233.323246.
- [16] David G Kirkpatrick and Raimund Seidel. The ultimate planar convex hull algorithm? SIAM Journal on Computing, 15(1):287–299, 1986. doi:10.1137/0215021.
- [17] H. T. Kung, Fabrizio Luccio, and Franco P. Preparata. On finding the maxima of a set of vectors. J. ACM, 22(4):469–476, 1975. doi:10.1145/321906.321910.
- [18] Mark H Overmars and Jan Van Leeuwen. Maintenance of configurations in the plane. Journal of computer and System Sciences, 23(2):166–204, 1981. doi:10.1016/0022-0000(81)90012-X.
- [19] Franco P. Preparata and Se June Hong. Convex hulls of finite sets of points in two and three dimensions. Communications of the ACM, 20(2):87–93, 1977. doi:10.1145/359423.359430.
- [20] Franco P Preparata and Michael I Shamos. Computational Geometry: An Introduction. Springer Science & Business Media, 2012.
- [21] Michael Ian Shamos and Dan Hoey. Closest-point problems. In 16th Annual Symposium on Foundations of Computer Science (sfcs 1975), pages 151–162. IEEE, 1975. doi:10.1109/SFCS.1975.8.
- [22] Andrew Chi-Chih Yao. On constructing minimum spanning trees in k-dimensional spaces and related problems. SIAM Journal on Computing, 11(4):721–736, 1982. doi:10.1137/0211059.
