Utah State University, Logan, UT 84322, USA
11email: [email protected]
On the Planar Two-Center Problem and Circular Hulls††thanks: A preliminary version of this paper will appear in the Proceedings of the 36th International Symposium on Computational Geometry (SoCG 2020).
Abstract
Given a set of points in the Euclidean plane, the two-center problem is to find two congruent disks of smallest radius whose union covers all points of . Previously, Eppstein [SODA’97] gave a randomized algorithm of expected time and Chan [CGTA’99] presented a deterministic algorithm of time. In this paper, we propose an time deterministic algorithm, which improves Chan’s deterministic algorithm and matches the randomized bound of Eppstein. If is in convex position, then we solve the problem in deterministic time. Our results rely on new techniques for dynamically maintaining circular hulls under point insertions and deletions, which are of independent interest.
1 Introduction
In this paper, we consider the planar 2-center problem. Given a set of points in the Euclidean plane, we wish to find two congruent disks of smallest radius whose union covers all points of .
The classical 1-center problem for a set of points is to find the smallest disk covering all points, and the problem can be solved in linear time in any fixed dimensional space [9, 13, 23]. As a natural generalization, the 2-center problem has attracted much attention. Hershberger and Suri [18] first solved the decision version of the problem in time, which was later improved to time [17]. Using this result and parametric search [22], Agarwal and Sharir [2] gave an time algorithm for the -center problem. Katz and Sharir [20] achieved the same running time by using expanders instead of parametric search. Eppstein [15] presented a randomized algorithm of expected time. Later, Jaromczyk and Kowaluk [19] proposed an time algorithm. A breakthrough was achieved by Sharir [27], who proposed the first subquadratic algorithm for the problem, and the running time is . Afterwards, following Sharir’s algorithmic scheme, Eppstein [16] derived a randomized algorithm of expected time, and then Chan [6] developed an time deterministic algorithm and a randomized algorithm of time with high probability. Recently, Tan and Jiang [28] proposed a simple algorithm of time based on binary search, but unfortunately, the algorithm is not correct (see the appendix for details). The problem has an time lower bound in the algebraic decision tree model [16], by a reduction from the max-gap problem.
In this paper, we present a new deterministic algorithm of time, which improves the time deterministic algorithm by Chan [6] and matches the randomized bound of [6, 16]. This is the first progress on the problem since Chan’s work [6] was published twenty years ago. Further, if is in convex position (i.e., every point of is a vertex of the convex hull of ), then our technique can solve the 2-center problem on in time. Previously, Kim and Shin [21] announced an time algorithm for this convex position case, but Tan and Jiang [28] found errors in their time analysis.
Some variations of the 2-center problem have also been considered in the literature. Agarwal et al. [3] studied the discrete 2-center problem where the centers of the two disks must be in , and they solved the problem in time. Agarwal and Phillips [1] considered an outlier version of the problem where points of are allowed to be outside the two disks, and they presented a randomized algorithm of expected time. Arkin et al. [4] studied a bichromatic 2-center problem for a set of pairs of points in the plane, and the goal is to assign a red color to a point and a blue color to the other point for every pair, such that is minimized, where (resp., ) is the radius of the smallest disk covering all red (resp., blue) points. Arkin et al. [4] gave an time algorithm, which was recently improved to time by Wang and Xue [29]. The more general -center problem is NP-hard if is part of the input [24].
1.1 Our Techniques
Let and be two congruent disks in an optimal solution such that the distance of their centers is minimized. Let be their radius and the distance of their centers. If , we call it the distant case; otherwise, it is the nearby case.
Eppstein [16] already solved the distant case in deterministic time. Solving the nearby case turns out to be the bottleneck in all previous three sub-quadratic time algorithms [6, 16, 27]. Specifically, Sharir [27] first solved it in deterministic time. Eppstein [16] gave a randomized algorithm of expected time. Chan [16] proposed a randomized algorithm of time with high probability and another deterministic algorithm of time. Our contribution is an time deterministic algorithm for the nearby case, which improves Chan’s algorithm by a factor of . Combining with the time deterministic algorithm of Eppstein [16] for the distant case, the 2-center problem can now be solved in deterministic time. Interestingly, solving the distant case now becomes the bottleneck of the problem.
Our algorithm (for the nearby case) is based on the framework of Chan [6]. Our improvement is twofold. First, Chan [6] derived an time algorithm for the decision problem, i.e., given , decide whether . We improve the algorithm to time, after time preprocessing. Second, Chan [6] solved the optimization problem (i.e., the original 2-center problem) by parametric search. To this end, Chan developed a parallel algorithm for the decision problem and the algorithm runs in parallel steps using processors. By applying Cole’s parametric search [10] and using his time decision algorithm, Chan solved the optimization problem in time. We first notice that simply replacing Chan’s time decision algorithm with our new time algorithm does not lead to any improvement. Indeed, in Chan’s parallel algorithm, the number of processors times the number of parallel steps is . We further design another parallel algorithm for the decision problem, which runs in parallel steps using processors. Consequently, by applying Cole’s parametric search with our time decision algorithm, we solve the optimization problem in time. Note that although Cole’s parametric search is used, our algorithm mainly involves independent binary searches and no sorting networks are needed.
In addition, we show that our algorithm can be easily applied to solving the convex position case in time.
Circular hulls.
To obtain our algorithm for the decision problem, we develop new techniques for circular hulls [18] (also known as -hulls with [14]). A circular hull of radius for a set of points is the common intersection of all disks of radius containing (to see how circular hulls are related to the two-center problem, notice that there exists a disk of radius covering all points of if and only if the circular hull of of radius exists). Although circular hulls have been studied before, our result needs more efficient algorithms for certain operations. For example, two algorithms [14, 18] were known for constructing the circular hull for a set of points; both algorithms run in time, even if the points are given sorted. We instead present a linear-time algorithm once the points are sorted. Also, Hershberger and Suri [18] gave a linear-time algorithm to find the common tangents of two circular hulls separated by a line, and we design a new algorithm of time. We also need to maintain a dynamic circular hull for a set of points under point insertions and deletions. Hershberger and Suri [18] gave a semi-dynamic data structure that can support deletions in amortized time each. In our problem, we need to handle both insertions and deletions but with the following special properties: the point in each insertion must be to the right of all points of and the point in each deletion must be the leftmost point of . Our data structure can handle each update in amortized time (which leads to the linear time decision algorithm for the 2-center problem111As will be clear later, the points processed in our dynamic circular hull problem are actually sorted radially around a point; we can extend the result for the left-right sorted case to the radically sorted case.). We believe that these results on circular hulls are interesting in their own right and undoubtedly have other applications.
Outline.
The rest of the paper is organized as follows. We introduce notation and review some previous work in Section 2. In Section 3, we present our decision algorithm, and the algorithm needs a data structure to maintain circular hulls dynamically, which is given in Section 6. Section 4 solves the optimization problem. Section 5 is concerned with the convex position case. Section 7 is devoted to proving a lemma that is used in Section 4.
2 Preliminaries
We begin with some notation, some of which is borrowed from [6]. It suffices to solve the nearby case. Thus, we assume that in the rest of the paper. In the nearby case, it is possible to find in time a constant number of points such that at least one of them, denoted by , is in [16]. We assume that is the origin of the plane. We make a general position assumption: no two points of are collinear with and no two points of have the same -coordinate. This assumption does not affect the running time of the algorithm, but simplifies the presentation.
For any set of points in the plane, let denote the radius of the smallest enclosing disk of . For a connected region in the plane, let denote the boundary of .
The boundaries of the two disks and have exactly two intersections, and let and be the two rays through these intersections emanating from (e.g., see Fig. 2). As argued in [6], one of the two coordinate axes must separate and since the angle between the two rays lies in , and without loss of generality, we assume it is the -axis.


Let denote the subset of points of above the -axis, and . For notational simplicity, let . Let be the sorted list of counterclockwise around , and the sorted list of also counterclockwise around (e.g., see Fig. 2). For each and , define and . Note that if , then , and if , then . In words, if we consider a ray emanating from and between and , and another ray emanating from and between and , then (resp., ) consist of all points to the left (resp., right) of the two rays (e.g., see Fig. 2).
Note that the partition of by the two rays is for some and , and thus . Define and , for all . Then, . If we consider and as matrices, then each row of (resp., ) is monotonically increasing (resp., decreasing) and each column of (resp., ) is monotonically decreasing (resp., increasing). For each , define . Thus, .
2.1 Circular Hulls
For any point in the plane and a value , we use to denote the disk centered at with radius . For a set of points in the plane, define , i.e., the common intersection of the disks for all points . Note that is convex. A dual concept of is the circular hull [18] (also known as -hull with [14]; e.g., see Fig 4), denoted by , which is the common intersection of all disks of radius containing . is convex and unique. The vertices of is a subset of and the edges are arcs of circles of radius . and are dual to each other: Every arc of is on the circle of radius centered at a vertex of and every arc of is on the circle of radius centered at a vertex of . Note that exists if and only if , which is true if and only . For brevity, we often drop the subscript from and if it is clear from the context.


Circular hulls will play a very important role in our algorithm. As discussed in [18], circular hulls have many properties similar to convex hulls. However, circular hulls also have special properties that convex hulls do not possess. For example, the circular hull for a set of points may not exist. Also, the leftmost point of a set of points must be a vertex of the convex hull of , but this may not be the case for the circular hull. Due to these special properties, extending algorithms on convex hulls to circular hulls sometimes is not trivial, as will be seen later. In the following, we introduce some concepts on circular hulls that will be needed later.
We assume that and thus a disk of radius is a unit disk (whose boundary is a unit circle). We use to refer to . We assume that exists.
For any arc of a circle, the circle is called the supporting circle of the arc, and the disk enclosed in the circle is called the supporting disk of the arc. If a disk contains all points of a set , then we say that covers . We say that a set of points in the plane is unit disk coverable if there is a unit disk that contains all points of , which is true if and only if exists.
Consider two points and that are unit disk coverable. There must be a unit circle with and on it, and we call the arc of the circle subtending an angle of at most a minor arc [18]. Note that there are two minor arcs connecting and , we use to refer to the one clockwise around the center of the supporting circle of the arc from to , and use to refer to the other one (e.g., see Fig. 4). Note that and . For any minor arc , we use to denote the supporting disk of , i.e., the disk whose boundary contains . Note that all arcs of are minor arcs. We make a general position assumption that no point of is on a minor arc of two other points of . The following observation has already been discovered previously [14, 18].
Observation 1
-
1.
A point of is a vertex of iff there is a unit disk covering and with on the boundary.
-
2.
A minor arc connecting two points of is an arc of iff its supporting disk covers .
-
3.
is the common intersection of the supporting disks of all arcs of .
-
4.
A unit disk covers iff it contains .
-
5.
For any subset of , .
For any vertex of , we refer to the clockwise neighboring vertex of on the clockwise neighbor of , and the counterclockwise neighbor is defined analogously. We use and to denote ’s clockwise and counterclockwise neighbors, respectively.
Tangents.
Consider a vertex in the circular hull . Consider the arc of . Let be the disk . By Observation 1(2) and (4), contains . Observe that if we rotate around clockwise until contains the arc , always contains , and in fact, this continuum of disks are the only unit disks that contain and have on the boundaries. For each of such disk , we say that (and any part of containing ) is tangent to at . We have the following observation.
Observation 2
A unit disk that contains a vertex of on its boundary is tangent to at if and only if contains both and .


