Abstract 1 Introduction 2 Preliminaries 3 Dynamic range reporting 4 Proving Lemma 4: Dynamic line-separable UDRR 5 Algorithm for shallow cuttings 6 Dynamic unit-disk range emptiness queries References

Dynamic Unit-Disk Range Reporting

Haitao Wang ORCID Kahlert School of Computing, University of Utah, Salt Lake City, UT, USA Yiming Zhao ORCID Department of Computer Sciences, Metropolitan State University of Denver, CO, USA
Abstract

For a set P of n points in the plane and a value r>0, the unit-disk range reporting problem is to construct a data structure so that given any query disk of radius r, all points of P in the disk can be reported efficiently. We consider the dynamic version of the problem where point insertions and deletions of P are allowed. The previous best method provides a data structure of O(nlogn) space that supports O(log3+ϵn) amortized insertion time, O(log5+ϵn) amortized deletion time, and O(log2n/loglogn+k) query time, where ϵ is an arbitrarily small positive constant and k is the output size. In this paper, we improve the query time to O(logn+k) while keeping other complexities the same as before. A key ingredient of our approach is a shallow cutting algorithm for circular arcs, which may be interesting in its own right. A related problem that can also be solved by our techniques is the dynamic unit-disk range emptiness queries: Given a query unit disk, we wish to determine whether the disk contains a point of P. The best previous work can maintain P in a data structure of O(n) space that supports O(log2n) amortized insertion time, O(log4n) amortized deletion time, and O(log2n) query time. Our new data structure also uses O(n) space but can support each update in O(log1+ϵn) amortized time and support each query in O(logn) time.

Keywords and phrases:
Unit disks, range reporting, range emptiness, alpha-hulls, dynamic data structures, shallow cuttings
Copyright and License:
[Uncaptioned image] © Haitao Wang and Yiming Zhao; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Computational geometry
; Theory of computation Design and analysis of algorithms
Related Version:
Full Version: https://arxiv.org/pdf/2501.00120
Funding:
This research was supported in part by NSF under Grant CCF-2300356.
Editors:
Olaf Beyersdorff, Michał Pilipczuk, Elaine Pimentel, and Nguyễn Kim Thắng

1 Introduction

Range searching is a fundamental problem and has been studied extensively in computational geometry [2, 3, 26]. In this paper, we consider a dynamic range reporting problem regarding disks of fixed radius, called unit disks.

Given a set P of n points in the plane, the unit-disk range reporting problem (or UDRR for short) is to construct a data structure to report all points of P in any query unit disk. The problem is also known as the fixed-radius neighbor problem in the literature [4, 14, 16, 17]. Chazelle and Edelsbrunner [17] constructed a data structure of O(n) space that can answer each query in O(logn+k) time, where k is the output size; their data structure can be constructed in O(n2) time. By a standard lifting transformation [5], the problem can be reduced to the half-space range reporting queries in 3D; this reduction also works if the radius of the query disk is arbitrary. Using Afshani and Chan’s 3D half-space range reporting data structure [1], one can construct a data structure of O(n) space with O(logn+k) query time, while the preprocessing takes O(nlogn) expected time since it invokes Ramos’ algorithm [27] to construct shallow cuttings for a set of planes in 3D. Chan and Tsakalidis [13] later presented an O(nlogn)-time deterministic shallow cutting algorithm. Combining the framework in [1] with the shallow cutting algorithm [13], one can build a data structure of O(n) space in O(nlogn) deterministic time that can answer each UDRR query in O(logn+k) time.

We consider the dynamic UDRR problem in which point insertions and deletions of P are allowed. By the lifting transformation, the problem can be reduced to dynamic halfspace range reporting in 3D [11, 7, 10], which also works for query disks of arbitrary radii. Using the currently best result of dynamic halfspace range reporting [6], one can obtain a data structure of O(nlogn) space that supports O(log3+ϵn) amortized insertion time, O(log5+ϵn) amortized deletion time, and O(log2n/loglogn+k) query time, where ϵ is an arbitrarily small positive constant and k is the output size.

Our result.

In this paper, we achieve the optimal O(logn+k) query time, while the space of the data structure and the update time complexities are the same as above.

A byproduct of our techniques is a static data structure of O(n) space that can be built in O(nlogn) time and support O(logn+k) query time. This matches the above result of [1, 13]. But our method is much simpler. Indeed, the algorithm of [1, 13] involves relatively advanced geometric techniques like computing shallow cuttings for the planes in 3D, planar graph separators, etc. Our algorithm, on the contrary, relies only on elementary techniques (the most complicated one might be a fractional cascading data structure [18, 19]). One may consider our algorithm a generalization of the classical 2D half-plane range reporting algorithm of Chazelle, Guibas, and Lee [20].

Our techniques may also be useful for solving other problems related to unit disks. In particular, we can obtain an efficient algorithm for the dynamic unit-disk range emptiness queries. For a dynamic set P of points in the plane, we wish to determine whether a query unit disk contains any point of P (and if so, return such a point as an “evidence”). The previous best solution is to use a dynamic nearest neighbor search data structure [11]. Specifically, we can have a data structure of O(n) space that supports O(log2n) amortized insertion time, O(log4n) amortized deletion time, and O(log2n) query time. Using our techniques, we obtain an improved data structure of O(n) space that supports both insertions and deletions in O(log1+ϵn) amortized time and supports queries in O(logn) time.

Our approach.

We first discuss our static data structure. We use a set of O(n) grid cells (each of which is an axis-parallel rectangle) to capture the proximity information for the points of P, such that the distance between any two points in the same cell is at most 1. For a query unit disk Dq whose center is q, points of P in the cell C that contains q can be reported immediately. The critical part is handling other cells that contain points of PDq. The number of such cells is constant and each of them is separated from C (and thus from q) by an axis-parallel line. The problem thus boils down to the following subproblem: Given a set Q of points in a grid cell C above a horizontal line , report the points of Q in any query unit disk whose center is below . A point pQ is in Dq if and only if q lies in the unit disk Dp centered at p, or equivalently, q is above the arc of the boundary of Dp below . Let Γ denote the set of all such arcs for all points pQ. To find the points of Q in Dq, it suffices to report the arcs of Γ below q. To tackle this problem, we follow the same framework as that for the 2D half-plane range reporting algorithm [20], by constructing lower envelope layers of Γ and building a fractional cascading data structure on them [18, 19].

To make the data structure dynamic, we first derive a data structure to maintain the grid cells dynamically so that each update (point insertions/deletions) can be handled in O(logn) amortized time. This dynamic data structure could be of independent interest. Next, we develop a data structure to dynamically maintain arcs of Γ to support the arc-reporting queries (i.e., given a query point, report all arcs of Γ below it). To this end, we cannot use the fractional cascading data structure anymore because it is not amenable to dynamic changes. Instead, we adapt the techniques for dynamically maintaining a set of lines to answer line-reporting queries (i.e., given a query point, report all lines below the query point; its dual problem is the halfplane range reporting queries) [6, 9, 10, 11, 23]. To make these techniques work for the arcs of Γ in our problem, we need an efficient shallow cutting algorithm for Γ. For this, we adapt the algorithm in [13] for lines and derive an O(|Γ|log|Γ|) time shallow cutting algorithm for Γ. As shallow cuttings have many applications, our algorithm may be interesting in its own right.

Outline.

The rest of the paper is organized as follows. In Section 2, we introduce notation and a conforming coverage set of grid cells to capture the proximity information for points of P. Section 3 discusses our dynamic UDRR data structure. A main subproblem of it is solved in Section 4. A key ingredient of our method is an efficient algorithm for computing shallow cuttings for arcs; this algorithm is presented in Section 5. Section 6 demonstrates that our techniques may be used to solve other related problems, such as dynamic unit-disk range emptiness queries. Due to the space limit, some details and proofs are omitted but can be found in the full paper.

2 Preliminaries

We define some notation that will be used throughout the paper. A unit disk refers to a disk of radius 1. A unit circle is defined similarly. Unless otherwise stated, a circular arc or an arc refers to a circular arc of radius 1. For a circular arc γ, we call the circle that contains γ the underlying circle of γ and call the disk whose boundary contains γ the underlying disk.

