Load balancing under $d$-thinning

In the classical balls-and-bins model, $m$ balls are allocated into $n$ bins one by one uniformly at random. In this note, we consider the $d$-thinning variant of this model, in which the process is regulated in an on-line fashion as follows. For each ball, after a random bin has been selected, an overseer may decide, based on all previous history, whether to accept this bin or not. However, one of every $d$ consecutive suggested bins must be accepted. The maximum load of this setting is the number of balls in the most loaded bin. We show that after $\Theta(n)$ balls have been allocated, the least maximum load achievable with high probability is $(d+o(1))\sqrt[d]{\frac{d\log n}{\log\log n}}$. This should be compared with the related $d$-choice setting, in which the optimal maximum load achievable with high probability is $\frac{\log\log n}{\log d}+O(1)$.


Introduction
In the classical balls-and-bins model, m balls are sequentially allocated into n random bins, each selected uniformly and independently at random. This model has been extensively studied in probability theory, random graph theory, and computer science, and it has found many applications in various areas, such as hashing, load balancing, and resource allocation in parallel and distributed systems (see e.g., [2], [5], [6], [11], [12]).
The maximum load is defined as the number of balls in the fullest bin. When m ≥ n log n, the maximum load is known to be of m n + Θ m log n n with high probability (see, e.g., [10]). In [2], Azar, Broder, Karlin and Upfal studied the two-choice variant of the balls-and-bins model, in which for the allocation of each ball, an overseer has the freedom of making a choice between two bins, each selected independently and uniformly at random. They showed that for m = Θ(n), the greedy strategy of selecting the less loaded bin yields, with high probability, an optimal maximum load of log log n log 2 + O(1), an exponential improvement over the classical balls-and-bins model. Since then, this surprising phenomenon has found many algorithmic applications (see e.g. [7] and references therein).
In [3], with motivations from statistics, Dwivedi, the first author, Gurel-Gurevich and Ramdas considered the following two-thinning variant of the balls-and-bins model. In this setting, for each ball, after a uniformly random primary allocation has been suggested, an overseer may choose to either accept it, or allocate the ball into a new independent and uniformly random secondary allocation. Note that the overseer is oblivious to the secondary allocation before deciding whether to accept the primary allocation or not. Hence, the overseer has less choice in this variant than in the two-choice setting. Equivalently, the two-thinning setting could be described as allowing the overseer to discard allocations on-line as long as no two consecutive allocations are rejected (thus justifying the term two-thinning). This setup arises naturally in a statistical scenario in which one collects samples one-by-one and is allowed to decide whether to keep each sample or not, under the constraint that no two consecutive samples are discarded. In [3], the authors showed that the power of two-thinning could reduce the discrepancy of a sequence of random points independently and uniformly chosen from the interval [0, 1] to be near optimal. The authors also show that a weaker (1 + β)-thinning setting, where discarding is allowed with probability β < 1 independently for every sample whose predecessor was not discarded, also obtains near optimal discrepancy.
In [4], the first author and Gurel-Gurevich show that by setting a threshold and accepting the primary allocation if a ball is assigned to a bin in which the number of balls that already accepted their primary allocations is below this threshold, the overseer can achieve, with high probability, an optimal maximum load of (2 + o(1)) 2 log n log log n , a polynomial improvement over the one-choice setting. Observe that the two-choice setting with errors (i.e., with constant probability of placing a ball into the unselected bin) and the (1 + β)-thinning setting provide no asymptotic improvement over the one-choice setting (this follows from [9], see also [3]).
In [2], the d-choice setting, where the overseer is given d > 2 choices, was also considered. In this setting, the greedy algorithm yields an optimal maximum load of log log n log d + O(1) with high probability; that is, compared with the case d = 2, the performance only improves by a multiplicative factor for larger values of d.
This paper investigates the analogous d-thinning setting for d > 2, in which the overseer is allowed to reject up to d−1 consecutive allocations for each ball (see an equivalent description in the abstract). Our result is about the recovery and analysis of the optimality of the ℓthreshold strategy. This strategy rejects the i-ary allocation of a ball if this ball is assigned to a bin which already contains ℓ balls whose i-ary allocations have been accepted. More details on the ℓ-threshold strategy and its optimality are given in the next section. Our main result is the following. Clearly, the exponent of the maximum load in the d-thinning setting keeps improving as d grows, but it is never asymptotically better than that in the two-choice setting.
Interestingly, our threshold strategy was used by Adler, Chakrabarti, Mitzenmacher and Rasmussento [1] to obtain a similar tight upper bound (up to a constant factor) in the related model of parallel allocation (which is neither stronger nor weaker than the setting considered here). Nevertheless, we provide here a finer analysis of the threshold strategy and achieve an upper bound which is tight up to the 1 + o(1) factor.
The more challenging part is to prove the matching lower bound on MaxLoad f (⌊ρn⌋), which establishes the optimality of the d log n log log n 1/d -threshold strategy. This is achieved in Section 4, not by directly extending the argument in [4], but rather via a reduction lemma, which reduces a d-thinning problem to a (d − 1)-thinning problem. After d − 1 rounds of iteration, the original d-thinning problem is reduced to a one-thinning problem, which is an easy to handle problem in the classical balls-and-bins model.

