Abstract 1 Introduction 2 Technical Overview 3 Preliminaries 4 Offline dynamic maximum depth 5 Dynamic data structure for maximum depth 6 Adaptation to dynamic Klee’s measure 7 Conclusion and open questions References Appendix A Low-level implementation details Appendix B Missing proofs

Near-Optimal Dynamic Data Structures for Maximum Depth and Klee’s Measure of Boxes

Sujoy Bhore ORCID Indian Institute of Technology Bombay, Mumbai, India    Subhash Suri ORCID University of California, Santa Barbara, CA, USA    Jie Xue ORCID New York University Shanghai, China    Xiongxin Yang ORCID University of California, Santa Barbara, CA, USA    Jiumu Zhu ORCID New York University Shanghai, China
Abstract

We study two fundamental geometric problems on a dynamic set of n axis-parallel boxes in d-dimensional space. The maximum depth problem asks for the largest number of boxes that contain a common point, whereas Klee’s measure problem asks for the volume of the union of the boxes. We present fully dynamic exact data structures for both problems achieving O~(n(d1)/2) amortized update time. This update time is optimal for an exact dynamic algorithm, up to logarithmic factors, assuming the Combinatorial k-Clique Hypothesis. Previously, matching bounds were established only for d=1 [Imai and Asano, J. Algo.’83], and for d=2 [Suri, Xue, Yang, and Zhu, SoCG’25].

Our approach integrates a classic grid-based partition framework with a novel charging analysis that controls the cost of structure-sensitive offline routines within each cell. This argument allows us to perform a global aggregation of the update time, by circumventing the worst-case costs associated with individual cell updates. We believe this technique may be of independent interest for other dynamic geometric problems.

Keywords and phrases:
dynamic algorithms, maximum depth
Category:
Track A: Algorithms, Complexity and Games
Copyright and License:
[Uncaptioned image] © Sujoy Bhore, Subhash Suri, Jie Xue, Xiongxin Yang, and Jiumu Zhu; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Design and analysis of algorithms
Editors:
Sayan Bhattacharya, Danupon Nanongkai, Michael Benedikt, and Gabriele Puppis

1 Introduction

For a set 𝒪 of geometric objects, the maximum depth of 𝒪 is the largest number of objects in 𝒪 that have a nonempty common intersection. Maximum depth is an important parameter capturing the local density of a family of geometric objects, and it has appeared in many geometric and combinatorial settings. The maximum depth is closely related to the clique number of the intersection graph of the objects. For example, for families with Helly number two – including axis-parallel rectangles and boxes – pairwise intersection implies a nonempty common intersection, and thus the maximum depth is exactly the size of a maximum clique in the corresponding intersection graph [19, 26]. For fat objects in fixed dimension, the maximum depth still provides a constant-factor approximation to the maximum clique size of the intersection graph.

Computing the maximum depth of an input family of objects in d is a fundamental problem in computational geometry and has been studied since the early days of the field [24, 18, 4, 1, 3, 13, 30]. For (axis-parallel) boxes in d, the maximum depth problem can be solved in O~(nd/2) time [29, 12, 13]. This bound is believed to be tight up to logarithmic factors, since any improvement would break the Combinatorial k-Clique Hypothesis [12].

For boxes, a closely related problem is Klee’s measure: given a set of boxes, compute the volume of their union (the Klee’s measure of ). The problem was first posed in 1977 by Klee [25], and it is among the earliest questions that influenced the development of computational geometry. Since then, it has been studied extensively [6, 31, 29, 12, 13, 5]. Moreover, algorithms for Klee’s measure can typically be adapted to solve the maximum depth problem with essentially the same running time [5]. In 1991, Overmars and Yap [29] gave the first O(nd/2logn)-time algorithm for Klee’s measure in d. About two decades later, Chan [12, 13] simplified and refined the approach to obtain an O(nd/2)-time algorithm. Again, this bound is conditional tight up to logarithmic factors [12].

In this paper, we study the dynamic versions of the maximum depth problem and Klee’s measure problem for boxes in d. In this fully dynamic setting, boxes may be inserted and deleted over time, and the goal is to maintain the maximum depth (respectively, Klee’s measure) of the current set efficiently. Since the seminal work of Overmars and van Leeuwen [28], dynamic geometric data structures have played a central role in computational geometry. Many classic geometric problems have been studied extensively in the dynamic model, leading to a rich collection of efficient data structures, including convex hulls [23, 10], closest pairs [20, 21, 14], range searching [27, 17], geometric width [11], geometric set cover and hitting set [15, 2, 16], geometric independent set [22, 9, 7], and geometric vertex cover and matching [8], among others. Due to the importance of maximum depth and Klee’s measure, it is natural to ask how efficiently one can maintain these quantities for a dynamic set of boxes in d.

The near-optimal O~(nd/2) running time for the static problems yields a lower bound for the dynamic setting via a standard sweep-line reduction: Given a dynamic data structure for maximum depth (or Klee’s measure) for boxes in d with update time T(n), one can obtain a static algorithm for boxes in d+1 with running time O(nT(n)) by applying the sweep-line framework of Imai and Asano [24]. Consequently, a dynamic data structure in d with update time O(n(d1)/2ε) would yield a static algorithm in d+1 with running time O(n(d+1)/2ε). In light of this reduction, the most compelling goal is to design dynamic data structures whose update time matches the n(d1)/2 barrier up to logarithmic factors. We formulate this as the following question, which is the main focus of this paper.

Do there exist dynamic data structures for maximum depth and Klee’s measure of
axis-parallel boxes in d with update time O~(n(d1)/2)?

For d=1, the classic work of Imai and Asano [24] achieves O(logn) update time and thus answers the above question affirmatively. Beyond this base case, however, the question had remained poorly understood. Only very recently, Suri, Xue, Yang, and Zhu [30] proposed (among other results) a dynamic maximum-depth data structure for rectangles in the plane with O(n1/2logn) amortized update time. With additional work, their ideas can be adapted to maintain Klee’s measure for planar rectangles as well, yielding O~(n1/2) update time. This resolves the above question for d=2. Unfortunately, while the 2D framework [30] extends to higher dimensions, it does not achieve the target bound of O~(n(d1)/2), already for d=3 (see discussion in Section 2). Prior to this work, the above question was open for any value of d3.

The main contribution of this paper is to answer the question in the affirmative for every fixed d. Specifically, we design fully dynamic data structures for both maximum depth and Klee’s measure of axis-parallel boxes in d with O~(n(d1)/2) update time.

Theorem 1.

There exists a fully dynamic maximum depth data structure for axis-parallel boxes in d with O~(n(d1)/2) amortized update time.

Our techniques extend beyond depth queries and also yield an efficient dynamic structure for maintaining the union volume for boxes.

Theorem 2.

There exists a fully dynamic Klee’s measure data structure for axis-parallel boxes in d with O~(n(d1)/2) amortized update time.

2 Technical Overview

We provide an overview of our fully dynamic maximum-depth data structure. We focus on the high-level ideas and the role of the key charging quantities. The dynamic Klee’s measure structure follows the similar framework with a different interval primitive.

2.1 Overview of the 2D data structure

We start by recalling the main idea behind the 2D data structure of [30]. It partitions the plane into r vertical strips so that each strip contains O(n/r) rectangle corners, and maintains the maximum depth inside each strip separately. Although Ω(n) rectangles may intersect a fixed strip, all but O(n/r) of them have no corner in it; we call these rectangles good (for the strip), and the remaining O(n/r) rectangles bad. Inside the strip, every good rectangle spans the strip in the x-direction and is therefore equivalent to an interval on the y-axis. This reduces the subproblem inside the strip to maintaining the maximum depth of a dynamic set of (weighted) intervals: updates caused by good rectangles take only O~(1) time, while updates caused by bad rectangles take O~(n/r) time, since there are only O(n/r) bad rectangles whose contribution must be recomputed. Moreover, each rectangle is bad for only O(1) strips (namely those containing its left or right vertical side), and is good for all other strips. Overall, the update time is O~(r+n/r), which becomes O~(n) by setting r=n.

2.2 Challenges in higher dimensions