For any point q, let Dq denote the unit disk centered at q. For any region R and any set P of points in the plane, let P(R) denote the subset of points of P inside R, i.e., P(R)=PR. For any region R in the plane, we use R to denote its boundary, e.g., if R is a disk, then R is its bounding circle.

Unless otherwise stated, ϵ refers to an arbitrarily small positive constant. Depending on the context, we often use k to denote the output size of a reporting query. For any point p in the plane, we use x(p) and y(p) to denote the x and y-coordinates of p, respectively.

2.1 Conforming coverage of 𝑷

Let P be a set of n points in the plane. We wish to have a data structure for P to answer the following unit-disk range reporting queries: Given a query unit disk D, report P(D), i.e., the points of P in D.

As discussed in Section 1, our method (for both static and dynamic problems) relies on a set of grid cells to capture the proximity information for the points of P. The technique of using grids has been widely used in various algorithms for solving problems in unit-disk graphs [32, 29, 12, 31, 30, 28]. However, the difference here is that we need to handle updates to P and therefore our grid cells will be dynamically changed as well. To resolve the issue, our definition of grid cells is slightly different from the previous work. Specifically, we define a conforming coverage set of cells for P in the following.

Definition 1 (Conforming Coverage).

A set 𝒞 of cells in the plane is called a conforming coverage for P if the following conditions hold.

  1. 1.

    Each cell of 𝒞 is an axis-parallel rectangle of side lengths at most 1/2. This implies that the distance of every two points in each cell is at most 1.

  2. 2.

    The union of all cells of 𝒞 covers all the points of P.

  3. 3.

    Every two cells are separated by an axis-parallel line.

  4. 4.

    Each cell C𝒞 is associated with a subset N(C)𝒞 of O(1) cells (called neighboring cells of C) such that for any point qC, P(Dq)CN(C)P(C).

  5. 5.

    For any point q, if q is not in any cell of 𝒞, then PDq=.

To solve the static problem, after computing a conforming coverage set of cells for P, we never need to change it in the future. As such, the following lemma from [28] suffices.

Lemma 2 (​​[28]).
  1. 1.

    A conforming coverage set 𝒞 of size O(n), along with P(C) and N(C) for all cells C𝒞, can be computed in O(nlogn) time and O(n) space.

  2. 2.

    With O(nlogn) time and O(n) space preprocessing, given any point q, we can do the following in O(logn) time: Determine whether q is in a cell C of 𝒞, and if so, return C and N(C).

However, for the dynamic problem, due to the updates of P, the conforming coverage set also needs to be maintained dynamically. For this, we have the following lemma.

Lemma 3.

A conforming coverage set 𝒞 of O(n) cells for P can be maintained in O(n) space (where n is the size of the current set P) such that each point insertion of P can be handled in O(logn) worst-case time, each point deletion can be handled in O(logn) amortized time, and the following query can be answered in O(logn) time: Given a query point q, determine whether q is in a cell C of 𝒞, and if so, return C and N(C).

The proof of Lemma 3, which is lengthy and technical, is in the full paper. Roughly speaking, if a point p is inserted to P, then at most O(1) cells will be added to 𝒞 and p will eventually be inserted into P(C) for the cell C𝒞 containing p. If a point p is deleted from P, the deletion boils down to the deletion of p from P(C) for the cell C𝒞 containing p. We do not remove cells from 𝒞. Instead, we reconstruct the entire data structure after n/2 deletions; this guarantees that the size of 𝒞 is always O(n). See the full paper for the details.

3 Dynamic range reporting

Let P be a set of points in the plane. We wish to maintain a data structure for P to answer unit-disk range reporting queries subject to point insertions and deletions of P. Let n denote the size of the current set P.

Using Lemma 3, we maintain a conforming coverage set 𝒞 of O(n) cells for P. To insert a point p to P, our insertion algorithm for Lemma 3 boils down to inserting p to P(C) for a cell C𝒞 that contains p. To delete a point p from P, our deletion algorithm for Lemma 3 boils down to deleting p from P(C) for a cell C𝒞 that contains p.

Consider a query unit disk Dq whose center is q. If q is not in a cell of 𝒞, then by Definition 1(5), P(Dq)= and thus we simply return null. Otherwise, to report P(Dq), it suffices to report P(C)Dq for all cells CN(C). In the case of C=C, since the distance between two points in C is at most 1 by Definition 1(1), we can simply report all points of P(C). If CC, C and C are separated by an axis-parallel line by Definition 1(3). Without loss of generality, we assume that C and C are separated by a horizontal line with C above and C below . As qC, q is below , i.e., q is separated from C by . Our goal is to report points of P(C)Dq. Due to the point updates of P(C), our problem is reduced to the following subproblem, called dynamic line-separable UDRR problem.

Problem 1 (Dynamic line-separable UDRR).

For a set Q of m points above a horizontal line , maintain Q in a data structure to support the following operations. (1) Insertion: insert a point to Q; (2) deletion: delete a point from Q; (3) unit-disk range reporting query: given a point q below , report the points of Q in the unit disk Dq.

We have the following Lemma 4 for the dynamic line-separable UDRR problem.

Lemma 4.

For the dynamic line-separable UDRR problem, we can have a data structure of O(mlogm) space to maintain Q to support insertions in O(log3+ϵm) amortized time, deletions in O(log5+ϵm) amortized time, and unit-disk range reporting queries in O(k+logm) time, where k is the output size, ϵ is an arbitrarily small positive constant, and m is the size of the current set Q.

We will prove Lemma 4 in Section 4. With Lemmas 3 and 4, we can obtain the following main result for our original dynamic UDRR problem.

Theorem 5.

We can maintain a set P of points in the plane in a data structure of O(nlogn) space to support insertions in O(log3+ϵn) amortized time, deletions in O(log5+ϵn) amortized time, and unit-disk range reporting queries in O(k+logn) time, where k is the output size, ϵ is an arbitrarily small positive constant, and n is the size of the current set P.

Proof.

We build the data structure 𝒟 in Lemma 3 to maintain a conforming coverage set 𝒞 of O(n) cells for P. For each cell C𝒞 that contains at least one point of P, we maintain a data structure 𝒟e(C) for P(C) with respect to the supporting line of each edge e of C. Since the space of each 𝒟e(C) is O(|P(C)|log|P(C)|), each cell of 𝒞 has four edges, and C𝒞|P(C)|=n, the total space of the overall data structure is O(nlogn).

Insertions.

To insert a point p to P, we first update 𝒟 by Lemma 3, which takes O(logn) worst-case time. The insertion algorithm of Lemma 3 eventually inserts p to P(C) for a cell C𝒞 that contains p. We insert p to 𝒟e(C) for each edge e of C, which takes O(log3+ϵn) amortized time by Lemma 4. As such, each insertion takes O(log3+ϵn) amortized time.

Deletions.

To delete a point p from P, we first update 𝒟 by Lemma 3, which takes O(logn) amortized time. The deletion algorithm of Lemma 3 eventually deletes p from P(C) for a cell C𝒞 that contains p. We delete p from 𝒟e(C) for each edge e of C, which takes O(log5+ϵn) amortized time by Lemma 4. As such, each deletion takes O(log5+ϵn) amortized time.

Queries.

Given a query unit disk Dq with center q, we first check whether q is in a cell of 𝒞, and if so, find such a cell; this takes O(logn) time by Lemma 3. If no cell of 𝒞 contains q, then PDq= and we simply return null. Otherwise, let C be the cell of 𝒞 that contains q. We first report all points of P(C). Next, for each CN(C), by Definition 1(3), C and C are separated by an axis-parallel line . Since each edge of C and C is axis-parallel, C must have an edge e whose supporting line is parallel to and separates C and C. Using 𝒟e(C), we report all points of P(C) inside Dq. As |N(C)|=O(1), the total query time is O(logn+k) by Lemma 4.

4 Proving Lemma 4: Dynamic line-separable UDRR

We now prove Lemma 4. For notational convenience, instead of m, we use n to denote the size of Q.

Consider a query unit disk Dq with center q below . The goal is to report Q(Dq). Observe that a point pQ is in Dq if and only if q is in the unit disk Dp. The portion of Dp below is a circular arc, denoted by γp. Since p is above , γp is on the lower half circle of Dp and thus is x-monotone. As such, p is in Dq if and only if q is above the arc γp. Define Γ to be the set of arcs γp for all points pQ. Therefore, reporting the points of Q in Dq becomes reporting the arcs of Γ that are below q, which we call arcs reporting queries.

