Abstract 1 Introduction 2 Notation and Preliminaries 3 A Rectangle amid Cells of the BBD Tree 4 Online Algorithm and Competitive Analysis 5 Generalizations to Positive Homothets of Polygons 6 Conclusions References

Online Hitting Set for Axis-Aligned Squares

Minati De ORCID Department of Mathematics, Indian Institute of Technology Delhi, New Delhi, India    Satyam Singh ORCID Department of Computer Science, Aalto University, Espoo, Finland    Csaba D. Tóth ORCID Department of Mathematics, California State University Northridge, Los Angeles, CA, USA
Department of Computer Science, Tufts University, Medford, MA, USA
Abstract

Given a set P of n points in the plane and a sequence of axis-aligned squares that arrive in an online fashion, the online hitting set problem consists of maintaining, by adding new points from P if necessary, a hitting set H⊆P, which contains at least one point in every input square that has already arrived. We present an O⁢(log⁡n)-competitive deterministic algorithm for this problem. The competitive ratio is the best possible, apart from constant factors. In fact, this is the first O⁢(log⁡n)-competitive algorithm for the online hitting set problem that works for geometric objects of arbitrary sizes (i.e., unbounded scaling factors) in the plane. We further generalize this result to positive homothets of a polygon with k≥3 vertices in the plane and provide an O⁢(k2⁢log⁡n)-competitive algorithm.

Keywords and phrases:
axis-aligned squares, hitting set, homothets of a polygon, online algorithm
Funding:
Satyam Singh: Research on this paper was supported by the Research Council of Finland, Grant 363444.
Csaba D. Tóth: Research on this paper was supported, in part, by the NSF award DMS-2154347.
Copyright and License:
[Uncaptioned image] © Minati De, Satyam Singh, and Csaba D. Tóth; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation → Computational geometry
; Theory of computation → Online algorithms
Related Version:
Previous Version: https://arxiv.org/pdf/2510.23107
Acknowledgements:
We thank an anonymous reviewer for a suggestion that helped improve the competitive ratio in Theorem 1 from O⁢(ϱ⁢log⁡n) to O⁢((1+log⁡ϱ)⁢log⁡n).
Editor:
Pierre Fraigniaud

1 Introduction

The minimum hitting set problem is one of Karp’s 21 classic NP-hard problems [24]. Given a set P of elements and a collection 𝒞={S1,…,Sm} of subsets of P, referred to as ranges, we need to find a set H⊆P (hitting set) of minimal size such that every set Si∈𝒞 contains at least one element of H. Motivated by numerous applications in VLSI design, resource allocation, and wireless networks, researchers have extensively studied the problem for geometric range spaces. In the geometric hitting set problem, we have P⊆ℝd for some constant dimension d, and the sets in 𝒞 are geometric objects of some type, such as balls, unit balls, simplices, hypercubes, or hyper-rectangles. Note that the minimum hitting set problem is dual to the minimum set cover problem in the abstract setting, but this duality in general does not extend to the geometric setting.

In this paper, we study the online hitting set problem for geometric objects. In the online geometric hitting set problem, the point set P is known in advance, while the objects in 𝒞 arrive one at a time (without prior knowledge). We need to maintain a hitting set Hi⊆P for the first i objects for all i≥1. Importantly, in the online model, points may be added to the hitting set as new objects arrive, but they cannot be removed (i.e., Hi⊆Hj for i≤j). Upon the arrival of a new object Si∈𝒞, any number of points can be added to the hitting set. Depending on whether P is finite [18, 20, 23, 26] or infinite [2, 14, 17, 19, 21, 22], there are different versions of the online geometric hitting set problem. In this paper, we consider P to be a finite set of points in ℝ2.

The quality measure for online algorithms is the competitive ratio, which quantifies the loss of performance due to irrevocable decisions made based on incomplete information. Let ALG be an algorithm for the online hitting set problem on an instance (P,𝒞). The competitive ratio of ALG, denoted by ρ⁢(ALG), is the supremum, over all possible input sequences σ, of the ratio between the size ALG⁢(σ) of the hitting set obtained by the online algorithm and the minimum size OPT⁢(σ) of a hitting set for the same input:

ρ⁢(ALG)=supσ[ALG⁢(σ)OPT⁢(σ)].

1.1 Related Previous Work

Alon et al. [3] initiated the study of the online hitting set problem and presented a deterministic algorithm with a competitive ratio of O⁢(log⁡|P|⁢log⁡|𝒞|) and obtained an almost matching lower bound of Ω⁢(log⁡|P|⁢log⁡|𝒞|log⁡log⁡|P|+log⁡log⁡|𝒞|). While their work addresses the general setting, Even and Smorodinsky [23] initiated the study of the online geometric hitting set problem for various geometric objects. They established an optimal competitive ratio of Θ⁢(log⁡|P|) when P is a finite subset of ℝ, and the objects are intervals in ℝ. They also established an optimal competitive ratio of Θ⁢(log⁡|P|) when P is a finite subset of ℝ2, and the objects are half-planes or congruent disks in the plane.

Later, Khan et al. [26] examined the problem for the special case of a finite set of integer points P⊆[0,N)2∩ℤ2 and a collection 𝒞 of axis-aligned squares S⊆[0,N)2 with integer coordinates, for N>0. They developed an O⁢(log⁡N)-competitive deterministic algorithm for this variant. They also established a randomized lower bound of Ω⁢(log⁡|P|), where P⊂ℝ2 is finite and 𝒞 consists of congruent axis-aligned squares. De et al. [18, 20] further investigated the problem for an arbitrary finite set P⊂ℝ2, where 𝒞 consists of homothetic geometric objects with scaling factors (e.g., diameters) in the interval [1,M] for some parameter M>0. In [18], they considered homothetic copies of a regular k-gon (for k≥4) and developed a randomized algorithm with expected competitive ratio O⁢(k2⁢log⁡M⁢log⁡|P|). Although regular k-gons can approximate disks as k→∞, this result does not imply a competitive algorithm for disks with radii in [1,M]. In [20], they addressed this gap by presenting an O⁢(log⁡M⁢log⁡|P|)-competitive deterministic algorithm for homothetic disks, and further generalized their result to positive homothets of any convex body in the plane with scaling factors in [1,M].

However, it remained an open problem whether the dependence on the parameter M is necessary, or whether there is an O⁢(log⁡|P|)-competitive online hitting set algorithm for arbitrary homothets of a polygon or for arbitrary disks in the plane. In fact, the full version of Khan et al. [26] posed this as an open problem specifically for axis-aligned squares.

1.2 Our Contribution

We present the first O⁢(log⁡n)-competitive algorithm for the online hitting set problem for a set P of n=|P| points and geometric objects of arbitrary sizes in the plane; Table 1 summarizes both previous and new results. Our algorithm works for axis-aligned squares of arbitrary sizes, and it generalizes to axis-aligned rectangles of bounded aspect ratio. The aspect ratio of a rectangle is the ratio of the length of the longer to that of the shorter side (e.g., the aspect ratio of a square is 1, and the aspect ratio of a 1×2 or a 2×1 rectangle is 2).