A natural goal in d is to replicate the same high-level principle: partition space so that most boxes behave “one-dimensionally” inside each region (and can be maintained cheaply), while only a small set of boxes interacts with the region boundaries. Two straightforward generalizations break down for essentially the same reason: the contribution of the boundary-interacting (“bad”) boxes can have prohibitively large combinatorial complexity. There are multiple natural generalizations of this approach to higher dimensions; however, none of them guarantees the desired bounds.

  • Partition into r slabs along one axis: Partition d into r slab regions S1,,Sr perpendicular to the x1-axis, each containing O(n/r) box corners. Inside a slab Si, good boxes are those with no corner in Si; they span the slab in the x1-direction and thus reduce to (d1)-dimensional boxes via projection. The difficulty is with the bad boxes: their contribution inside Si can be described by a piecewise-constant depth function over d1 whose rectilinear decomposition may require Ω((n/r)d1) regions in the worst case (because arrangements of t boxes in d1 can have complexity Ω(td1)). Thus, even assuming optimal lower-dimensional dynamic structures, the induced subproblem sizes are too large to support the target update time.

  • Partition into rd𝟏 cells in the first d𝟏 dimensions: Choose r1 hyperplanes perpendicular to each of the first d1 coordinate axes, so that these hyperplanes form a grid partition of d into rd1 cells, each of the form ×, where d1 is a (d1)-dimensional axis-parallel box. Inside a fixed cell ×, a box is good if it spans the cell in the first d1 coordinates, i.e., it completely covers . Restricted to the cell, such a box contributes exactly one interval on the last axis and can be maintained with a dynamic maximum-depth data structure for intervals. The bottleneck is the remaining bad boxes, namely those that intersect but do not cover it, so some side facet of the box crosses the base . A direct adaptation would handle these bad boxes in each affected cell by sweeping along the last axis and repeatedly invoking a (d1)-dimensional dynamic maximum-depth subroutine. Even assuming optimal lower-dimensional update bounds, this becomes too expensive once summed over the Θ(rd2) cells whose bases can be intersected by the boundary of a single updated box.

2.3 Overview of Our Techniques

At a high-level, we also follow the grid partition into cells of the form ×, and we retain the same “good boxes interval updates” principle. The key new ingredient is a structure-sensitive way to process the bad boxes within a fixed cell.

Fix a cell d1, and consider the set of bad boxes whose projections intersect but do not cover it. Our data structure represents their contribution to the depth inside × by a piecewise-constant function on the last coordinate (equivalently, by a set of weighted (type-2) intervals, one per piece). Thus, for a cell ×, the total depth reduces to the maximum depth of a set of weighted intervals on the last axis: type-1 intervals coming from good boxes (weight 1) plus the type-2 intervals capturing the bad-box contribution.

The core task in an update is therefore the following: when the bad-box set for a cell changes, we must recompute the new inside- depth function (and hence the new set of type-2 intervals) efficiently. We accomplish this via an offline subroutine that further refines by inserting additional axis-parallel hyperplanes so that, inside every resulting subcell, each bad box becomes equivalent to a slab in d1 (i.e., it is bounded in exactly one of the first d1 directions and is either fully present or fully absent in the other directions throughout the subcell). Once this holds, the contribution of the bad boxes inside each subcell reduces to a one-dimensional interval problem on the last axis.

The key idea to keep the refinement small is to avoid cutting at every bad-box endpoint in every partially overlapping direction. Instead, we choose an ordering (permutation) σ of the first d1 coordinate axes. For a given bad box, we treat the earliest axis (in σ-order) along which it only partially overlaps as its active direction (the slab direction), and we cut at the box endpoints only in the later partially overlapping directions. Equivalently, the box charges every partially overlapping direction except its first one under σ. In the formal development, this choice is captured by the indicators ϕσ,(,i) and the counts Φσ,(,i)=1+ϕσ,(,i). For a fixed σ, the number of inserted hyperplanes perpendicular to axis i is proportional to Φσ,(,i)1, and the number of resulting subcells is bounded by O(iΦσ,(,i)), which also governs the running time of the offline subroutine.

In the dynamic data structure, we maintain the values Φσ,(,i) for every cell , every axis i[d1], and every permutation σ. When an update changes the bad-box set in a cell, we pick the permutation σ that minimizes the product bound iΦσ,(,i) and invoke the offline subroutine under this choice to compute the updated inside- depth function (and hence the new type-2 intervals) for that cell. Meanwhile, updates from good boxes remain fast interval insertions/deletions (type-1 updates).

The remaining challenge is to argue that the total cost of these offline computations over all cells affected by a single box update is bounded by O~(n(d1)/2). This is where the main charging analysis enters. The affected cells lie on O(d) “slices” of the grid determined by the facets of the projected box: fixing a coordinate t[d1] and a slab index a[r] specifies a family of cells Vt(a). A global charging argument relates each local quantity Φσ,v(,i) to the distribution of box corners among these slices and shows that, for any slice Vt(a), choosing an order σ whose first element is t yields a strong bound on Vt(a)iΦσ,(,i) (Lemma 11). Combining this with the fact that each affected cell contains only O(n/r) bad boxes yields the desired amortized update time after setting r=n.

3 Preliminaries

Basic Notations.

We use to denote the set of positive integers and define 0={0}. For an integer n, we write [n]={1,,n}. Throughout the paper, all rectangles and boxes are axis-parallel.

Projection.

Let B=i=1d[xi,xi+] be a box in d. For i[d], let 𝐩𝐫𝐨𝐣i(B):=[xi,xi+] denote the interval obtained by projecting B onto dimension i. More generally, for I={i1,,ik}[d] where i1<<ik, let 𝐩𝐫𝐨𝐣I(B):=j=1k[xij,xij+] denote the |I|-dimensional box obtained by projecting B onto the dimensions in I. For a set of boxes in d, we write 𝐩𝐫𝐨𝐣i()={𝐩𝐫𝐨𝐣i(B):B} for i[d] and 𝐩𝐫𝐨𝐣I()={𝐩𝐫𝐨𝐣I(B):B} for I[d].

Maximum depth.

Let 𝒪 be a set of geometric objects in d. For a point pd, we define 𝖽𝖾𝗉p(𝒪)=|{O𝒪:pO}|, which is called the depth of 𝒪 at p. For a region Rd, we define 𝖽𝖾𝗉R(𝒪)=suppR𝖽𝖾𝗉p(𝒪), which is called the maximum depth of 𝒪 inside R. We write 𝖽𝖾𝗉(𝒪)=𝖽𝖾𝗉d(𝒪) for the maximum depth of 𝒪.

Klee’s measure.

For a geometric object O in d, we denote by V(O) the volume of O. Let 𝒪 be a set of geometric objects in d. For a region Rd, we define 𝖪𝗅𝖾𝖾R(𝒪)=V((O𝒪O)R), which is called the Klee’s measure of 𝒪 inside R. We write 𝖪𝗅𝖾𝖾(𝒪)=𝖪𝗅𝖾𝖾d(𝒪) for the Klee’s measure of 𝒪. Note that 𝖪𝗅𝖾𝖾(𝒪) can be if 𝒪 contains unbounded objects.

Piecewise constant functions.

We say that a function f: is piecewise constant if can be partitioned into finitely many intervals I1,,Ir such that, for every i[r], the restriction f|Ii is constant. Such a partition need not be unique. If we require r to be minimum possible, then the resulting partition into maximal intervals on which f is constant is uniquely determined; we call these intervals the pieces of f and denote them by I1,,Ir. For each piece Ii, we write f(Ii)=f(x) for an arbitrary xIi; this value is well-defined since f|Ii is constant.

4 Offline dynamic maximum depth

In this section, we consider an offline variant of the dynamic maximum depth problem and propose an algorithm whose running time depends not only on the number of update operations but also on the structure of the boxes involved. We will use this offline algorithm as a subroutine in our fully dynamic data structure.

Offline Inside-R Box Maximum Depth in c

Input: An initially empty set of boxes in c, a fixed box region Rc, and a sequence of n updates to , each of which is of one of the following two types:

  • Insertion: Insert a new box into .

  • Deletion: Delete an existing box from

Output: A sequence (δ1,,δn), where δi0 is the maximum depth of inside the region R after the i-th update.

4.1 Dynamic maximum depth for slabs

In designing our algorithm, we require an efficient dynamic maximum-depth data structure for slabs, i.e., boxes that are bounded in exactly one dimension. Formally, a slab L in c is a box such that there exists exactly one index i[c] satisfying 𝐩𝐫𝐨𝐣i(L)(,).

If we have a dynamic set of slabs in c that are all bounded in the same dimension, then maintaining the maximum depth of reduces to maintaining the maximum depth of a dynamic set of intervals and can be done with logarithmic update time. Moreover, the following observation implies that even if the slabs in are bounded in different dimensions, we can still maintain the maximum depth of with logarithmic update time by handling each dimension separately.