Let be a point outside . If there is a vertex on such that is tangent to at , then the arc is an upper tangent from to ; e.g., see Fig 6. If there is a vertex on such that is tangent to at , then the arc is a lower tangent from to . By replacing the arcs of clockwise from to with the two tangents from , we obtain . This also shows that has tangents to if and only if is unit disk coverable and is outside . Note that is possible, in which case .
Common tangents of two circular hulls.
Let and be two sets of points in the plane such that all points of (resp., ) are to the left (resp., right) of a vertical line . Let . A unit disk that is tangent to , say at a vertex , and is also tangent to , say at a vertex , is said to be commonly tangent to and . The minor arc of connecting and is called a common tangent of the two circular hulls. It is an upper (resp, lower) tangent if it is clockwise (resp., counterclockwise) from to along the minor arc (e.g., see Fig. 6). The common tangents of and may not exist. Indeed, if does not exist, then the common tangents do not exist. Otherwise the common tangents do not exist either if all points of are contained in , which happens only if is covered by for the rightmost arc of and we call it the -dominating case, or if all points of are contained in , which happens only if is covered by for the leftmost arc of and we call it the -dominating case. If none of the above cases happens, then there are exactly two common tangents between the two hulls. Each tangent intersects the vertical line , which separates and , and the upper tangent intersects higher than the lower tangent does.
Suppose is a sequence of points and and are two points of . We will adhere to the convention that a subsequence of from to includes both and , but a subsequence of strictly from to does not include either one. In many cases, is a cyclic sequence of points, e.g., vertices on a circular hull, and we often say points of clockwise/counterclockwise (strictly) from to .
3 The Decision Problem
This section is concerned with the decision problem: Given a value , decide whether . Previously, Chan [6] solved the problem in time (Chan actually considered a slightly different problem: decide whether , but the idea is similar). We present an time algorithm, after time preprocessing to sort all points of and to obtain the sorted lists and .
Given , we use the following algorithmic framework in Algorithm 1 from [6] (see Theorem 3.3), which can decide whether , and if yes, report all indices with .
The algorithm is simple, but the technical crux is in how to decide whether and whether . Chan [6] built a data structure in time so that each of these two steps can be done in time, which leads to an overall time for his decision algorithm. Our innovation is a new data structure that can perform each of the two steps in amortized time, resulting in an time algorithm. Our idea is motivated by the following observation.
Observation 3
All such elements that are checked in the algorithms (i.e., Line 3) are in a path of the matrix from to an element in the bottom row and the path only goes rightwards or downwards. The same holds for the elements of that are checked in the algorithms (i.e., Line 4).
We call such a path in as specified in the observation a monotone path, which contains at most elements of . We show that we can determine in time whether for all elements in a monotone path of . The same algorithm works for as well.
Let be a monotone path of , starting from . Consider any element on . Recall that . The next value of after is either or , i.e., either or . Note that can be obtained from by inserting and can be obtained from by deleting . Because the points are ordered around counterclockwise, our problem becomes the following. Maintain a sublist of the above sorted list of , with initially, to determine whether (or equivalently whether exists) under deletions and insertions, such that a deletion operation deletes the first point of and an insertion operation inserts the point of following the last point of . Further, deletions only happen to points of (i.e., once is deleted from , no deletions will happen). We refer to the problem as the dynamic circular hull problem. We will show in Section 6 that the problem can be solved in time, i.e., each update takes amortized time. This leads to the following result.
Theorem 3.1
Assume that points of are sorted cyclically around . Given any , whether can be decided in time.
Remark.
For the nearby case, Chan proposed (in Theorem 3.4 [16]) a randomized algorithm of time with high probability (i.e., ) by using his time decision algorithm. Applying our linear time decision algorithm and following Chan’s algorithm (specifically, setting to instead of in the algorithm of Theorem 3.4 in [16]), we can obtain the following result: After deterministic time preprocessing, we can compute for the nearby case in time with high probability (i.e., ).
4 The Optimization Problem
With Theorem 3.1, we solve the optimization problem by parametric search [10, 22]. As Chan’s algorithm [6], because our decision algorithm is inherently sequential, we need to design a parallel decision algorithm. Chan [6] gave a parallel decision algorithm that runs in parallel steps using processors. Consequently, by using his time decision algorithm and applying Cole’s parametric search [10], Chan [6] solved the optimization problem in time. By following Chan’s algorithmic scheme, we develop a new parallel decision algorithm that runs in parallel steps using processors. Then, with the serial decision algorithm in Theorem 3.1 and applying Cole’s parametric search [10] on our new parallel decision algorithm, we solve the optimization problem in time.
Our algorithm relies on the following lemma, whose proof is quite independent of the remainder of this section and will be given in Section 7. Note that Hershberger and Suri [18] gave a linear-time algorithm to achieve the same result as Lemma 1, which suffices for their purpose.
Lemma 1
Given the circular hull (with respect to a radius ) of a set of points and the circular hull of another set of points such that the points of and are separated by a line, one can do the following in time (assuming that the vertices of each circular hull are stored in a data structure that supports binary search): determine whether the circular hull of (with respect to ) exists; if yes, either determine which dominating case happens (i.e., all points of a set are contained in the circular hull of the other set) or compute the two common tangents between the circular hulls of and .
For any , let and . By using Lemma 1, we have the following lemma.
Lemma 2
We can preprocess and compute an interval containing in time so that given any and any pair with , we can determine whether (resp., ) exists, and if yes, return the root of a balanced binary search tree representing the circular hull, in parallel steps using processors, or in time using one processor, where .
Proof
Preprocessing.
We build a complete binary search tree on the set such that the leaves of from left to right storing the points of in their index order. Each internal node of stores a hierarchical representation [11] of the polyhedron , where is the set of points stored in the leaves of the subtree rooted at ( is called a canonical subset). Computing the polyhedrons of all internal nodes of can be done in time in a bottom-up manner using linear time polyhedra intersection algorithms [7, 8]. Similarly, we build a tree on the set .
Consider a vertex of for a canonical subset of . Define . Let be the set of the values of all vertices of for all canonical subsets of . Note that . We find the smallest value such that , and let denote such . The value can be found in using our linear time decision algorithm and doing binary search on using the linear time selection algorithm [5]. Next, we find the largest value in that is smaller than , and let denote that value. By definition, and does not contain any element of .
Consider a canonical subset of and any . We construct for each canonical subset of by intersecting the facets of with the paraboloid and projecting them vertically to the -plane. By the definitions of and , the paraboloid intersects the same set of edges of for all ; this implies that is combinatorially the same for all . Hence, we can consider , which is the dual of , as a parameterized circular hull of . We store the (parameterized) vertices of in a balanced binary search tree. Since is convex, we can obtain and thus the balanced binary search tree for in time; we associate the tree at the node of for . Because the total size of for all canonical subsets in is , we can obtain the balanced binary search trees for of all canonical subsets in in time.
We do the same for as above. The processing on will obtain two values and correspondingly as the above and . We update and ; so still holds. This finishes our processing on , which takes time and is independent of .
Queries.
Given any and any pair with , we determine whether exists, and if yes, return the root of a balanced binary search tree representing it, as follows (the case for is similar). Let and let .
By the standard method, we first find canonical subsets of whose union is exactly . Our following computation procedure can be described as a complete binary tree where the leaves corresponding to the above canonical subsets. So has leaves, and its height is . For each leave of , its circular hull is already available due to the preprocessing. For each internal node that is the parent of two leaves, we compute the circular hull of the union of the two subsets and of the two leaves. As the points of are ordered radially by , the two subsets are separated by a line through . Hence, we can find the common tangents (if exist) using Lemma 1 in time because the size of each subset is no more than . Recall that the circular hull of each canonical subset is represented by a balanced binary search tree. After having the common tangents, we split and merge the two balanced binary search trees to obtain a balanced binary search tree for . In addition, we keep unaltered the two original trees for and respectively, and this can be done by using persistent data structures (e.g., using the copy-path technique [12, 26]) in time. In this way, the original trees for and can be used in parallel for other computations. If the algorithm detects that does not exist, then we simply halt the algorithm and report that does not exist. Also, if the algorithm finds that a dominating case happens, e.g., the -dominating case, then and thus we simply return the root of the tree for .
We do this for all internal nodes in the second level of (i.e., the level above the leaves) in parallel by assigning a processor for each node. In this way, as has leaves, we can compute the circular hulls for the second level in parallel steps using processors. Then, we proceed on the third level in the same way. At the root of , we will have the root of a balanced binary search tree for . Using processors, this takes parallel steps because each level needs parallel steps and the height of is .
Alternatively, if we only use one processor, then since has nodes and we spend time on each node, the total time is . ∎
Armed with Lemma 2, to determine whether , we use the algorithm framework in Theorem 4.2 of Chan [6], but we provide a more efficient implementation, as follows.
Recall the definitions of the matrices and in Section 2, and in particular, each row of (resp., ) is monotonically increasing while each column of (resp., ) is monotonically decreasing. For convenience, let and for all . Let . Let for . Set and . For each , find the largest with (set if no such index exists; note that ). Observe that . Each can be found in time by binary search using Lemma 3. Hence, computing all ’s takes time. This is part of our preprocessing, independent of .
Given , our goal is to decide whether . Let be the interval obtained by the preprocessing of Lemma 2. Since , if , then ; if , then . It remains to resolve the case , as follows. In this case the result of Lemma 2 applies.
We will decide whether for all (recall that iff some ), as follows. Let such that . If , then return . Otherwise, find (by binary search) the largest with , and return if and only if . Algorithm 2 gives the pseudocode. See Theorem 4.2 of [6] for the algorithm correctness.
Chan [6] implemented the algorithm in parallel steps using processors. In what follows, with the help of Lemma 2, we provide a more efficient implementation of parallel steps using processors. Line 1 can be done in time as part of the preprocessing, independent of . We first discuss how to implement Line 3 for all indices , and we will show later that Lines 2 and 4 can be implemented in a similar (and faster) way.
For each , if , then we form a group of at most indices: . Otherwise, starting from , we form a group for every consecutive indices until , so every group has exactly indices except that the last group may have less than indices. In this way, we have at most groups, each of which consists of at most consecutive indices in for some .
Consider a group of indices in . Note that . For each such that , we need to perform binary search on to find the largest index with . To this end, we do the following. We compute the two circular hulls and , in parallel steps using processors by Lemma 2. Note that by “compute the two circular hulls”, we mean that the two circular hulls are computed implicitly in the sense that each of them is represented by a balanced binary search tree and we have the access of its root. If (resp., ) does not exist, then we set it to . We do this for all groups in parallel, which takes parallel steps using processors.
Consider the group defined above again. For each , we need to do binary search on for iterations. In each iteration, the goal is to determine whether for an index . To this end, it suffices to determine whether exists. Notice that . and are already computed above. If one of them does not exist, then does not exist and thus . Otherwise, we compute the circular hull , which can be done in time using one processor by Lemma 2 because . We also compute in time using one processor. Then, we compute the common tangents of and by Lemma 1 (note that and are separated by a line through ), in time using one processor. Then, we merge the two hulls with the two common tangents to obtain a balanced binary search tree for . Because we want to keep the tree for unaltered so that it can participate in other computations in parallel, we use a persistent tree to represent it. Similarly, we obtain a tree for , in time using one processor. If one of and does not exist, then we return . Note that and are separated by and . By applying Lemma 1, we can determine whether exists in time using one processor and consequently determine whether . Therefore, the above algorithm determines whether in time using one processor.
If we do the above for all ’s in parallel, then we can determine whether in time using processors, for each iteration of the binary search. As there are iterations, the binary search procedure (i.e., Line 3) for all runs in parallel steps using processors.
For implementing Line 2, we can use the same approach as above by grouping the indices into groups. The difference is that now each has a specific index , i.e., , for deciding whether , and thus we do not have to do binary search. Hence, using processors, we can implement Line 2 for all in parallel steps. We can do the same for Line 4.
As a summary, we have the following theorem.
Theorem 4.1
After time preprocessing on , given any , we can decide whether in parallel steps using processors.
With the serial decision algorithm in Theorem 3.1 and applying Cole’s parametric search [10] on the parallel decision algorithm in Theorem 4.1, the following result follows.
Theorem 4.2
The value can be computed in time.
Proof
Suppose there is a serial decision algorithm of time and another parallel decision algorithm that runs in parallel steps using processors. Then, Megiddo’s parametric search [22] can compute in time by simulating the parallel decision algorithm on and using the serial decision algorithm to resolve comparisons with . If the parallel decision algorithm has a “bounded fan-in or bounded fan-out” property, then Cole’s technique [10] can reduce the time complexity to . Like Chan’s algorithm [6], our algorithm has this property because it mainly consists of rounds of independent binary search (i.e., the algorithm of Lemma 1). In our case, , , and . Thus, applying Cole’s technique, can be computed in time. ∎
Note that once is computed, we can apply the seriel decision algorithm to obtain in additional time a pair of congruent disks of radius covering .
Corollary 1
The planar two-center problem can be solved in time.
5 The Convex Position Case
In this section, we consider the case where is in convex position (i.e., every point of is a vertex of the convex hull of ). We show that our above time algorithm can be applied to solving this case in the same time asymptotically.
We first compute the convex hull of and order all vertices clockwise as . A key observation [21] is that there is an optimal solution with two congruent disks and of radius such that covers the points of in a chain of and covers the rest of the points. In other words, the cyclic list of can be cut into two lists such that one list is covered by and the other list is covered by .
Let be any point in the interior of . By the above observation, there exists a pair of rays and emanating from such that covers all points of on one side of the two rays and covers the points of in the other side. In order to apply our previous algorithm, we need to find a line that separates the two rays. For this, we propose the following approach.
For any , let denote the subset of vertices on clockwise from to , and if . Due to the above key observation, , with indices modulo . For each , define . Notice that as increases in , is monotonically increasing while is monotonically decreasing. Define to be the largest index in such that . We have the following lemma.
Lemma 4
is equal to the minimum of the following four values: , , , and for all indices and with and .
Proof
Observe that . Hence, is no larger than any of the values specified in the lemma statement.
Let and be two indices such that with . We claim that . Indeed, since , we have . On the other hand, as , we obtain . By a similar argument, also holds.
Without loss of generality, we assume that .
If and , then the lemma follows. Otherwise, one of the following four cases must hold: , , , and . If , then . If , then . Below we show that if and we also show that the case cannot happen, which will prove the lemma.
If , then , for . By the definition of , we have . Because , . Combining the above three inequalities leads to the following: . Because , we obtain . Notice that . Thus, we derive . Since , we finally have .
If , then . By the definition of , we have . Also, since , holds. Therefore, we obtain , which incurs contradiction since . Thus, the case cannot happen. ∎
Based on the above lemma, our algorithm works as follows.
We first compute and the index . This can be easily done in time. Indeed, as increases in , is monotonically increasing while is monotonically decreasing. Therefore, and can be found by binary search on . As both and can be computed in time, the binary search takes time. For the same reason, we can compute and in time.
If , then for two indices and with and . We can compute it as follows. Let be a line through and intersecting the interior of . Let be any point on in the interior of . Lemma 4 implies and satisfy the property discussed above, i.e., separates the two rays and . Consequently, we can apply our algorithm for Theorem 4.2 to compute in time.
Theorem 5.1
The planar two-center problem for a set of points in convex position can be solved in time.
Remark.
The randomized result remarked after Theorem 3.1 also applies to the convex position case, i.e., after deterministic time preprocessing, we can compute in time with high probability (i.e., ).
6 The Dynamic Circular Hull Problem
In this section, we give an time algorithm for the dynamic circular hull problem needed in our decision algorithm in Section 3.
Recall that the points of are ordered around cyclically. To simplify the exposition, we first work on a slightly different problem setting in which points are sorted by their -coordinates; we will show later that the algorithm can be easily adapted to the original problem setting.
Specifically, let be a set of points sorted from left to right and be a set of points sorted from left to right, such that all points of are strictly to the left of a vertical line and all points of are strictly to the right of . The problem is to maintain a sublist of the sorted list of , with initially, to determine whether exists under deletions and insertions, such that a deletion operation deletes the leftmost point of and an insertion operation inserts the point of after the rightmost point of . Further, deletion operations only happen to points of . In the following, we build a data structure in time that can handle each update in amortized time (i.e., after each update, we know whether exists). We make a general position assumption that no two points of have the same -coordinate.
Since initially , we need to compute . Hershberger and Suri [18] gave an time algorithm using divide-and-conquer. The algorithm of Edelsbrunner et al. [14] can also compute in time by first computing the farthest Delaunay triangulation of . Both algorithms still take time even if points of are sorted (indeed, the algorithm of [18] spends time for each combine/merge step and the algorithm of [14] needs to compute the farthest Delaunay triangulation first). We instead exhibit an time incremental algorithm, which can be considered an extension of Graham’s scan for convex hulls, although the extension is not straightforward at all. Before we are able to describe the algorithm, we need to discuss some properties of the circular hulls.
The remainder of this section is organized as follows. In Section 6.1, we show some properties of circular hulls that will be useful for our algorithm. In Section 6.2, we present our linear-time algorithm for constructing the circular hull for a set of sorted points. In Section 6.3, we elaborate on our data structure for maintaining for a dynamic set . Section 6.4 sets up the data structure initially when (e.g., invokes the algorithm given in Section 6.2). Our algorithms for processing deletions and insertions will be described in Sections 6.5 and 6.6, respectively. Finally in Section 6.7 we adapt the algorithm to our original problem setting where points are sorted radially around the origin .
6.1 Observations and Properties of Circular Hulls
From now on, we assume and thus a disk of radius is a unit disk (whose boundary is a unit circle). We use to refer to . We assume that is a subset of and exists.
Recall that every arc of is a minor arc. In the following, unless otherwise stated, an arc refers to a minor arc and a disk refers to a unit disk. For ease of exposition, we make a general position assumption that no point of is on a minor arc of two other points of .
We define the upper hull of as the boundary of from the leftmost vertex to the rightmost vertex. The remaining arcs of comprise the lower hull. Unlike convex hulls, the upper hull (resp., the lower hull) of may not be -monotone due to that the leftmost/rightmost arc may not be -monotone. If the rightmost point of is in the interior of an arc, then we refer to the arc as the rightmost arc of ; otherwise, the rightmost arc is (and its supporting disk is defined to be ). We define the leftmost arc of likewise.