Notation and definitions
Representation of the setting. Let {Z 1 (r)} r∈N ,· · · ,{Z d (r)} r∈N be d sequences of independent random variables, which are uniformly distributed on the set [n] := {1, 2, · · · , n}. Here {Z 1 (r)} r∈N is used as a pool of primary allocations, {Z 2 (r)} r∈N -as a pool of secondary allocations and, in general, {Z d (r)} r∈N -as a pool of d-ary allocations. Elements are drawn from these pools one by one as needed, so that if the overseer accepts the primary allocation Z 1 (1) of the first ball and rejects the primary allocation Z 1 (2) of the second ball, then the bin Z 2 (1) is offered as the secondary allocation for the second ball.
A d-thinning strategy. A d-thinning strategy f is a sequence of Boolean functions , which takes the final allocations of the first t − 1 balls and the i-ary allocation of the t-th ball, and returns 0 if this i-ary allocation is accepted and 1 if it is rejected. We also allow f t,i to implicitly depend on any external, potentially random data, as long as this data is independent from all future allocations. For completion we also define f t,d ≡ 0, which corresponds to the fact that in our setting, the d-ary allocation cannot be rejected. Let {Z(t)} t∈N denote final allocations assigned by f .
Towards obtaining a formal description of Z(t), set r 1 (t) = t and for i ∈ {2, · · · , d} inductively define Thus, r i (t) represents how many of the first t balls have their first i − 1 rounds of allocations rejected. For i ∈ [d] and r ∈ N, we define which is the unique time at which Z i (r) is used as an i-ary allocation. For t ∈ N, the function Chosen(t) determines which round allocation is accepted for the t-th ball, i.e., The final allocation assigned by f is now defined via .
Particularly, we have f 1 = f . The thinning strategy f j accepts or rejects the i-ary allocation of the r-th ball (with respect to f j ) according to the decision of f on the (i + j − 1)-ary allocation of the t j (r)-th ball (with respect to f ), i.e., the r-th ball whose first j −1 allocations we rejected. Observe that the (d−j+1)-thinning strategy f j , relies on information concerning the first j − 1 rounds of allocations assigned by f . This is still a valid strategy as these allocations are independent of future allocations from {Z k (r k (t))} k>j and {Z k (r)} k∈[d],r>r k (t) .
We also introduce the operation and observe that for all j ∈ [d − 1] we have (f j ) + = f j+1 .
Load analysis notation. For m ∈ [n] and t ∈ N, the load of bin m after t balls have been allocated is defined as Let L f i,m (r) be the number of balls that accept bin m as their i-ary allocations after t i (r) balls were allocated, i.e., The maximum load over a subset S ⊆ [n] after t balls have been allocated using the strategy f is defined as In addition, we define which is the number of non-empty bins in S after t balls were allocated, and which counts the number of bins in S offered as primary allocations in the process of allocating of t balls. For simplicity, we drop the subscript S when S = [n]. Asymptotic optimality. We say that a d-thinning strategy f is asymptotically optimal if for any other d-thinning strategy g, with high probability, as n tends to infinity we have Threshold strategy. The ℓ-threshold strategy for ℓ > 0 is the strategy f that accepts an allocation when the suggested bin contains no more than ℓ balls that were allocated in the i-ary allocations round, i.e., where ½(E) is the indicator function for the event E.
The following lemmata from [4] and [8] will be of use in our analysis. The first is a comparison bound relating the balls-and-bins model to independent Poisson random variables. We denote by Two additional lemmata from [4] provide concentration bounds for the maximum load over a subset of bins and on the number of bins with load above a certain level in the balls-and-bins process, respectively. , from which the upper bound in Theorem 1.1 is an immediate consequence. Our proof essentially follows from iterations of the argument in [4]. Observe that with this choice of ℓ, we have . For any ǫ > 0, there exists n 0 = n 0 (d, ρ, ǫ) such that for all n > n 0 , the ℓ-threshold strategy f satisfies Proof. By definition, the ℓ-threshold strategy guarantees that L f i,m (r) ≤ ℓ for all i ∈ [d − 1], m ∈ [n] and r ∈ N. Set L = (1 + ǫ)ℓ. We have We will upper bound this probability conditioned on the event that is chosen along the proof so that this event occurs with high probability. Using the law of total probability, we have P max Next, we define the sequence {β i } i∈ [d] in an iterative way such that the 2nd term of (13) is small. We set r 1 = ⌊ρn⌋ and β 1 = ρn. To define β 2 and upper bound P(r 2 > β 2 | r 1 ≤ β 1 ), we introduce independent Poissons {Y k } k∈[n] with parameter To make the right-hand side of the above inequality small, we set β 2 = 2nρ ℓ 1 /ℓ! and obtain Once β i−1 has been defined, we define β i and upper bound P(r i > β i | r i−1 ≤ β i−1 ) by repeating the above argument, replacing {Y k } k∈[n] with independent Poisson random variables with parameter ρ i−1 := β i−1 /n. Applying Lemma 2.1 to such variables we obtain Setting β i = 2nρ ℓ i−1 /ℓ!, this yields Putting together our definition of β i and ρ i , we obtain the recursive formula with β 1 = ρn. By solving this recursion we obtain Observe that 2/ℓ! > ℓ −(ℓ−1) when ℓ ≥ 3 (using the fact that all k ∈ N satisfy k! ≤ e √ k(k/e) k ). Thus for n ≥ 3 we have where the second and third inequalities hold when ℓ > max{2, 1/ρ}, and the last identity uses the observation ℓ ℓ d = n 1−o(1) as stated in (10). Since {β i } i∈[d] is a decreasing sequence, we deduce the following bound on the second term of (13).
To estimate the first term of (13), we consider {Y k } i∈[n] , a collection of independent Poisson random variables with parameter ρ d = β d /n and apply Lemma 2.1 to obtain P max Notice that Take a union bound to obtain P max where the identity follows from our definition ρ d = β d /n and the formular (14). Using the inequality k! ≥ √ 2πk(k/e) k for any k ∈ N, we have 2/L! < (e/L) L < 1 when ℓ > e and 2 ℓ!
Therefore, we end up with P max The second inequality holds automatically whenever ρe < 1. Otherwise, it holds for all n large enough to satisfy ǫ > log(ρe)/(log √ ℓ − log(ρe)) = Θ((log n − log log n) −1 ). The last inequality holds for all n large enough to satisfy ǫ > 7(log log log n − log d)/ log log n. The desired statement (11) now follows from (12), (13), (15) and (16). Remark 1. From the above proof, we see that the parameter ǫ is allowed to depend on n and Proposition 3.1 remains valid as long as ǫ > C log log log n/ log log n for an appropriate absolute constant C. Thus, with this choice of ǫ, the upper bound in Theorem 1.1 is an immediate consequence of Proposition 3.1.