Fact 3.

Let be a set of slabs in c and be a fixed box in c. Then we have 𝖽𝖾𝗉()=i=1c𝖽𝖾𝗉(i), where i consists of the slabs bounded in dimension i.

Proof.

Since =i=1ci, we have 𝖽𝖾𝗉()i=1c𝖽𝖾𝗉(i). It remains to show the reverse inequality. For each i[c], let pi be a point satisfying 𝖽𝖾𝗉pi(i)=𝖽𝖾𝗉(i). Since all slabs in i are perpendicular to the xi-axis, we have 𝖽𝖾𝗉p(i)=𝖽𝖾𝗉pi(i) for any point pc whose i-th coordinate is equal to that of pi. Let p denote the point whose i-th coordinate equals the i-th coordinate of pi for every i[c]. Then 𝖽𝖾𝗉p(i)=𝖽𝖾𝗉pi(i) for all i[c], and thus

𝖽𝖾𝗉p()=i=1c𝖽𝖾𝗉p(i)=i=1c𝖽𝖾𝗉pi(i)=i=1c𝖽𝖾𝗉(i).

Moreover, p since p1,,pc. Therefore, 𝖽𝖾𝗉()𝖽𝖾𝗉p()=i=1c𝖽𝖾𝗉(i).

Figure 1: Illustration of Fact 3 in 2D. Blue (resp. yellow) rectangles represent horizontal (resp. vertical) slabs, with p1 (resp. p2) achieving maximum depth. The point p achieves maximum depth with respect to all slabs.
Lemma 4.

Let be a fixed box in c. There exists a dynamic inside- maximum depth data structure for slabs in c with O(logn) update time.

Proof.

Let be a dynamic set of slabs in c, and for each i[c] let i denote the slabs perpendicular to the xi-axis. For each i[c], we maintain a data structure 𝐃i that supports updates to i and maintains 𝖽𝖾𝗉(i). Maintaining 𝖽𝖾𝗉(i) reduces to the one-dimensional problem of maintaining the maximum depth of the dynamic interval set 𝐩𝐫𝐨𝐣i(i) inside the interval 𝐩𝐫𝐨𝐣i(), which admits O(logn) update time [24]. An insertion or deletion of a slab affects exactly one index i, and thus triggers a single update to the corresponding 𝐃i. Therefore, by Fact 3, 𝐃1,,𝐃c together maintain 𝖽𝖾𝗉(). The update time is O(logn).

4.2 Solving the offline problem

Let be a box in c. We say a box B in c is nontrivial in dimension i[c] with respect to if 𝐩𝐫𝐨𝐣i()𝐩𝐫𝐨𝐣i(B) and 𝐩𝐫𝐨𝐣i()𝐩𝐫𝐨𝐣i(B). For a permutation σ of [c], an index i[c], and a box B in c, we define ϕσ,(B,i)=1 if both of the following conditions hold:

  • B is nontrivial in dimension i with respect to ,

  • there exists j<σi such that B is nontrivial in dimension j with respect to .

Otherwise, ϕσ,(B,i)=0. For a set of boxes in c, define Φσ,(,i)=1+Bϕσ,(B,i).

Lemma 5.

Let σ be a permutation of [c] and be a fixed box in c. Then Offline Inside- Box Maximum Depth in c can be solved in O(nlogni=1cΦσ,(,i)) time, where denotes the set of all boxes that are inserted into in the sequence of updates.

Proof.

For simplicity, we present the proof for the case =c and drop the subscript in the notation. the argument extends verbatim to an arbitrary fixed box by restricting attention to . Without loss of generality, we assume the boxes in are in general position in the sense that, for every i[c], the intervals in 𝐩𝐫𝐨𝐣i() have distinct endpoints.

For each i[c], we define a set i of hyperplanes perpendicular to the xi-axis as follows. Let i={B:ϕσ(B,i)=1}. For each endpoint a of each interval in 𝐩𝐫𝐨𝐣i(i), we include in i the hyperplane xi=a. Note that |i|=2|i|=2Bϕσ(B,i). The hyperplanes in 1,,c partition the space c into i=1c(|i|+1)=O(i=1cΦσ(,i)) cells; let Γ denote the resulting set of cells. For each cell γΓ, we maintain a dynamic data structure 𝐃γ that maintains the maximum depth of the current set inside the interior of γ; denote this value by yγ. Under the general-position assumption, the maximum depth of is attained in the interior of some cell, and thus equals maxγΓyγ. Therefore, replaying the n updates for every γΓ yields a total running time O(|Γ|nt), where t is the maximum update time of each individual 𝐃γ.

The remaining task is to achieve t=O(logn). The key observation is that, inside the interior of any fixed cell γΓ, every box B behaves like a slab. To see this, fix B and suppose B is nontrivial in dimensions i1,,ip[c] with respect to c, where i1<σ<σip. By the definition of ϕ, we have ϕσ(B,i2)==ϕσ(B,ip)=1. Hence, for each j{2,,p}, we added to ij the two hyperplanes corresponding to the endpoints of 𝐩𝐫𝐨𝐣ij(B). It follows that, for each such j, the interior of 𝐩𝐫𝐨𝐣ij(γ) is either contained in 𝐩𝐫𝐨𝐣ij(B) or disjoint from it. Therefore, inside the interior of γ, the box B has the same intersection as the slab i=1i11(,)×𝐩𝐫𝐨𝐣i1(B)×i=i1+1c(,). As a consequence, inside the interior of γ, maintaining the maximum depth of reduces to maintaining the maximum depth of a dynamic set of slabs. We can therefore instantiate 𝐃γ using Lemma 4, which supports updates in O(logn) time. This gives t=O(log||)=O(logn) and yields a total running time as claimed.

Let R be a region in d1 and let be a set of boxes in d. We define the inside-R depth function of as the function δR:0 given by δR(p):=𝖽𝖾𝗉R×{p}() for all p. Note that δR is a piecewise constant function, for any choice of R. Indeed, as p moves from to , the set of boxes intersecting the slice R×{p} can change only when p reaches an endpoint of an interval in 𝐩𝐫𝐨𝐣d(). Our offline algorithm above directly implies an algorithm for computing the inside- depth function for a fixed box , which will be used in our dynamic data structure.

Refer to caption
Refer to caption
Figure 2: A cell γΓ (gray) that unbounded along one axis and its top-view. By the auxiliary partitions, all boxes intersecting γ are slabs. Colors indicate the bounded direction (yellow vs. blue). The cross-section induced by the red hyperplane yields a 2D instance of horizontal and vertical slabs as in Figure 1.
Corollary 6.

Given a permutation σ of [d1], a box in d1, and a set of n boxes in d, one can compute the inside- depth function δ:0 in O(nlogni=1d1Φσ,(𝐩𝐫𝐨𝐣[d1](),i)) time.

Proof.

Let P be the set of endpoints of the intervals in 𝐩𝐫𝐨𝐣d(). Without loss of generality, assume that the boxes in are in general position, so P contains exactly 2n distinct points p1,,p2n with p1<<p2n. Consider a point q moving from to on xd-axis, and maintain a dynamic set 0 of boxes in d1, initially empty. Whenever q reaches a point pi, if pi is the left (resp., right) endpoint of 𝐩𝐫𝐨𝐣d(B) for some B, then we insert into 0 (resp., delete from 0) the box 𝐩𝐫𝐨𝐣[d1](B). Clearly, for any a, δ(a) equals the maximum depth of 0 inside at the time q=a. Thus, to compute δ, it suffices to maintain the maximum depth of 0 inside under this sequence of insertions and deletions. This is an instance of Offline Inside- Box Maximum Depth in d1, as the update sequence is fully known in advance. Moreover, the set of boxes that are ever inserted into 0 is exactly 𝐩𝐫𝐨𝐣[d1](). Applying Lemma 5 completes the proof and yields the stated running time O(nlogni=1d1Φσ,(𝐩𝐫𝐨𝐣[d1](),i)).

5 Dynamic data structure for maximum depth

We now describe our dynamic data structure for maintaining the maximum depth of a dynamic set of boxes. Let be a dynamic set of boxes in d, which contains n boxes initially. Let r be a parameter to be specified later.

5.1 Construction of the data structure