In what follows, an arc of Γ always refers to the portion below of a unit circle with center above . Our problem thus becomes dynamically maintaining a set Γ of arcs to report the arcs of Γ below a query point q. The arcs reporting queries can be reduced to the following k-lowest-arcs queries: Given a query vertical line and a number k1, report the k lowest arcs of Γ intersecting . We have the following observation, which follows the proof of Chan [7] for lines.

Observation 6 ([7]).

Suppose that we can answer each k-lowest-arcs query in O(logn+k) time. Then, the arcs of Γ below a query point q can be reported in O(logn+k) time, where k is the output size.

In light of the above observation, we now focus on the k-lowest-arcs queries. We adapt a technique for a similar problem on lines (which is the dual problem of the dynamic halfplane range reporting problem): Dynamically maintain a set of lines (subject to insertions and deletions) to report the k-lowest lines at a query vertical line. For this problem, Chan [10] gave a data structure of O(nlogn) space that supports O(log6+ϵn) amortized update time and O(k+logn) query time. De Berg and Staals [6] improved the result of [10] for dynamically maintaining a set of planes in 3D. They gave a data structure of O(nlogn) space that supports O(log3+ϵn) amortized insertion time, O(log5+ϵn) amortized deletion time, and O(log2n/loglogn+k) query time. Their approach is based on the techniques for dynamically maintaining planes for answering lowest point queries [9, 11, 23] and these techniques in turn replies on computing shallow cuttings on the planes in 3D [13]. In the following, we will extend these techniques to the arcs of Γ and prove the following result.

Lemma 7.

For the set Γ of arcs, we can have a data structure of O(nlogn) space to support insertions in O(log3+ϵn) amortized time, deletions in O(log5+ϵn) amortized time, and k-lowest-arcs queries in O(k+logn) time, where n is the size of the current set Γ.

Combining Lemma 7 and Observation 6 immediately leads to Lemma 4.

In what follows, we first develop a shallow cutting algorithm for arcs of Γ in Section 4.1 and then using the algorithm to prove Lemma 7 in Section 4.2.

4.1 Shallow cuttings

Without loss of generality, we assume that is the x-axis. Let (resp., +) be the half-plane below (resp., above) . Note that each arc of Γ is x-monotone, every arc has both endpoints on , and every two arcs cross each other at most once.

We use +-constrained unit disk to refer to a unit disk with center in + and use +-constrained arc to refer to a portion of the arc C for a unit circle C with center in +. For any point q, let ρ(q) to denote the vertical downward ray from q. We say that an arc γ of Γ is below q if it intersects ρ(q). As the center of γ is in + and ρq, γ intersects ρq at most once.

For a parameter rn and a region R of the plane, a (1/r)-cutting covering R for the arcs of Γ is a set of interior-disjoint cells such that the union of all cells covers R and each cell intersects at most n/r arcs of Γ. For each cell Δ, its conflict list ΓΔ is the set of arcs of Γ that intersect Δ. The size of the cutting is the number of its cells.

For a point p, the level of p in Γ is the number of arcs of Γ below p. For any integer k[1,n], the (k)-level of Γ, denoted by Lk(Γ), is defined as the region consisting of all points of with level at most k. Given parameters r,k[1,n], a k-shallow (1/r)-cutting is a (1/r)-cutting for Γ that covers Lk(Γ).

We use pseudo-trapezoid to refer to a region that has two vertical line segments as left and right edges, an +-constrained arc or a line segment on as a top edge, and an +-constrained arc as a bottom edge. In particular, if a pseudo-trapezoid does not have a bottom edge, i.e., the bottom side is unbounded, then we call it a bottom-open pseudo-trapezoid.

We say that a shallow cutting is in the bottom-open pseudo-trapezoid form if every cell of it is a bottom-open pseudo-trapezoid. Our main result about the shallow cuttings for Γ is given in the following theorem.

Theorem 8.

There exist constants B, C, and C, such that for a parameter k[1,n], we can compute a (Bik)-shallow (CBik/n)-cutting of size at most CnBik in the bottom-open pseudo-trapezoid form, along with conflict lists of all its cells, for all i=0,1,,logBnk, in O(nlognk) total time. In particular, we can compute a k-shallow (Ck/n)-cutting of size O(n/k), along with its conflict lists, in O(nlognk) time.

Since the proof of Theorem 8 is technical and lengthy (and is one of our main results in this paper), we devote the entire Section 5 to it.

4.2 Proving Lemma 7

We now prove Lemma 7. With the shallow cutting algorithm in Theorem 8, we generalize the techniques of [6, 10] for lines to the arcs of Γ. We first give two deletion-only data structures, which will be needed in our fully dynamic data structure for Lemma 7.

4.2.1 Deletion-only data structure

Our first deletion-only data structure is given in Lemma 9 (see the full paper for the proof).

Lemma 9.

There is a data structure of O(n) size to maintain a set Γ of n arcs to support O(logn) amortized time deletions and O(nlogO(1)n+k) time k-lowest-arcs queries. If a set Γ of n arcs is given initially, the data structure can be constructed in O(nlogn) time.

We have the following lemma for another deletion-only data structure, obtained by following the same algorithmic scheme as [6, Lemma 6] and replacing their shallow cutting algorithm for lines with our shallow cutting algorithm for arcs of Γ in Theorem 8.

Lemma 10.

[6, Lemma 6] For any fixed r, there is a data structure of O(nlogr) size to maintain a set Γ of n arcs to support O(rlogn) amortized time deletions and O(logr+n/r+k) time k-lowest-arcs queries. If a set Γ of n arcs is given initially, the data structure can be constructed in O(nlogn) time.

4.2.2 Fully-dynamic data structure for Lemma 7

With the two deletion-only data structures in Lemmas 9 and 10, we are now in a position to describe our fully dynamic data structure for Lemma 7.

Overview.

To achieve our result in Lemma 7, roughly speaking, we can simply plug our shallow cutting algorithm for Γ in Theorem 8 and Lemma 9 into the algorithmic scheme of [6] or [10]. The algorithms of [6] and [10] are similar. For the method of [10], we can just replace their shallow cutting algorithm for lines [13] with our shallow cutting algorithm for Γ in Theorem 8 and replace their deletion-only data structure [24] with a combination of Lemmas 9 and 10. In addition, a general technique of querying multiple structures simultaneously from [6, Theorem 1] is also needed. For the method of [6], it was described for the plane problem in 3D with a query time O(log2n/loglogn+k). We can follow the same algorithmic scheme but using our shallow cutting algorithm for Γ in Theorem 8 and Lemma 9 in the corresponding places. In addition, since our problem is a 2D problem, the technique of dynamic interval trees in [13] can be used to reduce the query time component from O(log2n/loglogn) to O(logn). In the following, we adapt the method from Chan [10].

The data structure is an adaptation of the one for dynamic 3D convex hulls [9, 11, 23] (the idea was originally given in [9] and subsequent improvements were made in [11, 23]). We first give the following lemma. The lemma is similar to [10, Theorem 3.1], which is based on the result in [9], but Lemma 11 provides slightly better complexities than [10, Theorem 3.1] by using the recently improved result of [11] (see the full paper for more details).

Lemma 11 (​​[9, 10, 11, 23]).

Let Γ be a set of arcs, which initially is and undergoes n updates (insertions and deletions). For any b2, we can maintain a collection of shallow cuttings Tij in the bottom-open pseudo-trapezoid form, i=1,2,,logn, j=1,2,,O(logbn), in bO(1)log5n amortized time per update such that the following properties hold.

  1. 1.

    Each cutting Tij is of size O(2i) and never changes until it is replaced by a new one created from scratch. The total size of all cuttings created over time is bO(1)log3n.

  2. 2.

    Each cell ΔTij is associated with a list LΔ of O(n/2i) arcs of Γ. Each list LΔ undergoes deletions only after its creation. The total size of all such lists created over time is bO(1)nlog4n.

  3. 3.

    For any k1, let ik=log(n/Ck) for a sufficiently large constant C. For any vertical line , if an arc γΓ is among the k lowest arcs at , then there exists some j such that γ is in the list LΔj of the cell ΔjTikj intersecting .

  4. 4.

    At any moment, for each i, the number of cells of the current cuttings Tij for all j is O(2i). This implies that the total size of the lists LΔ of all cells Δ of all current cuttings Tij at any moment is O(nlogn).