For a minor arc , recall that is the supporting disk of . We further use to denote the region of bounded by and the chord of connecting the two endpoints of (e.g., see Fig. 8). Observe that ; e.g., see Fig. 8. For notational simplicity, we use to refer to . The following observation, which is due to the convexity of the circular hull, was already shown in [18].
Observation 4
[18] Suppose is a point to the right (resp., left) of all points of and exists. Then, is not a vertex of if and only if is in , where is the rightmost (reps., leftmost) arc of . We say that is redundant (with respect to ) if .
Recall that in Graham’s scan for computing convex hulls, the algorithm uses “left turn” and “right turn”. Here instead we find it more informative to use inner turn and outer turn, defined as follows. Note that these concepts are new. Suppose two points and are unit disk coverable. Consider the minor arc , and a point . We say that and form an inner turn if and outer turn otherwise. The following observation will help prove the correctness of our algorithm.
Observation 5
Proof
For the first statement, since and form an inner turn, . As is not in the interior of , one can verify from Fig. 10 that must contain .
We next prove the second statement. Because is unit disk coverable, exists. As is not in the interior of , must be a vertex of . Let be the clockwise neighbor of on . Hence, is an arc of and is either or . Also, covers by Observation 1(2). If , then contains , which contradicts with that and form an outer turn. Thus, , and contains . ∎
For any two vertices and on , we use to denote the set of vertices of clockwise from to . In particular, if , then we let consist of all vertices of . Define . We use to refer to the subset of vertices of not in , and define similarly.
Let be a point outside , and and are the upper and lower tangents from to , respectively; e.g., see Fig 6. Recall that by replacing the arcs of clockwise from to with the two tangents, we can obtain . Hence, consists of exactly those vertices of that are not vertices of . We further have the following observation.
Observation 6
Suppose and are the upper and lower tangents from a point to , respectively; e.g., see Fig. 6.
-
1.
For any vertex in , there is no disk with on the boundary that contains .
-
2.
For any vertex in , any disk tangent to at covers .
-
3.
If is strictly to the right of all points of , then the rightmost vertex of must be in .
-
4.
If there is a line through a vertex of such that all vertices of are on the same side of while is on the other side, then must be in .
Proof
The first two statements can be easily seen by knowing that can be obtained by replacing the arcs of clockwise from to by the two tangents and .
For the third statement, assume to the contrary that , where is the rightmost vertex of . Then, , and by the second statement, any disk tangent to at covers . Let and . Since and are both tangent to at , both disks cover . Hence, contains . Since covers , it contains . Since covers , it contains . Let be the vertical line through . We claim that must intersect one of and twice. Indeed, since contains , it intersects each of the two arcs at least once. If does not intersect either arc twice, then since contains and contains , and both and are to the left of , must be to the left of . As is strictly to the right of , cannot be in , incurring contradiction. Hence, intersects one of and twice. Assume without loss of generality that intersects twice. This implies that the region of to the right of is a subset of . Since is to the right of and is in , must be in the region of to the right of and thus is in . Because , is in . But this means that there are no tangents from to , incurring contradiction.
The fourth statement can be proved in the same way as above by rotating the coordinate system so that is vertical and is on its right side. ∎
Let be the subset of to the left of the vertical line and . Let and be the upper and lower common tangents of and , respectively, i.e., and are the tangent points on and and are the tangent points on ; e.g., see Fig. 6. Then, the following arcs constitute the boundary of in clockwise order: arcs of clockwise from to , , arcs of clockwise from to , and . The following observation generalizes Observation 6.
Observation 7
Suppose and are the upper and lower common tangents of and , respectively; e.g., see Fig. 6.
-
1.
For any vertex in , there is no disk with on the boundary that contains .
-
2.
For any vertex in , any disk tangent to at contains . For any vertex in , any disk tangent to at contains .
-
3.
The rightmost vertex of must be in . The leftmost vertex of must be in .
Proof
The first two statements simply follow from how we can obtain from and using the two common tangents.
For the third statement, we only show the case for the rightmost vertex of and the other case can be treated likewise. The proof is similar to that for Observation 6 and we briefly discuss it. Let be the rightmost vertex of . Assume to the contrary that is not in . Then, by the second statement, both and cover , where and . Hence, covers . Since is to the left of while is to the right of , by the same analysis as that for Observation 6 we can show that must intersect one of and twice. Assume without loss of generality that intersects twice. This implies contains all points of . Since , we obtain that contains all points of . But this means that there are no common tangents between and , incurring contradiction. ∎
6.2 The Static Algorithm
In this subsection, we assume that and we provide an time algorithm for computing . The algorithm incrementally processes the points from to . Hence, one may either consider it as a static algorithm or a semi-dynamic algorithm for point insertions only. The algorithm will determine whether exists, and if yes, compute and store the vertices of in a circular doubly linked list.
The algorithm is similar in spirit to Graham’s scan for computing convex hulls. However, unlike the convex hull case, where it is possible to compute the upper and lower hulls separately, here we need to compute as a whole because updating either the upper or the lower hull may end up with updating the other hull. Our algorithm relies on the following lemma.
Lemma 5
Suppose is a point outside the circular hull of a point set . Then, is unit disk coverable if and only if one of the following is true.
-
1.
is in the supporting disk of an arc of .
-
2.
has a vertex such that is contained in . Further, this is true if and only if both and are in .
Proof
The “if” direction is easy. If is in the supporting disk of an arc of , then since also covers , covers . If has a vertex such that is contained in , then contains and thus contains . Hence, covers . In the following, we prove the “only if” direction.
Let be a disk that contains . Clearly, it is possible to move such that covers and contains a point of . By Observation 1(1), is a vertex of . Now we rotate around clockwise (so that is always on ) and keep covering until meets another point . If , then must be the clockwise neighbor of on and now . Since is in , the first lemma statement holds. Below we assume that , i.e., .
Since , is , and thus covers . By Observation 1(4), also contains . Now, we rotate around counterclockwise and keep containing until meets another point . Depending on whether , there are two cases. If , then by the same analysis as above, the first lemma statement follows. Otherwise, as above, we can obtain that contains . Because and both and contain , we obtain that contains . Therefore, the second lemma statement holds.
It remains to show that if and only if both and are in . If is contained in , then it is obviously true that both and are in . Now assume that both and are in . Since , both and are in and also in . By Observation 2, both and are tangent to at and thus both disks contain . Therefore, . ∎
We process the vertices of incrementally from to . We use a circular doubly linked list to maintain the vertices of the current circular hull that has been computed. Each vertex in the list has a pointer and a pointer to refer to its clockwise and counterclockwise neighbors on the current hull, respectively. In addition, we maintain the rightmost vertex of the current hull, which is also the access we have to . Initially we directly compute and set up the list , with . For each , let .
Consider a general step for processing a new vertex with , and suppose now stores the circular hull of . With , we can find the rightmost arc of the current hull. If is in , then is “redundant” by Observation 4, i.e., does not affect the current circular hull, so we do not need to do anything (i.e., no need to update ). Otherwise, our goal is to find the two tangents from to the current hull, or decide that they do not exist. Starting from , we first run a counterclockwise scanning procedure to search the upper tangent, as follows (see Algorithm 3 for the pseudocode). Starting with , we check in the following way. We first check whether both and are in . If yes, then we stop the procedure and return as the upper tangent. Otherwise, we check whether and form an inner turn. If yes, then we stop the procedure and return as the upper tangent. Assume that they form an outer turn. Then, if , then we set and proceed as above; otherwise, we stop the procedure and conclude that (and thus ) is not unit disk coverable.
It is not difficult to see that the algorithm will eventually stop. The following lemma proves the correctness of the algorithm.
Lemma 6
The counterclockwise scanning procedure will decide whether exists, and if yes, find the upper tangent from to unless is redundant.
Proof
First of all, if is redundant, then our algorithm correctly determines it. Below we assume that is not redundant. Suppose the procedure is checking the vertex . There are three cases for the procedure to stop: and are in ; and form an inner turn; and form an outer turn and . In the first two cases, we will show that is the upper tangent. In the third case, we will show that is not unit disk coverable.
If and are in , then by Lemma 5(2), . Hence, . Since is an arc of , contains and thus . Therefore, is the upper tangent from to .
If and form an inner turn, to show that is tangent to at , by Observation 2 it suffices to show that contains both and . Since is not redundant and is to the right of both and , is not in . Because and form an inner turn, by Observation 5(1), contains . Next we prove . Depending on whether , there are two subcases.
-
•
If , then according to our algorithm, and form an outer turn. Because and form an inner turn, . Since is an arc of , contains and thus . Hence, contains , and thus, is unit disk coverable.
We claim that is not in the interior of . Indeed, assume to the contrary this is not true. Then, since is on the boundary of , one of and , as two vertices of must be outside . However, we have proved above that contains both and , incurring contradiction.
Since is not in the interior of , by Observation 5(2), contains .
-
•
If , then in the same way as the above case we can show that contains , and thus, is unit disk coverable.
We claim that and form an outer turn. Assume to the contrary that they form an inner turn. Then, . As , we obtain that . Since and are to the left of and is to the right of , by a similar argument as in the proof of Observation 6(3), we can show that is inside , implying that is redundant, which incurs contradiction because is not redundant.
Further, using the same analysis as the above subcase , we can show that is not in the interior of . Consequently, by Observation 5(2), is in .
It remains to discuss the third case where and form an outer turn and . According to our algorithm, this case happens only if both of the followings are true: (1) for each vertex of , does not contain both and ; (2) for each arc of , it does not form an inner turn with (i.e., ), implying that is not in the supporting disk of any arc of . According to Lemma 5, is not unit disk coverable. ∎
If the above procedure finds the upper tangent, then we run a symmetric clockwise scanning procedure to find the lower tangent (which guarantees to exist, for the upper tangent exists). Next, we replace the vertices in clockwise strictly from the upper tangent point to the lower tangent point by , and then reset to . The runtime of the two procedures is , where is the number of vertices removed from . After a point is removed from , it will never appear in again. Hence the total time of the algorithm for processing all points is .
Theorem 6.1
We can maintain the circular hull of a set of points such that if a new point to the right of all points of is inserted, in amortized time we can decide whether exists, and if yes, update .
Corollary 2
Given a set of points in the plane sorted by -coordinates, there exists a linear time algorithm that can decide whether its circular hull exists, and if yes, compute the circular hull.
6.3 The Data Structure for Dynamically Maintaining
In this subsection, we explain our data structure for maintaining under both insertions and deletions on . Recall that is a subset of and the vertical line separates and . Let and . Our data structure will maintain and separately. Recall that each insertion happens to a point in and each deletion happens to a point in . Our goal is determine whether exists after each update.
For , we use a circular doubly linked list to maintain , in the same way as in the static algorithm. As such, from any vertex of , we can visit its two neighbors and in constant time. If a point is inserted, then we update as in the static algorithm. In addition, we also store explicitly the leftmost arc of whenever it is updated, which introduces only a constant time to the previous algorithm. If does not exist after an insertion, then since and no point from will be deleted, will not exist after any update in future and thus we can halt the entire algorithm. Without loss of generality, we assume that exists and thus always exists.
For , because points of are deleted in order from left to right, initially when , we build the circular doubly linked list by processing points of from right to left, i.e., from to . Further, in order to maintain some historical information, we have each vertex of associated with two stacks and , which are empty initially. Specifically, initially we process the points of incrementally from to . Consider a general step of the algorithm processing a point . Suppose and are the two tangents found by using our static algorithm. Then, in addition to the processing in the static algorithm, we push into , push into , and push into both and . Note that this does not change the time complexity of our previous static algorithm asymptotically. Later when is deleted, we simply pop out of both and . In this way, at any moment during processing the deletions of , for any vertex in the current circular hull , the top of (resp., ) is always the clockwise (resp., counterclockwise) neighbor of on , which can be accessed in constant time from the vertex . So we can use these stacks to replace the circular doubly linked list, and we call it the stack data structure. In addition, for handling insertions, we also explicitly store, say in an array , the rightmost arc of the current circular hull after processing each point of (i.e., given , stores the rightmost arc of the circular hull of ). These only introduces constant time to our original static algorithm. If during processing a new point we find that the circular hull of does not exist, then we stop the algorithm and set . In this way, whenever we process a deletion on , if the index of the deleted point is smaller than or equal to , then we know that and thus does not exist and we do not need to do anything. Without loss of generality, we assume that exists and thus always exists (so the variable is not needed any more).
The above describes our data structure for maintaining and . We also need to maintain other information. To explain them, we first show a property, as follows.
Although is to the left of , may cover some region of the plane to the right of , denoted by , and if is the rightmost arc of , then is exactly the portion of to the right of due to the convexity of [18]. Symmetrically, we define as the region of to the left of . The following lemma shows that as points are deleted from , becomes monotonically smaller, and as points are inserted into , becomes monotonically larger.

