Abstract 1 Introduction 2 Notation and Definitions 3 Uniform Set Systems 4 Unweighted Online Hitting Set 5 Online Algorithm for Weighted Hitting Sets References

Improved Online Hitting Set Algorithms for Structured and Geometric Set Systems

Sujoy Bhore ORCID Department of Computer Science and Engineering, Indian Institute of Technology Bombay, India    Anupam Gupta ORCID Computer Science Department, New York University, NY, USA    Amit Kumar ORCID Department of Computer Science and Engineering, Indian Institute of Technology Delhi, India
Abstract

In the online hitting set problem, sets arrive over time, and the algorithm has to maintain a subset of elements that hit all the sets seen so far. Alon, Awerbuch, Azar, Buchbinder, and Naor (SICOMP 2009) gave an algorithm with competitive ratio O(lognlogm) for the (general) online hitting set and set cover problems for m sets and n elements; this is known to be tight for efficient online algorithms. Given this barrier for general set systems, we ask: can we break this double-logarithmic phenomenon for online hitting set/set cover on structured and geometric set systems?

We provide an O(lognloglogn)-competitive algorithm for the weighted online hitting set problem on set systems with linear shallow-cell complexity, replacing the double-logarithmic factor in the general result by effectively a single logarithmic term. As a consequence of our results we obtain the first bounds for weighted online hitting set for natural geometric set families, thereby answering open questions regarding the gap between general and geometric weighted online hitting set problems.

Keywords and phrases:
Hitting Set, Online Algorithms, Shallow-Cell Complexity, VC-Dimension
Funding:
Anupam Gupta: Supported in part by NSF awards CCF-2422926 and CCF-2608359.
Copyright and License:
[Uncaptioned image] © Sujoy Bhore, Anupam Gupta, and Amit Kumar; 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:
Full Version: https://arxiv.org/abs/2603.14293 [6]
Editors:
Hee-Kap Ahn, Michael Hoffmann, and Amir Nayyeri

1 Introduction

In the hitting set problem, we are given a set system =(U,), with ground set U and a collection of subsets of U; every element e has a cost ce. The goal is to select a minimum-cost subset SU that hits every set in . This problem has been a central one in algorithm design because of its many applications, and also because it serves as a test-bed for new techniques. The hitting set problem is equivalent to the set cover problem on a “dual” set system , which contains an element eS for each original set S, and a set Se for each element eU, such that eSeSSe; i.e., we flip the roles of U and . Henceforth, we focus on hitting set.

In the offline setting, the hitting set (or the set cover) problem has been widely studied, with (1±o(1))ln|U|-approximation algorithms in the worst-case, which are best-possible if PNP [20]. In addition, hitting set has also been extensively studied for special set systems – most notably, those with low VC-dimension or bounded shallow cell complexity (SCC) [12, 7, 18, 11, 10, 26, 8], which result in constant-factor approximations for set systems like pseudo-disks and half-spaces in 2. These measures of set complexity arise not only in geometric and combinatorial settings, but in non-geometric problems like job scheduling [4].

The progress for structured set systems in the online setting – where sets arrive over time, and must be hit as they arrive – has been more limited. While results are known for online hitting set (and set cover) for specific problems like intervals in or 2-dimensional squares (see [18, 21]), general techniques are not known. The offline algorithms use quasi-uniform sampling procedures [26, 8] or black-box algorithms to find ε-nets [18], which have seemed difficult to extend to the online setting. As far as we know, the results for geometric instances have been restricted to the unweighted versions of the problems, and the O(lognlogm)- competitiveness of [2] (where n=|U| and m=||) remains the only general result for weighted online hitting set, even for set systems with bounded VC dimension/SCC. We ask:

Can we achieve better competitive ratios for broad classes of set systems? Specifically, can we match the performance gains seen in structured offline settings?

1.1 Our Results

Our main results answer this question positively. Recall that the VC dimension of a set system is the largest set of elements that can be shattered. The shallow cell complexity φ(,) is a finer-grained notion, bounding the number of sets of size k in any restriction of the set system to elements.

The Unweighted Case.

For unit-cost instances, we adapt the offline Net-Finder algorithm [22] to the online setting to give improved algorithm for set systems with small shallow cell complexity (SCC) and VC dimension:

Theorem 1 (Unweighted Hitting Set).

There is a randomized online algorithm for (unweighted) hitting set that has competitive ratio O(logn(d+log(dφ(d𝖮𝖯𝖳logn,d)))), where φ(,) is the shallow cell complexity (SCC) and d the VC dimension of the set system.