With Lemma 11, we can answer a k-lowest-arcs query as follows. Consider a query vertical line . By Lemma 11(3), for each j, we compute the cell Δj of Tikj intersecting , which takes O(logn) time by binary search as the x-projections of Tikj partition the x-axis into intervals. Then, we use “brute-force” to find the k lowest arcs among all arcs in LΔj in O(k) time as |LΔj|=O(k). Finally, among all arcs found above, we return the k lowest arcs, which takes O(klogbn) time. As such, the total query time is O((logn+k)logbn).

An improved query algorithm.

We now improve the query time. We store each list LΔ by a deletion-only data structure that supports k-lowest-arcs queries. Suppose that such a deletion-only data structure is of space S0(|LΔ|), supports each k-lowest-arcs query in O(Q0(|LΔ|)+k) time and D0(|LΔ|) deletion time, and can be built in O(P0(|LΔ|)) time. Then, by Lemma 11(2), each update causes at most bO(1)log4n amortized number of deletions to the lists LΔ, and thus the amortized update time is

U(n)=bO(1)log5n+maxΔTijD0(|LΔ|)bO(1)log4n+P0(bO(1)nlog4n)/n. (1)

Note that the last term is obtained due to the following. After every n updates, we reconstruct the entire data structure and thus the reconstruction time is on the order of ΔTijP0(|LΔ|), which is bounded by P0(bO(1)nlog4n) since ΔTij|LΔ|=bO(1)nlog4n by Lemma 11(2) (assuming that P0(n)=Ω(n)).

By Lemma 11(4), the total space is

S(n)=O(i=1logn2iS0(n/2i)). (2)

For each query, there are two tasks: (1) Compute the cell Δj for every j; (2) find the k lowest arcs of all lists LΔj for all j. In the following, we solve the first task in O(logn+logbn) time and solve the second task in O(logn+k) time.

For the first task, following the method in [10], for each i, we use a dynamic interval tree [5] to store the intervals of the x-projections of the cuttings Tij for all j in an interval tree Ti. Using Ti, all t intervals intersecting can be computed in O(logn+t) time. In our problem, t=O(logbn). Insertions and deletions of intervals on Ti can be supported in O(logn) amortized time. We can thus maintain all interval trees Ti in additional amortized lognbO(1)log3n time per update as the total size of all cuttings over time is bO(1)log3n by Lemma 11(1). This additional update time is subsumed by the first term in (1). In this way, the first task can be solved in O(logn+logbn) time.

For the second task, instead of brute-force, we use the deletion-only data structures for the lists LΔj and resort to a technique of querying multiple k-lowest-arcs data structures simultaneously in [6, Theorem 1], which is based on an adaption of the heap selection algorithm of Frederickson [22]. Applying [6, Theorem 1], the second task can be accomplished in O(k+logbnmaxjQ0(|LΔj|)) time, which is O(k+logbnQ0(O(k))) since the size of each |LΔj| is O(k).

Combining the complexities of the first and second tasks, the overall query time is

Q(n)=O(logn+logbn+k)+Q0(O(k))logbn. (3)

Let m=|LΔ|. Depending on m, we use different deletion-only data structures for LΔ.

  1. 1.

    If mlog3n, then we use Lemma 9 to handle LΔ with P0(m)=O(mlogm), S0(m)=O(m), D0(m)=O(logm), Q0(m)=m1/2logO(1)m. Plugging them into (1), (2), and (3) and setting b=logϵn, we obtain U(n)=O(log5+ϵn), S(n)=O(nlogn), and Q(n)=O(logn+k+k1/2logO(1)klogn/loglogn). Since m=O(k), we have k=Ω(m). As mlog3n, we have k=Ω(log3n). Therefore, Q(n)=O(logn+k).

  2. 2.

    If m<log3n, then we use Lemma 10 to handle LΔ by setting r=logn/loglogn. This results in P0(m)=O(mlogm), S0(m)=O(mloglogn), D0(m)=O(lognlogm/loglogn), Q0(m)=O(loglogn+mloglogn/logn). Since m<log3m, we have D0(m)=O(logn). Plugging them into (1) and (3) and setting b=logϵn, we obtain U(n)=O(log5+ϵn) and Q(n)=O(logn+k+(loglogn+kloglogn/logn)logn/loglogn), which is O(logn+k). For the space, since m<log3n, if we plug S0(m)=O(mloglogn) into (2), we only need to consider those i’s such that n/2i<log3n. There are only O(loglogn) such i’s. Therefore, we obtain S(n)=O(nlog2logn) for all such m’s in this case.

Combining the above two cases leads to U(n)=O(log5+ϵn), S(n)=O(nlogn), and Q(n)=O(logn+k). We can actually obtain a better bound for the insertion time. If P(n) is the preprocessing time for constructing the data structure for a set of n arcs, then the amortized insertion time I(n) is bounded by I(n)=O(blogbnP(n)/n) [6, 11]. According to our above discussion and Lemma 11(4), constructing the deletion-only data structures for all lists LΔ is O(nlog2n). The shallow cuttings in Lemma 11 can be built in O(nlog2n) following the method in [11] and using our shallow cutting algorithm in Theorem 8. In this way, we can bound the amortized insertion time by O(blogbnlog2n), which is O(log3+ϵn) with b=logϵn. This proves Lemma 7.

5 Algorithm for shallow cuttings

In this section, we prove Theorem 8. We follow the notation in Section 4.1.

As in [13], we use parameter K=n/r instead of r. A k-shallow (1/r)-cutting becomes a k-shallow (K/n)-cutting and we use a (k,K)-shallow cutting to represent it. It has the following properties: (1) |ΓΔ|K for each cell Δ; (2) the union of all cells covers Lk(Γ). Theorem 8 says that a (k,O(k))-shallow cutting of size O(n/k) in the bottom-open pseudo-trapezoid form can be computed in O(nlognk) time.

Following the analysis of Matoušek [25], we start with the following lemma (see the full paper for the proof), which shows the existence of the shallow cutting in the pseudo-trapezoid form, i.e., each cell is a pseudo-trapezoid but not necessarily bottom-open.

Lemma 12.

For any k[1,n], there exists a (k,O(k))-shallow cutting of size O(n/k) in the pseudo-trapezoid form.

Chan and Tsakalidis [13] introduced a vertex form of the shallow cutting for lines. Here for arcs of Γ, using vertices is not sufficient. We will introduce a vertex-segment form in Section 5.2. The definition requires a concept, which we call line-separated α-hulls and is discussed in Section 5.1. In Section 5.3, we present our algorithm to compute shallow cuttings in the vertex-segment form.

5.1 Line-separated 𝜶-hulls

The line-separated α-hull is an extension of the α-hull introduced in [21]. In [21], α-hull is considered for all values α(,). For our problem, we only consider the value α=1.

Let Q be a set of points in . We define the line-separated α-hull H(Q) of Q with respect to the x-axis as the complement of the union of all unit disks with centers in + that do not contain any point of Q (so the disk centers and the points of Q are separated by , which is why we use “line-separated”; see Fig. 1).

Figure 1: Illustration the boundary of H(Q), where Q is the set of points below the x-axis . It consists of three (blue) dashed horizontal line segments of y-coordinates 1, four (red) dotted +-constrained arcs with centers on , and four other solid +-constrained arcs. The region below the boundary is H(Q).

Many of the properties of the α-hulls [21] can be extended to the line-separated case. We list some of these in the following observation; the proof is a straightforward extension of that in [21] by adding the “line-separated” constraint.

Observation 13.
  1. 1.

    QH(Q), and for any subset QQ, H(Q)H(Q).

  2. 2.

    A point qQ is a vertex of H(Q) if and only if there exists a unit disk with center in + and its boundary containing q such that the interior of the disk does not contain any point of Q.

  3. 3.

    If there is an +-constrained arc connecting two points of Q such that the interior of the underlying disk of the arc does not contain any point of Q, then the arc is an edge of H(Q).