Lemma 7
If , then ; e.g., see Fig. 11. Similarly, if , then .
Proof
We only prove the case for , and the other case for can be treated likewise. Indeed, let and be the rightmost arcs of and , respectively. If , then must be due to , and thus we have . Assume that . If , then since and , holds. Assume that (e.g., see Fig. 11). Since is an arc of , contains and thus . By Observation 1(4), contains , and thus, contains the arc . Note that is bounded from the left by and bounded from the right by the portion of to the right of . Since is the region of to the right of and contains , it must hold that .∎
In addition to the data structures for and described above, our dynamic algorithm also maintains the following information. Recall that based on our assumption both and always exist.
-
1.
If is contained in , i.e., the -dominating case, then our algorithm will detect it, and in this case and exists.
-
2.
If is contained in , i.e., the -dominating case, then our algorithm will detect it, and in this case and exists. Further, because in future deletions will only happen to and insertions will only happen to , Lemma 7 implies that always holds. Therefore, in future we can ignore all deletions and only handle insertions, which can be done by simply applying the static algorithm on .
-
3.
If neither of the above cases happens, then our algorithm will detect whether exists, and if yes, the two common tangents of and will be explicitly maintained.
6.4 Initialization
Initially, , so we build the data structure for as discussed before. This takes time. Since there are update operations, the amortized cost is .
One annoying issue is to check whether - or -dominating case will happen after each update. We show how to resolve the issue. We discuss the -dominating case first.
Recall is sorted from left to right. When is inserted into (i.e., this is the first insertion), it is quite trivial to determine whether the -dominating case happens, which can be done in constant time by checking whether is contained in the supporting circle of the rightmost arc of (which is maintained after each deletion). However, the problem becomes challenging after more points are inserted. We use the following strategy to resolve the problem “once for all”.
An easy observation is that once the -dominating case does not happen for the first time after an update (which may be either an insertion or a deletion), in light of Lemma 7, it will not never happen in future, because will become smaller while will become larger. Also, before that particular update, holds and thus exists. Lemma 8 gives an time algorithm to find that particular update. Note that this procedure is only performed once in the entire algorithm.
Lemma 8
The first update after which the -dominating case does not happen can be determined in time.
Proof
For each , we use to refer to . As discussed before, each is the part of a unit disk on the right side of the line . By Lemma 7, it holds that for all . Recall that the rightmost arc is maintained by our algorithm after each deletion of . Thus, given , can be obtained in time.
From the outset, we process insertions and deletions as follows. During the algorithm, we maintain a variable , which is the first deletion after which the -dominating case will not happen for the points in the current set . Initially before any deletion or insertion, and , and thus we set . For each deletion of a point , if , then we proceed on the next update; otherwise we return the deletion of as the answer to the problem. Consider an insertion of a point . We first check whether is in . If yes, we proceed on the next update. Otherwise, we keep decrementing until or . Then we check whether , where is the index of the leftmost point of the current set (i.e., ). If , then we return the insertion of as the answer to the problem. Otherwise, we proceed on the next update.
The correctness of the algorithm is based on Lemma 7. It is not difficult to see that the algorithm runs in time. ∎
Lemma 8 finds the update after which the -dominating case does not happen for the first time. Regardless of whether it is an insertion or a deletion, let and be the two subsets right after the update. So we know that both and exist, and the -dominating case does not happen.
Next, we discuss how to detect whether the -dominating case happens after each update in future (starting from the update found in Lemma 8), by a -dominating case detection procedure, as follows. As discussed before, once we find the -dominating case happens for the first time after an update, we can simply use our static algorithm to handle the deletions only in future. Starting from , we check whether is in the supporting disk of the leftmost arc of the current . Recall that the leftmost arc of is explicitly stored (and if it is , then its supporting disk is ). If yes, we decrement until or (thus all points of from to are in ). Now consider an insertion to . If the leftmost arc of gets updated, then by Lemma 7, all points of from to are still contained in the supporting disk of the new leftmost arc. We further check whether is in . If yes, we decrement until or . Let be the index of the leftmost point of the current set . Whenever decrements as above, if , then we know the -dominating case happens and then we only need to process the insertions using the static algorithm in future. Similarly, when is deleted, we increment by one, and if , and we again run into the -dominating case.
In the following discussion on processing updates, before actually processing each update, we run the above procedure to check whether the -dominating case happens. If yes, then the rest of the algorithm is trivial. Otherwise, we will perform the corresponding algorithm (to be discussed below) for processing the update. Hence, the -dominating case detection procedure is actually part of the update processing algorithm. In the following discussion whenever we process an insertion or a deletion, we assume that the -dominating case will not happen after the operation. It is easy to see that the procedure takes time in the entire algorithm for processing all updates.
According to the above discussion, we start from the update found by Lemma 8, and neither dominating case will happen. This implies that the common tangents of and exist if and only if exists. Next, we present an time procedure to decide whether exists, and if yes, find the two common tangents. Note that this procedure is performed only once, e.g., after the update of Lemma 8, which does not affect the amortized time performance per update.
Because we do not know whether exists, we apply our static algorithm processing the points of from right to left. If during processing a point we determine the current circular hull does not exist, then we stop the algorithm and let refer to the point; otherwise let . If , then exists and we compute the common tangents of and by an algorithm given below. Assume that . Since exists, must be from . Observe that before is deleted, cannot exist. Suppose we consider the next update. If it is a deletion of a point to the left of , then we do nothing but we know does not exist. If it is an insertion of a point , then we know that does not exist, but instead of immediately inserting to our data structure for , we hold in a first-in-first-out queue , which is initially. If it is the deletion of , then we know that exist, where does not include the points held in . In this case (and also the case ), we find the two common tangents of and , as follows.
The algorithm is similar to that for finding common tangents of two convex hulls. Hershberger and Suri gave a linear time algorithm for that [18] (see Lemma 4.12). To make the paper self-contained, we sketch a slightly different algorithm. We first find the upper common tangent as follows. Starting from the leftmost vertex, we consider the vertices of in the clockwise order. For each vertex, we find its upper tangent to by using the counterclockwise scanning procedure in our static algorithm. Once we find the upper tangent, we check whether it is also tangent to . If yes, we have found the upper common tangent. Otherwise, we consider the next vertex of , but start the counterclockwise scanning procedure from the current tangent point on . As the upper common tangent exists, the algorithm will eventually find it. We find the lower common tangent in a similar way using the clockwise scanning procedure of our static algorithm. The time is linear in the total number of vertices of and .
After the common tangents are found, if (which only happens if ), then we need to process the insertions on the points in in order to know whether exists after the deletion of . For this, we will apply on these points the insertion algorithm to be given below.
The above describes our initialization procedure, which takes time. In the following, we present our algorithm for handling future insertions (including those in ) and deletions. Our algorithm maintains an invariant that is stated in the following observation.
Observation 8
Suppose the algorithm is about to process an update.
-
1.
Before the update, the -dominating case does not happen,
-
2.
Before the update, the two common tangents of and exist and are explicitly computed.
-
3.
After the update, the -dominating case does not happen.
The first invariant is established due to that we always process updates after the update computed in Lemma 8. The third invariant is established by our -dominating case detection procedure. More precisely, once the procedure detects that the -dominating case happens after an update, then we will apply our static algorithm on with insertions only. The second invariant has been established above for the moment, and we will show later that it will be re-established after each future update is processed. We are able to do so because our insertion processing algorithm may also involve performing point deletions. For this reason, in the following we discuss the deletion processing algorithm first.
6.5 Deletions
Suppose a point is deleted from . Let and let still be the original set before the deletion. Let and . Since exists (due to Observation 8(2)), exists. Thus, our task is to update the common tangents if they are changed. We show that we can do so in amortized time. Let and denote the upper and lower common tangents of and , respectively, which have been computed by Observation 8(2).
First of all, if is not the leftmost vertex of (which has been explicitly stored when we build the data structure for initially), then is in the interior of and thus nothing needs to be done (i.e., the common tangents do not change). Otherwise, let , which can be accessed in time using our stack data structure for . According to our stack data structure, is at the top of the stack . We pop out of . We also pop out of , where . If , then the common tangents do not change and thus we are done with the deletion. Otherwise, we assume that (the other case can be treated likewise). Depending on whether , there are two cases.
If , then after is deleted, is still a vertex of and thus is still the lower common tangent. To find the new upper common tangent, we move counterclockwise on and simultaneously move counterclockwise on . This procedure is similar in spirit to finding common tangent for two convex hulls separated by a vertical line, and we sketch it below (e.g., see Fig. 12).
We first check whether is tangent to at . Recall that by Observation 2 this is can be done by checking whether contains and (which can be accessed from in constant time using our stack data structure). If not, then we move counterclockwise on until is tangent to at . Then, we check whether is tangent to at . If not, then we move counterclockwise on until is tangent to at . If the new is not tangent to at , then we move counterclockwise again. We repeat the algorithm until is both tangent to at and tangent to at . As the upper common tangent exists, the procedure will eventually find it.