In the preprocessing, for each dimension i[d1], we construct a set i of r1 hyperplanes in d perpendicular to the xi-axis such that, after sorting the hyperplanes along the xi-axis, the number of corners of boxes in lying between any two consecutive hyperplanes is O(n/r). Let :=i=1d1i. The hyperplanes in partition d into rd1 regions, which we call cells. We index cells by vectors v=(a1,,ad1)[r]d1, where ai indicates the position of the cell along dimension i (i.e., the cell lies between the (ai1)-st and ai-th hyperplanes in i, with the two outermost slabs treated as unbounded). Since we do not introduce hyperplanes perpendicular to the xd-axis, each cell is of the form × for a box d1. For each v[r]d1, let v denote the unique box in d1 such that the corresponding cell is v×.

By the standard periodic reconstruction trick, we may assume that ||=Θ(n) throughout the reconstruction period. For simplicity, we also assume that, throughout the period, for each i[d1], the number of corners of boxes in between any two consecutive hyperplanes in i remains O(n/r). This assumption can be removed by applying the same splitting procedure as in [30]; we defer these implementation details to Appendix A.

For each v[r]d1, our data structure maintains the following information:

  • Φσ,v(𝐩𝐫𝐨𝐣[d1](),i) for all permutations σ of [d1] and all i[d1].

  • The subset v:={B:v𝐩𝐫𝐨𝐣[d1](B) and v𝐩𝐫𝐨𝐣[d1](B)}.

  • A dynamic maximum-depth data structure 𝐃v for weighted intervals, storing a multiset v that consists of:

    • the interval 𝐩𝐫𝐨𝐣d(B) with weight 1, for every B with v𝐩𝐫𝐨𝐣[d1](B); these are called type-1 intervals,

    • the interval P with weight δvv(P), for every piece P of the function δvv; these are called type-2 intervals.

The basic correspondence between v and the inside-v depth function is easy to establish.

Observation 7.

𝖽𝖾𝗉p(v)=δv(p) for all p.

Proof.

Fix p. By construction, 𝖽𝖾𝗉p(v) equals δvv(p) plus the number of boxes B satisfying v𝐩𝐫𝐨𝐣[d1](B) and p𝐩𝐫𝐨𝐣d(B). The latter quantity is exactly δvv(p). Therefore, 𝖽𝖾𝗉p(v)=δvv(p)+δvv(p)=δv(p). The intervals in v are stored in the data structure 𝐃v for weighted intervals. Observation 7 implies that 𝖽𝖾𝗉(v)=𝖽𝖾𝗉v×(), and hence maxv[r]d1𝖽𝖾𝗉(v)=𝖽𝖾𝗉(). Accordingly, maintaining the values 𝖽𝖾𝗉(v) and taking their maximum over all v[r]d1 suffices to obtain 𝖽𝖾𝗉().

Consider an update on a box B that either inserts B into or deletes an existing box B. We process the update for every v[r]d1. First, we update the values Φσ,v(𝐩𝐫𝐨𝐣[d1](),i) for all permutations σ of [d1] and all i[d1]. This is straightforward: for each such pair (σ,i), we compute ϕσ,v(𝐩𝐫𝐨𝐣[d1](B),i) and either add it to or subtract it from the current value of Φσ,v(𝐩𝐫𝐨𝐣[d1](),i), depending on whether the update is an insertion or a deletion. We then update the set v, which is also immediate from its definition.

Next, we update the data structure 𝐃v, since the interval multiset v may change. There are three cases. If v𝐩𝐫𝐨𝐣[d1](B)=, then v does not change. If v𝐩𝐫𝐨𝐣[d1](B), then v changes only by a single type-1 interval: we insert 𝐩𝐫𝐨𝐣d(B) (with weight 1) if B is inserted, or delete the corresponding type-1 interval if B is deleted. Thus, it suffices to perform one insertion/deletion operation in 𝐃v.

In the remaining case, we have v𝐩𝐫𝐨𝐣[d1](B) and v𝐩𝐫𝐨𝐣[d1](B), i.e., Bv. In this case, the type-2 intervals in v change, and we proceed as follows.

  1. 1.

    Pick a permutation σ of [d1] that minimizes i=1d1Φσ,v(𝐩𝐫𝐨𝐣[d1](),i).

  2. 2.

    Apply the algorithm of Corollary 6 with this permutation σ to compute the updated inside-v depth function δvv, which in turn specifies the updated set of type-2 intervals in v.

  3. 3.

    Delete the old type-2 intervals from 𝐃v and insert the new type-2 intervals into 𝐃v.

We perform the above update for all v[r]d1. Correctness follows from Observation 7 and the fact that 𝐃v always stores exactly the current interval multiset v. The main challenge is to prove that this procedure achieves the desired amortized update time O~(n(d1)/2).

5.2 Update time analysis

We show that each update of our data structure can be processed in O~((n/r)d1+rd1) time. Setting r=n then yields the desired bound O~(n(d1)/2).

Consider an update that inserts a new box B or deletes an existing box B. First observe that, for every v[r]d1 such that v does not change, the corresponding local update costs only O~(1) time (it consists of maintaining counters and possibly inserting/deleting a single type-1 interval). In total, this contributes O~(rd1) time. It therefore suffices to focus on those v[r]d1 for which v changes; let V[r]d1 denote this set. Note that V consists exactly of the vectors v for which v intersects the boundary of 𝐩𝐫𝐨𝐣[d1](B). For vV, all steps of the update can still be performed in O~(1) time except: (i) recomputing δvv via Corollary 6, and (ii) deleting the old type-2 intervals from 𝐃v and inserting the new ones. Since δvv has O(|v|) pieces, step (ii) costs O~(|v|) time, which is dominated (up to logarithmic factors) by the cost of step (i). Thus, it suffices to bound the total cost of computing δvv for all vV.

Let denote the set of boxes after the insertion/deletion of B. For i[d1] and a[r], define

Vi(a):={(a1,,ad1)[r]d1:ai=a}.

Intuitively, the cells v× with vVi(a) are precisely those whose i-th coordinate is a. Define γi(a):=vVi(a)|𝖼𝗈𝗋()(v×)|, i.e., the number of corners of boxes in lying in these cells. For i,j[d1] and a,b[r], define Vi,j(a,b) and γi,j(a,b) similarly. The following basic properties are immediate from the construction.

Fact 8.

The following three properties hold.

  1. (i)

    γi(a)=O(n/r) for all i[d1] and a[r].

  2. (ii)

    a=1rγi,j(a,b)=γj(b) for all i,j[d1] and b[r].

  3. (iii)

    For v=(a1,,ad1)[r]d1, |v|i=1d1γi(ai).

Combining Item 1 and Item 3 yields |v|=O(n/r) for all v[r]d1, and in particular for all vV. By Corollary 6, computing δvv takes time

O(|v|log|v|minσi=1d1Φσ,v(𝐩𝐫𝐨𝐣[d1](v),i)),

where the minimum is over permutations σ of [d1]. Thus, the remaining difficulty is to bound the multiplicative factor minσi=1d1Φσ,v(𝐩𝐫𝐨𝐣[d1](v),i) in aggregate over vV. A per-cell bound is too weak; instead we carry out a global analysis. The key is Lemma 11, which is based on the following relation between the Φ-values and the γ-values.

Lemma 9.

Let v=(a1,,ad1)[r]d1 and σ be a permutation of [d1]. Then for any box B in d and any i[d1], if ϕσ,v(𝐩𝐫𝐨𝐣[d1](B),i)=1, then there exist j[d1] with j<σi and a vector uVi,j(ai,aj) satisfying that 𝖼𝗈𝗋(B)(u×).

Proof.

Assume ϕσ,v(𝐩𝐫𝐨𝐣[d1](B),i)=1. By definition of ϕ, 𝐩𝐫𝐨𝐣[d1](B) is nontrivial in dimension i with respect to v, and there exists j<σi such that 𝐩𝐫𝐨𝐣[d1](B) is also nontrivial in dimension j with respect to v. Therefore, there is a facet Fi (resp., Fj) of 𝐩𝐫𝐨𝐣[d1](B) perpendicular to the xi-axis (resp., xj-axis) that intersects v. Let Fi and Fj be the corresponding facets of B. Then both Fi and Fj intersect the cell v×. Since ij, there is a corner z𝖼𝗈𝗋(B) lying on both Fi and Fj. Suppose zu× for u=(b1,,bd1)[r]d1. Then 𝖼𝗈𝗋(B)(u×). Moreover, because zFi and Fi is perpendicular to the xi-axis while intersecting v×, the i-th coordinate slab of z equals that of v×, i.e., bi=ai. Similarly, bj=aj. Hence uVi,j(ai,aj).

Corollary 10.

Let v=(a1,,ad1)[r]d1 and σ be a permutation of [d1]. Then for any i[d1], we have the inequality