For any two points q,q that can be covered by a +-constrained unit disk, there exists a unique +-constrained arc that connects q and q; we use γ(q,q) to denote that arc.

5.1.1 Algorithm for computing 𝑯(𝑸)

By slightly modifying the algorithm of [21], H(Q) can be computed in O(mlogm) time, where m=|Q|. The algorithm also suggests that H(Q) is x-monotone. In the following, assuming that the points of Q are already sorted from left to right as q1,q2,,qm, we give a linear time algorithm to compute H(Q), which is similar in spirit to Graham’s scan for computing convex hulls.

Irrelevant points.

Note that if a point qQ whose y-coordinate is smaller than or equal to 1, then q must be in H(Q) because every +-constrained disk does not contain q in the interior. Hence, in that case q is irrelevant for computing H(Q) and thus can be ignored. If all points of Q are irrelevant, then H(Q) is simply the region below the horizontal line whose y-coordinate is 1. In the following, we assume that every point of Q is relevant.

Wings.

Consider a point qQ. Let a be a point on the x-axis with x(a)<x(q) such that q is on the unit circle Ca centered at a. Let p be the lowest point of Ca. We define the left wing of q to be the concatenation of the following two parts (see Fig. 3): (1) the arc of CaR between q and p, called the left wing arc, and the horizontal half-line with p as the right endpoint, called the left wing half-line. The point p is called the left wing vertex of q. We define the right wing of q and the corresponding concepts symmetrically. The left and right wings together actually form the boundary of the line-separated α-hull of {q}. In Fig. 1, the four (red) dotted arcs are wing arcs and the three (blue) dashed segments are on wing half-lines.

Figure 2: Illustration the wings of the a point q. The two (red) dotted curves are wing arcs and the two (blue) dashed segments are wing half-lines. p and p are the left and right wing vertices, respectively.
Figure 3: Illustration two points q and q that are in far-away position. The two (red) dotted arcs and the (blue) dashed segments in between constitute β(q,q).
Far-away position.

Consider two points q,q such that x(q)<x(q). We say that (q,q) are in far-away position if x(p)<x(p) holds, where p is the right wing vertex of q and p is the left wing vertex of q (see Fig. 3). In this case, q is above the right wing of q and there is no +-constrained unit disk covering both q and q. We use β(q,q) to denote the concatenation of the right wing arc of q, the segment pp¯, and the left wing arc of q. In fact, the left wing of q, β(q,q), and the right wing of q together form the boundary of the line-separated α-hull of {q,q}. In Fig. 1, q and q are also in far-away position.

The algorithm.

Define Qi={q1,,qi} for each 1im. Our algorithm handles the points of Q incrementally from q1 to qm. For each qi, the algorithm computes H(Qi) by updating H(Qi1) with qi. Suppose that qi1,qi2,,qit are the points of Qi that are the vertices of H(Qi) sorted from left to right. Then, our algorithm maintains the following invariant: the boundary H(Qi) is x-monotone and consists of the following parts from left to right: the left wing of qi1, γ(qij,qij+1) or β(qij,qij+1), for each j=1,2,,t1 in order, and the right wing of qit. H(Qi) is the region below H(Qi).

Initially, for q1, we set H(Q1) to the concatenation of the left wing and the right wing of q1. In general, suppose we already have H(Qi1). We compute H(Qi) as follows. We process the points of qi1,qi2,,qit in the backward order. For ease of exposition, we assume that t>1; the special case t=1 can be easily handled.

We first process the point qit. If qit and qi are in the far-away position, then we delete the right wing of qit from H(Qi1) and add β(qit,qi) and the right wing of qi. This finishes computing H(Qi). Below, we assume that qit and qi are not in the far-away position.

If qi is below the right wing of qit, then qi is inside H(Qi1). In this case, H(Qi) is H(Qi1) and we are done. If qi is above the right wing of qit, then we further check whether the arc γ(qit,qi) exists (which is true if and only if there exists an +-constrained unit disk covering both qit and qi).

  • If γ(qit,qi) does not exist (in this case qit must be below the left wing of qi and thus qit does not contribute to H(Qi) because it is “dominated” by qi), then we “prune” qit from H(Qi1), i.e., delete the right wing of qit and also delete γ(qit1,qit) or β(qit1,qit) whichever exists in H(Qi1). Next, we process qit1 following the same algorithm.

  • If γ(qit,qi) exists, then we further check whether D contains qit1, where D is the underlying disk of γ(qit,qi). If qit1D, then qit must be in H({qit1,qi}) and thus does not contribute to H(Qi). In this case, we prune qit as above and continue processing qit1. If qit1D, we delete the right wing of qit from H(Qi1) and add the arc γ(qit,qi) and the right wing of qi; this finishes computing H(Qi).

Clearly, the runtime for computing H(Qi) is O(1+t), where t is the number of points of qi1,qi2,,qit pruned from H(Qi1). The overall algorithm for computing H(Q) takes O(m) time since once a point is pruned it will never appear on the hull again, which resembles Graham’s scan for computing convex hulls.

5.1.2 Vertical decompositions

According to the above discussion, H(Q) has at most 5m vertices with m=|Q|, including all wing vertices. The vertical downward rays from all vertices partition H(Q) into at most 5m bottom-open pseudo-trapezoids and rectangles. We call this partition the vertical decomposition of H(Q), denoted by VD(Q).

In our later discussion, we need to combine Q with a set S of pairwise disjoint segments on whose endpoints are all in Q. For each segment sS, we draw a vertical downward ray from each endpoint of s; let R(s) denote the bottom-open rectangular region bounded by the two rays and s. The regions R(s) for all segments sS form the vertical decomposition of S, denoted by VD(S).

We combine VD(Q) and VD(S) to form a vertical decomposition of (Q,S), denoted by VD(QS) as follows. Let U be the upper envelope of H(Q) and S. We draw a vertical downward ray from each vertex of v of U. These rays divide the region below U into cells, each of which is bounded by two vertical rays from left and right, and bounded from above by a line segment or an +-constrained arc. These cells together form the decomposition VD(QS). In the following, depending on the context, VD(Q) may refer to the region covered by all cells of it; the same applies to VD(S) and VD(QS). As such, we have VD(QS)=VD(Q)VD(S). Note that since the endpoints of all segments of S are in Q and on , the boundary VD(QS) is x-monotone.

5.2 Shallow cuttings in the vertex-segment form

We introduce a vertex-segment form of the shallow cutting. Given parameters k,K[1,n] with kK, a (k,K)-shallow cutting for the arcs of Γ in the vertex-segment form is a set Q of points in along with a set S of interior pairwise-disjoint segments on such that the following conditions hold:

  1. 1.

    The endpoints of all segments of S are in Q.

  2. 2.

    Every point of Q has level at most K in Γ.

  3. 3.

    Every segment of S intersects at most K arcs of Γ.

  4. 4.

    VD(QS) covers Lk(Γ).

The conflict list of a point qQ, denoted by Γq, is the set of arcs of Γ below q. Note that |Γq|K as the level of q is at most K. The conflict list of a segment sS, denoted by Γs, is the set of arcs intersecting s. The conflict lists of (Q,S) refer to the conflict lists of all points of Q and all segments of S. The size of the cutting is defined to be |Q|. Observe that since the endpoints of all segments of S are in Q and the segments of S are interior pairwise-disjoint, we have |S|<|Q|. Therefore, VD(QS) has O(|Q|) cells, and more specifically, at most 5|Q| cells. Further, we have following observation.

Observation 14.

Suppose that (Q,S) is a (k,K)-shallow cutting for Γ in the vertex-segment form. Then every cell of VD(QS) intersects at most 3K arcs of Γ.

Proof.