We then consider the case where . In this case, the lower common tangent is also changed and we need to compute it as well. As the -dominating case does not happen, both upper and lower common tangents exist. Thus, we can use the same algorithm as above to find the upper common tangent and use a symmetric algorithm to find the lower common tangent.
In either case above, we call the procedure for finding the upper common tangent the deletion-type upper common tangent searching procedure, which takes time, where is the number of vertices of strictly counterclockwise from the original to its new position when the algorithm finishes and is the number of vertices of strictly counterclockwise from the original to its new position after the algorithm finishes (we say that these vertices are involved in the procedure). If the lower common tangent is also updated, we call it the deletion-type lower common tangent searching procedure. Lemma 9 shows that each point can involve in at most one such procedure in the entire algorithm, and thus the amortized cost of the two procedures is .
Lemma 9
Each point of can involve in at most one deletion-type upper tangent searching procedure and at most one deletion-type lower tangent searching procedure in the entire algorithm (for processing all updates).
Proof
We only discuss the upper tangent case, for the lower tangent case is similar. Let be a vertex on involved in the procedure. We show that cannot involve in the procedure again. Indeed, was not a vertex of before is deleted. After is delete, since is involved in the procedure, must be a vertex of . As only deletions will happen on , will always be a vertex of the circular hull of until it is deleted. Hence, will never be involved in the procedure again (because to involve in the procedure, cannot be a vertex of the circular hull of ).
Let be a vertex on involved in the procedure. Let and be the old and new upper common tangent points on , respectively. Let and be the old and new lower common tangent points on , respectively. Then, . Notice that . By Observation 7(1), any disk tangent to at does not contain . On the other hand, since is involved in the procedure, we have because is moving counterclockwise to while is moving clockwise to according to our algorithm. Thus, any disk tangent to at must contain the new set after the deletion.
Now consider another deletion operation later. We argue that will not be involved in the same procedure for the deletion. Let be the set of right before the deletion, and let and . Clearly, and . Assume to the contrary that involves in the procedure again. Then, is a vertex of . Let be a disk tangent to at . Hence, covers and thus . This implies that is also tangent to at . Thus, contains . On the other hand, because is involved in the procedure, as discussed above, any disk tangent to at does not contain . Hence, does not contain . Because , we obtain that does not contain , incurring contradiction. ∎
This finishes the description of our deletion algorithm, which takes amortized time. Note that the second invariant in Observation 8 is established.
6.6 Insertions
Consider an insertion of a point into . We first update the hull as in our static algorithm. If is redundant, then we are done for the insertion because still exists (by Observation 8(2)) and the common tangents do not change. Otherwise, appears as the rightmost vertex in the new (recall that we have assumed that exists and thus always exists). Let be the set of before is inserted and the set after the insertion. Let and . Let and be the counterclockwise and clockwise neighbors of in the , or equivalently, they are the upper and lower tangent points from to . For a purpose that will be clear later, we temporarily keep the circular hull of unaltered.
Since the -dominating case does not happen, one of the following two cases will happen: (1) the common tangents of and exist; (2) does not exist. Our algorithm will detect which case happens. In the first case, the algorithm will find the new common tangents. In the second case, some further processing that involves deleting points from will follow (the deletion processing algorithm in Section 6.5 will be invoked). Before describing our algorithm, we give two lemmas that will help demonstrate the correctness of our algorithm. Let and be the upper and lower common tangents of and , respectively, which are already known by Observation 8(2). We use denote the subset of vertices of clockwise from to excluding and , and if . In fact, . Let .
Lemma 10
-
1.
The rightmost vertex of is also the rightmost vertex of , which must be in .
-
2.
The rightmost arc of is one of the following three arcs: the rightmost arc of , , and .
Proof
Let be the rightmost vertex of . We first show that must be in . Assume to the contrary that this is not true. Then, . Since all points of are to the right of and all points of are to the left of , none of the points of is a vertex of , which implies that all points of are in , and thus . Therefore, we obtain that all points of are in , which is the -dominating case. This contradicts Observation 8(1) that the -dominating case does not happen. Hence, is in .
Since , it is not difficult to see that is also the rightmost vertex of . Since consists of all vertices of that are also vertices of , must be in .
The above proves the first statement of the lemma. The second statement follows from , which consists of all vertices of that are also vertices of . ∎
If is in the supporting disk of the rightmost arc of , i.e., is redundant with respect to , then exists and and are still the common tangents of and . Otherwise, exists if and only if the tangents from to exist. If exists, we use and to denote the upper and lower tangent points from to , respectively.
Lemma 11
Assume that is not in the supporting disk of the rightmost arc of and exists.
-
1.
If , or if and and form an inner turn, then is still the upper tangent of and ; e.g., see Fig. 14.
-
2.
If , or and and form an outer turn, then is the new upper common tangent of and as well as the upper tangent from to , and further, ; e.g., see Fig. 14.
-
3.
If is in , or if and and form an inner turn, then is still the upper tangent of and .
-
4.
If , or and and form an outer turn, then is the new lower common tangent of and as well as the lower tangent from to , and further, .
Proof
We only prove (1) and (2), since (3) and (4) can be proved analogously.
Assume that . Then, by the definition of , is tangent to at , and thus is also the upper tangent from to and . To show that is still the upper common tangent, it suffices to show that both and are still vertices of . Assume to the contrary this is not true. Then, because , is the upper tangent from to , and the rightmost vertex of is in by Lemma 10, if we apply the clockwise scanning procedure on to search the lower tangent , then at least one of and will be removed from the vertex list of during procedure. As at least one of and is not a vertex of and the scanning procedure starts from the rightmost vertex of , cannot be a vertex of and must be in , and further, must cross the vertical line twice because both and are to the right of while is to the left of . Hence, is the leftmost arc of . In addition, since , is actually , implying that all points of are in . Therefore, we obtain that this is the -dominating case, contradicting with Observation 8(3) that the -dominating case does not happen after is inserted. Hence, is still the upper tangent of and .
Assume that and and form an inner turn. Then, because by Lemma 10 the rightmost vertex of is also the rightmost vertex of , which is in , if we apply the counterclockwise scanning procedure on to search the upper tangent from to , then the procedure will return , and thus . Consequently, following the same proof as above, we can show that is still the upper tangent of and . The proves the lemma statement (1).
Next we prove the lemma statement (2).
Assume . Consider the counterclockwise scanning procedure on for searching and the counterclockwise scanning procedure on for searching . As the rightmost vertex of is also the rightmost vertex of , the two procedures both start from . Further, since and , the counterclockwise scanning procedure on for will process vertices of counterclockwise from to , after which the counterclockwise neighbor of on will be processed. This means that the counterclockwise scanning procedure on for will also process vertices of counterclockwise from to , after which the counterclockwise neighbor of on will be processed, which is . We claim that is not in , since otherwise by the similar analysis as above the -dominating case would happen, incurring contradiction. Hence, is a vertex on . As is the upper tangent of from to , contains and thus . Hence, is tangent to at , and thus is an upper tangent from to . On the other hand, since contains and also , is an arc of . Since and , is the upper common tangent of and .
We next discuss the case where and and form an outer turn. As above, we consider the two counterclockwise scanning procedures. Since , the two procedures will both process vertices on from until . As and form an outer turn, according to our counterclockwise searching procedure on for , when we process , we need to further check whether the two neighbors of in are both in . We claim that this is not true. Indeed, assume to the contrary that this is true. Then, we obtain that . But this means that the -dominating case happens since both and are in , incurring contradiction. Because the two neighbors of in are not both in , according to our counterclockwise searching procedure, we will proceed on processing the counterclockwise neighbor of on , which is . Then, following the same analysis as the above case, we can show that is the upper tangent from to and also the upper common tangent of and .
It remains to show that . Since is the upper tangent from to and also the upper tangent from to , must be a vertex of both and . Because consists of all points that are vertices of both and , it must contain . This proves the lemma statement (2) ∎
In light of Lemma 11, our algorithm works as follows. We first check whether is in the supporting circle of the rightmost arc of . By Lemma 10, this can be done in constant time. If yes, then and are still the common tangents of and , and we are done with the insertion. In the following, we assume otherwise. Depending on whether satisfies the condition in Lemma 11(1) or Lemma 11(2), and whether satisfies the condition in Lemma 11(3) or Lemma 11(4), there are four cases.
If satisfies Lemma 11(1) and satisfies Lemma 11(3), then and are still the common tangents of and . So exists and we are done with the insertion.
If satisfies Lemma 11(2) and satisfies Lemma 11(3), then is still the lower common tangent but is not the upper common tangent any more. This also implies that exists. Next, we find the new upper common tangent, as follows. We apply the counterclockwise scanning procedure on as in the static algorithm, but it is sufficient for the scanning procedure to start from (as discussed in the proof of Lemma 11). As the upper common tangent exists, this procedure will find it. We call the procedure the insertion-type upper common tangent searching procedure. The running time of the procedure is , where is the number of vertices of counterclockwise strictly from to the new upper tangent point (we say that these vertices are involved in the procedure). By the following lemma, the amortized cost of the procedure is .
Lemma 12
Each point of can involve in the insertion-type upper common tangent searching procedure at most once in the entire algorithm.
Proof
Let be a point involved in the procedure, which is a vertex of . Let and be ’s counterclockwise and clockwise neighbors on , respectively. According to our counterclockwise scanning procedure, and form an outer turn, and thus the disk does not contain , and similarly, and form an outer turn and does not contain .
We claim that at least one of and are to the right of . To prove the claim, it is sufficient to show that is not the rightmost vertex of . Indeed, since is involved in the procedure, is in . By Observation 7(3), the rightmost vertex of is in . Therefore, is not the rightmost vertex of . The claim is thus proved. Without loss of generality, we assume that is to the right of .
We argue that will not be involved in the same procedure again in future. Assume to the contrary that is involved in the same procedure again during another insertion of , with . Let , , and refer to the corresponding sets right before the insertion. Since is involved in the procedure, has not been deleted and thus is in . Since is to the right of , has also not been deleted and thus is in as well. As is an arc of and , is also an arc of .
Let (resp., ) be the tangent point on of the upper (resp., lower) common tangent of and . Since is involved in the procedure for inserting , must be a vertex of in . As is an arc of and , must be an arc of and thus the disk must cover . Hence, covers . Notice that is in , for . Therefore, is contained in . But we have obtained above that does not contain . Hence, we obtain contradiction. ∎
If satisfies Lemma 11(1) and satisfies Lemma 11(4), then is still the upper common tangent but is not the lower common tangent any more. This is a symmetric case to the above case, and we can apply the clockwise scanning procedure on (starting from ) to find the new lower common tangent. We call this the insertion-type lower common tangent searching procedure, which takes amortized time by a similar analysis as Lemma 12.
If satisfies Lemma 11(2) and satisfies Lemma 11(4), e.g., see Fig. 15, then neither nor is a common tangent any more. Indeed, this is the most challenging case. One reason is that we do not know whether exists. Therefore, our algorithm needs to determine whether exists, and if yes, find the new common tangents, which are the tangents from to by Lemma 11. Further, if does not exist, then our algorithm will find a special vertex on such that there is no unit disk that can cover and the points of to the right of including . As such, before is deleted, always does not exist (but may still not exist even after is deleted). The following lemma will be useful later.
Lemma 13
Assume that does not exist. If is a subset of such that exists, then there is a unit disk tangent to at that contains all points of .
Proof
If is a vertex of , then by Observation 1(1) there is a disk with on its boundary and covering . Since covers and has on its boundary, is tangent to at . This proves the lemma. Below we show that the case where is not a vertex of cannot happen.
Assume to the contrary is not a vertex of . Then is in the interior of . Thus, removing from will not affect , i.e., , where . Recall that by our algorithm invariant Observation 8(2), exists. Since , . Since is in the interior of , must be in the interior of , and thus . But this implies that exists as , which contradicts with the fact that does not exist. ∎
We next elaborate on the algorithm. It is possible that is not in the upper hull or is not in the lower hull of . We first consider the case where is in the upper hull and is in the lower hull; other cases can be handled in a similar (and easier) way and will be discussed later.