Φσ,v(𝐩𝐫𝐨𝐣[d1](),i)1j[d1],j<σiγi,j(ai,aj).
Proof.

By definition, Φσ,v(𝐩𝐫𝐨𝐣[d1](),i)1=Bϕσ,v(𝐩𝐫𝐨𝐣[d1](B),i). For a B such that ϕσ,v(𝐩𝐫𝐨𝐣[d1](B),i)=1, Lemma 9 implies that there exists j<σi and some uVi,j(ai,aj) such that 𝖼𝗈𝗋(B)(u×). Consequently,

ϕσ,v(𝐩𝐫𝐨𝐣[d1](B),i)j[d1],j<σiuVi,j(ai,aj)|𝖼𝗈𝗋(B)(u×)|.

Summing this inequality over all B yields

Φσ,v(𝐩𝐫𝐨𝐣[d1](),i)1 Bj[d1],j<σiuVi,j(ai,aj)|𝖼𝗈𝗋(B)(u×)|
=j[d1],j<σiuVi,j(ai,aj)|𝖼𝗈𝗋()(u×)|
=j[d1],j<σiγi,j(ai,aj).

We are now ready to prove the key lemma. Roughly speaking, it bounds the total “Φ-product complexity” over all cells in a fixed tube Vt(a), provided the permutation σ starts with t.

Lemma 11.

Let t[d1] and a[r]. If σ is a permutation of [d1] whose first element is t, then we have vVt(a)i=1d1Φσ,v(𝐩𝐫𝐨𝐣[d1](v),i)=O((n/r+r)d2).

Proof.

It suffices to prove vVt(a)i=1d1Φσ,v(𝐩𝐫𝐨𝐣[d1](),i)=O((n/r+r)d2). Without loss of generality, assume t=1 and σ=(1,,d1). Then Vt(a) consists of the vectors (a1,,ad1)[r]d1 with a1=a and a2,,ad1[r]. By Corollary 10,

vVt(a)i=1d1Φσ,v(𝐩𝐫𝐨𝐣[d1](),i) a1=aaa2=1rad1=1ri=1d1(1+j=1i1γi,j(ai,aj))
a1=aaa2=1rad1=1ri=2d1(j=1i1(γi,j(ai,aj)+1)).

Define Q:={(j2,,jd1)[d1]d2:ji<i for all i{2,,d1}}. Then in the above inequality, i=2d1(j=1i1(γi,j(ai,aj)+1))=(j2,,jd1)Qi=2d1(γi,ji(ai,aji)+1), and therefore
vVt(a)i=1d1Φσ,v(𝐩𝐫𝐨𝐣[d1](),i) (j2,,jd1)Qa1=aaa2=1rad1=1ri=2d1(γi,ji(ai,aji)+1).

Since |Q|=O(1) (as d is constant), it suffices to show that for every fixed (j2,,jd1)Q, the left sum-of-products is bounded by O((n/r+r)d2). For each k[d1], define

Sk:=a1=aaa2=1rak=1ri=2k(γi,ji(ai,aji)+1).

This is well-defined because ji<i for all i, and thus all indices appearing in the product are at most k1. We prove by induction that Sk=O((n/r+r)k1) for all k[d1], which immediately gives the desired bound for Sd1=O((n/r+r)d2).

For the base case k=1, we have S1=a1=aai=21γi,ji(ai,aji)=O(1). Assume Sk1=O((n/r+r)k2) for some k2. In the product i=2k(γi,ji(ai,aji)+1), all factors with ik1 are independent of ak, since ji<ik1. Hence,

Sk =a1=aaa2=1rak1=1r(i=2k1(γi,ji(ai,aji)+1)ak=1r(γk,jk(ak,ajk)+1))
=a1=aaa2=1rak1=1r(i=2k1(γi,ji(ai,aji)+1)(r+ak=1rγk,jk(ak,ajk))).

By Item 2 of Fact 8, ak=1rγk,jk(ak,ajk)=γjk(ajk), and by Item 1 of Fact 8 this is O(n/r) for every value of ajk. Therefore,

Sk=O(n/r+r)a1=aaa2=1rak1=1ri=2k1(γi,ji(ai,aji)+1)=O((n/r+r)Sk1),

which yields Sk=O((n/r+r)k1) and completes the proof.

Corollary 12.

vVTv=O~((n/r)d1+nrd3), where Tv denotes the time cost of computing δvv.

Proof.

Recall that V consists of all v[r]d1 such that v intersects the boundary of 𝐩𝐫𝐨𝐣[d1](B). Equivalently, v intersects one of the 2(d1) facets of 𝐩𝐫𝐨𝐣[d1](B). Let F1,,Fd1,F1,,Fd1 be these facets, where Fi,Fi are perpendicular to the xi-axis. For each i[d1], there exist indices ai,ai[r] such that FivVi(ai)v and FivVi(ai)v. Hence, Vi=1d1(Vi(ai)Vi(ai)) and

vVTvi=1d1(vVi(ai)Tv+vVi(ai)Tv).

Combining Corollary 6 and Fact 8, we have for every vV and every permutation σ of [d1],

Tv=O~(nri=1d1Φσ,v(𝐩𝐫𝐨𝐣[d1](v),i)).

Fix i[d1] and choose a permutation σ whose first element is i. Applying Lemma 11 to the tube Vi(ai) (and similarly to Vi(ai)) yields

vVi(ai)Tv=O~(nr(n/r+r)d2),vVi(ai)Tv=O~(nr(n/r+r)d2).

Since d is a constant, n/r(n/r+r)d2=O((n/r)d1+nrd3). Summing over all i[d1] (a constant number of terms) yields the desired bound.

Combining Corollary 12 with the O~(rd1) cost for the cells outside V shows that the update time is O~((n/r)d1+nrd3+rd1). Moreover, the middle term is always dominated by the other two terms: if rn then nrd3(n/r)d1, while if rn then nrd3rd1. Therefore, the update time is O~((n/r)d1+rd1). Setting r=n yields O~(n(d1)/2), proving Theorem 1.

6 Adaptation to dynamic Klee’s measure

In this section, we explain how to modify the data structure from the previous sections to maintain Klee’s measure for axis-parallel boxes in the fully dynamic setting. The proofs of this section are defer to Appendix B.

6.1 Offline subroutine

We first modify the offline algorithm from Section 4. The only additional ingredient is the following analogue of Fact 3.

Fact 13.

Let be a set of slabs in c and be a fixed box in c. Then we have 1𝖪𝗅𝖾𝖾()/V()=i=1c(1𝖪𝗅𝖾𝖾(i)/V()), where i consists of the slabs bounded in dimension i and V() denotes the volume of .

Fact 13 implies an analogue of Lemma 4, namely a dynamic inside- Klee’s measure data structure for slabs with O(logn) update time. Using this slab data structure in place of Lemma 4, we obtain an analogue of Lemma 5 for Offline Inside- Box Klee’s Measure with the same running-time bound.

To formulate the analogue of Corollary 6, we define the inside-R measure function of as κR:, where

κR(p):=𝖪𝗅𝖾𝖾R×{p}()for all p.

As in the maximum-depth setting, κR is a piecewise constant function whose breakpoints lie among the endpoints of the intervals in 𝐩𝐫𝐨𝐣d(), and hence it has O(||) pieces. The following corollary follows by the same sweep-line reduction as in the proof of Corollary 6.

Corollary 14.

Let σ be a permutation of [d1] and be a fixed box in d1. Given a set of n boxes in d, one can use O(nlogni=1d1Φσ,(𝐩𝐫𝐨𝐣[d1](),i)) time to compute the inside- measure function κ.

6.2 Dynamic data structure

We now modify the dynamic data structure from Section 5. We use the same partition of d into rd1 cells indexed by v[r]d1, and we maintain 𝖪𝗅𝖾𝖾v×() for each cell individually. We follow the notation from Section 5.

Recall that for maximum depth we maintained, for each v, a weighted interval multiset v that encodes the inside-v depth function. For Klee’s measure, we define v analogously, replacing the pieces of δvv by the pieces of κvv. However, the relation between 𝖪𝗅𝖾𝖾v×() and v is slightly more involved. We therefore separate v into two parts: let vv be the set of (weight-1) intervals corresponding to boxes B with v𝐩𝐫𝐨𝐣[d1](B), and let v′′v be the set of intervals corresponding to the pieces of the function κvv. For each Iv′′, we denote its weight by w(I):=κvv(I). For a set of intervals, we write for the union of the intervals in .