Consider a cell Δ of VD(QS). Let e be the top edge of Δ. By the definition of VD(QS), e is one of the following: a segment of S, an arc γ(q,q) for two points q,qQ, a wing arc of a point qQ, and a segment of a wing half-line of a point qQ. Below, we argue |ΓΔ|3K for each of these cases, where ΓΔ is the set of arcs of Γ intersecting Δ.

  1. 1.

    If e a segment of S, then recall that |Γe|K. Also, the size of the conflict list of each endpoint of e is at most K. For any arc γΓ intersecting Δ, since the center of γ is in +, γ must either intersect e or in the conflict list of at least one endpoint of e. Therefore, |ΓΔ|3K holds.

  2. 2.

    If e is an arc γ(q,q) for two points q,qQ, then any arc γΓ intersecting Δ must be in the conflict list of one of q and q. Hence, we have |ΓΔ|2K.

  3. 3.

    If e is a wing arc γ of a point qQ, then q is an endpoint of γ. Let p be the other endpoint of γ. By definition, the y-coordinate of p is 1. Thus, no arc of Γ is below p. By definition, the radius of γ is 1 and the center of γ is on . Hence, any arc of Γ intersecting Δ must be in the conflict list of q and thus |ΓΔ||Γq|K.

  4. 4.

    If e is a segment s of a wing half-line of a point qQ, then by definition e is horizontal and has y-coordinate equal to 1. As centers of all arcs of Γ are in +, no arc of Γ can intersect Δ. Hence, |ΓΔ|=0.

Combining all the above cases leads to |ΓΔ|3K.

In the next two lemmas, we show that shallow cuttings in the vertex-segment form and in the pseudo-trapezoid form can be transformed to each other.

Lemma 15.

A (k,K)-shallow cutting of size t in the pseudo-trapezoid form can be transformed into a (k,k+K)-shallow cutting in the vertex-segment form of size O(t).

Proof.

Let Ξ be a (k,K)-shallow cutting of size t in the pseudo-trapezoid form. Without loss of generality, we assume that all cells of Ξ intersect Lk(Γ). Define Q to be the set of vertices of all cells of Ξ. Define S to be the top edges of all cells of Ξ that are segments of . Since the interiors of cells of Ξ are pairwise disjoint, the segments of S are also interior pairwise-disjoint. As Ξ has t cells, we have |Q|=O(t). In the following, we argue that (Q,S) is a (k,k+K)-shallow cutting in the vertex-segment form.

First of all, by definition, endpoints of all segments of S are in Q. Consider a point qQ, which is a vertex of a cell ΔΞ. As Δ intersects Lk(Γ) and |ΓΔ|K, there are at most k+K arcs of Γ below q. Hence, q has level at most k+K in Γ. For each segment sS, since it is a top edge of a cell ΔΞ and |ΓΔ|K, we obtain |Γs|K.

It remains to argue that VD(QS) covers Lk(Γ). By definition, the union of all cells of Ξ covers Lk(Γ). Consider a cell ΔΞ, which is a pseudo-trapezoid. We show that ΔVD(QS), which will prove that VD(QS) covers Lk(Γ).

Let e be the top edge of Δ. As Δ is a pseudo-trapezoid, e is either a segment on or an +-constrained arc. If e is a segment of , then eS and thus Δ is a cell of VD(S). Hence, ΔVD(S)VD(QS). If e is an +-constrained arc, then let q1 and q2 be its two endpoints; thus e is the arc γ(q1,q2). Since Δ is a pseudo-trapezoid with γ(q1,q2) as the top edge, Δ must be contained in the line-separated α-hull H({q1,q2}), which is a subset of H(Q) by Observation 13(1) as q1,q2Q. Recall that VD(Q) is the vertical decomposition of H(Q). Hence, we have ΔVD(Q)VD(QS).

This proves ΔVD(QS) and therefore VD(QS) covers Lk(Γ).

Lemma 16.

A (k,K)-shallow cutting of size t in the vertex-segment form can be transformed into a (k,3K)-shallow cutting of size O(t) in the bottom-open pseudo-trapezoid form.

Proof.

Let (Q,S) be a (k,K)-shallow cutting of size t in the vertex-segment form. We intend to take the vertical decomposition VD(Q,S) as the (k,3K)-shallow cutting Ξ of size O(t) in the bottom-open pseudo-trapezoid form. However, a subtle issue is that some cells of VD(Q,S) might not be pseudo-trapezoids. More specifically, consider a cell ΔVD(Q,S). Let e be the top edge of Δ. According to the definition of VD(Q,S), e belongs to one of the three cases: (1) e is an +-constrained arc; (2) e is a segment of ; (3) e is a segment of a wing half-line of a point of Q. In the first two cases, Δ is a bottom-open pseudo-trapezoid and we include Δ in Ξ. In the third case, Δ is not a pseudo-trapezoid by our definition since e is a line segment but not on . In this case, we extend Δ by moving e upwards until to obtain an extended cell Δ, which is a bottom-open pseudo-trapezoid; we add Δ to Ξ. We call Δ a special cell of Ξ.

Figure 4: Illustrating the proof of ΓΔ=, with Δ=RΔ, where R is the gray rectangle and Δ is the region below e.

We claim that ΓΔ=, i.e., Δ does not intersect any arcs of Γ. Indeed, let e be the top edge of Δ. Let R be the rectangular region of Δ between e and e (see Fig. 4). Then, Δ=ΔR. Consider any point pR. We argue that no arc of Γ is below p, which will prove the claim. Assume to the contradiction that there is an arc γΓ below p. Without loss of generality, we assume that γ is the lowest arc of Γ intersecting the vertical downward ray ρ(p). Let p be the intersection of γ and ρ(p). By definition, pL0(Γ). Since (Q,S) is a (k,K)-shallow cutting, VD(Q,S) covers Lk(Γ) and thus covers L0(Γ) as k0. Therefore, VD(Q,S) covers p. On the other hand, since e is on a wing half-line of a point of Q, the y-coordinate of e is 1 and thus no arcs of Γ intersect e. Hence, p must be above e. But since e is the top edge of the cell ΔVD(Q,S), p cannot be covered by VD(Q,S), a contradiction. This proves that ΓΔ=.

Since |Q|=t, VD(QS) has O(t) cells. By definition, the size of Ξ is O(t). We next show that Ξ is a (k,3K)-shallow cutting in the bottom-open pseudo-trapezoid form. First of all, by definition, each cell of VD(Q,S) is a bottom-open pseudo-trapezoid. Also, since VD(Q,S) covers Lk(Γ) and each cell of VD(Q,S) is either in Ξ or contained in a cell of Ξ, VD(Q,S) is a subset of Ξ. Therefore, Ξ covers Lk(Γ). For each Δ of Ξ, if it is a special cell, then |ΓΔ|=0 as proved above; otherwise Δ is also a cell in VD(Q,S) and we have |ΓΔ|3K by Observation 14. Therefore, Ξ is a (k,3K)-shallow cutting in the bottom-open pseudo-trapezoid form.

Combining Lemmas 12 and 15 leads to the following.

Corollary 17.

Given k[1,n], there exists a (k,O(k))-shallow cutting of size O(n/k) in the vertex-segment form.

5.3 Computing shallow cuttings in the vertex-segment form

In what follows, by extending the algorithm of [13], we present an algorithm to compute shallow cuttings for Γ in the vertex-segment form.

We say that a (standard) cutting is in the pseudo-trapezoid form if every cell of the cutting is a pseudo-trapezoid. The following result was known previously [15, 28].

Lemma 18 ([15, 28]).

Given any constant ϵ>0, an ϵ-cutting for Γ in the pseudo-trapezoid form of O(1) size covering the plane, along with its conflict lists, can be computed in O(n) time.

We say that a shallow cutting (Q,S) in the vertex-segment form is sorted if points of Q are sorted by their x-coordinates. The following is the main theorem about our algorithm.

Theorem 19.

There exist constants B,C,C, such that for any parameter k[1,n], given a (Bk,CBk)-shallow cutting (QIN,SIN) in the sorted vertex-segment form for Γ of size at most CnBk along with its conflict lists, we can compute a (k,Ck)-shallow cutting (QOUT,SOUT) in the sorted vertex-segment form for Γ of size at most Cnk along with its conflict lists in O(n) time.

Proof.

Let ϵ be a constant to be set later. We begin by computing the decomposition VD(QIN,SIN). Since QIN is sorted, H(QIN) can be computed in O(|QIN|) time using the algorithm from Section 5.1. As the endpoints of all segments of SIN are in QIN and segments of SIN are interior pairwise-disjoint on , the segments of SIN can also be sorted from left to right in O(|QIN|) time. As such, computing VD(QIN,SIN) can be done in O(|QIN|) time, which is O(n/k) as |QIN|CnBk.