If exists, then as those previous cases, we could find the upper tangent from to by a counterclockwise scanning procedure on , starting from , and similarly, find the lower tangent from to by a clockwise scanning procedure on , starting from . The two procedures could run independently. However, since we do not know whether exists and in the case where does not exist we need to find a particular vertex , we will coordinate the two scanning procedures by processing vertices in order of decreasing -coordinate. Specifically, starting from , we will process and scan counterclockwise, and simultaneously, starting from , we will process and scan clockwise, in the same way as the static algorithm. We coordinate the two scanning procedures by the following rule: if is to the right of , then we process first; otherwise we process first. In addition, our algorithm maintains the following invariant: There is a unit disk with on the boundary covering both and , and there is a unit disk with on the boundary covering both and . For the purpose of describing our algorithm, we temporarily set to and set to 222One could consider that we are working on , and thus is indeed and is indeed .. The above invariant holds initially when and , because and .
Without loss of generality, we assume that is to the right of . So we process , as follows. We first check whether there is a unit disk with on the boundary covering both and . If not, then we stop the algorithm and return . If yes, we proceed as follows.
We check whether and form an inner turn. If yes, then is the upper tangent from to and thus is the new upper common tangent by Lemma 11. Then, we proceed to find the lower tangent, which is guaranteed to exist, by running the clockwise scanning procedure. If it is an outer turn, then we check whether contains and . If yes, then we return as the upper common tangent and also return as the lower common tangent. Otherwise, if is to the left of (i.e., is not the leftmost vertex of ), then we set and proceed as above; otherwise, we set and stop the algorithm.
The above describes our algorithm. For the correctness, in addition to Lemma 11, it is sufficient to show that if the algorithm returns , then is correctly computed, as proved in Lemma 14.
Lemma 14
Suppose the algorithm returns . Then, there is no unit disk that can cover all points of and the points of to the right of including .
Proof
Suppose we are processing a vertex . There are two ways that is returned: (1) when there is no unit disk with on the boundary covering both and ; (2) when is the leftmost vertex of and we still attempt to set . In both cases, . Our goal is to show that is not unit disk coverable, where is the subset of points of to the right of including .
In the first case, assume to the contrary that are unit disk coverable. Then, by Lemma 13, there is a unit disk with on the boundary covering . Thus, we obtain contradiction since and .
In the second case, we have and . So it suffices to show that does not exist. Assume to the contrary that exists. By Lemma 11, the tangents from to are the tangents from to , and . According to our algorithm, cannot be a vertex of counterclockwise from to . Thus, is a vertex of counterclockwise from to . Further, must be a vertex counterclockwise from to . On the other hand, since is the leftmost vertex of and is currently being processed, it must be the case that and has already been processed, where . This means that cannot be a vertex of counterclockwise from to , and thus must be a vertex of counterclockwise from to . Since is a vertex counterclockwise from to , we obtain that must be a vertex of counterclockwise from to . But this contradicts with that is a vertex of counterclockwise from to . ∎
As in the third case, we also call the above algorithm the insertion-type common tangent points searching procedure, and its runtime is time, where is the number the vertices of counterclockwise strictly from to the final position of when the algorithm stops and the number of vertices clockwise strictly from to the final position of when the algorithm stops (we say that those vertices are involved in the procedure). We can use literally the same proof as Lemma 12 to show that each point of can involve in the procedure at most once in the entire algorithm. In fact, the proof of Lemma 12 shows that each point of can involve in the insertion-type common tangent points searching procedure in both this case and the above third case at most once in the entire algorithm. Hence, the amortized cost is .
One of the following cases happens after the above algorithm: (1) the two common tangents of and are found; (2) a vertex (which is either or ) is returned. In the first case, we are done with the insertion, and Observation 8(2) is established. In the second case, does not exist and we further perform the following processing. Without loss of generality, we assume that . According to our algorithm, is either or to the left of , and must be to the right of because it was processed before .
We perform deletions to delete points from in order from left to right until . By the definition of , after each deletion except the last deletion of , does not exist. Note that these deletions actually have not been invoked yet, so we perform them ahead of time in the sense that when they are actually invoked in future we know that does not exist.
To process these deletions efficiently, the key idea is that we process the deletions by pretending has not been inserted yet, or equivalently, we process the deletions with respect to . Because exists before any deletion, we know that it still exists after each deletion. After all these deletions are completed, we will insert again (by “resuming” our previous work on processing the insertion; see below for the details). This is the reason we temporarily kept the circular hull unaltered before.
We again assume that the -dominating case does not happen (with respect to ) after each deletion, which can be determined by our -dominating case detection procedure by changing back to its value before was inserted. Note that we also need to store the current value in another variable so that when we resume processing the insertion of again (which will be discuss below) we simply reset to that value, which only introduces a constant time.
For each deletion, we update the common tangents of and by using the algorithm in Section 6.5. Once is deleted, we insert again by “resuming” our previous work of the insertion of , as follows. Let refer to the set of after is deleted. Let and be the common tangents of and . Let denote the set of vertices clockwise from to excluding and , and if . Let . Recall that and refer to the vertices of when our earlier algorithm for processing the insertion of stops (and returns ). Depending on whether and whether , there are four cases.
-
•
If and , then is to the left of or at and is to the left of or at . In this case, and are still the common tangents of and , i.e., and . So . If we apply the same algorithm as before for processing the insertion of , we are still at the fourth case, i.e., satisfies Lemma 11(2) and satisfies Lemma 11(4). But the crux of the idea is that instead of starting over the two scanning procedures from and , respectively, we “resume” the previous work by starting the counterclockwise scanning procedure from on and starting the clockwise scanning procedure from on . In this way, we avoid processing a vertex twice except and , for which we can charge the time to the deletion of .
-
•
If but , then is to the left of or at and is still the lower common tangent of and , i.e., , but the upper one changes, i.e., . Consequently, it is possible that now satisfies Lemma 11(1), which can be determined when we process the deletion of . We resume the same algorithm as before for the insertion of , i.e., regardless of which case happens, when we search the lower common tangent point on by running the clockwise scanning procedure, we start from . However, in the counterclockwise scanning procedure for searching the upper common tangent point, we need to start from the new upper tangent point because has been deleted.
-
•
If but , then this is symmetric to the above second case. We start the clockwise scanning procedure from and start the counterclockwise scanning procedure from .
-
•
If and , then both and have been deleted since is deleted and is either or to the left of . Hence, both upper and lower common tangents get changed, i.e., and . We start the new algorithm exactly the same as before, i.e., start the two scanning procedures from and , respectively.
Other than the time for computing the new common tangents after each deletion (whose amortized time is as shown in Section 6.5), the amortized cost of processing the insertion of is . After the above processing, if exists, then we are done with the insertion of (and Observation 8(2) is established). Otherwise, the algorithm will return a new vertex and we will repeat the same algorithm. As more and more points are deleted from , eventually we will encounter a situation where exists since exists (e.g., when all points of are deleted).
Recall that the above algorithm is for the situation where is on the upper hull and is on the lower hull of . If this is not the case, then and are either both on the upper hull or both on the lower hull. Without loss of generality, assume that they are both on the upper hull. Then, we can change the algorithm in the following way. We only perform the counterclockwise scanning procedure on the upper hull, starting from . The algorithm for processing each vertex is the same as before except the following: if arrives at and we still want to set , then we stop the algorithm and return . If the procedure finds the new upper common tangent, then the lower common tangent exists and we find it by running the clockwise scanning procedure starting from . If the procedure returns , then we perform deletions as above until . Note that the lower common tangent must get changed, i.e., , because is to the left of and thus must be deleted. So we run into either the third or the four case as above (i.e., the two cases with ). The correctness is still based on Lemma 11 and a similar proof for Lemma 14. The amortized cost analysis of Lemmas 12 still applies.
6.7 Adapting the Algorithm to the Radially Sorted Case
The above gives our algorithm in the problem setting where points in are sorted from left to right. We show that we can adapt the algorithm easily to the radially sorted case where points in are radially sorted around a point such that and are still separated by a line through (this is actually our original problem setting on ).
Without loss of generality, we assume that is vertical, and and are sorted clockwise around such that all points of are to the left of and all points of are to the right of . We first discuss how to update the circular hull of under insertions when (i.e., extending the static algorithm to the radially sorted case). We still consider the points of following their index order. To handle each insertion of , we still run a counterclockwise scanning procedure to find the upper tangent from to the current and a clockwise scanning procedure to find the lower tangent. Recall that our previous algorithm starts the two procedure from the rightmost vertex of . Here, the difference is that we start the two procedures from the vertex , where has the largest index among all vertices of . This will be consistent with our previous algorithm. Indeed, because the points of are right of and radially sorted around , all vertices of are on one side of the line through and while is on the other side of . Based on Observation 6(4), searching the two tangents from will be successful, and we can use the similar analysis to prove the correctness of this adapted algorithm. Note that this requires our algorithm to keep track of the vertex of the largest index of , which only introduces overall time for all points of , just like in the previous algorithm where we need to keep track of the rightmost vertex (which is actually also the vertex of the largest index in the previous problem setting where points of are sorted from left to right; this means that if we describe the algorithm as maintaining the vertex of with the largest index then the same algorithm works on both problem settings without any change).
Further, exactly the same as before, we maintain the leftmost arc of after each insertion. This is for handling the case where . We still need the leftmost arc because and are still separated by a vertical line, in the same way as before, so we can use the same method as before to handle the interactions between and , such as computing their common tangents, determining dominating cases, etc. For example, when the common tangents of and exist, after is inserted, we need to update the common tangents. To this end, we first compute the two tangent points and from to in the way described above, and then we follow exactly the same algorithm as before, i.e.,, there are four cases depending the locations of and with respect to Lemma 11.
For computing initially when , we consider the points of in the inverse index order, in a similar way as the above for , but now we also need to associate stacks with vertices as in the previous algorithm. The rest of the algorithm follows the same as before.
In summary, we can solve the dynamic circular hull problem on in time, and thus Theorem 3.1 is proved.
7 Computing Common Tangents of Two Circular Hulls in Time
In this section, we prove Lemma 1. Without loss of generality, let and assume that and are separated by a vertical line with on the left side. Let and denote the circular hulls of and , respectively. Also, we assume that the vertices of in counterclockwise order starting from the rightmost vertex of are stored in a balanced binary search tree , and each vertex of is associated with its two neighbors (so that given a node of storing a vertex of we can access and in time). Similarly, vertices of in clockwise order starting from the leftmost vertex of are stored in another balanced binary search tree .
In the following, we present an time algorithm for Lemma 1, i.e., determine whether exists; if yes, then determine whether the -dominating case or the -dominating case happens; if neither dominating case happens, then compute the two common tangents of and . Our algorithm is similar in spirit to the binary search algorithm given by Overmars and van Leeuwen [25] for finding common tangents of two convex hulls separated by a line, but the technical crux is in finding the criteria on which the binary search is based.
7.1 A Special Case
We first consider a special case where has only one point , but has vertices. We first check whether the -dominating case happens, by checking whether is in the supporting disk of the rightmost arc of . Using , the rightmost arc can be found in time. In the following, we assume that is outside the disk. Next, we will determine whether exists, and if yes, find the two tangents from to . To this end, we first assume that the tangents exist and give an algorithm to find them. Later we will show that the algorithm can be slightly modified to determine whether the tangents exist (i.e., whether exists).
We only show how to find the upper tangent point , and the lower tangent point can be found in a similar way. If we order the vertices of counterclockwise starting from as a sequence , then we partition the sequence into three subsequences: , defined as follows. If , then consists of all vertices from to ; otherwise . . consists of the rest of vertices. By Observation 2, a vertex of is if and only if contains both and . Lemma 15 provides a criteria on which our binary search algorithm is based to find .
Lemma 15
Assume that . Consider a vertex . If , then . Otherwise, is in if and only if the four vertices are all in or all in .
Proof
If , then since and is the first vertex of , must be in .
Assume that is in . We show that the four points are all in or all in .
We first give an observation: for any subsequence of , is the cyclic sequence of all vertices on the circular hull of . To see this, let be an arc of connecting two adjacent vertices of . Then contains all vertices of , and thus it covers . Therefore, by Observation 1(2), is also an arc of . Hence, the arc set of consists of all arcs of connecting all pairs of adjacent vertices of plus another arc connecting the first vertex and the last vertex of .
Let be the subsequence of from to . By the above observation, is the vertex set of . Recall our counterclockwise scanning procedure for finding in our static algorithm in Section 6.2, which starts from . When a vertex is processed, the result only depends on the two neighbors of . Hence, if we run our counterclockwise scanning procedure on both and , the result of the algorithm after processing a vertex is the same for any . However, when is or , the result of processing may be different as one of its neighbors gets changed from to . As each vertex of is not a tangent point from to (because ), it is not a tangent point from to either. Hence, the upper tangent point from to is either or . If it is , then covers ; otherwise, covers . Notice that all four points are in . Thus, either or contains all the four points.
Now assume that is in . We show that neither nor contains all four points , which will prove the lemma.
By the definition of , . Let be the subsequence of from to . According to the above observation, is the cyclic sequence of vertices of . Thus, and are the two neighbors of in , and and are two neighbors of in . Assume to the contrary that either or contains all four points . We obtain contradiction below for either case.
In the first case (i.e., contains all four points), since and are the two neighbors of in and both of them are in , is tangent to at . Thus, is the upper tangent from to . We claim that . Indeed, since , contains by the definition of . Because is the upper tangent from to , contains all vertices of and thus covers . Hence, is the upper tangent from to and is the tangent point. Thus, it holds that . However, this contradicts with that .
In the second case, since and are the two neighbors of in and both of them are in , is tangent to at . Thus, is the upper tangent from to . Following the same analysis as above, we can show that . However, this contradicts with that . ∎
In light of Lemma 15, we can compute in time using the tree , as follows. First, we check whether is , which can be done in constant time after is accessed in time from . If not, let be the vertex of at the root of . We check whether in time. If yes, we stop the algorithm. Otherwise, we check whether using Lemma 15. If yes, then we proceed on the right child; otherwise we proceed on the left child. The running time is , which is the height of . The lower tangent from to can be found likewise.
The above algorithm finds the tangents if they exist. If we do not know whether they exist, then we slightly change the algorithm as follows. Whenever we check whether a vertex is the tangent point, we also check whether and can be covered by a unit disk. If not, then no tangents exist and we stop the algorithm; otherwise we proceed in the same way as before. But if we reach a leaf and is still not the tangent point, then no tangents exist. The time of the algorithm is still .
7.2 The General Case
In the following, we discuss the general case where and each have vertices. Our algorithm begins with checking whether a dominating case happens in the following lemma.
Lemma 16
Whether the -dominating case (resp., the -dominating case) happens can be determined in time.
Proof
We only show how to determine whether the -dominating case happens, and the other case is similar. Recall that the -dominating case refers to the case where is covered by the supporting disk of the leftmost arc of , which is true if and only if all vertices of are in by Observation 1(4). We first check whether the leftmost arc of is . If yes, then the case does not happen. Otherwise, we have the disk and proceed as follows.
Let be the vertex at the root of . The vertex and the rightmost vertex of partition the boundary of into two chains with a roughly equal number of vertices. We check whether both and are in . If not, then the -dominating case does not happen and we stop the algorithm. Otherwise, by Lemma 4.6 of [18], one of the chains of partitioned by and is entirely in , and that chain can be determined in time by knowing the neighbors of and . If the chain counterclockwise from to is in , then we go to the right child of , i.e., working on the other chain recursively; otherwise, we go to the left child of . If we reach a leaf , then the -dominating case happens if and only if . Clearly, the runtime of the algorithm is . ∎
In the following, we assume that neither dominating case happens. Our goal is to determine whether exists, and if yes, compute the two common tangents of and . We first show how to find the common tangents by assuming that exists. We follow the binary search scheme of Overmars and van Leeuwen [25] for convex hulls but resort to the criteria in Lemma 15.
With respect to any vertex of , we define three sets of vertices of : in the same way as in Section 7.1. We further partition into two subsets: and as follows. A vertex is in if is on counterclockwise from to , where and are the upper and lower tangent points from to , respectively. Let . Note that if , for . By Observation 2, a vertex is in if and only if there is a unit disk tangent to at containing , which can be determined in time given the two neighbors of . A vertex of is called an -vertex with respect to if for any .
Symmetrically, with respect to a vertex , we also define -vertices of following the clockwise order from the leftmost vertex of , for . For a pair of vertices with and , we say that the pair is an case if is an -vertex of with respect to and is an -vertex of with respect to , with .
We describe an algorithm to compute the upper common tangent with and as the tangent points on and , respectively. Suppose and are vertices at the roots of and , respectively. Depending on whether is an case, for , there are nine cases (several subcases arise for the case ). We show below that in each case we can disregard half of the remaining vertices of either or . Let be the list of vertices of following their order in , i.e., counterclockwise from . Let be the list of vertices of following their order in , i.e., clockwise from . We discuss the nine cases in order corresponding to those in [25], as follows.
-
1.
Case , which corresponds to Case a. in [25]; e.g., see Fig. 17. In this case, and . We can stop the algorithm.
Figure 16: Illustrating the case . Figure 17: Illustrating the case . - 2.
-
3.
Case , which corresponds to Case c. in [25]; e.g., see Fig. 19. In this case, the part of after and the part of before can be disregarded, i.e., we move to its left child and move to its right child.
Figure 18: Illustrating the case . Figure 19: Illustrating the case . - 4.
-
5.
Case , which corresponds to Case e. in [25]; e.g., see Fig. 21. In this case, the part of before and the part of after can be disregarded.
Figure 20: Illustrating the case . Figure 21: Illustrating the case . - 6.
-
7.
Case , which corresponds to Case g. in [25]; e.g., see Fig. 23. In this case, the part of before can be disregarded.
Figure 22: Illustrating the case . Figure 23: Illustrating the case . - 8.
-
9.
Case , which corresponds to Case i. in [25]. In this case, two subcases are further considered in [25]. Here, however, we need more subcases. Depending on whether is an case, for , there are four subcases.
-
(a)
Case ; e.g., see Fig. 25. In this case, the part of after can be disregarded. Indeed, for each vertex in that part, is in of with respect to . By the definition of , there is no unit disk tangent to at that covers (and thus ). Therefore, cannot be the upper common tangent point, and thus can be disregarded.
Figure 24: Illustrating the case . Also shown are the two tangents from to (red dash-dotted arcs) and the two tangents from to (blue dash-dotted arcs). Figure 25: Illustrating the case . -
(b)
Case ; e.g., see Fig. 25. In this case, the part of after can be disregarded, for the similar reason discussed above.
-
(c)
Case . In this case, the part of after and the part of after can be disregarded.
-
(d)
Case . In this case, we can find a unit disk that is tangent to at and covers and a unit disk that is tangent to at and covers . Clearly, intersects , because each of them contains both and .
If , then we claim that is the lower common tangent. Indeed, since , is tangent to at and also tangent to at . Thus, either is the upper common tangent or is the lower common tangent. As we know that is a -vertex of with respect to , cannot be the upper common tangent point and thus cannot be the upper common tangent. Hence, is the lower common tangent.
The claim implies that cannot be after in and cannot be after in . Therefore, in this case, the part of after and the part of after can be disregarded.
If , then their boundaries intersect at two points. Let be the intersection point such that if we move from around clockwise, we will encounter before the other insertion. Depending on whether is to the left or right of , there are two subcases, which correspond to the two subcases of Case i. in [25].
Figure 26: Illustrating the case , and the intersection is to the left of . Figure 27: Illustrating the case , and the intersection is to the right of
-
(a)
By Lemma 15, with the two neighbors of and the two neighbors of , each of the above nine cases can be determined in constant time. For the subcases in Case , recall that given the two neighbors of in , whether is a -vertex with respect to can be determined in constant time. Similarly, given the two neighbors of in , whether is a -vertex with respect to can also be determined in constant time. Hence, determining all cases and subcases can be done in constant time. Therefore, the upper common tangent can be found in time. By a symmetric algorithm, we can compute the lower common tangent in time.
The above algorithm is based on the assumption that exists (and thus the common tangents of and exist). If we do not know whether this is true, then we slightly change the algorithm as follows. Suppose we are considering a pair of vertices as above. Then, we first check whether is unit disk coverable. If not, then does not exist and we stop the algorithm. Otherwise, we proceed in the same way as before. In addition, if one of and is a leaf in its tree and the algorithm still wants to go to a child of that leaf, then we know that the common tangents do not exist and we stop the algorithm. The runtime of the algorithm is still . This proves Lemma 1.
References
- [1] P.K. Agarwal and J.M. Phillips. An efficient algorithm for 2D Euclidean 2-center with outliers. In Proceedings of the 16th Annual European Symposium on Algorithms (ESA), pages 64–75, 2008.
- [2] P.K. Agarwal and M. Sharir. Planar geometric location problems. Algorithmica, 11:185–195, 1994.
- [3] P.K. Agarwal, M. Sharir, and E. Welzl. The discrete 2-center problem. Discrete and Computational Geometry, 20:287–305, 1998.
- [4] E.M. Arkin, J.M. Díaz-Báñez, F. Hurtado, P. Kumar, J.S.B. Mitchell, B. Palop, P. Pérez-Lantero, M. Saumell, and R.I. Silveira. Bichromatic 2-center of pairs of points. Computational Geometry: Theory and Applications, 48:94–107, 2015.
- [5] M. Blum, R.W. Floyd, V. Pratt, R.L. Rivest, and R.E. Tarjan. Time bounds for selection. Journal of Computer and System Sciences, 7:448–461, 1973.
- [6] T.M. Chan. More planar two-center algorithms. Computational Geometry: Theory and Applications, 13:189–198, 1999.
- [7] T.M. Chan. A simpler linear-time algorithm for intersecting two convex polyhedra in three dimensions. Discrete and Computational Geometry, 56:860–865, 2016.
- [8] B. Chazelle. An optimal algorithm for intersecting three-dimensional convex polyhedra. SIAM Journal on Computing, 21(4):671–696, 1992.
- [9] B. Chazelle and J. Matoušek. On linear-time deterministic algorithms for optimization problems in fixed dimension. Journal of Algorithms, 21:579–597, 1996.
- [10] R. Cole. Slowing down sorting networks to obtain faster sorting algorithms. Journal of the ACM, 34(1):200–208, 1987.
- [11] D.P. Dobkin and D.G. Kirkpatrick. Determining the separation of preprocessed polyhedra – A unified approach. In Proc. of the 17th International Colloquium on Automata, Languages and Programming, volume 443 of Lecture Notes in Computer Science, pages 400–413. Springer, 1990.
- [12] J. Driscoll, N. Sarnak, D. Sleator, and R.E. Tarjan. Making data structures persistent. Journal of Computer and System Sciences, 38(1):86–124, 1989.
- [13] M.E. Dyer. On a multidimensional search technique and its application to the Euclidean one centre problem. SIAM Journal on Computing, 15(3):725–738, 1986.
- [14] H. Edelsbrunner, D. Kirkpatrick, and R. Seidel. On the shape of a set of points in the plane. IEEE Transactions on Information Theory, 29:551–559, 1983.
- [15] D. Eppstein. Dynamic three-dimensional linear programming. ORSA Journal on Computing, 4:360–368, 1992.
- [16] D. Eppstein. Faster construction of planar two-centers. In Proc. of the 8th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 131–138, 1997.
- [17] J. Hershberger. A faster algorithm for the two-center decision problem. Information Processing Letters, 1:23–29, 1993.
- [18] J. Hershberger and S. Suri. Finding tailored partitions. Journal of Algorithms, 3:431–463, 1991.
- [19] J. Jaromczyk and M. Kowaluk. An efficient algorithm for the Euclidean two-center problem. In Proceedings of the 10th Annual Symposium on Computational Geometry (SoCG), pages 303–311, 1994.
- [20] M. Katz and M. Sharir. An expander-based approach to geometric optimization. SIAM Journal on Computing, 26(5):1384–1408, 1997.
- [21] S.K. Kim and C.-S. Shin. Efficient algorithms for two-center problems for a convex polygon. In Proceedings of the 6th International Computing and Combinatorics Conference (COCOON), pages 299–309, 2000.
- [22] N. Megiddo. Applying parallel computation algorithms in the design of serial algorithms. Journal of the ACM, 30(4):852–865, 1983.
- [23] N. Megiddo. Linear-time algorithms for linear programming in and related problems. SIAM Journal on Computing, 12(4):759–776, 1983.
- [24] N. Megiddo and K.J. Supowit. On the complexity of some common geometric location problems. SIAM Journal on Computing, 13:182–196, 1984.
- [25] M. Overmars and J. van Leeuwen. Maintenance of configurations in the plane. Journal of Computer System Sciences, 23(2):166–204, 1981.
- [26] N. Sarnak and R.E. Tarjan. Planar point location using persistent search trees. Communications of the ACM, 29:669–679, 1986.
- [27] M. Sharir. A near-linear algorithm for the planar 2-center problem. Discrete and Computational Geometry, 18:125–134, 1997.
- [28] X. Tan and B. Jiang. Simple algorithms for the planar 2-center problem. In Proceedings of the 23rd International Computing and Combinatorics Conference (COCOON), pages 481–491, 2017.
- [29] H. Wang and J. Xue. Improved algorithms for the bichromatic two-center problem for pairs of points. In Proceedings of the 16th Algorithms and Data Structures Symposium (WADS), pages 578–591, 2019.
Appendix
We provide a counterexample to show that Tan and Jiang’s algorithm [28] is not correct. We follow the same notation as in [28] without further explanations. The authors first gave an algorithm for the convex position case where is in convex position, and then use it to solve the general case. Their algorithm uses binary search that relies on a monotonicity property given in Theorem 1. The argument of the proof does not stand. For example, because is adjustable, the authors claim that due to Lemma 3. But Lemma 3 does not imply that at all. Nevertheless, we provide a counterexample to demonstrate that the monotonicity property claimed in Theorem 1 does not hold.

Refer to Fig. 28. . A circle centered at the origin contains all five points. and are the two intersections of -axis and . are all in the interior of . Hence, is the smallest enclosing circle of . By definition, we have . and are on a line through such that is in the second quadrant and is in the fourth quadrant. and -axis form a relatively small angle. Both and are arbitrarily close to the boundary of so that any circle enclosing both and has a radius very close to or larger than .
For any two points and , let denote their Euclidean distance.
We can pick the points to guarantee the following properties (although we do not provide their exact coordinates, one can verify that the example in Fig. 28 satisfies these properties): (1) (and thus and ); (2) ; (3) ; (4) ; (5) .