Fact 15.

𝖪𝗅𝖾𝖾v×()=𝖪𝗅𝖾𝖾(v)V(v)+Iv′′V(I\v)w(I).

To evaluate the right-hand side of Fact 15, we store v and v′′ in two data structures 𝐃v and 𝐃v′′. The data structure 𝐃v maintains 𝖪𝗅𝖾𝖾(v) and also supports range queries for Klee’s measure; this additional capability is needed when constructing and maintaining 𝐃v′′. The data structure 𝐃v′′ maintains the quantity Iv′′V(I\v)w(I).

Before defining 𝐃v, we introduce an auxiliary structure 𝐀 on v. Given a pair (L,R) of query intervals, 𝐀 checks whether there exists an interval in v whose left endpoint lies in L and right endpoint lies in R. Such a structure can be obtained by mapping each interval in v to a point in 2 (left endpoint as the x-coordinate and right endpoint as the y-coordinate), reducing the query to dynamic 2D orthogonal range emptiness. Standard dynamic range-emptiness structures (e.g., dynamic 2D range trees) support both updates and queries in O~(1) time, and we use 𝐀 as such a black box.

Next, we define 𝐃v, a dynamic range Klee’s measure data structure built on v.

Definition 16.

A dynamic range Klee’s measure data structure stores a set of intervals and supports the following three operations:

  • Insertion: Insert a new interval into .

  • Deletion: Delete an existing interval from .

  • Query: For a query interval Q, return 𝖪𝗅𝖾𝖾Q(Q) where Q={I:QI}.

Lemma 17.

There exists a dynamic range Klee’s measure data structure with O~(1) amortized update time and O~(1) query time.

Let 𝐃v be the data structure from Lemma 17 instantiated on v. Querying 𝐃v with Q=(,+) returns 𝖪𝗅𝖾𝖾(v).

We now define 𝐃v′′. It is an interval tree built on v′′, whose stored values depend on both v′′ and v. The intervals in v′′ form a partition of . The leaves of 𝐃v′′ correspond one-to-one to the intervals in v′′, in left-to-right order. For a node t of 𝐃v′′, let v′′(t)v′′ denote the set of leaf intervals in the subtree rooted at t, and define

v(t):={Iv:v′′(t)I}.

At node t we store the value

η(t):=Iv′′(t)V(I\v(t))w(I).

If t has children s1 and s2, then v(t)v(s1)v(s2), and η(t) can be computed from η(s1) and η(s2) by testing, for each child s{s1,s2}, whether v(s)=v(t). We set η(s)=η(s) if v(s)=v(t) and η(s)=0 otherwise, and then η(t)=η(s1)+η(s2). Using 𝐀, this equality test can be performed in O~(1) time, and hence η(t) can be computed in O~(1) time given η(s1) and η(s2).

If t is a leaf corresponding to an interval Iv′′, then

η(t)=(V(I)𝖪𝗅𝖾𝖾I(v(t)))w(I).

We obtain 𝖪𝗅𝖾𝖾I(v(t)) by querying 𝐃v with Q=I in O~(1) time, and then compute η(t) in O~(1) time. It follows that 𝐃v′′ can be built in O~(|v′′|) time by a bottom-up construction.

After an insertion or deletion in v, we can update 𝐃v′′ in O~(1) time. Consider an interval I inserted into v or deleted from v. Let t1 and t2 be the two leaves of 𝐃v′′ whose corresponding intervals in v′′ contain the endpoints of I. Let πi be the path from the root to ti, for i{1,2}. Only nodes on π1π2 may change, and we can update them bottom-up, spending O~(1) time per visited node. Since |π1|,|π2|=O~(1), the total update time is O~(1). We do not separately support insertions/deletions to v′′: in our setting, whenever v′′ changes, it changes globally, and we rebuild 𝐃v′′ from scratch on the new v′′.

At this point, 𝐃v provides 𝖪𝗅𝖾𝖾(v), and the root of 𝐃v′′ stores Iv′′V(I\v)w(I). Applying Fact 15 yields 𝖪𝗅𝖾𝖾v×().

Update time

Finally, we consider the update time for a fixed cell v× when a box B is inserted into or deleted from . If v𝐩𝐫𝐨𝐣[d1](B), then we insert into v (or delete from v) the interval 𝐩𝐫𝐨𝐣d(B). In this case we update 𝐀 and 𝐃v, and then update 𝐃v′′ as described above; the total cost is O~(1).

Otherwise, we recompute the inside-v measure function κvv and rebuild 𝐃v′′ on the resulting set v′′ of pieces. By Corollary 14, the cost of recomputing κvv matches (up to logarithmic factors) the cost of recomputing δvv in the maximum-depth structure. Moreover, rebuilding 𝐃v′′ costs O~(|v′′|)=O~(|v|), since the number of pieces of κvv is O(|v|). Therefore, the per-cell update time is the same as in the maximum-depth setting up to logarithmic factors. Applying the same global analysis as in Section 5 yields an overall amortized update time O~(n(d1)/2), proving Theorem 2.

7 Conclusion and open questions

In this paper, we develop fully dynamic data structures for maintaining the maximum depth and Klee’s measure of a set of axis-parallel boxes in any constant dimension d, achieving a near-optimal amortized update time of O~(n(d1)/2). While this update time is close to the conjectured lower bound, several directions remain open for future investigation.

A first and perhaps most natural question is whether one can eliminate the logarithmic factors in the update time, mirroring the historical progression of static Klee’s measure algorithms [29, 12, 13]. A second direction is to improve the preprocessing time and the space complexity. It is plausible that the preprocessing can be reduced to O(nd/2) time, whereas our current preprocessing and space usage is comparatively brute-force and requires O~(n(d+1)/2) time and space.

Our results address the exact problems in the fully dynamic setting, but it is also natural to study relaxations. For instance, one may ask whether maintaining a (1ε)-approximation to the maximum depth or to Klee’s measure admits asymptotically faster updates. Another variant is the semi-dynamic setting, where updates are restricted to insertions only or deletions only. It remains open whether these relaxations allow substantially smaller update times.

Since this work focuses on boxes, an obvious next step is to design dynamic maximum-depth data structures for other object families, such as balls, simplices, or more general convex bodies. These extensions appear considerably more challenging, as the maximum-depth problem is already known to be 3SUM-hard even for disks [4].

Finally, from a technical perspective, it is also interesting to explore whether our charging analysis can be applied to other partitioning-based problems involving boxes.