Next, for each cell ΔVD(QIN,SIN), we perform the following two steps.

  1. 1.

    Compute an ϵ-cutting ΞΔ of size O(1) for ΓΔ. We clip the cells of ΞΔ to lie within Δ (and redecompose each new cell into pseudo-trapezoids if needed). Let QΔ denote the set of vertices of all cells of ΞΔ and SΔ the set of top edges of the cells of ΞΔ that are segments of .

    Since ϵ=O(1), ΞΔ has O(1) cells and computing ΞΔ takes O(|ΓΔ|) time by Lemma 18. Hence, both |QΔ| and |SΔ| are O(1). As ΔVD(QIN,SIN)|ΓΔ|=O(n), the total time of this step for all cells ΔVD(QIN,SIN) is O(n).

  2. 2.

    Compute by brute force a smallest subset QΔQΔ, along with a subset SΔSΔ, such that the following conditions are satisfied.

    1. (a)

      The endpoints of all segments of SΔ are in QΔ.

    2. (b)

      Every vertex in QΔ has level in ΓΔ at most Ck.

    3. (c)

      Every segment in SΔ intersects at most Ck arcs of ΓΔ.

    4. (d)

      For each cell σΞΔ whose vertices are all in L2k(ΓΔ), σ is covered by VD(QΔ,SΔ).

    As both |QΔ| and |SΔ| are O(1), there are O(1) different pairs of QΔ and SΔ. For each such pair (QΔ,SΔ), we can check whether the four conditions are satisfied in O(|ΓΔ|) time, because |QΔ|, |SΔ|, and the size of ΞΔ are all O(1). Hence, finding a smallest subset QΔ with SΔ takes O(|ΓΔ|) time. After that, for each point qQΔ, its conflict list in ΓΔ, which is also its conflict list in Γ, can be found in O(|ΓΔ|) time. Similarly, for each segment of SΔ, its conflict list can be found in O(|ΓΔ|) time. As both |QΔ| and |SΔ| are O(1), finding the conflict lists of (QΔ,SΔ) takes O(|ΓΔ|) time. Since ΔVD(QIN,SIN)|ΓΔ|=O(n), the runtime of this step for all ΔVD(QIN,SIN) is O(n).

We define QOUT=ΔVD(QIN,SIN)QΔ and SOUT=ΔVD(QIN,SIN)SΔ. We can sort the points of QOUT in O(n/k) time as follows. For each ΔVD(QIN,SIN), we sort the points of QΔ, which takes O(1) time as |QΔ|=O(1). Then, for all cells ΔVD(QIN,SIN) in order from left to right, we concatenate the sorted lists of QΔ, and the resulting list is a sorted list of QOUT. This takes O(n/k) time in total as VD(QIN,SIN) has O(n/k) cells.

The total runtime of the above algorithm is O(n).

Correctness.

In the following, we argue the correctness, i.e., prove that (QOUT,SOUT) is a (k,Ck)-shallow cutting for Γ of size at most Cnk. We first show that (QOUT,SOUT) is a (k,Ck)-shallow cutting and then bound its size.

Consider a cell ΔVD(QIN,SIN). For each point qQΔ, according to our algorithm, q has level in ΓΔ at most Ck. In light of the definition of VD(QIN,SIN), Δ is a bottom-open cell bounded by two vertical rays. Hence, the level of q in ΓΔ is also its level in Γ. Therefore, q has level in Γ at most Ck.

For each segment sSΔ, by definition, s is a top edge of a cell ΔVD(QIN,SIN). According to our algorithm, s intersects at most Ck arcs of ΓΔ. Since sΔ, any arc of Γ intersecting s must intersect Δ and thus is in ΓΔ. Therefore, s intersects at most Ck arcs of Γ. In addition, according to our algorithm, the endpoints of s are in QΔ.

To show that (QOUT,SOUT) is a (k,Ck)-shallow cutting, it remains to prove that VD(QOUT,SOUT) covers Lk(Γ). Consider a point pLk(Γ). By definition, VD(QIN,SIN) covers LBk(Γ). By setting B>1, VD(QIN,SIN) covers Lk(Γ) and thus p must be in a cell Δ of VD(QIN,SIN). In the following, we argue that p is covered by VD(QΔSΔ), which will prove that VD(QOUT,SOUT) covers Lk(Γ).

Let σ be the cell of the cutting ΞΔ that contains p. Since p has level in ΓΔ at most k and the number of arcs of ΓΔ intersecting σ is at most ϵ|ΓΔ|, every vertex of σ has level at most k+ϵ|ΓΔ|. Because the size of the conflict list of each point of QIN is at most CBk, |ΓΔ|3CBk by Observation 14. Therefore, k+ϵ|ΓΔ|2k by setting the constant ϵ=1/(3CB). Hence, all vertices of σ are in L2k(ΓΔ) and thus σ is covered by VD(QΔSΔ) according to our algorithm. As pσ, we obtain that p is covered by VD(QΔSΔ).

Bounding the size of VD(𝑸OUT,𝑺OUT), i.e., |𝑸OUT|.

We now prove |QOUT|Cn/k. To this end, we compare it against a (5k,5c0k)-shallow cutting (Q,S) of size at most c0n/(5k) for some constant c0, whose existence is guaranteed by Corollary 17. The details can be found in the full paper. This proves the theorem.

Corollary 20.

There exist constants B, C, and C, such that for any parameter k[1,n], we can compute a (Bik,CBik)-shallow cutting in the sorted vertex-segment form of size at most CnBik, along with its conflict lists, for all i=0,1,,logBnk in O(nlognk) total time. In particular, we can compute a (k,Ck)-shallow cutting of size O(n/k) in the sorted vertex-segment form, along with its conflict lists, in O(nlognk) time.

Proof.

By Theorem 19, the runtime T(n,k) satisfies the recurrence T(n,k)=T(n,Bk)+O(n) with the trivial base case T(n,n)=O(n). The recurrence solves to T(n,k)=O(nlognk).

Proving Theorem 8.

We first apply Corollary 20 to compute the shallow cuttings in the sorted vertex-segment form. Then, we transform them to shallow cuttings in the bottom-open pseudo-trapezoid form by Lemma 16, which can be done in additional O(nlognk) time (i.e., linear time for each cutting). This proves Theorem 8.

6 Dynamic unit-disk range emptiness queries

Our techniques may be extended to solve other related problems about unit disks. In the following, we demonstrate one exemplary problem: the dynamic unit-disk range emptiness queries (see the full paper for a simple solution to the static problem using our techniques).

For a set P of points in the plane, we wish to maintain P in a dynamic data structure for points insertions and deletions to answer unit-disk range emptiness queries: Given a unit disk D, determine whether D contains a point of P, and if so, return such a point. One can solve the problem by using a dynamic nearest neighbor search data structure (i.e., given a query disk D, using a nearest neighbor query we find a point pP nearest to the center of D; D contains a point of P if and only if pD). The current best dynamic nearest neighbor search data structure is given by Chan [11]; with that, we can obtain a data structure of O(n) space in O(nlogn) time that supports O(log2n) amortized insertion time, O(log4n) amortized deletion time, and O(log2n) time for unit-disk range emptiness queries. In the following, using our techniques, we propose a better result.

As in Section 3 for the dynamic reporting problem, we can use Lemma 3 to reduce the problem to the following line-separated problem.

Problem 2 (Dynamic line-separable unit-disk range emptiness queries).

Given a set Q of m points above a horizontal line , build a data structure to maintain Q to support the following operations. (1) Insertion: insert a point to Q; (2) deletion: delete a point from Q; (3) unit-disk range emptiness query: given a unit disk D whose center is below , determine whether D contains a point of Q, and if so, return such a point.

To solve the line-separable problem, we define the set Γ of arcs using Q in the same way as before. Let Dq be a unit disk with center q below . Note that DqQ if and only if q is above the lower envelope of Γ. Further, q is above the lower envelope of Γ if and only if the lowest arc of Γ intersecting q is below q, where q is the vertical line through q. Therefore, our problem reduces to the following vertical line queries subject to arcs insertions and deletions for Γ: Given a vertical line , find the lowest arc of Γ that intersects .