MaxLoad lower bound: generic thinning strategies
In this section, we prove the following proposition, from which the lower bound in Theorem 1.1 is an immediate consequence.
Proposition 4.1. For any ǫ > 0, there exists n 0 = n 0 (d, ρ, ǫ) such that for all n > n 0 , any d-thinning strategy f satisfies We first prove a reduction lemma which reduces a d-thinning allocation problem to a (d − 1)-thinning problem. The above statement will follow from iterations of this thinning reduction lemma.
Let us consider the following more general problem of allocating ⌊γ⌋ balls into n bins using a d-thinning strategy f . Let s > 0 and let S ⊆ [n] be a subset. We denote by A f the event that the maximum load over S is less than s, i.e., Our goal is to upper bound the probability P A f . We divide the allocation process into ⌈s⌉ stages, each of which consists of allocating w = ⌊γ/s⌋ balls except for the final stage in which the remaining balls are allocated. We define the level sets S f k k=0,1,··· ,⌈s⌉ as where L f m (t), defined as per (5), represents the load of bin m after t balls have been allocated using a d-thinning strategy f . Given {γ k } k=0,1,··· ,⌈s⌉ , an arbitrary sequence with γ 0 = |S|, we introduce the following events Here, E f k is the event that after k stages there are less than γ k bins containing k or more balls, and F f k is the event that after k stages the maximum load over S is less than s. Recall that f + , defined as per (4), is the (d − 1)-thinning strategy induced from f . Our reduction argument utilizes the following events where ψ f S f k−1 (w) was defined in (9) as the number of bins in S f k−1 selected as primary slots in the allocation of w balls using the d-thinning strategy f . We require the following reduction lemma.
Proof. For simplicity, we write From the law of total probability, we obtain By induction, we thus have, where E 0 = ∅ as we set γ 0 = |S|. Notice that the size of S k is at least the number of bins in S k−1 which receive at least one ball in the k-th stage. Hence, we have where φ f S k−1 (w), defined in (8), is the number of non-empty bins in S k−1 after allocating w balls using our d-thinning strategy f . Using the inequality From the definitions of r 2 and f + in (1) and (4), respectively, it follows that Putting together (24), (25) and (26), we have This, together with (23), proves the reduction lemma.
where θ 1 = w 1 /n. We denote A 1,k 1 = A f 2 k 1 and B 1,k 1 = B f 1 k 1 , which are defined as per (21), using the fact that f + = f 2 . In these notations, the first subscript (also used as the subscript of k) indicates the first round of allocation (i.e., primary allocation). We apply Lemma 4.2 with aforementioned parameters γ, S, s and {γ 1,k 1 } k 1 ∈{0,··· ,⌈s 1 ⌉} to obtain Lemma 2.3 with θ = θ 1 and the set there S = S 1,k 1 −1 yields where the second inequality uses the fact that, under E c 1,k 1 −1 , we have |S 1,k 1 −1 | ≥ γ 1,k 1 −1 . This, together with (27), yields Our goal is therefore to upper bound P(A 1,k 1 ∩ E c 1,k 1 −1 ). This will be achieved by establishing an upper bound for P(A 1,k 1 ) analogous to (28), which involves the (d − 2)-thinning strategy f 3 instead of the (d − 1)-thinning strategy f 2 . We continue this thinning reduction procedure for (d − 1) rounds until the problem is reduced to the analysis of the 1-thinning strategy f d , which is a problem of deterministic computation.
We state the general step of the recursion as follows. In the i-th step, our task is to upper bound P(A i−1,k i−1 ). Analogous to (27), we apply Lemma 4.2 with the parameters γ = ⌊γ i−1,k i−1 ⌋, S = S i−1,k i−1 −1 , s = s i and {γ i,k i } k i ∈{0,··· ,⌈s i ⌉} to obtain Lemma 2.3 with θ = θ i and the set there S = S i,k i −1 yields where the second inequality again uses the fact that, under E c i,k i −1 , we have |S i,k i −1 | ≥ γ i,k i −1 . Analogous to (28), we have Putting together (28) and (31), we obtain We conclude the proof with the estimate of the right-hand side of (32). Firstly, we establish lower bounds for θ i and γ i,k i . Recall that γ 0,1 = ρn, , we iterate equations (29) and (30) to obtain (34) Denoteρ = min{1, ρ}. Towards obtaining a lower bound for θ i , we iterate (34) to obtain , and repeat this process with the simple fact s i+1 < (d − ǫ)ℓ (see (29)) to inductively verify that for i ≥ 2 we have
Next, we upper bound each term of the right-hand side of (32). We begin with the easier 2nd term.
The 2nd term of (32). Notice that θ i and γ i,k i are decreasing in both i and k i . Using the lower bounds (35) and (36), we have In the 3rd inequality, we use the inequality of arithmetic and geometric means, and the fact that d−1 j=1 (k j + 2) ≤ (d − ǫ)ℓ + 3(d − 1), which follows from s d = (d − ǫ)ℓ − d−1 j=0 (k j − 1) > 0. Observe that the quantity inside the exponential function is of order nℓ −ℓ d−1 and the fact that n ≥ ℓ ℓ d as stated in (10). Hence, the last identity holds for sufficiently large n depending on d and ρ but not ǫ.