References

  • [1] Peyman Afshani and Timothy M. Chan. On approximate range counting and depth. Discrete Comput. Geom., 42(1):3–21, 2009. doi:10.1007/S00454-009-9177-Z.
  • [2] Pankaj K. Agarwal, Hsien-Chih Chang, Subhash Suri, Allen Xiao, and Jie Xue. Dynamic geometric set cover and hitting set. ACM Trans. Algorithms, 18(4):40:1–40:37, 2022. doi:10.1145/3551639.
  • [3] Helmut Alt and Ludmila Scharf. Computing the depth of an arrangement of axis-aligned rectangles in parallel. In Abstr. 26th Eur. Workshop Comput. Geom. (EuroCG), pages 33–36, 2010.
  • [4] Boris Aronov and Sariel Har-Peled. On approximating the depth and related problems. SIAM J. Comput., 38(3):899–921, 2008. doi:10.1137/060669474.
  • [5] Jérémy Barbay, Timothy M. Chan, Gonzalo Navarro, and Pablo Pérez-Lantero. Maximum-weight planar boxes in time O(n2) (and better). Inf. Process. Lett., 114(8):437–445, 2014.
  • [6] Jon Louis Bentley. Algorithms for klee’s rectangle problem. Unpublished manuscript, 1977.
  • [7] Sujoy Bhore and Timothy M. Chan. Dynamic independent set of disks (and hypercubes) made easier. In Proc. 8th Sympos. Simplicity in Algorithms (SOSA), pages 485–495, 2025. doi:10.1137/1.9781611978315.36.
  • [8] Sujoy Bhore and Timothy M. Chan. Fast static and dynamic approximation algorithms for geometric optimization problems: Piercing, independent set, vertex cover, and matching. In Proc. 36th ACM-SIAM Sympos. Discrete Algs. (SODA), pages 2357–2386, 2025. doi:10.1137/1.9781611978322.79.
  • [9] Sujoy Bhore, Martin Nöllenburg, Csaba D. Tóth, and Jules Wulms. Fully dynamic maximum independent sets of disks in polylogarithmic update time. In Proc. 40th Int. Annu. Sympos. Comput. Geom. (SoCG), pages 19:1–19:16, 2024. doi:10.4230/LIPIcs.SOCG.2024.19.
  • [10] Timothy M. Chan. Dynamic planar convex hull operations in near-logarithmic amortized time. J. ACM, 48(1):1–12, 2001. doi:10.1145/363647.363652.
  • [11] Timothy M. Chan. Dynamic coresets. Discrete Comput. Geom., 42(3):469–488, 2009. doi:10.1007/S00454-009-9165-3.
  • [12] Timothy M. Chan. A (slightly) faster algorithm for Klee’s measure problem. Comput. Geom., 43(3):243–250, 2010. doi:10.1016/J.COMGEO.2009.01.007.
  • [13] Timothy M. Chan. Klee’s measure problem made easy. In Proc. 54th Annu. IEEE Sympos. Found. Comput. Sci. (FOCS), pages 410–419, 2013. doi:10.1109/FOCS.2013.51.
  • [14] Timothy M. Chan. Dynamic geometric data structures via shallow cuttings. Discrete Comput. Geom., 64(4):1235–1252, 2020. doi:10.1007/S00454-020-00229-5.
  • [15] Timothy M. Chan and Qizheng He. More dynamic data structures for geometric set cover with sublinear update time. J. Comput. Geom., 13(2):90–114, 2021. doi:10.20382/JOCG.V13I2A6.
  • [16] Timothy M. Chan, Qizheng He, Subhash Suri, and Jie Xue. Dynamic geometric set cover, revisited. In Proc. 33rd ACM-SIAM Sympos. Discrete Algorithms (SODA), pages 3496–3528, 2022. doi:10.1137/1.9781611977073.139.
  • [17] Timothy M. Chan and Konstantinos Tsakalidis. Dynamic orthogonal range searching on the RAM, revisited. J. Comput. Geom., 9(2):45–66, 2018. doi:10.20382/JOCG.V9I2A5.
  • [18] Bernard Marie Chazelle and D. T. Lee. On a circle placement problem. Computing, 36(1-2):1–16, 1986. doi:10.1007/BF02238188.
  • [19] Ludwig Danzer, Branko Grünbaum, and Victor Klee. Helly’s theorem and its relatives. In Convexity, Proc. Sympos. Pure Math., Vol. 7, Amer. Math. Soc., volume 7, page 101, 1963.
  • [20] David Dobkin and Subhash Suri. Maintenance of geometric extrema. J. ACM, 38(2):275–298, 1991. doi:10.1145/103516.103518.
  • [21] D. Eppstein. Dynamic Euclidean minimum spanning trees and extrema of binary functions. Discrete Comput. Geom., 13(1):111–122, 1995. doi:10.1007/BF02574030.
  • [22] Monika Henzinger, Stefan Neumann, and Andreas Wiese. Dynamic approximate maximum independent set of intervals, hypercubes and hyperrectangles. In Proc. 36th Int. Sympos. Comput. Geom. (SoCG), pages 51:1–51:14, 2020. doi:10.4230/LIPIcs.SOCG.2020.51.
  • [23] John Hershberger and Subhash Suri. Off-line maintenance of planar configurations. J. Algorithms, 21(3):453–475, 1996. doi:10.1006/JAGM.1996.0054.
  • [24] Hiroshi Imai and Takao Asano. Finding the connected components and a maximum clique of an intersection graph of rectangles in the plane. J. Algorithms, 4(4):310–323, 1983. doi:10.1016/0196-6774(83)90012-3.
  • [25] Victor Klee. Can the measure of i=1n[ai,bi] be computed in less than o(nlogn) steps? Amer. Math. Monthly, 84(4):284–285, 1977.
  • [26] Jiri Matousek. Lectures on discrete geometry, volume 212. Springer Science & Business Media, 2013.
  • [27] Christian Worm Mortensen. Fully dynamic orthogonal range reporting on ram. SIAM J. Comput., 35(6):1494–1525, 2006. doi:10.1137/S0097539703436722.
  • [28] Mark H. Overmars and Jan van Leeuwen. Maintenance of configurations in the plane. J. Comput. Syst. Sci., 23(2):166–204, 1981. doi:10.1016/0022-0000(81)90012-X.
  • [29] Mark H. Overmars and Chee-Keng Yap. New upper bounds in Klee’s measure problem. SIAM J. Comput., 20(6):1034–1045, 1991. doi:10.1137/0220065.
  • [30] Subhash Suri, Jie Xue, Xiongxin Yang, and Jiumu Zhu. Dynamic maximum depth of geometric objects. In Proc. 41st Int. Annu. Sympos. Comput. Geom. (SoCG), pages 77:1–77:13, 2025. doi:10.4230/LIPIcs.SOCG.2025.77.
  • [31] Jan van Leeuwen and Derick Wood. The measure problem for rectangular ranges in d-space. J. Algorithms, 2(3):282–300, 1981. doi:10.1016/0196-6774(81)90027-4.

Appendix A Low-level implementation details

In this section, we provide the implementation details omitted in Section 5, namely periodic reconstruction and the splitting procedure.

A.1 Reconstruction

Our data structure uses the standard technique of periodic reconstruction, as in [30]. After the i-th reconstruction, let ni:=|| denote the number of boxes at that time. We then perform ni/2 update operations before initiating the (i+1)-st reconstruction. During this i-th period, i.e., the interval between the i-th and (i+1)-st reconstructions, we therefore have ||=Θ(ni).

Since our data structure supports updates in O(n(d1)/2logn) time on a set of size n, we can rebuild it from scratch in O(n(d+1)/2logn) time by inserting the n boxes one by one. Thus, the (i+1)-st reconstruction takes O(ni(d+1)/2logni) time. Amortizing this cost over the ni/2 operations in the i-th period yields an amortized reconstruction cost of O(ni(d1)/2logni) per operation, which keeps the amortized update time at O(n(d1)/2logn).

A.2 Splitting

We now describe how to maintain the invariant assumed in Section 5: for each i[d1], the number of corners of boxes in lying between any two consecutive hyperplanes in i is always O(n/r).

Fix i[d1] and consider a reconstruction period in which the set size satisfies ||=Θ(n) (where n denotes the size at the beginning of the period). The hyperplanes in i partition d into slabs along the xi-axis. Whenever the number of corners of boxes in in the slab defined by two consecutive hyperplanes Hai1,Haii reaches 2d+1n/r, we insert a new hyperplane H perpendicular to the xi-axis between Hai1 and Hai so that the numbers of corners in the two new slabs (between Hai1 and H and between H and Hai) are both exactly 2dn/r. Consequently, every cell v× whose i-th coordinate equals ai is split into two cells × and ′′×.

By construction, immediately after the split, each of the two new slabs contains at most 2dn/r corners, and a slab is split only once it accumulates 2d+1n/r corners. Thus, at all times, the number of corners between any two consecutive hyperplanes in i is at most 2d+1n/r=O(n/r).

On the other hand, to make the proof in Section 5 go through, we also need to ensure that the total number of cells remains O(rd1) despite splittings. This is guaranteed by the following fact, which is a direct generalization of Fact 4 in [30].

Fact 18.

Over the first t update operations within a reconstruction period (with parameter n fixed at the beginning of the period), the number of splittings along any fixed axis is at most 2tr/n.

Proof.

Since deletions do not trigger splitting, it suffices to account for insertions among the t operations. Fix an axis i[d1]. For each inserted box B, we charge it to the (at most) two slabs along the xi-axis, defined by consecutive hyperplanes in i, that contain corners of B at the time of insertion.

Each such charge corresponds to inserting at most 2d new corners into the charged slab. Therefore, a slab S must receive at least n/r charges before its number of corners grows from at most 2dn/r to 2d+1n/r, at which point S is split. Equivalently, every split of a slab S is preceded by at least n/r charges to S. Since each insertion contributes at most two charges along the xi-axis, the total number of charges along this axis over the first t operations is at most 2t. It follows that the number of splits along the xi-axis is at most 2tn/r=2trn, as claimed.

Corollary 19.

Despite splittings, the number of cells remains O(rd1).

Proof.

Consider an arbitrary reconstruction period. By construction, the period contains at most n/2 update operations. By Fact 18, the number of slab splittings along each axis is at most

2(n/2)rn=r.

Since we start the period with r slabs along each axis, after at most r additional splits the number of slabs along each axis is at most r+r. Therefore, the total number of cells is at most (r+r)d1=O(rd1).

Appendix B Missing proofs

B.1 Proof of Fact 8