We mention two corollaries of this work:

  1. (i)

    For set systems with “linear” SCC (i.e., where φ(,k)=poly(k)) and constant VC-dimension, the competitive ratio becomes O(logn). This gives hitting set and set cover algorithms for intervals in , lines and pseudo-disks – which includes disks and axis-aligned squares – in 2, and half-spaces in 3. (Table 1 gives the relevant bounds.) This result unifies and extends prior results for intervals, unit disks, and half-spaces [19], as well as for axis-aligned squares in 2 [21]. This resolves the open problem [19, §8, Prob. #1] regarding hitting sets for arbitrary (not necessarily unit) disks in 2 (see also [21, §6, Prob. #1]), and another open problem in [21, §6, Prob. #5] which asks for results for hitting squares using non-integral point sets.

  2. (ii)

    For set systems with VC-dimension d, we have φ(,k)d, and hence the competitive ratio becomes O(dlognlog(d𝖮𝖯𝖳logn)). Comparing this to the offline bound of O(dlog(d𝖮𝖯𝖳)), our online algorithm incurs only a near-logarithmic overhead.

The Weighted Case.

If elements have arbitrary non-negative costs, we do not know of any prior online algorithms, so our result extending [8] to the online setting gives the first algorithm for structured set systems in this weighted case. Here, we state a special case of our result – for the “linear” case where φ(,k)=poly(k) – and defer the more detailed result to Theorem 16.

Theorem 2 (Weighted Hitting Set).

There is a randomized online algorithm for weighted hitting set that has competitive ratio O(lognloglogn) for any set system with linear SCC.

This immediately extends the geometric results listed above in i to the weighted setting; to the best of our knowledge, these are the first results for weighted hitting set for these geometric instances. Our results for axis-aligned squares answers an open problem about weighted hitting sets from [21, §6, Prob. #4].

In both the unweighted and weighted cases, we lose nearly-logarithmic factors over the offline results: such a “price of uncertainty” is in line with typical losses for online vs. offline set cover. Moreover, such a logarithmic loss is unavoidable for the online setting, even for very structured set systems: [19] show a lower bound of Ω(logn) for online hitting intervals on a line; observe that we can get exact offline algorithms for this problem.

Table 1: Bounds on the SCC and VC dimensions of some primal/dual set systems from [23, 24]. Primal bounds give results for corresponding the hitting set problem, and dual bounds give results for the corresponding set cover problem. A triangle is α-fat if the ratio of the radius of the smallest enclosing ball to that of the largest inscribed ball is at most α.
Objects Primal Dual
φ(,k) VC-dim φ(,k) VC-dim
Intervals in O(k) 2 O(1) 2
Lines in 2 O(k) 2 O(k) 2
Pseudo-disks in 2 O(k) 3 O(k) O(1)
α-Fat triangles in 2 O(klogm/k+k/αlog21/α) 7
Half-spaces in 3 O(k2) 4 O(k2) 4

1.2 Our Techniques

We demonstrate that online relax-and-round approaches can be successfully combined with net-finding and quasi-uniform sampling offline algorithms to resolve open problems in the area. The first step in both the unweighted and weighted cases is to use an online algorithm for fractional hitting set, losing an O(logn)-factor in the competitive ratio. Starting from [18], we know that rounding a fractional solution reduces to finding an ε-net in a set-system, where each element e with fractional value xe is replaced by nxe clones. Since the fractional solution is feasible, each set in the original instance now contains at least n clones, so finding a hitting set in the original instance reduces to finding an ε-net (for ε=1/n) that hits all sets of size at least n in this new set system 𝒥. We start with the elegant algorithm of [22], which first samples each element with a certain base probability; now, for any large set T not hit by this sample, it selects elements of T independently with probability proportional to 1/|T| into the sample.

Carrying out this procedure in the online setting has two main issues: firstly, the fractional solution evolves over time, and the xe values may increase as sets arrive. As a result, if an element e is contained in sets S1 and S2, the number of clones of e in the corresponding sets in the new set system 𝒥 may be different, which affects the VC dimension and the SCC of 𝒥. Secondly, the initial sampling step in [22] requires knowledge of all the elements in the set system; but in the online setting, new clones of an element appear when its fractional value increases. We handle the first issue by showing that the VC dimension and the SCC of the new set system 𝒥 can be related to those of the original instance, and for the second issue, we replace the sampling step by a deferred sampling step.

The online algorithm for weighted hitting set adapts the quasi-uniform sampling algorithm of [8] to the online setting. This algorithm builds a chain of nested sets of clones, starting with the entire set V0 of clones, with each subsequent set V having size (1/2+δ) times the size of V1. Here δ is a small bias term, which ensures that most sets S of the hitting set instance have at least half their elements survive to the next level. Sets whose size falls below n/2 are said to be “dangerous” and must select a “backup” element to hit them. The choice of this backup element is done to ensure that no element is picked too often. Apart from the challenge of the new clones arriving online, finding the backups seems like an inherently offline problem, since it seems to require knowing the entire set system. However, we view the problem of finding backup elements as a load-balancing problem, and show how to choose backups that increases the probability by a logarithmic factor. Existing presentations of the algorithm also build the layers iteratively, discarding sets that are covered by each layer to get the set system for the next layer – we observe that these optimizations are inessential, and removing them allows a clean online implementation. (See Algorithm 4 in Section 5.)

1.3 Related Work

Offline.

Hitting set for geometric instances has been widely studied, see, e.g., [12, 7, 18, 11, 10, 26, 8]. The work of [7] gave an O(dlog(d𝖮𝖯𝖳))-approximation for the NP-hard hitting set problem in the offline case for set systems of VC dimension d. [18] reinterpreted their algorithm as first solving an LP relaxation for hitting set using multiplicative weights, and then rounding it using an ε-net algorithm. The use of shallow cell complexity in covering/hitting problems first appears in [11, 26], and was formally defined in [8]. These elegant papers gave the first results for weighted hitting set, where elements have costs, and the goal is to minimize the total cost of picked elements (as opposed to their cardinality); their approach is called quasi-uniform sampling. [1] extend the ε-net algorithm from [22] to the setting where the ε-net is in terms of element “sizes” and not their cardinality.

Online.

[19] studied (unweighted) online hitting set in geometric settings, and gave optimal Θ(logn)-competitive ratio for hitting intervals on a line, and half-planes and unit disks in the plane 2. Their techniques did not extend to arbitrary disks; [15] gave an O(lognlogM)-competitive algorithm for the setting where the disks have radii in [1,M]. Theorem 1 settles the question by giving an O(logn)-competitive algorithm for arbitrary disks.

[21] give an O(logn)-competitive algorithm for hitting set where the points are on the n×n-grid, and the arriving sets are axis-aligned squares S[0,n)2. A partial answer to avoiding integrality of the points was given in [14] who give an O(k2lognlogM)-competitive algorithm for homothetic copies of a regular k-gon for k4, with scaling factors in [1,M]. The above result of [15] extends this to positive homothets of any convex body in 2 with scaling factors in [1,M]. Theorem 1 settles the question for squares without any reliance on M; it remains unclear if our results can extend to positive homothets of convex bodies.

Our techniques do not seem to directly extend to the continuous setting (the “piercing set” problem), on which there is substantial work – see [9, 16, 17, 13]. Our techniques do not seem to give improved results for higher-dimensional covering/hitting problems (with the exception of hitting sets for half-spaces in 3), since the shallow-cell complexity φ(,k) of the associated set systems now depends polynomially on as well.

[5] give an O(log1/ε)-competitive algorithm to maintain online ε-nets for intervals and axis-aligned rectangles in the unweighted setting; since ε=1/𝖮𝖯𝖳, and we lose an O(logn) factor in solving the fractional relaxation, their work can be combined with our framework to infer an O(logn(log𝖮𝖯𝖳)2)-competitive algorithm for hitting axis-aligned rectangles. In contrast, our general result for bounded VC dimension set systems gives an O(lognlog(logn𝖮𝖯𝖳))-competitive algorithm.

2 Notation and Definitions

Hitting Set: Offline and Online.

eU has a cost ce0; the unweighted case is when ce=1 for all e. Let n=|U| and m=||. The LP relaxation for the hitting set problem is

minx[0,1]n{ecexeeSxe1S}; (1)

let 𝖫𝖯() denote the optimal value of this LP on instance . Restricting the variables to be Boolean gives us the optimal set cover value, denoted 𝖮𝖯𝖳(). Observe that 𝖫𝖯()𝖮𝖯𝖳().

In an online fractional hitting set instance, an adversary fixes the instance , as well as an ordering S1,S2,,Sm on the sets in ; let t:={S1,,St}. The algorithm knows the element set U in advance. At each time t[m], a set St arrives and reveals identities of the elements in it. The algorithm must now produce a solution {xet}eU, such that xt is a solution to the LP relaxation with instance t=(U,t). The solution must be monotonextxt+1 – in other words, elements cannot be dropped once they are picked. A (randomized) algorithm for this problem is α-competitive if 𝔼[eUcexem]α𝖮𝖯𝖳(), for every instance . If the solutions xt{0,1}n, then we have an algorithm for the online (integral) hitting set problem; we will denote the set of elements corresponding to xt by Ct.

Dual Set Systems.

The dual set system of the set system =(U,) is the set system =(F,), where we have a set E for every element e in U, an element s for every set S, and sEeS. The hitting set problem for the system is equivalent to the set cover problem on the dual system .

2.1 Shallow Cell Complexity

For a set system (U,) and a subset UU, denote the induced collection of sets as U:={SUS}.

Definition 3 (Shallow Cell Complexity).

A set system =(U,) is said to have shallow cell complexity (SCC) φ:+×++ if for any ,k+, and for any subset UU with |U|=, the number of distinct subsets of size at most k in U is at most φ(,k).

Crucially, the number of distinct sets in U is bounded by φ(,k) rather than the worst-case (k). If the VC dimension of the set system is d, the shattering lemma [25, Ch. 15] implies that φ(,k)(d)(e/d)d.

We focus on functions φ which are well-behaved, in the sense of [23].

Definition 4 (Well-Behaved SCC).

A function φ(,) is (a,b)-well-behaved for constants a(1,2) and b2 if it is non-decreasing in both arguments, and for all positive integers kb, we have φ(,k)(φ(/2,k/2))a.

Well-behavedness is easy to verify for the common case of φ(,k)=kc for some constant c0. Henceforth, our focus will be on such functions.

3 Uniform Set Systems

The first step of our approach is the following “uniformization” procedure, that takes any online algorithm 𝒜 for (fractional) hitting set, and some instance =(U,) with n elements and m sets, and produces a new instance 𝒥=(V,𝒢) with N:=n(n+1) elements and M:=m sets in an online manner. For each set Sj, we have a corresponding set Tj𝒢. For each element eU, there are at most n+1 “clone” elements {(e,i)i{0,,n}} in V, each of the same cost as that of e.

Recall that the sets in appear in the order S1,,Sm. The algorithm 𝒜 maintains a fractional solution xt at time t (i.e., after the arrival of the set St). Without loss of generality, we assume that the fractional values xet never exceed 1 – indeed, if these values ever exceed 1, we can reduce them to 1 without violating feasibility. The element-set containment is defined in Algorithm 1. When the set St arrives, the algorithm 𝒜 updates the fractional solution to xt. The solution xt is now used to define the elements in the corresponding set Tt in the instance 𝒥: Tt:={(e,i):eSt,inxet}.

Before analyzing this algorithm, we give a useful definition:

Definition 5 (Projection).

For a subset TV, define its projection, proj(T):={e:(e,i)T for some i}, as the set of elements in U whose clones are present in T.

Algorithm 1 Uniformize(,𝒜).
Theorem 6.

Suppose 𝒜 is a (deterministic) ρ-competitive online algorithm for fractional set cover. Given an instance =(U,), let Uniformize(,𝒜) generate the instance 𝒥=(V,𝒢). Then the instance 𝒥 satisfies the following properties:

  1. (i)

    Any solution for can be converted into a solution for 𝒥 of the same cost, and vice versa.

  2. (ii)

    Each set Tt𝒢 contains at least B:=n elements in 𝒢.

  3. (iii)

    NB(1+exe), where N denotes the number of elements in V contained in at least one set in 𝒢. Hence, in the unweighted setting, NB(1+ρ𝖮𝖯𝖳()).

  4. (iv)

    We have VCdim(𝒢)VCdim(), also φ𝒢(,k)kφ(,k).

Proof.

For the first claim, let UU be a solution to . Then, V:={(e,0):eU} is a solution to 𝒥. Conversely, if V is a solution to 𝒥, then proj(V) is a solution to . The second claim follows from the feasibility of xt. Indeed, for each set St, eStmin(xet,1)1. Therefore, eStnmin(xet,1)n. But the left-hand side above is exactly equal to |Tt|.

To prove property iii, observe that the number of clones of an element e is at most nxem+1. Summing over all elements, we see that Nn(exe+1). In the unweighted setting, exeρ𝖮𝖯𝖳().

For property iv, we first consider the VC dimension of 𝒢. Let VV be shattered by the sets in 𝒢. We first observe that V contains at most one clone corresponding to an element eU. Indeed, suppose V contains (e,i) and (e,i) for two distinct indices i<i. Now every set T𝒢 containing (e,i) also contains (e,i). Thus, there is no set in 𝒢 that contains (e,i), but does not contain (e,i), a contradiction. This implies that the corresponding set U={e:(e,i)V for some i} is also shattered by . Thus, VCdim(𝒢)VCdim().

Finally, we bound the SCC of the set system 𝒥. Fix two positive integers and k. Let V be a subset of V with |V|. Let 𝒢 be the distinct sets in 𝒢V of size at most k. Let U denote proj(V) and denote {proj(T):T𝒢}. Since |U| and each set in has size at most k, ||φ(,k).

Consider a set S and let 𝒢(S) be the collection of sets T𝒢 for which proj(T)=S. We claim that if T,T𝒢(S) then either TT or TT. Indeed, suppose T=TtV and T=TtV for some times t and t respectively. Assume w.l.o.g. that t<t. Then xetxet for each element e. Therefore, if (e,i)T, then eS. Therefore (e,i)T as well. This shows that TT. Since each of the sets in 𝒢(S) has at most k elements, we see that |𝒢(S)|k. Summing over all the sets S, we see that |𝒢|φ(,k)k. This shows that φ𝒢(,k)kφ(,k).

Since we can perform this “uniformization” process to go from to 𝒥 in an online fashion – and we can also convert solutions to 𝒥 back to solutions to online – we henceforth imagine working with the instance 𝒥, and want to hit every set of 𝒥 by picking one of the B elements in it.

4 Unweighted Online Hitting Set

In this section, we study the unweighted version of the online hitting set problem. Consider the instance 𝒥=(V,𝒢) generated by the Uniformize routine in Algorithm 1. We rely on the structural properties established in Theorem 6: there exists a subset VV of size |V|=N with the guarantee that each element in V is contained in at least one set in 𝒢. Moreover, each set in 𝒢 contains at least B elements, and our solution must hit this set. We first describe the offline algorithm of [23], and then extend it to an online algorithm.

4.1 The NetFinder Algorithm

We consider the following offline algorithm for finding ε-nets (see Algorithm 2) [23]. The algorithm maintains a subset H of V, which is initialized to the empty set. In the base sampling step (line 2), each element in V is added to H with probability α/B. In the alteration step (line 5), we consider each set Tt. While a set Tt is not yet hit by some element in H, we add each element in Tt to the set H independently with probability β/|Tt|.

Algorithm 2 Net-Finder-V1.

Let ε denote B/N. Since each set in 𝒢 has size at least B, any ε-net in the set system (V,𝒢) must hit all the sets in 𝒢. The following guarantee now follows from [23, Theorem 7.6]:

Theorem 7.

Assume that the set system 𝒢 has SCC φ𝒢 and VC dimension d. Define ε=B/N. For α=O(d+ln(dφ𝒢(O(d/ε),O(d))))O(1/ε) and β=O(d), the Net-Finder-V1 Algorithm picks O(1/ε)logφ𝒢(O(d/ε),O(d))+O(d/ε) elements in expectation.

4.2 Implementing NetFinder Online

We show how to implement Algorithm 2 online. There are two technical difficulties:

  1. (i)

    The parameter α used in Algorithm 2 depends on N (see Theorem 7). But in the online setting, elements contained in a set are revealed over time, and hence N changes over time. We address this using a standard doubling trick: we divide the execution into phases. In a single phase, the value of N lies in the range [2a,2a+1) for some non-negative integer a.

  2. (ii)

    The base sampling step in Algorithm 2 should not be performed for elements eVV. As observed above, the set V only gets revealed over time. Crucially, base sampling can be deferred: we sample an element eV only upon the arrival of the first set Tt containing it.

The algorithm, Net-Finder-V2, is given in Algorithm 3. First, we find the nearest power of 2 which is larger than N and define ε accordingly (line 3). Observe that the quantity α is a function of ε (as given in Theorem 7). The rest of the algorithm is essentially the same as Net-Finder-V1, but we perform base sampling on an element only when the first set containing it arrives. Thus, we classify the elements in V as being either fresh or stale; initially, each element is fresh. An element becomes stale when we encounter the first set containing it. The alteration steps are then done exactly as in Net-Finder-V1. It follows that the statement of Theorem 7 holds for this algorithm as well.

Algorithm 3 Net-Finder-V2.

4.3 The Final Algorithm

We now describe the online hitting set algorithm combining Algorithm 1 and Algorithm 3. If 𝒜 is an online algorithm for fractional hitting set and =(U,) an instance of the online hitting set, we use Algorithm 1 to obtain the instance 𝒥=(V,𝒢), such that each set St gives rise to set Tt𝒢. In each iteration t, Net-Finder-V2 maintains H as a valid hitting set for 𝒥 by potentially adding elements from Tt. Then, we recover the corresponding hitting set for by projecting the solution back, i.e., using the set proj(H). We get the following result:

Theorem 8.

Given an online ρ-competitive algorithm for fractional online hitting set, there is an online randomized algorithm for unweighted hitting set that has expected competitive ratio

O(ρd)+O(ρlog(dφ(ρd𝖮𝖯𝖳(),d)))

for any instance =(V,), where the set system has SCC φ and VC dimension d.

Proof.

We need to bound the expected size of proj(H). Since |proj(H)||H|, it suffices to bound 𝔼[|H|]. Consider a phase during the algorithm when N stays in the range [2a,2a+1) for some a. Observe that ε=B/2a+1.

Using the notation in Section 4.1, Theorem 7 implies that 𝔼[|H|] is at most

O(1/ε)logφ𝒢(O(d/ε),O(d))+O(d/ε)=O(2a+1/B)logφ𝒢(O(d2a+1/B),O(d))+O(d2a+1/B).

Summing over all a (which forms a series dominated by the last term) and using N to denote the final value of |V|, we see that the 𝔼[|H|] is at most

O(N/B)logφ𝒢(O(N/B),O(d))+O(dN/B).

Theorem 6 gives N/B1+ρ𝖮𝖯𝖳() and φ𝒢(,k)kφ(,k), and hence the proof.

Corollary 9.

Given an online ρ-competitive algorithm for fractional online hitting set, there is an online randomized algorithm for (unweighted) online hitting set that has expected competitive ratio O(dρlog(dρ𝖮𝖯𝖳())), if the input set system has VC dimension d.

Furthermore, if the SCC φ of the set system satisfies φ(,k)=poly(k), then the expected competitive ratio is O(dρlogd).

Proof.

If the set system has VC dimension d, then φ(,k)=O(d). Theorem 8 now implies the desired bound on the competitive ratio. The result for the case φ(,k)=poly(k) also follows from Theorem 8. Setting ρ=logn in Corollary 9 implies Theorem 1.

5 Online Algorithm for Weighted Hitting Sets

We now consider the weighted case of the hitting set problem on an online instance 𝒥=(V,𝒢). We use N=|V| to denote the size of the universe, and B=n to denote a lower bound on the size of each set in this instance. In lieu of the size guarantee, we give a per-element guarantee and show that each element eV which lies in at least one set is chosen with probability at most α/B, for some parameter α=α(N,B)1. We adapt the quasi-uniform sampling framework of [8] to the online setting. For convenience, we follow the exposition of that algorithm as presented in [23, Chapter 8].

5.1 Element Levels

The idea of the algorithm is natural: we construct a nested family of sets starting with V0=V, where each subsequent set V+1 is a uniformly random subset of size roughly (1/2+δ) times that of the previous set V, for a small “bias” term δ. The process ends at a level L with the corresponding set VL having size N/B. If we chose VL as our hitting set H, the probability of each element eH would be 1/B, as desired. As sets in 𝒢 are hit only with constant probability by VL, we require “alterations” (backups) to ensure validity.

We assume that φ𝒢 that is (a,b)-well-behaved for some positive constants a,b. (Recall Definition 4.) Let c1 be a large enough constant and assume Bc1. For brevity, define

N=c1N2B=B2. (2)

Now we can define the element levels as follows:

  1. 1.

    Define L to be the largest value [0,logB/c1] such that

    h𝒢(N,B)=(def.)8ln(BlogNφ𝒢(N,B))B1/2. (3)

    If L=0 (or if h𝒢(N0,B0)>1/2), we return V as the hitting set. Since we have L=logBc1 or h𝒢(NL,BL)>1/2, it follows that

    12L=O(1B+log(logNBLφ𝒢(NL,BL))B)=O(log(logNBLφ𝒢(NL,BL))B). (4)
  2. 2.

    Define V0=V. For each {0,1,,L1}, let V+1 be a random subset of V of size

    |V|(1/2+h𝒢(|V|,B)).
  3. 3.

    The level of element e is defined as the largest {0,1,,L} such that eV.

Since the elements of V are given up-front, we define subsets V before sets in 𝒢 arrive.

5.2 The Weighted Hitting Set Algorithm

Given the notion of element levels, the main idea of the algorithm of [8], is the following: for each set T𝒢, consider the first level where |TV| is smaller than B/2. If this (low-probability) bad event happens, we pick some element in T at level 1 to hit it (since |TV0|=|T|B, >0). The choice of this “backup” element is done consistently so that no element is chosen with too high a probability – showing such backup elements can be chosen is precisely where the small SCC of set system plays a role.

Algorithm 4 Offline Small SCC Hitting Set.

The algorithm (presented in 4) follows this outline: For each arriving set T of size at least B, and each level , we define a backup element, namely γ(T), that will hit it in case of the bad event happening at the next level. This bad event at level is that the size of TV is smaller than B/2. Since each arriving set T is of size at least B, it either experiences a bad event at some level {0,1,,L1}, or intersects the final set VL. It is now easy to check that the solution returned by the algorithm is feasible; the remaining part is to show that each element belongs to this hitting set with probability α/B for some suitable parameter α.

In order to implement this algorithm in an online fashion, we need to define the backup element in line 4 in an online fashion; we do this in the next section with only a small loss in performance over the offline setting.

5.3 Backup Elements and Consistent Rounding

The next lemma defines a good backup map that can be maintained online:

Lemma 10.

Consider a set system (X,). For any positive integers k and i, let i be the subsets in of sizes in [2ik,2i+1k). Then there exists a map γ:X such that γ(S)S for each S and for each integer i0, the number of sets from the subcollection i (i.e., the “scale-i” sets) mapped by γ to any element eX is at most

load(k,i):=φ(|X|,2i+1k)2i+1k.

Moreover, if the sets in arrive online, we can maintain such a map γ such that the number of sets assigned to each element is at most load(k,i):=log|X|load(k,i).

Proof.

The first part of the lemma is proved in [23, Lemma 8.18]. For the second claim, we do the following. Fix an integer i0. We build a map γi:iX online using a basic result about algorithms for online load-balancing: it says that if jobs arrive online and each job must be assigned to one of some subset of “valid” machines, then the greedy algorithm ensures that the number of jobs assigned to any machine is at most log#machines factor higher than the optimal maximum load [3]. In our setting, the jobs are sets from i and the machines are elements of X, which shows that the load of each element with respect to the sets in i is only logN worse than in γ. Finally, the map γ:X merely combines all these maps {γi} into one, completing the claim.

The following “bias” term will be crucial for the rest of the analysis:

h(,k):=8ln(klogφ(,k))k. (5)
Lemma 11.

Consider set system (X,) and a positive integer k such that |S|k for all S, and where h(|X|,k)1/2. Let YX be a uniformly random subset of size |X|(1/2+h(|X|,k)). Suppose the sets in are revealed online one by one. Let γ be the online mapping defined in Lemma 10. Then, defining

Q:={γ(S)S,|SY|<k/2}

gives us a set QX (which is maintained in an online fashion) such that

  1. (i)

    for each S, either |SY|k/2 or SQ, and

  2. (ii)

    each eX belongs to Q w.p. O(1/k2), where the probability is over the choice of Y.

Proof.

This proof follows that of [23, Lemma 8.13], the only differences are that (a) the procedure is performed online, and (b) the load of any element is higher by log|X| due to the online load balancing in Lemma 10. Accordingly, the second term h(|X|,k) in the sampling probability contains a term corresponding to log|X|, which helps to control the probability of any element being chosen into Q.

We now give a sketch of the proof. A Chernoff bound implies that if we pick a random subset YX of size |X|(1/2+δ) with δ1/2, any set S of size at least k has

Pr[|SY|<k/2]exp(|S|/2δ2). (6)

(See [6] for a proof.) As in the statement of Lemma 10, we partition into sets i based on the set sizes. Now we add an element e to Q if e=γ(S) for some set S and |SY|k/2. By a union bound, the probability of e being added to Q is at most

Pr[eQ] i0Si:γ(S)=ePr[|SY|<k/2]i0load(k,i)exp(2i1kh(|X|,k)2).
For brevity, define Λ:=log|X|. Using the definition of h(,k) in (5) and Lemma 10, we see that the above expression is at most
i02i+1kk2i+2Λφ(|X|,2i+1k)(Λφ(|X|,k))2i+2()i02i+1kk2i+2(Λφ(|X|,k))2(i+1)(Λφ(|X|,k))2i+21O(1/k2),

where inequality () used the fact that Λ=log|X|1, φ is (a,b)-well-behaved and that kb (we assume the constant in O(1/k2) is at least b2 and hence the upper bound on the probability of this event is trivial if k<b). This completes the proof of the lemma.

In summary, we know that for any set system (X,), if we pick a random subset Y of about half (plus some “bias” term h(|X|,k) that depends on the SCC and the extra load log|X|) of the elements, then most sets of size at least B have at least B/2 elements in common with Y, and moreover, each element eX is picked as a backup element (due to sets that have fewer than B/2 elements) with probability at most O(1/k2).

5.3.1 Defining backup maps in Algorithm 4

We can now use Lemma 10 to define the maps γ used in line 4 of Algorithm 4. Fix an index {0,,L1}. Consider the set system (V,𝒢) where 𝒢 is the collection of subsets T𝒢 for which |TV|B/2. We now use Lemma 10 with X=V,=𝒢 and k=B=B/2. We set γ to be the resulting online map γ:𝒢V. Observe that the set Q defined in Lemma 10 is same as the set Q defined in Algorithm 4. We show next that maps γ (and the resulting backup sets Q) ensure a low probability of picking elements.

5.4 Probability of Picking Elements

To bound the probability of selecting an element e in the hitting set constructed by Algorithm 4, we first relate h𝒢(N,B) for varying values of (See [6] for the proofs).

Claim 12.

For any <L we have h𝒢(N+1,B+1)2ah𝒢(N,B).

Claim 13.

For any L we have |V|c1N/2, and for each eV, Pr[eV]c12.

Theorem 14.

In Algorithm 4, each element eV is selected in the set H with probability at most O(1Blog(BLlogNφ𝒢(NL,BL))).

Proof.

Recall that if L=0, we return the entire set V as the solution (which clearly hits all sets of size at least B); using (4), we get

Pr[eH]=1O(log(BLlogNφ𝒢(c1N,N))B). (7)

Else, by a union bound, the probability that eH is

=0L1(Pr[eV]Pr[eQeV])+Pr[eVL]==0L1c12(B)2+c12L,

where we used Claim 13 and Lemma 11ii for the first expressions, and Claim 13 again for the second. Now simplifying using the definition (2) for the first term, and the inequality (4) for the second, we get

Pr[eH] c1B2=0L12+O(log(logNBLφ𝒢(NL,BL))B).

Finally, the geometric sum gives 2LBc1, and results in the claimed bounds.

5.5 The Algorithm for Weighted Hitting Sets

We now combine Algorithm 1 and Algorithm 4 to get an online weighted hitting set algorithm. We first give a simple observation about Algorithm 1 (See [6] for the proof).

Claim 15.

Let =(U,) be an instance of the weighted online hitting set problem. Then, Algorithm 1 can be implemented such that (let xe be the solution at the end of the instance) (i) ecexe4ρ𝖮𝖯𝖳(), (ii) if xet0 for any time t and element e, then xet1/n.

The online weighted hitting set algorithm is as follows: Algorithm 1 (with the changes in Claim 15) takes an instance =(U,) of the weighted hitting set problem and outputs an online instance 𝒥=(V,𝒢) (which has the properties stated in Theorem 6). Since the backup maps γ can be defined in an online manner, Algorithm 4 can be implemented on the instance 𝒥 in an online manner. This gives us an online hitting set H. The hitting set for is just proj(H). We now state the main result about the competitive ratio of this algorithm.

Theorem 16.

Given an online ρ-competitive algorithm for fractional online hitting set, there is a randomized (weighted) online hitting set algorithm with expected competitive ratio

O(ρlog(BLlognφ(NL,BL))).

Here L is the level associated with the instance (V,𝒢) as given by (3).

Proof.

Let e be an element in V. If e does not appear in any of the sets tTt, then it is not selected by Algorithm 4. Otherwise its selection probability is upper bounded by Theorem 14.

Consider an element eU (note that U is the ground set of the original instance ). We now bound the probability that it gets selected. Let xe be the final fractional value of e in Algorithm 1. If xe=0, then no clones of e appear in any of the sets in the instance 𝒢, and hence, none of these clones gets added to H in Algorithm 4. Therefore probability of e getting selected is 0. Now suppose xe>0. Claim 15 shows that xe1/n. Let Ye be the set of clones corresponding to e in the set V. In other words, Ye={(e,i):imin(1,nxe)}. Since xe1/n, |Ye|2nxe. Now, any clone (e,i) gets added to H with probability at most

O(1Blog(BLlogNφ𝒢(NL,BL))).

Therefore, the probability that any of the clones of e gets added to H is at most |Ye| times the above expression. Thus, the probability of selection of e is at most (recall that B=n)

O(log(BLlogNφ𝒢(NL,BL)))xe.

The desired result now follows from the fact that ecexe=4ρ𝖮𝖯𝖳 (using Claim 15), that N=O(n2) and that φ𝒢(NL,BL)BLφ(NL,BL) due to Theorem 6.

The guarantee of Theorem 16 depends on the value of L, which depends on the form of φ. We now apply the above result for the most interesting case: that of set systems with linear SCC, i.e., where φ(,k)=poly(k).

Corollary 17 (Linear SCC).

Suppose we are given an online ρ-competitive algorithm for fractional online weighted hitting set and the arriving instance =(U,), n:=|U|, satisfies φ(,k)=poly(k). Then there is an online randomized algorithm for (weighted) online hitting set that has expected competitive ratio O(ρloglogn).

Corollary 17, whose proof is deferred to the full version of the paper, implies Theorem 2.

References

  • [1] Sander Aarts and David B. Shmoys. Hitting sets when the shallow cell complexity is small. In Jaroslaw Byrka and Andreas Wiese, editors, WAOA, volume 14297 of Lecture Notes in Computer Science, pages 160–174. Springer, 2023. doi:10.1007/978-3-031-49815-2_12.
  • [2] 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.
  • [3] Yossi Azar, Joseph Naor, and Raphael Rom. The competitiveness of on-line assignments. J. Algorithms, 18(2):221–237, 1995. doi:10.1006/JAGM.1995.1008.
  • [4] Nikhil Bansal and Kirk Pruhs. The geometry of scheduling. SIAM Journal on Computing, 43(5):1684–1698, 2014. doi:10.1137/130911317.
  • [5] Sujoy Bhore, Devdan Dey, and Satyam Singh. Online epsilon net and piercing set for geometric concepts. In ICLR 2025, 2025. URL: https://openreview.net/forum?id=nNiWRRj6r9.
  • [6] Sujoy Bhore, Anupam Gupta, and Amit Kumar. Improved online hitting set algorithms for structured and geometric set systems. Preprint, abs/2603.14293, 2026. arXiv:2603.14293.
  • [7] Hervé Brönnimann and Michael T Goodrich. Almost optimal set covers in finite VC-dimension. In SoCG, pages 293–302, 1994. doi:10.1145/177424.178029.
  • [8] Timothy M. Chan, Elyot Grant, Jochen Könemann, and Malcolm Sharpe. Weighted capacitated, priority, and geometric set cover via improved quasi-uniform sampling. In SODA, pages 1576–1585. SIAM, 2012. doi:10.1137/1.9781611973099.125.
  • [9] 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.
  • [10] Chandra Chekuri, Kenneth L Clarkson, and Sariel Har-Peled. On the set multicover problem in geometric settings. ACM Transactions on Algorithms (TALG), 9(1):1–17, 2012. doi:10.1145/2390176.2390185.
  • [11] Kenneth L. Clarkson and Kasturi R. Varadarajan. Improved approximation algorithms for geometric set cover. Discret. Comput. Geom., 37(1):43–58, 2007. doi:10.1007/S00454-006-1273-8.
  • [12] KL Clarkson and Peter W Shor. Applications of random sampling in computational geometry, ii. Discrete & computational geometry, 4(5):387–422, 1989. doi:10.1007/BF02187740.
  • [13] 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.
  • [14] Minati De, Ratnadip Mandal, and Satyam Singh. New lower bound and algorithm for online geometric hitting set problem. In COCOON, volume 15983 of Lecture Notes in Computer Science, pages 234–247. Springer, 2025. doi:10.1007/978-981-95-0215-8_18.
  • [15] Minati De, Satyam Singh, and Csaba D. Tóth. Online hitting sets for disks of bounded radii. In ESA, volume 351 of LIPIcs, pages 50:1–50:16. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2025. doi:10.4230/LIPIcs.ESA.2025.50.
  • [16] 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.
  • [17] Adrian Dumitrescu and Csaba D. Tóth. Online unit clustering and unit covering in higher dimensions. Algorithmica, 2022. doi:10.1007/s00453-021-00916-6.
  • [18] Guy Even, Dror Rawitz, and Shimon Moni Shahar. Hitting sets when the VC-dimension is small. Information Processing Letters, 95(2):358–362, 2005. doi:10.1016/J.IPL.2005.03.010.
  • [19] Guy Even and Shakhar Smorodinsky. Hitting sets online and unique-max coloring. Discrete Applied Mathematics, 178:71–82, 2014. doi:10.1016/J.DAM.2014.06.019.
  • [20] Uriel Feige. A threshold of lnn for approximating set cover. J. ACM, 45(4):634–652, 1998. doi:10.1145/285055.285059.
  • [21] Arindam Khan, Aditya Lonkar, Saladi Rahul, Aditya Subramanian, and Andreas Wiese. Online and dynamic algorithms for geometric set cover and hitting set. In SoCG, pages 46–1, 2023. doi:10.4230/LIPIcs.SOCG.2023.46.
  • [22] Nabil H Mustafa. Computing optimal epsilon-nets is as easy as finding an unhit set. In ICALP, pages 87–1, 2019. doi:10.4230/LIPIcs.ICALP.2019.87.
  • [23] Nabil H Mustafa. Sampling in combinatorial and geometric set systems, volume 265. American Mathematical Society, 2022.
  • [24] Nabil H Mustafa and Kasturi Varadarajan. Epsilon-approximations & epsilon-nets. In Handbook of Discrete and Computational Geometry, pages 1241–1267. Chapman and Hall/CRC, 2017.
  • [25] János Pach and Pankaj K Agarwal. Combinatorial geometry. John Wiley & Sons, 2011.
  • [26] Kasturi Varadarajan. Weighted geometric set cover via quasi-uniform sampling. In STOC, pages 641–648, 2010. doi:10.1145/1806689.1806777.