An Optimal Algorithm for Computing Many Faces in Line Arrangements
Abstract
Given a set of points and a set of lines in the plane, we consider the classical problem of computing the faces of the arrangement of the lines that contain at least one point. We present an algorithm of time for the problem. We also prove that this matches the lower bound under the algebraic decision tree model and thus our algorithm is optimal. In particular, when , the runtime is , which matches the worst case combinatorial complexity of all output faces. This is the first optimal algorithm since the problem was first studied more than three decades ago [Edelsbrunner, Guibas, and Sharir, SoCG 1988].
Keywords and phrases:
Many faces, line arrangements, cuttings, -algorithms, decision tree complexities2012 ACM Subject Classification:
Theory of computation Computational geometry ; Theory of computation Design and analysis of algorithmsEditors:
Hee-Kap Ahn, Michael Hoffmann, and Amir NayyeriSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
Let be a set of points and a set of lines in the plane. We consider the problem of computing the faces of the arrangement of the lines of that contain at least one point of ; these faces are called non-empty faces. Note that each non-empty face only needs to be output once if it contains multiple points of . Let denote the arrangement of .
Previous work.
This is one of the most fundamental problems in computational geometry and has been studied extensively. A straightforward algorithm can implicitly determine the non-empty faces of in time, by first constructing , building a point location data structure for [15, 21, 25], and then finding the non-empty faces using the point location queries for points of . The following upper bounds have been proved on the combinatorial complexity of all non-empty faces of : [10], [17], and [17]. A lower bound of [17] is also known, which matches the upper bound in [10]. Note that the minimum of the above upper bounds is at most regardless of the values of and . Hence, using the above straightforward approach, time is also sufficient to output all non-empty faces explicitly. To have a more efficient algorithm, Edelsbrunner, Guibas, and Sharir [14] first studied the problem and gave a randomized algorithm of expected time, for any . Subsequently, an improved deterministic algorithm of time was proposed by Agarwal [1]. Also, Agarwal, Matoušek, and Schwarzkopf [2] presented a randomized algorithm of expected time. No progress had been made for a while until Wang [26] revisited the problem in SODA 2022 and derived a new deterministic algorithm of time.
On the other hand, is a lower bound for solving the problem due to the above lower bound [17] on the combinatorial complexity of all non-empty faces and also because computing a single face in line arrangements requires time in the algebraic decision tree model (indeed, a special case of the problem is to compute the lower envelope of all lines, which has an time lower bound). In particular, in the symmetric case where , is a lower bound since the worst case combinatorial complexity of all non-empty faces is [17].
Our result.
We propose a new (deterministic) algorithm of time for the problem, which is when and matches the above lower bound. For the asymmetric case where , using Ben-Or’s techniques [5], we prove that is also a lower bound under the algebraic decision tree model. Combining with the above lower bound, we thus obtain the lower bound for solving the problem. As such, our algorithm for the asymmetric case is also optimal. Although our solution only improves the previously best result of Wang [26] by a factor of , the result is important for providing the first optimal solution to a fundamental and classical problem in computational geometry.
Our algorithm takes a different approach than the previous work. For example, the most recent work of Wang [26] first solves the problem in time in the dual setting. Then, the algorithm is plugged into the framework of Agarwal [1] as a subroutine. More specifically, the framework first utilizes a cutting of to divide the problem into a collection of subproblems and then solves these subproblems using Wang’s new algorithm.
We dispense with the framework of Agarwal [1], and propose a new algorithm for the problem in the primal setting, which is different from that of Wang [26] in the dual setting. One key subproblem is to merge convex hulls, for which our techniques rely on a crucial observation that certain pairs of convex hull boundaries can intersect at most times. Using a hierarchical cutting of [8] and combining our new algorithm with Wang’s, we obtain a recursive algorithm that runs in time for the symmetric case .
To further reduce the factor, we resort to the recent techniques from Chan and Zheng [7]: the -algorithm framework for bounding algebraic decision tree complexities. More specifically, after recursive steps in our recursive algorithm, we reduce the problem to subproblems of size each (i.e., in each subproblem, we need to compute the non-empty faces of an arrangement of lines for points), with . As is very small, solving the problem efficiently under the algebraic decision tree model (i.e., only count the number of comparisons) can lead to an efficient algorithm under the conventional computational model (e.g., the real RAM model). With Chan and Zheng’s techniques, we developed an algorithm that solves each subproblem in decision tree complexity (i.e., the algorithm uses comparisons). Since is small, we are able to build a decision tree for the algorithm in time. With the decision tree, each subproblem can then be solved in time in the conventional computation model. Consequently, the original problem is solved in time. In addition, using this algorithm as a subroutine, the asymmetric case of the problem where can be solved in time.
Note that our algorithm is not a direct application of Chan and Zheng’s techniques. Nor it is a simple adaption of their algorithm for Hopcroft’s problem. Indeed, in order to fit the -algorithm framework, we need to design new procedures for a number of subproblems (notably, our techniques involve shaving log factors to merge convex hulls), which may be interesting in their own right. This is also the case for solving other problems when Chan and Zheng’s techniques are applied. For instance, Chan, Cheng, and Zheng [6] recently used the technique to tackle the higher-order Voronoi diagram problem and presented an optimal algorithm by improving the previous best algorithm by a factor of . To this end, they had to develop new techniques and made a great effort. On the other hand, there are other problems whose current best solutions have factors, but it is not clear whether the -algorithm techniques [7, 6] can be used to further reduce these factors. For instance, the biclique partition problem for a set of points in the plane can be solved in time [20, 27]. It has been open whether an time algorithm is possible.
Related work.
Other related problems have also been studied in the literature, e.g., the segment case where consists of line segments. Although faces in an arrangement of lines are convex, they may not even be simply connected in an arrangement of segments. Therefore, the segment case becomes more challenging. It has been proved that the combinatorial complexity of all non-empty faces of the segment arrangement is bounded by [4] and [13], where is the inverse Ackermann function; a lower bound [14] was also known. To compute all non-empty faces, Edelsbrunner, Guibas, and Sharir [14] first gave a randomized algorithm of expected time for any . Agarwal [1] presented an improved deterministic algorithm of time. Also, Agarwal, Matoušek, and Schwarzkopf [2] derived a randomized algorithm of expected time. Wang [26] proposed an time deterministic time, where . An intriguing question is whether our new techniques for the line case can somehow be utilized to tackle the segment case. One obstacle, for example, is that the problem for the segment case in the dual setting is not “cleanly” defined and thus we do not have a corresponding algorithm in the dual setting.
In part because of the difficulty, a special case has been studied extensively, in which we wish to compute a single face in an arrangement of segments. The problem can be solved in expected time using a randomized algorithm [9], or in time using a deterministic algorithm [3]. These algorithms provide improvements over the previous deterministic methods, which required time [23] and time [14] respectively. An open problem in this field has been whether it is possible to have an time deterministic algorithm. It is worth noting that computing the upper envelope of all segments can be accomplished more efficiently in time [19].
Outline.
After introducing notation in Section 2, we present an algorithm in Section 3 that solves the problem in the primal plane. Then, in Section 4, we describe the second algorithm (which is mainly from [26]) that tackles the problem in the dual plane. We combine the two algorithms in Section 5 to obtain our final algorithm. Due to the space limit, many details and proofs are omitted but can be found in the full paper.
2 Preliminaries
We follow the same notation as in Section 1, e.g., , , , , . Our goal is to compute all nonempty cells of . For ease of discussion, we assume that no point of lies on a line of . Note that this implies that each point of is in the interior of a face of . We also make a general position assumption that no line of is vertical. These assumptions can be relaxed without difficulty by the standard perturbation techniques [16, 28].
For any point , denote by the face of the arrangement that contains . For a region in the plane, we often use to denote the subset of in , i.e., .
Cuttings.
A tool that will be frequently used in our algorithm is cuttings [8, 22]. For a region in the plane, we use to denote the subset of lines of that intersect the interior of (we also say that these lines cross and is the conflict list of ).
A cutting for is a collection of closed cells (each of which is a possibly unbounded triangle) with disjoint interiors, which together cover the entire plane [8, 22]. The size of is defined to be the number of cells in . For a parameter with , a cutting for is a -cutting if holds for every cell .
We say that a cutting -refines another cutting if each cell of is wholly contained within a single cell of , and if every cell in encompasses at most cells from .
A hierarchical -cutting, characterized by constants and , consists of a series of cuttings with the following property. has a single cell that is the entire plane. For each , is a -cutting of size that -refines . To make a -cutting, we select to ensure . Consequently, the size of is . As already shown in [8], it can be easily verified that the total number of cells of all cuttings , , is also , and the total size of the conflict lists for all cells of , , is bounded by . If a cell within contains a cell in , we call the parent of and a child of . In the following, we often use to denote the set of all cells of all cuttings , .
For any , a hierarchical -cutting of size for (together with the conflict lists for all cells of for all ) can be computed in time [8].
3 The first algorithm in the primal plane
We present our first algorithm for the problem, which works in the primal plane.
For any subset , let denote the upper envelope of the lines of .
Consider a point . Our algorithm needs to output the face of that contains . Let (resp., ) denote the subset of lines of that are below (resp., above) . It is not difficult to see that the face is the common intersection of the region above the upper envelope and the region below the lower envelope of ; see Fig. 1. Our algorithm will compute binary search trees of height that represent and the lower envelope of , respectively. Using the two trees, can be computed in time by computing the two intersections between and , and can then be output in additional time. In what follows, we focus on computing since the lower envelope of can be treated likewise. In the following discussion, depending on the context, an upper envelope (or lower envelope) may refer to a binary search tree that represents it. For example, the phrase “computing ” means “computing a binary search tree that represents ”.
We start with computing a hierarchical -cutting for the lines of in time [8], for a parameter to be determined later. Let denote the set of all cells , . The algorithm also produces the conflict lists for all cells . For each cell , , we define as the subset of lines of that are completely below , where is the parent of (and thus is a cell of ). As is already available and has children, computing for all children of can be done in time by brute force. As such, computing for all cells takes time.
We wish to maintain a binary search tree to represent the upper envelope of . To compute it in linear time, we need to have lines of in sorted order by their slopes. If we sort each individually, the total sorting time for all cells is . To reduce the factor, we adopt the following strategy. We presort all lines of in time. Then, we have the following lemma (see the full paper for the proof).
Lemma 1.
Suppose we have a sorted list of the lines of by their slopes. Then, for all cells can be sorted in time.
After each is sorted, we compute its upper envelope , which takes time. As such, computing for all cells can be done in time.
Next, we compute , which is defined to be , for all cells . This can be done in time by point locations in a top-down manner in the hierarchical cutting. Specifically, for each point , starting from , which comprises a single cell that is the entire plane, suppose the cell of containing is known; then since has cells, locating the cell of containing can be done in time. As such, performing point locations for takes time. Note that as every point of is stored in a single cell of for each .
For each cell , , define as the subset of the lines of completely below . We have the following lemma (see the full paper for the proof).
Lemma 2.
For each cell , suppose is the parent of . Then, and thus is the upper envelope of and .
We wish to compute the upper envelope for every cell in the last cutting . For this, we show below for all cells can be computed in time.
We work on the hierarchical cutting in a top-down manner. Suppose for a cell has been computed (which is true initially when is the only cell of , in which case and thus ). Then, for each child of , we compute as follows. By Lemma 2, is the upper envelope of and . The following Lemma 3 (see the full paper for the proof) provides an algorithm that computes based on and . The technical crux of the result is a crucial observation that the dual of , which is the lower hull of the dual points of the lines of , has only intersections with the dual of , which is the lower hull of the dual points of the lines of . Note that the algorithm does not report explicitly but rather returns a binary search tree representing , which is obtained by splitting and merging binary search trees of and .
Lemma 3.
can be obtained from and in time.
By virtue of Lemma 3, we can compute for all cells in time, which is as has cells.
Consider a cell . For any point , let denote the subset of lines of below . It is easy to see that . Hence, is the lower envelope of and . The above already computes . Suppose is also available. Then, we compute by merging and in time by the algorithm of Lemma 3. Indeed, since all lines of cross while all lines of are completely below , the same algorithm as Lemma 4 is also applicable here. Consequently, once the upper envelopes for all points are computed, for all can be computed in additional time.
It remains to compute . To this end, we recursively apply the above algorithm on and . A subtle issue is that while , we do not have a good upper bound for . To address this issue, we do the following. If , then we arbitrarily partition into groups of at most points each. Since has cells, the number of groups for all cells is still bounded by . Now for each cell , for each group of , we apply the above algorithm recursively on and . Thus, we obtain the following recurrence for the runtime of the entire algorithm (excluding the time for presorting ), for any :
| (1) |
We will use the recurrence later in our combined algorithm in Section 5.
4 The second algorithm in the dual plane
We discuss another algorithm, which deals with the problem in the dual plane. It mostly follows Wang’s algorithm in [26] with a slight change to make the algorithm recursive.
Let be the set of lines dual to the points of and the set of points dual to the lines of . Consider a point . Recall that is the face of that contains . Without loss of generality, we assume that the dual line of is horizontal. In the dual plane, divides the points of into two subsets and the portions of the convex hulls of the two subsets between their inner common tangents are dual to [1, 12]; see Fig 2. Specifically, define (resp., ) to be the subset of points of above (resp., below) . Let be the lower hull of the convex hull of and the upper hull of ; see Fig 2. Hence, the boundary of is dual to the portions of and between their inner common tangents; let denote the dual of .
The algorithm will compute binary search trees of height to represent and , respectively. Using the trees, their inner common tangents can be computed in time [18] and then can be reported in additional time. We only discuss how to compute (i.e., compute the tree for it).
The algorithm uses a hierarchical -cutting for the lines of . The following recurrence for the runtime of the whole algorithm can be obtained (excluding a presorting step), for any :
| (2) |
See the full paper for the algorithm details. Recurrence (2) will be used in our combined algorithm in Section 5. We highlight some details below that are needed in Section 5.
Remark.
For each dual line (assume it is horizontal), the algorithm for Recurrence (2) computes a set of convex hulls such that (1) they are completely above ; (2) they are pairwise disjoint and each of them is a convex hull of a subset of points of ; (3) is the lower hull of them; (4) . Again, for each convex hull of , we have a binary search tree that represents it. As a final step, called the convex hull merge procedure, the algorithm computes the lower hull (which is ) of the vertices of all convex hulls of , for all . The term in (2) is due to this convex hull merge procedure. If this procedure could be performed in time (which is one of our goals in Section 5), then the term in (2) would become .
5 Combining the two algorithms
In this section, we combine the two algorithms presented in the last two sections to obtain a final algorithm to compute all non-empty faces of for the points of .
We first discuss the symmetric case where . If we apply (2) and then (1) using the same , we can obtain: . Setting leads to the following
| (3) |
The recurrence solves to . In the following, we improve the algorithm to time using the -algorithm framework of Chan and Zheng [7].
5.1 Improvement
We apply the recurrence (3) one more time to obtain the following with :
| (4) |
As is very small, we show that after time preprocessing, we can solve each subproblem of (4) in time. Consequently, we obtain .
More precisely, we will demonstrate that following a preprocessing step requiring time, where represents a polynomial function, each subproblem can be solved by performing only comparisons. Alternatively, we can solve using an algebraic decision tree with a height of . Given that , the term remains bounded by . To adapt this approach to the conventional computational model (such as the standard real RAM model), we explicitly construct the decision tree for the aforementioned algorithm. This construction, which can also be viewed as part of the preprocessing for solving , can be accomplished in time. Consequently, with just time spent on preprocessing, we can efficiently solve each subproblem in time. In the subsequent discussion, for notational convenience, we will use instead of . Our objective is to establish the following lemma.
Lemma 4.
After time preprocessing, can be solved using comparisons.
We first apply recurrence (2) by setting and , and obtain
| (5) |
As remarked at the end of Section 4, the term is due to the convex hull merge procedure for computing by merging the convex hulls of , for all . If the procedure could be done using comparisons, then the term would become . Note that . As such, to solve by comparisons, there are two challenges: (1) perform the merge procedure on the convex hulls using comparisons; (2) solve each subproblem using “amortized” comparisons, so that all such subproblems in (5) together cost comparisons.
-algorithm framework.
To address these challenges, we resort to the -algorithm framework for bounding decision tree complexities, as recently introduced by Chan and Zheng [7]. We provide a brief overview here, with more detailed information available in [7, Section 4.1].
In essence, this framework constitutes an algorithm that exclusively counts the number of comparisons, termed -comparisons in [7], to determine if a point belongs to a semialgebraic set of degree within a constant-dimensional space. Solving our problem of finding the non-empty faces is equivalent to locating the cell that contains a point defined by the input (i.e., the lines of and the points of in our problem) within an arrangement comprising the boundaries of semialgebraic sets in an -dimensional space (because our input size is ). Constructing this arrangement can be achieved in time without inspecting the input values, thereby obviating the need for any comparisons. Notably, the number of cells in is bounded by .
As the -algorithm progresses, it maintains a set consisting of cells from . Initially, comprises all cells of . During the algorithm’s execution, can only shrink, yet it always contains the sought-after cell . Upon completion of the algorithm, is located.
We define a potential function as . Given that contains cells, initially is . For any operation or subroutine of the algorithm, let denote the change in . Since monotonically decreases throughout the algorithm, we always have . The sum of over the entire algorithm is . Consequently, this allows us to accommodate costly operations or subroutines, as long as they result in a decrease in .
Two algorithmic tools are introduced in [7] under the framework: the basic search lemma [7, Lemma 4.1] and the search lemma [7, Lemma A.1]. Roughly speaking, these lemmas operate as follows: when presented with a set of predicates, where each predicate assesses whether holds true for the input vector , it is guaranteed that at least one of these predicates is true for all inputs within the active cells. In such cases, the basic search lemma can identify a predicate that holds true by conducting comparisons. The search lemma is for scenarios involving a binary tree (or a more general directed acyclic graph of degree) with nodes , each associated with a predicate , and where for each internal node , implies for a child of across all inputs in the active cells. This lemma can compute a leaf node for which holds true with comparisons.
As discussed in [7], intuitively the basic search lemma provides a mild form of nondeterminism, allowing us to “guess” which one of choices is correct, with only amortized cost instead of . This situation naturally occurs in the context of point location, where we seek to determine which one of the cells contains a given point. Another noteworthy application of both lemmas, as also discussed in [7], is the task of finding the predecessor of a query number within a sorted list of input numbers. As will be seen later, some subproblems in our algorithm also involves point locations as well as finding predecessors within sorted lists, making both the basic search lemma and the search lemma highly applicable.
In the following two subsections, we will address the aforementioned challenges individually. Let represent a set of points and a set of lines, for the problem in Recurrence (5).
5.2 The convex hull merge procedure
We follow the notation in the remark of Section 4. Define . Hence, . Our task is to compute (a binary search tree that represents) the lower hull (which is ) of the vertices of all convex hulls of , for all . Wang [26] gave an algorithm that can constructs in time, resulting in a total of time for all . We will convert the algorithm to a more efficient -algorithm that uses only comparisons. Below, we first review Wang’s algorithm.
Constructing : A conventional algorithm from Wang [26].
Since is the lower hull of all convex hulls of , it is only necessary to focus on the lower hull of each convex hull of . For each convex hull of , since we have its binary search tree, we can obtain a binary search tree only representing its lower hull in time. This is achieved by initially identifying the leftmost and rightmost vertices of the convex hulls and subsequently executing split/merge operations on these trees. The total time for doing this for all convex hulls of is .
Next we compute the portions of each lower hull that are vertically visible from the line . A point is vertically visible from if the vertical segment connecting to does not intersect any other lower hull of . Remarkably, these visible portions collectively form the lower envelope of , denoted by ; see Fig. 3.
For each convex hull within , we define its representative segment as the line segment connecting the leftmost and rightmost endpoints of (see Fig. 3). Define to be the set of the representative segments of all convex hulls of . Because the convex hulls are pairwise disjoint, so are the segments of . Observe that the lower envelope of corresponds to in the following manner. For each maximal segment of , suppose it lies on the representative segment of a convex hull of . Then the vertical projection of onto the lower hull of constitutes a maximal portion of the lower hull of on . This specific portion can be obtained in time by splitting the binary search tree representing the lower hull of at the -coordinates of and , respectively. Consequently, once is available, , where each maximal portion is represented by a binary search tree, can be obtained in additional time. Since segments of are disjoint, we have and constructing can be accomplished in time by a straightforward plane sweeping algorithm. Note that since vertices of each convex hull of are all from (whose size is ). As such, can be computed in time.
With , we proceed to compute the lower hull . As previously discussed, comprises at most pieces, ordered from left to right. Each piece is a portion of a lower hull of and is represented by a binary search tree.
To begin, we merge the first two pieces by computing their lower common tangent, a task achievable in time [24], since these two pieces are separated by a vertical line. After that we obtain a binary search tree that represents the lower hull of the first two pieces of . We proceed to merge this lower hull with the third piece of in a similar manner. This process continues until all pieces of have been merged, culminating in a binary search tree representing . The runtime is , as each merge operation consumes time, and has at most pieces.
As such, the lower hull can be computed in time. Applying the algorithm to all dual lines of will compute the lower hulls for all . It should be noted that after the algorithm is applied to one line , binary search trees of convex hulls of may have been destroyed due to the split and merge operations during the algorithm. The destroyed convex hulls may be used later for other lines of . To address the issue, we can use persistent binary search trees with path-copying [11, 25] to represent convex hulls so that standard operations on the trees (e.g., merge, split) can be performed in time each and after each operation the original trees are still kept.
Constructing : a new and faster -algorithm.
We now convert the above algorithm to a faster -algorithm. In the above algorithm, the procedures that take time are the following: (1) Computing the trees representing the lower hulls of ; (2) computing the lower envelope of ; (3) computing the lower envelope of by using ; (4) computing by merging the pieces of . Each of these procedures leads to an overall time for all since .
For each of these procedures, we will design a corresponding “-procedure” that uses only comparisons for all (thus the amortized cost for each is ). In particular, the fourth procedure poses the most challenge and its solution is also the most interesting. See the full paper for our -algorithms for the first three procedures.
5.2.1 The fourth procedure
The fourth procedure is to compute . The idea is to merge pieces of one by one from left to right, and each merge is done by first computing the lower common tangent. Note that each piece is a portion of the lower hull of a convex hull of and is represented by a binary search tree. Specifically, suppose we have the lower hull for the first pieces, i.e., we have a binary search tree for . The next step is to merge with the -th piece by first computing the lower common tangent of and . Let be the binary search tree for . With the lower common tangent, we perform split and merge operations on and for to obtain a new tree for the lower hull of the first pieces. Finding the lower common tangent can be done in time [24] and constructing the tree also takes time.
In the following, we focus on describing a -procedure that can compute the lower common tangent of and using comparisons. After the lower common tangent is computed, constructing does not need any comparisons because split and merge operations on and do not involve any comparisons.
Notation and algorithm overview
For notational convenience, let , , , and .
We will use the basic search lemma of the -algorithm framework of Chan and Zheng [7] discussed above. We will also rely on the technique from Overmars and van Leeuwen [24] for computing common tangents of two convex hulls.
Let the line segment be the lower common tangent between and , with and . We call and the tangent points. For ease of exposition, we assume that is not collinear with any edge of . Thus, the tangent points and are unique.
For each , since we are searching a vertex from , from now on, we view as a sequence of vertices ordered from left to right. We use a chain to refer to a contiguous subsequence of . For two vertices and of with left of , we use to denote the chain of from to including both and , while is defined to be . Similarly, refers to the chain of from to including but excluding ; is defined likewise. In addition, for any vertex of , we use (resp., ) to refer to the left (resp., right) neighboring vertex of in ; for convenience, if is the leftmost (resp., rightmost) vertex of , then (resp., ) refers to . For example, . The following lemma is based on the technique of Overmars and van Leeuwen [24], which will be used in our algorithm.
Lemma 5 (Overmars and van Leeuwen [24]).
Given two points and , (resp., ) partitions (resp., ) into two chains (we assume that neither chain contains , ). Then, among the four chains of and , we can determine at least one chain that does not contain a tangent point based on the following six points: (resp., ) and its two neighboring vertices of (resp., ); such a chain is called OvL-prunable111OvL is the last name initials of Overmars and van Leeuwen..
Lemma 5 provides a pruning criterion for the binary search algorithm of [24] that can compute in time. We will use the lemma in a different way. For any subchain of an OvL-prunable chain determined by the lemma, we also say that the subchain is OvL-prunable (a subchain is a contiguous subsequence of vertices of the chain).
For each , we maintain two vertices and of such that . After iterations, either or contains a single point. The single point is in the former case and in the latter one. In either case, one tangent point is determined. After that, the other tangent point can be computed by a similar (and simpler) procedure. For the simplicity of discussion, we assume is not an endpoint of , for each .
Computing a tangent point
Initially, for each , we set and to be the two endpoints of , respectively. This guarantees that the algorithm invariant holds, i.e., . We consider a general step of the algorithm. To apply the basic search lemma, we define a predicate with respect to , as follows.
Definition 6.
Define to be true if neither nor is OvL-prunable when Lemma 5 is applied to for any and .
By Lemma 5, whether is true can be determined by points of , i.e., at most six points are needed for each pair with and , and thus the predicate is of degree (where the variables are the coordinates of the points).
Each iteration of the algorithm proceeds as follows. For each , partition into chains of roughly equal lengths: , , for a parameter to be determined later. Define . As such, the length of each chain of is roughly equal to the length of divided by . Define , i.e., consists of pairs of chains such that in each pair, the first chain is from and the second one is from . We have the following observation (see the full paper for the proof).
Observation 7.
must contain a pair of chains and such that the predicate holds true.
In light of the above observation, we apply the basic search lemma on the cells of to find a pair of chains and such that the predicate is true. By the basic search lemma, this can be accomplished using comparisons. The subsequent lemma (see the full paper for the proof), which proves a key property, ensures our ability to recursively employ the algorithm.
Lemma 8.
If is true, then either or , and which case happens can be determined using comparisons.
By Lemma 8, without loss of generality, we assume (and thus ). This finishes the current iteration. We proceed on the next iteration with the two chains and , i.e., update and (and thus ). As , the algorithm invariant holds.
In this way, each iteration on and shrinks one of them to a subchain of size roughly of its original size. Since , after iterations, a tangent point can be found. The total number of comparisons is thus .
The above finds one tangent point. The other one can be found by a similar but simpler algorithm, which uses comparisons. See the full paper for details.
In summary, with comparisons, the lower tangent can be computed. Setting leads to an upper bound of on the number of comparisons.
In this way, the total number of comparisons for constructing the lower hull by merging the pieces of is since has at most pieces. As and the sum of in the entire algorithm is , the total number of comparisons for computing for all is .
5.3 Solving the subproblems
We can solve all subproblems in Recurrence (5) using a total of comparisons. See the full paper for details.
5.4 Putting it all together, the asymmetric case, and the lower bound
This proves Lemma 4, and thus in Recurrence (5) can be bounded by after time preprocessing, as discussed before. Equivalently, in Recurrence (4) is after time preprocessing. Notice that the preprocessing work is done only once and for all subproblems in (4). Since , we have . As such, in (4) solves to and we thus obtain the following theorem.
Theorem 9.
Given a set of points and a set of lines in the plane, we can report all faces of the line arrangement that contain at least one point in time.
The asymmetric case is handled in the following corollary; see the full paper for the proof.
Corollary 10.
Given a set of points and a set of lines in , we can report all faces of the line arrangement that contain at least one point in time.
Theorem 11 finally proves the lower bound below, with the help of Ben-Or’s technique [5]. This justifies the optimality of Corollary 10. See the full paper for the proof.
Theorem 11.
Computing all non-empty faces of the line arrangement requires time under the algebraic decision tree model.
References
- [1] Pankaj K. Agarwal. Partitioning arrangements of lines II: Applications. Discrete and Computational Geometry, 5:533–573, 1990. doi:10.1007/BF02187809.
- [2] Pankaj K. Agarwal, Jiří Matoušek, and Otfried Schwarzkopf. Computing many faces in arrangements of lines and segments. SIAM Journal on Computing, 27:491–505, 1998. doi:10.1137/S009753979426616X.
- [3] Nancy M. Amato, Michael T. Goodrich, and Edgar A. Ramos. Computing faces in segment and simplex arrangements. In Proceedings of the 27th Annual ACM Symposium on Theory of Computing (STOC), pages 672–682, 1995. doi:10.1145/225058.225285.
- [4] Boris Aronov, Herbert Edelsbrunner, Leonidas J. Guibas, and Micha Sharir. The number of edges of many faces in a line segment arrangement. Combinatorica, 12:261–274, 1992. doi:10.1007/BF01285815.
- [5] Michael Ben-Or. Lower bounds for algebraic computation trees (preliminary report). In Proceedings of the 15th Annual ACM Symposium on Theory of Computing (STOC), pages 80–86, 1983. doi:10.1145/800061.808735.
- [6] Timothy M. Chan, Pingan Cheng, and Da Wei Zheng. An optimal algorithm for higher-order voronoi diagrams in the plane: The usefulness of nondeterminism. In Proceedings of the 35th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 4451–4463, 2024. doi:10.1137/1.9781611977912.156.
- [7] Timothy M. Chan and Da Wei Zheng. Hopcroft’s problem, log-star shaving, 2D fractional cascading, and decision trees. In Proceedings of the 33rd Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 190–210, 2022. doi:10.1137/1.9781611977073.10.
- [8] Bernard Chazelle. Cutting hyperplanes for divide-and-conquer. Discrete and Computational Geometry, 9(2):145–158, 1993. doi:10.1007/BF02189314.
- [9] Bernard Chazelle, Herbert Edelsbrunner, Leonidas J. Guibas, Micha Sharir, and Jack Snoeyink. Computing a face in an arrangement of line segments and related problems. SIAM Journal on Computing, 22:1286–1302, 1993. doi:10.1137/0222077.
- [10] Kenneth L. Clarkson, Herbert Edelsbrunner, Leonidas J. Guibas, Micha Sharir, and Emo Welzl. Combinatorial complexity bounds for arrangement of curves and spheres. Discrete and Computational Geometry, 5:99–160, 1990. doi:10.1007/BF02187783.
- [11] James R. Driscoll, Neil Sarnak, Daniel D. Sleator, and Robert E. Tarjan. Making data structures persistent. Journal of Computer and System Sciences, 38(1):86–124, 1989. doi:10.1016/0022-0000(89)90034-2.
- [12] Herbert Edelsbrunner, Leonidas J. Guibas, John Hershberger, Raimund Seidel, Micha Sharir, Jack Snoeyink, and Emo Welzl. Implicitly representing arrangements of lines or segments. Discrete and Computational Geometry, 4:433–466, 1989. doi:10.1007/BF02187742.
- [13] Herbert Edelsbrunner, Leonidas J. Guibas, János Pach, Richard Pollack, Raimund Seidel, and Micha Sharir. Arrangements of curves in the plane topology, combinatorics, and algorithms. Theoretical Computer Science, 92(2):319–336, 1992. doi:10.1016/0304-3975(92)90319-B.
- [14] Herbert Edelsbrunner, Leonidas J. Guibas, and Micha Sharir. The complexity and construction of many faces in arrangement of lines and of segments. Discrete and Computational Geometry, 5:161–196, 1990. doi:10.1007/BF02187784.
- [15] Herbert Edelsbrunner, Leonidas J. Guibas, and Jorge Stolfi. Optimal point location in a monotone subdivision. SIAM Journal on Computing, 15(2):317–340, 1986. doi:10.1137/0215023.
- [16] Herbert Edelsbrunner and Ernst P. Mücke. Simulation of simplicity: A technique to cope with degenerate cases in geometric algorithms. ACM Transactions on Graphics, 9:66–104, 1990. doi:10.1145/77635.77639.
- [17] Herbert Edelsbrunner and Emo Welzl. On the maximal number of edges of many faces in an arrangement. Journal of Combinatorial Theory, Series A, 41:159–166, 1986. doi:10.1016/0097-3165(86)90078-6.
- [18] Leonidas J. Guibas, John Hershberger, and Jack Snoeyink. Compact interval trees: A data structure for convex hulls. International Journal of Computational Geometry and Applications, 1(1):1–22, 1991. doi:10.1142/S0218195991000025.
- [19] John Hershberger. Finding the upper envelope of line segments in time. Information Processing Letters, 33:169–174, 1989. doi:10.1016/0020-0190(89)90136-1.
- [20] Matthew J. Katz and Micha Sharir. An expander-based approach to geometric optimization. SIAM Journal on Computing, 26(5):1384–1408, 1997. doi:10.1137/S0097539794268649.
- [21] David G. Kirkpatrick. Optimal search in planar subdivisions. SIAM Journal on Computing, 12(1):28–35, 1983. doi:10.1137/0212002.
- [22] Jir̆í Matoušek. Range searching with efficient hierarchical cuttings. Discrete and Computational Geometry, 10(1):157–182, 1993. doi:10.1007/BF02573972.
- [23] Joseph S. B. Mitchell. On computing a single face in an arrangement of line segments. Manuscript, School of Operations Research and Industrial Engineering, Cornell University, Ithaca, NY, 1990.
- [24] 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.
- [25] Neil Sarnak and Robert E. Tarjan. Planar point location using persistent search trees. Communications of the ACM, 29:669–679, 1986. doi:10.1145/6138.6151.
- [26] Haitao Wang. Constructing many faces in arrangements of lines and segments. Journal of Computational Geometry (JoCG), 14:287–308, 2023. doi:10.20382/jocg.v14i1a11.
- [27] Haitao Wang and Yiming Zhao. Improved algorithms for distance selection and related problems. Algorithmica, 87:908–929, 2025. doi:10.1007/s00453-025-01305-z.
- [28] Chee-Keng Yap. Symbolic treatment of geometric degeneracies. Journal of Symbolic Computation, 10:349–370, 1990. doi:10.1016/S0747-7171(08)80069-7.