Proof.

Item 1 follows directly from the construction (and maintenance) of i: for each i[d1] and each a[r], the cells {v×:vVi(a)} form exactly the slab between two consecutive hyperplanes in i, and by invariant this slab contains O(n/r) corners of boxes in . Thus γi(a)=O(n/r).

Item 2 is immediate from the definitions. Fix i,j[d1] and b[r]. The sets Vi,j(a,b) partition Vj(b) as a ranges over [r], and therefore

a=1rγi,j(a,b)=a=1rvVi,j(a,b)|𝖼𝗈𝗋()(v×)|=vVj(b)|𝖼𝗈𝗋()(v×)|=γj(b).

For Item 3, fix v=(a1,,ad1)[r]d1 and consider any box Bv. By definition of v, we have 𝐩𝐫𝐨𝐣[d1](B)v and v𝐩𝐫𝐨𝐣[d1](B). Hence there exists a dimension i[d1] such that 𝐩𝐫𝐨𝐣i(v)𝐩𝐫𝐨𝐣i(B). Since 𝐩𝐫𝐨𝐣i(v) intersects 𝐩𝐫𝐨𝐣i(B), at least one endpoint of 𝐩𝐫𝐨𝐣i(B) lies in the interior of 𝐩𝐫𝐨𝐣i(v). Equivalently, there is a facet F of 𝐩𝐫𝐨𝐣[d1](B) perpendicular to the xi-axis that intersects v.

Let F be the corresponding facet of B in d, and let z𝖼𝗈𝗋(B) be any corner incident to F. Then z lies in the slab with i-th coordinate equal to ai, and therefore zu× for some uVi(ai). We charge the box B to this corner z. Doing this for every Bv yields

|v|i=1d1uVi(ai)|𝖼𝗈𝗋()(u×)|=i=1d1γi(ai),

which is exactly Item 3.

B.2 Proof of Fact 13

Fix i[c]. Every slab Li is unbounded in all coordinates except the i-th one. Let Ui:=Li𝐩𝐫𝐨𝐣i(L)𝐩𝐫𝐨𝐣i(). Then Li(L)=j=1i1𝐩𝐫𝐨𝐣j()×Ui×j=i+1c𝐩𝐫𝐨𝐣j(), and therefore

𝖪𝗅𝖾𝖾(i)=V(Li(L))=|Ui|ji|𝐩𝐫𝐨𝐣j()|.

Dividing by V()=j=1c|𝐩𝐫𝐨𝐣j()| gives

1𝖪𝗅𝖾𝖾(i)V()=1|Ui||𝐩𝐫𝐨𝐣i()|=|𝐩𝐫𝐨𝐣i()||Ui||𝐩𝐫𝐨𝐣i()|.

Now consider the full slab set =i=1ci. Inside , the complement of the union is

L(L) =i=1c(Li(L))
=i=1c(ji𝐩𝐫𝐨𝐣j()×(𝐩𝐫𝐨𝐣i()Ui))=i=1c(𝐩𝐫𝐨𝐣i()Ui).

Taking volumes yields V()𝖪𝗅𝖾𝖾()=i=1c(|𝐩𝐫𝐨𝐣i()||Ui|). Dividing by V() and substituting the expression for each i gives

1𝖪𝗅𝖾𝖾()V()=i=1c|𝐩𝐫𝐨𝐣i()||Ui||𝐩𝐫𝐨𝐣i()|=i=1c(1𝖪𝗅𝖾𝖾(i)V()).

B.3 Proof of Fact 15

Proof.

Let U:=v be the union of the type-1 intervals. For each p, define the cross-section value

m(p):=𝖪𝗅𝖾𝖾v×{p}()=V((BB)(v×{p})).

By Fubini’s theorem (or equivalently by additivity of volume along the xd-axis),

𝖪𝗅𝖾𝖾v×()=m(p)𝑑p.

If pU, then there exists a box B such that v𝐩𝐫𝐨𝐣[d1](B) and p𝐩𝐫𝐨𝐣d(B), which implies v×{p}B and hence m(p)=V(v). If pU, then no such box exists, and the only boxes contributing to the cross section inside v×{p} are those in v. By definition of the inside-v measure function, we then have m(p)=κvv(p). Since v′′ is precisely the set of pieces of κvv, for each Iv′′ the function equals the constant w(I) on I.

Therefore,

𝖪𝗅𝖾𝖾v×() =pUV(v)𝑑p+pUκvv(p)𝑑p
=V(v)|U|+Iv′′w(I)|IU|
=𝖪𝗅𝖾𝖾(v)V(v)+Iv′′V(I\v)w(I).

B.4 Proof of Lemma 17

We first observe the following simple fact.

Fact 20.

For any disjoint intervals X and Y and any interval set , 𝖪𝗅𝖾𝖾XY()=𝖪𝗅𝖾𝖾X()+𝖪𝗅𝖾𝖾Y().

Let {e1<<eN} be the sorted distinct endpoints of all intervals in . Define Ai=(ei,ei+1) for 1iN1, and A0=(,e1), AN=(eN,). Let 𝒜={A0,,AN} be the set of these disjoint intervals. We consider a standard BST 𝒯 on 𝒜 storing the atomic intervals Ai𝒜 at its leaf nodes. For any node v𝒯, let Av denote the interval spanned by its leaf descendants (atomic interval Ai if v is a leaf). Define

κ(v)={|Ai|𝟏[I:(I)=ei or r(I)=ei+1] where I=[(I),r(I)],if v is a leaf,vv.children(κ(v)𝟏[Av=Av]+|Av|𝟏[AvAv]),if v is internal.
Fact 21.

κ(v)=𝖪𝗅𝖾𝖾Av(Av) for all v𝒯.

Proof.

The claim holds trivially when v is a leaf node. Since Ai is atomic, Ai is nonempty when some I includes Ai and defines one of its endpoints, thus 𝖪𝗅𝖾𝖾Ai(Ai)=|Ai|. Otherwise, Ai= and the measure is 0. If v is an internal node, then by Fact 20, 𝖪𝗅𝖾𝖾Av(Av)=vv.children𝖪𝗅𝖾𝖾Av(Av). Thus it suffices to show that for each child v either 𝖪𝗅𝖾𝖾Av(Av)=κ(v) or |Av|. If Av=Av then 𝖪𝗅𝖾𝖾Av(Av)=𝖪𝗅𝖾𝖾Av(Av)=κ(v) trivially by induction. Otherwise AvAv, and since AvAv we cannot have an interval that contains Av but fails to contain Av, so the difference lies in the existence of some IAvAv. Thus I is an interval that fully contains Av but does not contain Av, consequently every point of Av lies in some interval of Av, and therefore 𝖪𝗅𝖾𝖾Av(Av)=|Av|.

To compute 𝖪𝗅𝖾𝖾Q(Q), let 𝒱 denote the O(logN) canonical nodes whose intervals {Av:v𝒱} form a disjoint partition of Q. By Fact 20, 𝖪𝗅𝖾𝖾Q(Q)=v𝒱𝖪𝗅𝖾𝖾AvQ(Q). For each v𝒱. If AvQ, then 𝖪𝗅𝖾𝖾AvQ(Q)=𝖪𝗅𝖾𝖾Av(Q)=𝖪𝗅𝖾𝖾Av(Av)𝟏[Av=Q]+|Av|𝟏[AvQ]. Otherwise if AvQ, then v is necessarily a leaf corresponding to some atomic interval Ai, and 𝖪𝗅𝖾𝖾AvQ(Q)=𝖪𝗅𝖾𝖾AiQ(Q)=κ(Ai)|AiQ|/|Ai|. Since 𝟏[Av=Q] can be evaluated in O~(1) time using the auxiliary structure 𝐀, and |𝒱|=O(logN), the value of 𝖪𝗅𝖾𝖾Q(Q) can be computed in O~(1) time via queries to 𝒯.

Furthermore, insertions or deletions of an interval I in can be reflected in 𝒯 in O~(1) time. Observe that κ(v) remains unchanged for any node v spanned by I, since by definition IAv={I:AvI} if AvI. Hence, the update only affects leaves incident to endpoints of I and the leaves’ ancestors. Accounting for rotations, splits, and merges in 𝒯, at most O(logN) nodes are changed in 𝒯. Let P be the union of root-to-leaf paths from affected nodes. For each vP, recomputing κ(v) using 𝐀 takes O~(1) time and restores the invariant κ(v)=𝖪𝗅𝖾𝖾Av(Av). Therefore, the total update time is O~(1).