To solve the dynamic vertical line query problem among arcs of Γ, we apply Chan’s framework [8] for the dynamic vertical line query problem among lines (in the dual plane, a vertical line query is dual to: Finding an extreme point on the convex hull of all dual points along a query direction). To this end, we need the following two components: (1) a dynamic data structure of O(m) space with O(logm) query time and mO(1) update time; (2) a deletion-only data structure of O(m) space that can be built in O(mlogm) time, supporting O(logm) query time and O(logm) amortized deletion time. For (1), we can use our static data structure as discussed above, i.e., whenever there is an update, we simply rebuild the data structure. For (2), Wang and Zhao [30] already provided such a data structure. Using these two components, we can apply exactly the same framework of Chan [8]. Indeed, the framework still works for the arcs of Γ because every arc is x-monotone. With the framework and the above two components, we can obtain a data structure of O(m) space that allows insertions and deletions of arcs of Γ in O(log1+ϵm) amortized update time and answers a vertical line query in O(logm) time, where m is the size of the current set Γ. Consequently, we can solve Problem 2 with the same time complexities. Finally, with Lemma 3 and our problem reduction, we can have a data structure of O(n) space that allows insertions and deletions of points of P in O(log1+ϵn) amortized time and answers a unit-disk range emptiness query in O(logn) time, where n is the size of the current set P.

References

  • [1] Peyman Afshani and Timothy M. Chan. Optimal halfspace range reporting in three dimensions. In Proceedings of the 20th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 180–186, 2009. doi:10.1137/1.9781611973068.21.
  • [2] Pankaj K. Agarwal. Range searching, in Handbook of Discrete and Computational Geometry, C.D. Tóth, J. O’Rourke, and J.E. Goodman (eds.), pages 1057–1092. CRC Press, 3rd edition, 2017.
  • [3] Pankaj K. Agarwal. Simplex range searching and its variants: a review. In A Journey Through Discrete Mathematics, pages 1–30. Springer, 2017. doi:10.1007/978-3-319-44479-6_1.
  • [4] Jon L. Bentley and Hermann A. Maurer. A note on Euclidean near neighbor searching in the plane. Information Processing Letters, 8:133–136, 1979.
  • [5] Mark de Berg, Otfried Cheong, Marc J. van Kreveld, and Mark H. Overmars. Computational Geometry — Algorithms and Applications. Springer-Verlag, Berlin, 3rd edition, 2008.
  • [6] Sarita de Berg and Frank Staals. Dynamic data structures for k-nearest neighbor queries. Computational Geometry: Theory and Applications, 111(101976), 2023. doi:10.1016/j.comgeo.2022.101976.
  • [7] Timothy M. Chan. Random sampling, halfspace range reporting, and construction of (k)-levels in three dimensions. SIAM Journal on Computing, 20:561–575, 2000. doi:10.1137/S0097539798349188.
  • [8] Timothy M. Chan. Dynamic planar convex hull operations in near-logarithmaic amortized time. Journal of the ACM, 48:1–12, 2001. doi:10.1145/363647.363652.
  • [9] Timothy M. Chan. A dynamic data structure for 3-D convex hulls and 2-D nearest neighbor queries. Journal of the ACM, 57:16:1–16:15, 2010. doi:10.1145/1706591.1706596.
  • [10] Timothy M. Chan. Three problems about dynamic convex hulls. International Journal of Computational Geometry and Applications, 22:341–364, 2012. doi:10.1142/S0218195912600096.
  • [11] Timothy M. Chan. Dynamic geometric data structures via shallow cuttings. Discrete and Computational Geometry, 64:1235–1252, 2020. doi:10.1007/s00454-020-00229-5.
  • [12] Timothy M. Chan and Dimitrios Skrepetos. All-pairs shortest paths in unit-disk graphs in slightly subquadratic time. In Proceedings of the 27th International Symposium on Algorithms and Computation (ISAAC), pages 24:1–24:13, 2016. doi:10.4230/LIPIcs.ISAAC.2016.24.
  • [13] Timothy M. Chan and Konstantinos Tsakalidis. Optimal deterministic algorithms for 2-d and 3-d shallow cuttings. Discrete and Computational Geometry, 56:866–881, 2016. doi:10.1007/s00454-016-9784-4.
  • [14] Bernard Chazelle. An improved algorithm for the fixed-radius neighbor problem. Information Processing Letters, 16:193–198, 1983. doi:10.1016/0020-0190(83)90123-0.
  • [15] Bernard Chazelle. Cutting hyperplanes for divide-and-conquer. Discrete and Computational Geometry, 9(2):145–158, 1993. doi:10.1007/BF02189314.
  • [16] Bernard Chazelle, Richard Cole, Franco P. Preparata, and Chee-Keng Yap. New upper bounds for neighbor searching. Information and Control, 68:105–124, 1986. doi:10.1016/S0019-9958(86)80030-4.
  • [17] Bernard Chazelle and Herbert Edelsbrunner. Optimal solutions for a class of point retrieval problems. Journal of Symbolic Computation, 1:47–56, 1985. doi:10.1016/S0747-7171(85)80028-6.
  • [18] Bernard Chazelle and Leonidas J. Guibas. Fractional cascading: I. A data structuring technique. Algorithmica, 1:133–162, 1986. doi:10.1007/BF01840440.
  • [19] Bernard Chazelle and Leonidas J. Guibas. Fractional cascading: II. Applications. Algorithmica, 1:163–191, 1986. doi:10.1007/BF01840441.
  • [20] Bernard Chazelle, Leonidas J. Guibas, and D.T. Lee. The power of geometric duality. BIT, 25:76–90, 1985. doi:10.1007/BF01934990.
  • [21] Herbert Edelsbrunner, David G. Kirkpatrick, and Raimund Seidel. On the shape of a set of points in the plane. IEEE Transactions on Information Theory, 29:551–559, 1983. doi:10.1109/TIT.1983.1056714.
  • [22] G.N. Frederickson. An optimal algorithm for selection in a min-heap. Information and Computation, 104:197–214, 1993. doi:10.1006/inco.1993.1030.
  • [23] Haim Kaplan, Wolfgang Mulzer, Liam Roditty, Paul Seiferth, and Micha Sharir. Dynamic planar Voronoi diagrams for general distance functions and their algorithmic applications. Discrete and Computational Geometry, 64:838–904, 2020. doi:10.1007/s00454-020-00243-7.
  • [24] Jir̆í Matoušek. Efficient partition trees. Discrete and Computational Geometry, 8(3):315–334, 1992. doi:10.1007/BF02293051.
  • [25] Jiří Matoušek. Reporting points in halfspaces. Computational Geometry: Theory and Applications, 2:169–186, 1992. doi:10.1016/0925-7721(92)90006-E.
  • [26] Jiří Matoušek. Geometric range searching. ACM Computing Survey, 26:421–461, 1994. doi:10.1145/197405.197408.
  • [27] Edgar A. Ramos. On range reporting, ray shooting and k-level construction. In Proceedings of the 15th Annual Symposium on Computational Geometry (SoCG), pages 390–399, 1999. doi:10.1145/304893.304993.
  • [28] Haitao Wang. Unit-disk range searching and applications. Journal of Computational Geometry, 14:343–394, 2023. doi:10.20382/jocg.v14i1a13.
  • [29] Haitao Wang and Jie Xue. Near-optimal algorithms for shortest paths in weighted unit-disk graphs. Discrete and Computational Geometry, 64:1141–1166, 2020. doi:10.1007/s00454-020-00219-7.
  • [30] Haitao Wang and Yiming Zhao. Computing the minimum bottleneck moving spanning tree. In Proceedings of the 47th International Symposium on Mathematical Foundations of Computer Science (MFCS), pages 82:1–82:15, 2022. doi:10.4230/LIPIcs.MFCS.2022.82.
  • [31] Haitao Wang and Yiming Zhao. An optimal algorithm for L1 shortest paths in unit-disk graphs. Computational Geometry: Theory and Applications, 110:101960: 1–9, 2023. doi:10.1016/j.comgeo.2022.101960.
  • [32] Haitao Wang and Yiming Zhao. Reverse shortest path problem for unit-disk graphs. Journal of Computational Geometry, 14:14–47, 2023. doi:10.20382/jocg.v14i1a2.