Table 1: Summary of known and new results for the geometric online hitting set problem where |P|=n for some n∈ℕ. (#) indicates lower bounds for randomized algorithms. The results presented in this paper are listed in the last three rows.
Finite Point Set Objects Lower Bound Upper Bound
P⊂ℝ Intervals in ℝ Ω⁢(log⁡|P|) [23] O⁢(log⁡|P|) [23]
P⊂ℝ2 Half-planes in ℝ2 Ω⁢(log⁡|P|) [23] O⁢(log⁡|P|) [23]
P⊂ℝ2 Congruent disks in ℝ2 Ω⁢(log⁡|P|) [23] O⁢(log⁡|P|) [23]
P⊆[0,N)2∩ℤ2 Axis-aligned squares with integral vertices Ω⁢(log⁡|P|) [26] (#) O⁢(log⁡N) [26]
P⊆[0,N)2∩ℤ2 Bottomless rectangles            (of the form [a,b]×(−∞,c]) Ω⁢(log⁡|P|) [23] O⁢(log⁡N) [20]
P⊂ℝ2 Positive homothets of an arbitrary convex body in ℝ2 with scaling factors in [1,M] Ω⁢(log⁡|P|) [26] (#) O⁢(log⁡M⁢log⁡|P|) [20]
P⊂ℝ2 Axis-aligned squares Ω⁢(log⁡|P|) [26] (#) O⁢(log⁡|P|)      [Theorem 1]
P⊂ℝ2 Axis-aligned rectangles of aspect ratio at most ϱ≥1 Ω⁢(log⁡|P|) [26] (#) O⁢((1+log⁡ϱ)⁢log⁡|P|)      [Theorem 1]
P⊂ℝ2 Positive homothets of a polygon with k≥3 vertices Ω⁢(log⁡|P|) [26] (#) O⁢(k2⁢log⁡|P|)      [Theorem 2]
Theorem 1.

For every ϱ≥1, there is an O⁢((1+log⁡ϱ)⁢log⁡n)-competitive deterministic algorithm for the online hitting set problem for any set of n points in the plane and a sequence of axis-aligned rectangles of aspect ratio at most ϱ.

We further generalize Theorem 1 to positive homothets of a polygon.

Theorem 2.

Let M be a polygon with k≥3 vertices. Then there is an O⁢(k2⁢log⁡n)-competitive deterministic algorithm for the online hitting set problem for any set of n points in the plane, and a sequence of positive homothets of M.

The previous best competitive ratio for these problems was O⁢(log2⁡n), by Alon et al. [3], which holds more generally for any collection of sets of polynomial size, including any collection of geometric objects of bounded VC-dimension. As noted above, De et al. [18] designed an O⁢(k2⁢log⁡M⁢log⁡n)-competitive randomized algorithm for homothets of regular k-gons with scaling factors in the range [1,M]. Theorem 2 provides a deterministic algorithm for homothets of arbitrary convex k-gons of arbitrary sizes. However, it is unclear whether the dependence on k is necessary. Even and Smorodinsky [23] asked whether there is an online hitting set algorithm with an O⁢(log⁡n)-competitive ratio for any set system on n points with bounded VC-dimension. Khan et al. [26] asked whether there is an O⁢(log⁡n)-competitive algorithm for the online hitting set problem with squares, as their algorithm is restricted to integer points in [0,N)2∩ℤ2 and it is O⁢(log⁡N)-competitive even if |P|≪N. Our result (Theorem 1) gives an affirmative answer to their question. It is unclear whether O⁢(log⁡n)-competitive online algorithms are possible for any other families of geometric set systems. In Section 6, we briefly discuss roadblocks to possible generalizations to disks (of arbitrary radii) in ℝ2 or to cubes in ℝ3, as well as possible extensions to the dual problem of online geometric set cover.

Technical highlights.

We present the key ideas for axis-aligned squares (of arbitrary size), since all technical tools readily generalize to axis-aligned rectangles of bounded aspect ratio. Recall that the point set P⊂ℝ2 is given in advance, that axis-aligned squares 𝒞={S1,S2⁢…} arrive one-by-one, and that we need to construct a hitting set H⊂P of size |H|≤O⁢(|OPT|⁢log⁡n) where OPT⊂P is an optimal hitting set for 𝒞. Each square Si∈𝒞 is hit by an unknown point p∈OPT in the offline optimum; we would like to add points to H that also hit many other potential squares that contain (the unknown) point p. Our general strategy is to preprocess P into a hierarchy of depth O⁢(log⁡n), and then use this hierarchy to narrow down the possible location of the points in OPT. In one dimension, where P⊂ℝ and 𝒞 is a sequence of intervals, a simple binary hierarchy is sufficient [23].

In the plane, we preprocess P⊂ℝ2 with the classical BBD tree data structure by Arya et al. [5], which has found a wide range of applications in computational geometry, including binary space partitions, range searching, and many other problems [1, 4, 5, 11, 25]; this data structure was previously used for the online geometric set cover problem by Khan et al. [26]. For a set P⊂ℝ2 of n points, the BBD tree is a hierarchical space partition of depth O⁢(log⁡n), where all cells of the partition are “fat” (in the sense defined below). When a square Si arrives online, we choose hitting points via a top-down traversal of the BBD tree. Specifically, we “activate” the O⁢(1) lowest inactive cells of the BBD tree that intersect Si (see Section 4 for details), and add O⁢(1) extremal points in each of these cells to H. The extremal points of a rectangular cell C are simply the leftmost, rightmost, topmost, and bottommost points in P∩C (i.e., extremal with respect to axis-parallel directions). Extremal points have previously been used in computational geometry for many different problems, including guarding set or shortest path problems [8, 10, 16, 30], as well as restricted versions of the online hitting set problem in combination with quadtrees [26].

Unfortunately, the cells in the BBD tree are not necessarily convex – they include rectangles with a rectangular hole – so we need to define extremal points much more carefully. The intersection Cv∩Si of a cell Cv of the BBD tree and a square Si can be reduced to axis-aligned half-spaces, and we show that Cv∩Si∩P is either empty or contains at least one extremal point of Cv (see Section 3.2 for details). Note that these techniques work for arbitrary axis-aligned fat rectangles (the fatness of a rectangle is quantified by the aspect ratio ϱ): extremal points in the four axis-parallel directions are sufficient if Si is an axis-aligned rectangle, and the intersection Cv∩Si reduces to halfplanes if both Cv and Si are fat.

Each (unknown) point p∈OPT is contained in O⁢(log⁡n) cells of the BBD tree. After O⁢(log⁡n) steps, in which a square Si arrives that contains the point p∈OPT but our algorithm adds O⁢(1) new points to H, the BBD tree is “saturated”, in the sense that all cells containing p are activated – at this point, the extremal points in H already hit any subsequent square Si that contains p. We prove that our algorithm uses only O⁢(log⁡n) points for any sequence of squares that can be optimally hit by a single point; see Section 4.2 for further details.

Relation to online set cover for squares.

Consider the online geometric set cover problem: given a set 𝒮 of n geometric objects in ℝd, and a sequence of points arriving one by one, we need to maintain a set cover Ci⊂𝒮 for the first i points in an online fashion. Note, however, that the hitting set and the set cover problems are not equivalent in the geometric setting: points in the plane form a 2-parameter family (parameterized by x- and y-coordinates), while axis-aligned squares form a 3-parameter family (parameterized by, e.g., a lower-left corner and a side length). In the online hitting set problem, the 2-parameter family is known in advance, and the 3-parameter family arrives without prior knowledge – the roles are reversed in online set cover. That is, an online hitting set algorithm makes decisions based on less information (i.e., more uncertainty) than an analogous online set cover algorithm. Importantly, these problems are not equivalent, and techniques developed for one problem do not easily carry over to the other. Khan et al. [26] studied a restricted version of the online set cover problem for axis-aligned squares. In their model, both a collection 𝒮 of m axis-aligned squares and a set P~ of n points are given in advance. Points from P~ arrive online, and we need to maintain a set of squares Ci⊂𝒮 that cover the first i points. Using a BBD tree decomposition over the point set P~, they obtain a deterministic O⁢(log⁡n)-competitive algorithm.

We remark that their result yields an O⁢(log⁡m)-competitive algorithm for the unrestricted version of the online set cover problem for axis-aligned squares (where P~ is not given in advance). An arrangement of m squares in the plane determines O⁢(m2) cells: points in the same cell are contained in the same subset of squares (they are combinatorially indistinguishable). We can define P~ as a set of O⁢(m2) representative points, one from each cell. When a sequence of arbitrary points p1,p2,… arrive online, we can replace each point pi with the representative of its cell, and invoke the algorithm by Khan et al. [26], with competitive ratio O⁢(log⁡|P~|)=O⁢(log⁡m2)=O⁢(log⁡m).

Organization.

Section 2 begins by introducing the necessary definitions and then reviews a classical space partition data structure, the Balanced Box Decomposition Tree (BBD tree) [6]. Section 3 presents several key properties of BBD trees. Section 4 describes our online algorithm for hitting axis-aligned rectangles, and analyzes its competitive ratio. Next, Section 5 generalizes the main result from axis-aligned squares to positive homothets of an arbitrary polygon. Finally, Section 6 concludes with a discussion of future research directions.

2 Notation and Preliminaries

Unless stated otherwise, the term object refers to a compact set in ℝd with a nonempty interior. Let σ denote such an object. For a scaling parameter λ∈ℝ and a translation vector b∈ℝd, the set λ⁢σ+b={λ⁢x+b:x∈σ} is called a homothet or homothetic copy of σ; and it is a positive homothet if λ>0.

BBD Trees.

Arya et al. [6] introduced the Balanced Box Decomposition Tree (BBD tree, for short), which is a binary space partition tree for a set of n points in ℝd. Since its introduction in the 1990s, BBD trees have become a widely used data structure for processing and classifying spatial data in computational geometry and related fields. In contrast to the quadtree (or compressed quadtree), the depth of the BBD tree is O⁢(log⁡n), and the nodes correspond to “fat” regions; the precise definition is given below.

Figure 1: The rectangle rin is not sticky for the rectangle rout in (a) and (b), and is sticky in (c) and (d).

For a set P of n points in an axis-aligned square (the bounding box), the BBD tree is a binary tree T, where the nodes correspond to regions, called cells (with the root corresponding to the bounding box). The parent-child relation corresponds to containment between the corresponding cells with the following properties:

  • ■

    Each node v∈V⁢(T) corresponds to a cell Cv=rout⁢(v)∖rin⁢(v), where rin⁢(v) and rout⁢(v) are axis-aligned rectangles such that rin⁢(v)⊂rout⁢(v), and where possibly rin⁢(v)=∅.

  • ■

    the aspect ratio of rout⁢(v) and rin⁢(v) (if rin≠∅) is at most 3;

  • ■

    if rin⁢(v)≠∅, then it is sticky, which means that the vertical (respectively, horizontal) distance between rin⁢(v) and the boundary of rout⁢(v) is either 0 or at least the side length of rin⁢(v). An equivalent condition for stickiness can be obtained by considering the regular grid consisting of 32 translated copies of rin⁢(v), centered around rin⁢(v). The rectangle rin⁢(v) is sticky for rout⁢(v) if and only if every copy of rin⁢(v) in this grid either lies entirely within rout⁢(v) or is disjoint from the interior of rout⁢(v), see Figure 1;

  • ■

    the cells {Cv:v∈V⁢(T)} form a laminar set system, that is, if u is a descendant of v, then Cu⊂Cv, otherwise int⁢(Cu)∩int⁢(Cv)=∅;

  • ■

    for each leaf node v∈V⁢(T), the region Cv contains at most one point of P.

Each internal node has exactly two children, generated by one of two operations: a fair split, which decomposes a cell Cv along an axis-parallel line into two cells, or a shrink, which introduces a new box R such that rin⁢(v)⊆R⊆rout⁢(v) and decomposes Cv=rout⁢(v)∖rin⁢(v) into rout⁢(v)∖R and R∖rin⁢(v). Furthermore, the number of nodes in T is O⁢(n), the depth of T is O⁢(log⁡n), and the entire structure can be constructed in O⁢(n⁢log⁡n) time [6].

3 A Rectangle amid Cells of the BBD Tree

In this section, we present some important properties of BBD trees and discuss the relative position of an arbitrary axis-aligned rectangle of bounded aspect ratio with respect to the cells of the BBD tree. These properties play a crucial role in the design and analysis of our algorithms in Sections 4 and 5.

3.1 Crossing Between Rectangles and Cells of the BBD Tree

Let T be a BBD tree for a finite point set P. We say that an axis-aligned rectangle R crosses a cell Cv, v∈V⁢(T), if Cv∩R≠∅ but Cv does not contain any vertex of R and R does not contain any vertex of Cv (i.e., vertices of rout⁢(v) and vertices of rin⁢(v) if any). See Figure 2 for examples.

Figure 2: In both (a) and (b), the rectangle R crosses the cell Cv, but R′ does not.
Lemma 3.

If R is an axis-aligned rectangle of aspect ratio at most ϱ, for some ϱ≥1, then it crosses O⁢(ϱ) interior-disjoint cells of a BBD tree.

Proof.

Let T be a BBD tree, and let U⊂V⁢(T) be a set of nodes that corresponds to a family of interior-disjoint cells crossed by R. Let v∈U. Recall that a cell of the BBD tree is defined as Cv=rout⁢(v)∖rin⁢(v), where rin⁢(v) may be empty. Depending on how R intersects with Cv, we distinguish between two cases.

Case 1: 𝑹 crosses 𝑪𝒗=𝒓𝐨𝐮𝐭⁢(𝒗)∖𝒓𝐢𝐧⁢(𝒗) and 𝑹 intersects two opposite edges of 𝒓𝐨𝐮𝐭⁢(𝒗).

Assume w.l.o.g. that R intersects two vertical edges of rout⁢(v) (i.e., R crosses rout⁢(v) horizontally); see Figure 2(a). Since the aspect ratios of R and rout are ϱ and at most 3, respectively, then we have

0⁢p⁢t⁢(R)≤ϱ⋅0⁢p⁢t⁢(R)<ϱ⋅0⁢p⁢t⁢(rout⁢(v))≤3⁢ϱ⋅0⁢p⁢t⁢(rout⁢(v)).

In particular, this implies 13⁢ϱ⁢0⁢p⁢t⁢(R)<0⁢p⁢t⁢(rout⁢(v)). Note also that 0⁢p⁢t⁢(R∩rout⁢(v))=0⁢p⁢t⁢(rout⁢(v)). If R horizontally crosses k interior-disjoint rectangles rout⁢(v1),…,rout⁢(vk), then

k3⁢ϱ⁢0⁢p⁢t⁢(R)<∑i=1k0⁢p⁢t⁢(rout⁢(vi))≤0⁢p⁢t⁢(R),

hence k≤3⁢ϱ. That is, R horizontally crosses at most 3⁢ϱ interior-disjoint cells. Similarly, R may cross at most 3⁢ϱ cells vertically. However, if R crosses a cell Cv horizontally and another cell Cw vertically, then int⁢(Cv)∩int⁢(Cw)≠∅. In particular, U cannot contain both v and w. Overall, R crosses at most 3⁢ϱ interior-disjoint cells in this case.

Case 2: 𝑹 crosses 𝑪𝒗=𝒓𝐨𝐮𝐭⁢(𝒗)∖𝒓𝐢𝐧⁢(𝒗) and 𝑹 intersects a pair of parallel edges in 𝒓𝐨𝐮𝐭⁢(𝒗) and 𝒓𝐢𝐧⁢(𝒗), respectively.

Assume w.l.o.g. that R intersects the left side of both rin⁢(v) and rout⁢(v); see Figure 2(b). Let distleft⁢(v) denote the distance between the left sides of rin and rout. Then we have 0⁢p⁢t⁢(R∩Cv)=distleft⁢(v), and in particular distleft⁢(v)<0⁢p⁢t⁢(R). Due to the stickiness, we also have 0⁢p⁢t⁢(rin)≤distleft⁢(v). Overall, we obtain

0⁢p⁢t⁢(R)≤ϱ⋅0⁢p⁢t⁢(R)<ϱ⋅0⁢p⁢t⁢(rin⁢(v))≤3⁢ϱ⋅0⁢p⁢t⁢(rin⁢(v))≤3⁢ϱ⋅distleft⁢(v).

By the pigeonhole principle, R crosses at most 3⁢ϱ interior-disjoint cells between the left sides of rin and rout. Similarly, R crosses at most 3⁢ϱ interior-disjoint cells between the right (respectively, top, bottom) sides of rin and rout. As a result, R crosses O⁢(ϱ) interior-disjoint cells in this case. ◀

3.2 Extremal Points and their Properties

For each node v of the BBD tree, we define a set Extv consisting of a constant number of extremal points in P.

  • ■

    For an axis-aligned rectangle r, let ext⁢(r) be a subset of P∩r that consists of a point with the minimum x-coordinate, maximum x-coordinate, minimum y-coordinate, and maximum y-coordinate (ties are broken arbitrarily).

  • ■

    If rin⁢(v)=∅ (that is, Cv=rout⁢(v)), then let Extv=ext⁢(rout⁢(v)); see Figure 3(a).

  • ■

    If rin⁢(v)≠∅, then we subdivide Cv=rout⁢(v)∖rin⁢(v) along the lines spanned by the four sides of rin⁢(v) into k, 2≤k≤9, rectangular regions Cv=⋃i=1kri and let Extv=⋃i=1kext⁢(ri); see Figure 3(b).

Figure 3: The extremal points Extv of the cell Cv are red, when (a) rin⁢(v)=∅; (b) rin⁢(v)≠∅.

Properties of extremal points.

We state a few properties of extremal points that will be used in the competitive analysis of our online algorithm in Section 4. Let P be a finite set of points in a bounding box (a square), and T be a BBD tree for P.

Figure 4: Illustration for (a) Lemma 4, and (b) Lemma 5.
Lemma 4.

Let r be an axis-aligned rectangle, and L− be a half-plane bounded by an axis-parallel line L. If P∩r∩L−≠∅, then ext⁢(r)∩L−≠∅.

Proof.

Assume w.l.o.g. that L is the vertical line x=a, for some a∈ℝ, and let L−={(x,y)∈ℝ2:x≤a} be the left half-plane; see Figure 4(a). We prove the contrapositive. If ext⁢(r)∩L−=∅, then every point p=(px,py)∈ext⁢(P) satisfies px>a. In particular, we have px>a for the leftmost point in P∩r, hence we have px>a for all points in P∩r. This implies that P∩r∩L−=∅, as required. ◀

Lemma 5.

Let Cv=rout⁢(v)∖rin⁢(v) be a cell (where rin⁢(v) may be empty), and L− be a half-plane bounded by an axis-parallel line L. If P∩Cv∩L−≠∅, then Extv∩L−≠∅.

Proof.

Assume w.l.o.g. that L is the vertical line x=a for some a∈ℝ, and let L−={(x,y)∈ℝ2:x≤a}; see Figure 4(b) for an illustration. We prove the contrapositive. Suppose that Extv∩L−=∅. Then every point of Extv has x-coordinate larger than a. Recall that Cv=⋃i=1kri. The leftmost point of P∩Cv is the leftmost point of P∩ri for some 1≤i≤k. This point is included in ext⁢(ri), and hence in Extv=⋃i=1kext⁢(ri). Consequently, Extv contains the leftmost point of P∩Cv. Then, all points of P∩Cv have x-coordinate larger than a. Hence, we have P∩Cv∩L−=∅, as required. ◀

Lemma 6.

Let Cv=rout⁢(v)∖rin⁢(v) be a cell, and S=L1−∩L2+ denote the intersection of two half-planes bounded by two horizontal lines or two vertical lines L1 and L2. If P∩Cv∩S≠∅ and S contains a corner of rin⁢(v), then Extv∩S≠∅.

Figure 5: Illustration for Lemma 6.

Proof.

Assume w.l.o.g. that L1 and L2 are the vertical lines x=a and x=b, respectively, for some a,b∈ℝ; see Figure 5 for an illustration. Let L1−={(x,y)∈ℝ2:x≤a} be the left half-plane. If L2+ is also a left half-plane, then L1−∩L2+ is a half-plane and Lemma 5 completes the proof. So we may assume that L2+={(x,y)∈ℝ2:x≥b} is the right half-plane, and b<a (since S=L1−∩L2+≠∅).

Assume that S contains a corner c=(c1,c2) of rin⁢(v). Recall that Cv is subdivided along the lines spanned by the sides of rin⁢(v). One of the subdivision lines is x=c1, where b<c1<a (since c∈S). Consequently, every subrectangle of Cv intersects at most one of L1 and L2.

Since P∩Cv∩S≠∅, there exists a point p∈P∩Cv∩S. Assume that p∈rx, where rx is one of the subrectangles of Cv. Since ext⁢(rx)∩S⊆Extv∩S and by Lemma 4, we have ext⁢(rx)∩S≠∅, thus we have Extv∩S≠∅. Hence, the lemma follows. ◀

Lemma 7.

Let Cv=rout⁢(v)∖rin⁢(v) be a cell, and let S=L1−∩L2+ be the intersection of two half-planes bounded by two perpendicular axis-parallel lines L1 and L2. If P∩Cv∩S≠∅ and L1∩L2∈rin⁢(v), then Extv∩S≠∅.

Figure 6: Illustration for Lemma 7.

Proof.

Assume w.l.o.g. that L1 is the vertical line x=a, and L2 is the horizontal line y=b for some a,b∈ℝ; see Figure 6 for an illustration. Let L1−={(x,y)∈ℝ2:x≤a} be the left half-plane and L2+={(x,y)∈ℝ2:y≥b} be the top half-plane; see Figure 6. Since L1∩L2=(a,b)∈rin⁢(v), then L1 intersects the subrectangles of Cv above and below rin(v); and L2 intersects the subrectangles of Cv to the left and right of rin⁢(v). In particular, none of the subrectangles in Cv intersects both L1 and L2.

Since P∩Cv∩S≠∅, there exists a point p∈P∩Cv∩S. Assume that p∈rx, where rx is one of the subrectangles of Cv. Since rx intersects at most one of L1 and L2, then rx∩S equals rx∩L1− or rx∩L2+. In both cases, by Lemma 4, we have ext⁢(rx)∩S≠∅. Now ext⁢(rx)⊆Extv implies that Extv∩S≠∅, as required. ◀

4 Online Algorithm and Competitive Analysis

In this section, we first prove Theorem 8. In Section 4.1, we present our online hitting set algorithm for axis-aligned rectangles of aspect ratio ϱ, for constant ϱ≥1. In Section 4.2, we analyze its competitive ratio, and then use this algorithm as a subroutine to prove Theorem 1.

Theorem 8.

For every ϱ≥1, there is an O⁢(ϱ⁢log⁡n)-competitive deterministic algorithm for the online hitting set problem for any set of n points in the plane and a sequence of axis-aligned rectangles of aspect ratio at most ϱ.

4.1 Online Algorithm

We now describe our online algorithm. Given a set P of n points in the plane, we compute a BBD tree T for P, and the set Hv of extremal points Extv⊂P for all nodes v∈V⁢(T). As the adversary presents a sequence of axis-aligned rectangles {S1,…,Sm} of aspect ratio at most ϱ, we maintain the following data structures:

A hitting set Hi⊂P for the first i rectangles {Sj:j≤i}, which is initialized to H0=∅. A set Ai⊂V⁢(T) of active nodes of T with the following property: If a node v∈V⁢(T) is active, then all ancestors of v are also active. Initially, all nodes are inactive (i.e., A0=∅); inactive nodes can become active, and any active node remains active for the remainder of the algorithm. Furthermore, we maintain the property that ⋃v∈AiExtv⊂Hi, i.e., Hi contains the extremal points of all active nodes (however, Hi may contain additional points as well).

When a rectangle Si arrives, initialize Hi:=Hi−1 and Ai:=Ai−1. If Si∩Hi≠∅, then no further changes are needed in our data structures. Suppose that Si∩Hi=∅.

  1. 1.

    Consider the four corners of Si.

    1. (a)

      For each corner a∈Croot, find the highest inactive node v∈V⁢(T) such that a∈Cv: activate v and its sibling v′ (set Ai:=Ai∪{v,v′}) and add their extremal points to Hi (set Hi:=Hi∪Extv∪Extv′).

    2. (b)

      For each corner a∉Croot, if the root of T is not already active, then activate the root and add its extremal points to Hi.

  2. 2.

    For every node u∈V⁢(T) where Si crosses Cu,

    1. (a)

      If u is already active but its children are not, then activate both children of u and add their extremal points to Hi.

    2. (b)

      If u is inactive, then find the highest inactive ancestor v of u (possibly v=u): activate v and its sibling v′ and add their extremal points to Hi.

  3. 3.

    If Si∩Hi=∅ still holds, then add an arbitrary point in Si∩P to Hi.

4.2 Competitive Analysis

The algorithm guarantees that Hi is a hitting set for the first i objects {S1,…,Si}. It is also clear that for each new object Si, we add O⁢(ϱ) new points to Hi: Since Si has four corners and crosses O⁢(ϱ) cells of the BBD tree by Lemma 3.

Let OPT⊂P be an offline optimum, i.e., a minimum hitting set for 𝒞={S1,…,Sm}. For each point p∈OPT, let 𝒞p={Sj∈𝒞:p∈Sj} be the set of objects hit by p. It is sufficient to show that for every p∈OPT, the algorithm adds new points to the hitting set in O⁢(log⁡n) steps to hit objects in 𝒞p (cf. Corollary 10). Since O⁢(ϱ) points are added to the hitting set in each such step, then the algorithm adds O⁢(ϱ⁢log⁡n) points in response to the objects in 𝒞p, and hence O⁢(|OPT|⋅ϱ⁢log⁡n) points in response to all objects in 𝒞.

Lemma 9.

If Si∈𝒞p and Si∩Hi−1=∅, then in step i, the algorithm activates a cell of the BBD tree containing p.

Proof.

The algorithm activates the root in step i=1. In the remainder of the proof, we may assume that i>1 and the root is already active. Before the arrival of Si, we have p∉Hi−1, so the leaf node of the BBD tree that contains p is inactive. Let v be the lowest active node in the BBD tree such that Cv contains p. Let u and w be the two children of v such that p∈Cu (hence p∉Cw).

We need to show that the algorithm activates u in step i. Suppose, for the sake of contradiction, that u is inactive at the beginning of step i. Then its sibling w is also inactive at that time (since our algorithm always activates two siblings).

The algorithm activates the highest inactive nodes that contain any of the four corners of Si (and their siblings), as well as the highest inactive nodes corresponding to every cell crossed by Si (and their siblings). Therefore, we may assume that neither Cu nor Cw contains any corner of Si, and neither of them is crossed by Si. Since Cv=Cu∪Cw, then Cv does not contain any corner of Si, either. If Si crosses Cv, then at the beginning of step i, node v is active but its children u and w are inactive, and so the algorithm would activate both u and w in step i. For this reason, we may also assume that Si does not cross Cv.

We examine all possible positions of Cv and Cu relative to Si. Recall that Cv=rout⁢(v)∖rin⁢(v), where rin⁢(v) may be empty.

Figure 7: Illustration of (a) Case 1; (b) Case 2a; (c) Case 2b; (d) Case 3a; (e) Case 3b; and (f) Case 4.

Case 1: 𝑺𝒊⊂𝒓𝐨𝐮𝐭⁢(𝒗); see Figure 7(a).

In this case, all four corners of Si are in rout⁢(v). If all four corners of Si are in rin⁢(v), then p∈Si⊂rin⁢(v), which contradicts the assumption that p∈Cv. Therefore, a corner of Si lies in rout⁢(v)∖rin⁢(v)=Cv. For this corner of Si, the highest inactive node is u or w. Consequently, the algorithm activates both siblings u and w. In particular, u is activated.

Case 2: 𝑺𝒊⊄𝒓𝐨𝐮𝐭⁢(𝒗) but 𝒓𝐨𝐮𝐭⁢(𝒗) contains some corner of 𝑺𝒊; see Figure 7(b-c).

Since Cv does not contain any corners of Si, then all corners of Si in rout⁢(v) are in rin⁢(v). Since Si⊄rout⁢(v), then rin⁢(v) contains either one or two corners of Si. We examine each case separately:

Case 2a: 𝒓𝐢𝐧⁢(𝒗) contains precisely one corner of 𝑺𝒊.

Assume w.l.o.g. that rin⁢(v) contains the lower-right corner of Si (as in Figure 7(b)). Denote by a the lower-right corner of Si. Then Si also contains precisely one corner of rin⁢(v), namely its upper-left corner. Since the remaining three corners of Si are outside of both rin⁢(v) and Cv, they are outside of rout⁢(v). Consequently, Si also contains precisely one corner of rout⁢(v), namely the upper-left corner of rout⁢(v). Since p∈Si∩Cv, then Lemma 7 yields Extv∩Si≠∅. However, Cv was activated in a previous step. This implies that Extv⊂Hi−1, hence Si∩Hi−1≠∅: a contradiction.

Case 2b: 𝒓𝐢𝐧⁢(𝒗) contains exactly two corners of 𝑺𝒊.

Recall that an axis-aligned rectangle Si crosses a cell Cv, for v∈V⁢(T) if Cv∩Si≠∅ but Cv does not contain any vertex of Si and Si does not contain any vertex of Cv. Consequently, Si crosses Cv: a contradiction.

Case 3: 𝒓𝐨𝐮𝐭⁢(𝒗) does not contain any corner of 𝑺𝒊, but it intersects some edges of 𝑺𝒊; see Figure 7(d-e).

Let a⁢b be an edge of Si that intersects Cv, where a and b are corners of Si. Since rout⁢(v) contains neither a nor b, then both a and b are outside of rout⁢(v), and so the two edges of Si orthogonal to a⁢b are also outside of rout⁢(v). Consequently, rout⁢(v) intersects one edge of Si or two parallel edges of Si.

Case 3a: 𝒓𝐨𝐮𝐭⁢(𝒗) intersects precisely one edge of 𝑺𝒊.

Assume w.l.o.g. that rout⁢(v) intersects the right edge a⁢b of Si; see Figure 7(d). Let L be the vertical line spanned by a⁢b, and let L− be the left half-plane determined by L. Note that p∈Si∩Cv implies p∈L−, so P∩Cv∩L−≠∅. Lemma 5 yields Extv∩Si≠∅. However, Cv was activated in a previous step. This implies that Extv⊂Hi−1, hence Si∩Hi−1≠∅: a contradiction.

Case 3b: 𝒓𝐨𝐮𝐭⁢(𝒗) intersects two parallel edges of 𝑺𝒊.

Assume w.l.o.g. that rout⁢(v) intersects the left and right edges of Si. If Si does not contain any corners of rin⁢(v), then Si does not contain any vertex of Cv, and so Si crosses Cv: a contradiction.

So we may assume that Si contains some corners of rin⁢(v). Lemma 6 yields Extv∩Si≠∅. However, Cv was activated in a previous step. This implies that Extv⊂Hi−1, hence Si∩Hi−1≠∅: a contradiction.

Case 4: 𝒓𝐨𝐮𝐭⁢(𝒗) lies in the interior of 𝑺𝒊; see Figure 7(f).

Since p∈P∩Cv, then P∩Cv≠∅, and so Extv≠∅. Since Cv is active, then Extv⊂Hi−1, and Cv⊂rout⁢(v)⊂Si implies that Extv⊂Si. Consequently, Hi−1∩Si≠∅: a contradiction. ◀

Corollary 10.

For every p∈OPT, the algorithm adds new points to the hitting set in O⁢(log⁡n) steps in which rectangles in 𝒞p arrive.

Proof.

Let 𝒞^p⊆𝒞p be the set of rectangles Si∈𝒞p for which the algorithm adds new hitting points to Hi (that is, any rectangle Si∈𝒞p∖𝒞^p contains p, but does not require new hitting points as Si∩Hi−1≠∅). By Lemma 9, the algorithm activates a cell containing p to hit each rectangle in 𝒞^p. In the BBD tree, the cells containing p correspond to a descending path from root to leaf. Since the depth of the BBD tree for n points is O⁢(log⁡n), there are O⁢(log⁡n) such cells, which implies that |𝒞^p|≤O⁢(log⁡n), as required. ◀ This completes the proof of Theorem 8. Now we have all the tools to prove Theorem 1.

Proof of Theorem 1.

Theorem 8 implies the claim if 1≤ϱ≤2. Assume that ϱ>2. Partition the incoming rectangles into O⁢(1+log⁡ϱ) classes: let ℛ0 be the set of rectangles of aspect ratio in [1,2], and for j=1,…,⌈log2⁡ϱ⌉, let ℛj be the set of rectangles of aspect ratio in (2j,2j+1]. Within each class, we further separate rectangles whose width is at least their height from those whose height exceeds their width, yielding 2⁢(1+⌈log2⁡ϱ⌉) classes in total. Applying the linear transformation (x,y)↦(x/2j,y) (respectively, (x,y)↦(x,y/2j)) to both P and the rectangles in the j-th class maps each rectangle to one with aspect ratio in [1,2]. Since the scaling is applied to both P and the rectangles, any hitting set for the original instance corresponds to a hitting set of the same size in the scaled instance. Furthermore, the size of an offline optimum for each class is at most |OPT|, the size of the offline hitting set of all rectangles. Running a separate instance of our online algorithm with ϱ=2 on each of the O⁢(log⁡ϱ) classes yields a hitting set of size O⁢(|OPT|⋅log⁡n) per class. Taking the union of the resulting hitting sets over all classes is a hitting set of size O⁢(|OPT|⋅(1+log⁡ϱ)⁢log⁡n). ◀

4.3 Runtime Analysis

It is not difficult to implement our online algorithm (Section 4.1) for n points in the plane with O⁢(n⁢log2⁡n) preprocessing time and O⁢(log⁡n) update time. It is known that the BBD tree can be computed in O⁢(n⁢log⁡n) time [6]. Recall that the BBD tree has depth O⁢(log⁡n), and the cells on each level are interior-disjoint. Consequently, the extremal points on each level can be computed using four sweep-line algorithms (one for each axis-aligned direction) in O⁢(n⁢log⁡n) time; and the extremal points of all cells can be computed in O⁢(n⁢log2⁡n) time.

We need several data structures to support our online algorithm. First, we need an orthogonal range searching data structure for P that reports a point in P∩Si for a query rectangle Si. The classical data structure by Chazelle [15] (see also [7, Chap. 5]) already achieves O⁢(n⁢log⁡n) preprocessing and O⁢(log⁡n) query time. Second, we need a semi-dynamic orthogonal range emptiness data structure for Hi that supports insertions and emptiness queries Hi∩Si=∅. The semi-dynamic data structure by Mehlhorn and Näher [27, Theorem 8] supports O⁢(log⁡n) insertion and query time. (We note that o⁢(log⁡n) amortized update and query time is possible in the word RAM model [12, 13, 28], i.e., in the rank space of the point set P, which distorts the aspect ratios of orthogonal ranges). Finally, we also augment the BBD tree with binary variables to indicate which cells are active.

When a rectangle Si arrives, we can test whether Hi∩Si=∅ in O⁢(log⁡n) time using the semi-dynamic range emptiness data structure for Hi. If Si requires new hitting points, we use the BBD tree to find the highest inactive cells containing the four corners of Si, as well as the highest inactive cells that cross Si, in O⁢(log⁡n) time. We can then activate these cells and their siblings, and add O⁢(1) extremal points to the hitting set in O⁢(1) time. If Si does not contain any of the new extremal points added Hi, we can find a suitable hitting point in P∩Si in O⁢(log⁡n) time using the orthogonal range reporting data structure for P. Finally, updating the semi-dynamic range emptiness data structure for Hi takes O⁢(log⁡n) time.

In the proof of Theorem 1, we run O⁢(1+log⁡ϱ) parallel instances of this online algorithm, each acting on distinct classes of rectangles. So the preprocessing time increases to O⁢(n⁢log2⁡n⁢(1+log⁡ϱ)) but the update time remains O⁢(log⁡n).

5 Generalizations to Positive Homothets of Polygons

In Section 4, we presented an O⁢(log⁡n)-competitive algorithm for the online hitting set problem with n points in the plane and axis-aligned squares (of aspect ratio ϱ=1). Axis-aligned squares are homothets of a unit square. Since a suitable linear transformation maps any parallelogram to a unit square, our result extends to positive homothets of any parallelogram.

Corollary 11.

For every parallelogram M in the plane, there is an O⁢(log⁡n)-competitive algorithm for the online hitting set problem for any set of n points in the plane and a sequence of positive homothets of M in the plane.

We further generalize Theorem 1 to positive homothets of polygons with k vertices.

Lemma 12.

Every polygon with k≥3 vertices is the union of at most 5⁢k−12 parallelograms.

Proof.

Every simple polygon M with k≥3 vertices admits a triangulation with k−2 triangles. In general, a polygon M with k≥3 vertices and h≥0 holes admits a triangulation with k+2⁢h−2 triangles [29, Lemma 5.2]. We have h≤k/3−1, as every hole as well as the outer boundary has at least 3 vertices. Therefore, M is the union of at most 5⁢k/3−4 triangles. Every triangle T is decomposed by its three medians into four congruent subtriangles: one containing the center of T, and three incident to each of the corners of T. The union of the central subtriangle and a corner subtriangle is a parallelogram; see Figure 8. Thus, T is the union of three parallelograms, and consequently M is the union of at most 3⁢(5⁢k/3−4)=5⁢k−12 parallelograms. ◀

Figure 8: A triangle is the union of three parallelograms.
Lemma 13.

Let T be a polygon that can be written as a union of k parallelograms. Then there is an O⁢(k2⁢log⁡n)-competitive deterministic algorithm for the online hitting set problem for any set P of n points and a sequence of positive homothets of T in the plane.

Proof.

Assume that T is the union of k parallelograms, i.e., T=⋃j=1kMj, where each Mj is a parallelogram. By Corollary 11, there is an O⁢(log⁡n)-competitive deterministic algorithm ALGj for the online hitting set problem for the same point set P and a sequence of positive homothets of the parallelogram Mj, for every j∈{1,…,k}.

Online algorithm.

We now describe a deterministic online algorithm for the point set P and a sequence T1,T2,… of positive homothets of T. For every i∈ℕ, we have Ti=ai⁢T+bi for some scaling factor ai>0 and translation vector bi∈ℝ2. Since T=⋃j=1kMj, then Ti=⋃j=1kMi,j, where Mi,j=ai⁢Mj+bi is a positive homothet of the parallelogram Mj.

We maintain a hitting set Hi⊂P for the first i homothets {Tℓ:ℓ≤i}. We initialize the algorithm ALGj for j=1,…,k, that each maintain a hitting set Hi,j⊂P for some subset of the first i parallelograms {Mℓ,j:ℓ≤i}. We also maintain the set Hi=⋃j=1kHi,j.

When a homothet Ti=ai⁢T+bi arrives, we initialize Hi:=Hi−1, and Hi,j:=Hi−1,j for all j=1,…,k. If Ti∩Hi≠∅, then no further changes are needed. Otherwise, we compute the parallelograms Mi,j=ai⁢Mj+bi for j=1,…,k. For each j=1,…,k, if P∩Mi,j≠∅, then we feed Mi,j to the algorithm ALGj, which in turn adds new points to Hi,j. Finally, we update Hi by setting Hi:=⋃j=1kHi,j. This completes the description of the algorithm.

Competitive analysis.

The algorithm guarantees that Hi is a hitting set for the first i objects {T1,…,Ti}. It is also clear that for each new object Ti, we add O⁢(k) new points to Hi: since each algorithm ALGj adds O⁢(1) points to Hi,j.

Let OPT⊂P be an offline optimum, i.e., a minimum hitting set for 𝒞={T1,…,Tm}. For each point p∈OPT, let 𝒞p={Ti∈𝒞:p∈Ti} be the set of objects hit by p. It is sufficient to show that for every p∈OPT, the algorithm adds O⁢(k2⁢log⁡n) points to Hi in response to the arrival of the objects in 𝒞p.

Let 𝒞p′ be a set of objects Ti∈𝒞p such that our algorithm adds new points to the hitting set in step i. Since our algorithm adds O⁢(k) points to the hitting set in each step, it is enough to show that |𝒞p′|≤O⁢(k⁢log⁡n). We further partition 𝒞p′ based on which parallelograms are hit by point p. For j=1,…,k, let 𝒞p,j′={Ti∈𝒞p′:p∈Mi,j, and ⁢p∉Mi,j′⁢ for ⁢j′<j}; and ℳp,j′={Mi,j:Ti∈𝒞p,j′}. By definition, 𝒞p′=⋃j=1k𝒞p,j′. Note that ℳp,i′ is a set of homothets of the parallelogram Mj that contain the point p∈P. By assumption, algorithm ALGj is O⁢(log⁡n)-competitive, and therefore adds O⁢(log⁡n) points to the hitting set in response to parallelograms in ℳp,j′. Recall that we feed a parallelogram Mi,j∈ℳp,j′ to ALGj only if object Ti has not been hit by Hi−1, and hence ALGj adds at least one new point to the hitting set in step i. Consequently, we have |ℳp,j′|≤O⁢(log⁡n). Overall, we obtain |𝒞p′|=∑j=1k|𝒞p,j′|=∑j=1k|ℳp,j′|≤O⁢(k⁢log⁡n), as required. Hence, the theorem follows. ◀

The combination of Lemmas 12 and 13 together immediately implies Theorem 2.

6 Conclusions

Our main result (Theorem 1) is an O⁢(log⁡n)-competitive algorithm for the online hitting set problem for n points in the plane, and a sequence of axis-aligned squares (or axis-aligned rectangles of bounded aspect ratio). This is the first online hitting set algorithm that is O⁢(log⁡n)-competitive for geometric objects of arbitrary sizes in the plane. Our result further generalizes to positive homothets of any simple k-gon for k≥3, and achieves an O⁢(k2⁢log⁡n)-competitive algorithm. Even though a disk can be approximated by a regular k-gon as k→∞, our generalized result does not imply any competitive algorithm for disks. Very recently, Bhore, Gupta and Kumar [9] presented a randomized online hitting set algorithm with O⁢(log⁡n) expected competitive ratio for n points and a sequence of pseudo-disks in the plane, including disks of arbitrary radii, or positive homothets of a convex polygon (with arbitrarily many vertices). It remains an open problem whether deterministic O⁢(log⁡n)-competitive algorithms are possible for these classes of geometric objects.

Does our result generalize to higher dimensions? Is there an O⁢(log⁡n)-competitive online hitting set algorithm for axis-aligned cubes of arbitrary sizes in ℝd for a constant dimension d? Is there one for d=3? While BBD trees generalize to ℝd, for any constant dimension d∈ℕ, our online algorithm does not generalize to (hyper-)cubes in d-space. The reason is that the extremal points (cf. Section 3.2) do not necessarily capture the intersection Cv∩R of a cell Cv of the BBD tree and an axis-aligned box. In the plane, we have shown that Cv contains a vertex of R, or Cv∩R is a crossing intersection, or Cv∩R behaves as an axis-aligned halfplane with respect to the sub-rectangles of Cv (Section 3.2). However, in ℝd, d≥3, it is possible that R contains exactly one edge of the cell Cv=rout⁢(v) and yet Cv∩R does not contain any of the extremal points of Cv. It remains open whether O⁢(log⁡n)-competitive algorithms are possible for geometric objects of arbitrary sizes in dimensions d≥3.

References

  • [1] Pankaj K. Agarwal, Kyle Fox, Kamesh Munagala, and Abhinandan Nath. Parallel algorithms for constructing range and nearest-neighbor searching data structures. In Proc. 35th ACM Symposium on Principles of Database Systems, (PODS), pages 429–440. ACM, 2016. doi:10.1145/2902251.2902303.
  • [2] Shanli Alefkhani, Nima Khodaveisi, and Mathieu Mari. Online hitting set of d-dimensional fat objects. In Proc. 21st International Workshop on Approximation and Online Algorithms, (WAOA), volume 14297 of LNCS, pages 134–144. Springer, 2023. doi:10.1007/978-3-031-49815-2_10.
  • [3] Noga Alon, Baruch Awerbuch, Yossi Azar, Niv Buchbinder, and Joseph Naor. The online set cover problem. SIAM J. Comput., 39(2):361–370, 2009. doi:10.1137/060661946.
  • [4] Sunil Arya, Theocharis Malamatos, and David M. Mount. Space-time tradeoffs for approximate nearest neighbor searching. J. ACM, 57(1):1:1–1:54, 2009. doi:10.1145/1613676.1613677.
  • [5] Sunil Arya and David M. Mount. Approximate range searching. Comput. Geom., 17(3-4):135–152, 2000. doi:10.1016/S0925-7721(00)00022-5.
  • [6] Sunil Arya, David M. Mount, Nathan S. Netanyahu, Ruth Silverman, and Angela Y. Wu. An optimal algorithm for approximate nearest neighbor searching fixed dimensions. J. ACM, 45(6):891–923, 1998. doi:10.1145/293347.293348.
  • [7] Mark de Berg, Otfried Cheong, Marc J. van Kreveld, and Mark H. Overmars. Computational Geometry: Algorithms and Applications. Springer, 3rd edition, 2008. doi:10.1007/978-3-540-77974-2.
  • [8] Mark de Berg, Haggai David, Matthew J. Katz, Mark H. Overmars, A. Frank van der Stappen, and Jules Vleugels. Guarding scenes against invasive hypercubes. Comput. Geom., 26(2):99–117, 2003. doi:10.1016/S0925-7721(03)00016-6.
  • [9] Sujoy Bhore, Anupam Gupta, and Amit Kumar. Improved Online Hitting Set Algorithms for Structured and Geometric Set Systems. In 42nd International Symposium on Computational Geometry (SoCG 2026), volume 367 of Leibniz International Proceedings in Informatics (LIPIcs), pages 14:1–14:14. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2026. doi:10.4230/LIPIcs.SoCG.2026.14.
  • [10] Srecko Brlek, Hugo Tremblay, Jérôme Tremblay, and Romaine Weber. Efficient computation of the outer hull of a discrete path. In Proc. 18th IAPR International Conference on Discrete Geometry for Computer Imagery (DGCI), volume 8668 of LNCS, pages 122–133. Springer, 2014. doi:10.1007/978-3-319-09955-2_11.
  • [11] Timothy M. Chan. Approximate nearest neighbor queries revisited. Discret. Comput. Geom., 20(3):359–373, 1998. doi:10.1007/PL00009390.
  • [12] Timothy M. Chan, Kasper Green Larsen, and Mihai Pătraşcu. Orthogonal range searching on the ram, revisited. In Proc. 27th Symposium on Computational Geometry, pages 1–10. ACM Press, 2011. doi:10.1145/1998196.1998198.
  • [13] 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.
  • [14] Moses Charikar, Chandra Chekuri, Tomás Feder, and Rajeev Motwani. Incremental clustering and dynamic information retrieval. SIAM J. Comput., 33(6):1417–1440, 2004. doi:10.1137/S0097539702418498.
  • [15] Bernard Chazelle. A functional approach to data structures and its use in multidimensional searching. SIAM J. Computing, 17(3):427–462, 1988. doi:10.1137/0217026.
  • [16] Danny Z. Chen and Haitao Wang. Computing L1 shortest paths among polygonal obstacles in the plane. Algorithmica, 81(6):2430–2483, 2019. doi:10.1007/S00453-018-00540-X.
  • [17] Minati De, Saksham Jain, Sarat Varma Kallepalli, and Satyam Singh. Online geometric covering and piercing. Algorithmica, 86(9):2739–2765, 2024. doi:10.1007/S00453-024-01244-1.
  • [18] Minati De, Ratnadip Mandal, and Satyam Singh. New lower bound and algorithms for online geometric hitting set problem. arXiv, 2024. doi:10.48550/arXiv.2409.11166.
  • [19] Minati De and Satyam Singh. Online hitting of unit balls and hypercubes in ℝd using points from ℤd. Theor. Comput. Sci., 992:114452, 2024. doi:10.1016/J.TCS.2024.114452.
  • [20] Minati De, Satyam Singh, and Csaba D. Tóth. Online hitting sets for disks of bounded radii. In Proc. 33rd European Symposium on Algorithms, (ESA), volume 351 of LIPIcs, pages 50:1–50:16. Schloss Dagstuhl, 2025. doi:10.4230/LIPIcs.ESA.2025.50.
  • [21] Adrian Dumitrescu, Anirban Ghosh, and Csaba D. Tóth. Online unit covering in Euclidean space. Theor. Comput. Sci., 809:218–230, 2020. doi:10.1016/J.TCS.2019.12.010.
  • [22] Adrian Dumitrescu and Csaba D. Tóth. Online unit clustering and unit covering in higher dimensions. Algorithmica, 84(5):1213–1231, 2022. doi:10.1007/S00453-021-00916-6.
  • [23] Guy Even and Shakhar Smorodinsky. Hitting sets online and unique-max coloring. Discret. Appl. Math., 178:71–82, 2014. doi:10.1016/J.DAM.2014.06.019.
  • [24] M. R. Garey and David S. Johnson. Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman, 1979.
  • [25] Ziyue Huang and Ke Yi. Approximate range counting under differential privacy. In Proc. 37th International Symposium on Computational Geometry (SoCG), volume 189 of LIPIcs, pages 45:1–45:14. Schloss Dagstuhl, 2021. doi:10.4230/LIPIcs.SoCG.2021.45.
  • [26] Arindam Khan, Aditya Lonkar, Saladi Rahul, Aditya Subramanian, and Andreas Wiese. Online and dynamic algorithms for geometric set cover and hitting set. In Proc. 39th Symposium on Computational Geometry (SoCG), volume 258 of LIPIcs, pages 46:1–46:17. Schloss Dagstuhl, 2023. See also https://arxiv.org/abs/2303.09524. doi:10.4230/LIPIcs.SOCG.2023.46.
  • [27] Kurt Mehlhorn and Stefan Näher. Dynamic fractional cascading. Algorithmica, 5(2):215–241, 1990. doi:10.1007/BF01840386.
  • [28] Christian Worm Mortensen. Fully dynamic orthogonal range reporting on RAM. SIAM J. Comput., 35(6):1494–1525, 2006. doi:10.1137/S0097539703436722.
  • [29] Joseph O’Rourke. Art Gallery Theorems and Algorithms. Oxford University Press, 1987. URL: https://www.science.smith.edu/˜jorourke/books/ArtGalleryTheorems/.
  • [30] Haitao Wang. A new algorithm for Euclidean shortest paths in the plane. In Proc. 53rd ACM SIGACT Symposium on Theory of Computing, (STOC), pages 975–988. ACM, 2021. doi:10.1145/3406325.3451037.