The power of thinning in balanced allocation

Balls are sequentially allocated into $n$ bins as follows: for each ball, an independent, uniformly random bin is generated. An overseer may then choose to either allocate the ball to this bin, or else the ball is allocated to a new independent uniformly random bin. The goal of the overseer is to reduce the load of the most heavily loaded bin after $\Theta(n)$ balls have been allocated. We provide an asymptotically optimal strategy yielding a maximum load of $(1+o(1))\sqrt{\frac{8\log n}{\log\log n}}$ balls.


Introduction and results
Fix ρ > 0 and consider an online model in which an overseer is monitoring the sequential allocation of ρn balls into n bins. Each ball is assigned a primary allocation, i.e., an independent, uniformly chosen random bin. Then, the overseer is given the choice to reject this primary allocation, in which case the ball is assigned a secondary allocation instead, that is, a new, independent, uniformly chosen random bin. The overseer's decision may depend on all past allocations, but not any future information. The resulting sequence allocations is called a two-thinning of the balls-and-bins process.
A two-thinning strategy is a function determining whether to accept or reject each suggested allocation, depending on all previous allocations (See formal definition in Section 2). Denote by MaxLoad f t ([n]) the load of the most heavily loaded bin after the player allocates t balls into n bins, following the strategy f . A strategy f is asymptotically optimal if, for any strategy g with probability tending to one as n → ∞ we have MaxLoad f ρn ([n]) ≤ (1 + o(1)) MaxLoad g ρn ([n]).
Here we describe and analyse an optimal two-thinning strategy which we call the -threshold strategy. This is the two-thinning strategy which rejects a ball whenever the number of primary allocations to the suggested bin at the allocation time is at least . Our main result is the following, Theorem 1.1. Let f be the 2 log n log log n -threshold strategy for the allocation of ρn balls into n bins. Then f is asymptotically optimal and, with probability tending to one as n → ∞, 8 log n log log n .  [3] have shown that a significantly lower maximum load of log 2 log n + O(1) balls could be achieved, with high probability, in a two-choices setting, i.e., if the allocation of each ball is governed by an overseer who is offered a choice between two independent, uniformly chosen random bins. Moreover, the overseer can achieve this simply by following a naïve strategy of always selecting the less loaded of the two bins. Slight variations of this model, where the maximum load could be improved by a constant factor have also been considered, see [2,12]. The two-thinning setting, considered in this paper, is intermediate between twochoices and no-choice, as it is equivalent to a two-choices setting in which the overseer is oblivious of the location of one of the two available bins. The name "two-thinning" is due to yet another point of view on this setting. According to this view, an infinite sequence of allocations has been drawn independently and uniformly at random, and the overseer is allowed to thin it on-line (i.e., delete some of the allocations depending only on the past), as long as at most one of every two consecutive entries is deleted (for a more thorough discussion of the model see joint work with Ramdas and Dwivedi [6], where the model was introduced).
From Theorem 1.1 we see that the optimal maximum load under two-thinning is indeed intermediate between the maximum load without thinning and the maximum load in the two-choices setting.
Threshold strategy in other settings. The threshold strategy has been considered in additional settings. In [1], Adler, Chakrabarti, Mitzenmacher and Rasmussen applied this strategy to a model of parallel allocation with limited communications in the kchoices model. Their upper bound is O (log n/ log log n) 1/(k+1) -of the same order of magnitude as in Theorem 1.1. We remark that it appears that neither model is stronger than the other.
More choice. Already in [3], Azar et al. showed that allowing the overseer choice between k > 2 choices, reduces the asymptotic maximal load by a factor of log(k). The expected counterpart in the k-thinning setting, where we allow the overseer to iteratively reject up to k suggested allocations for each ball, is the following conjecture.

Conjecture 1.2.
In the k-thinning setting, the asymptotically optimal maximum load is Indeed, a matching upper bound has already been verified in [1]. More balls. Berenbrink, Czumaj, Steger and Vöcking [4] have considered the power of two choices in the heavily loaded case of the balls and bins model, that is, when ω(n) balls are allocated into n bins. They showed that in this case under the power of k-choices, the deviation of the maximum load from the average load is asymptotically almost surely log k log n + O(1) (see Talwar and Wieder [11], for a simpler proof). We wonder whether the same phenomenon will occur for two-thinning. Namely, Problem 1.3. In the two-thinning setting, where m = Ω(n) balls are two-thinned, is the asymptotically optimal maximum load m n + Θ log n log log n ? 1+β-thinning. In his thesis [7], Mitzenmacher suggested considering a variant of the power of two-choices in which, for each allocation independently, there is some small probability that a decision opposite to that made by the overseer will be executed. This notion was recently formulated and studied by Peres, Talwar and Wieder [9], viewing it as having two-choices with probability β and no-choice with probability (1 − β), independently for every ball. Once errors of this nature are introduced to the model, two-choices and one-retry are equivalent up to a parameter change, and in lightly loaded case of ρn balls allocated into n bins, both offer no improvement over having no-choice at all (see [6] for more details).

Definitions & notation
which, given the sequence of primary allocations up to time t, the sequence of final allocations up to time t − 1, and the sequence of previous decisions of whether to retry or not (up to time t − 1), decides whether to accept the primary allocation (indicated by 0) or reject it (indicated by 1).
Given a thinning strategy f , generate {D t } t∈N , {Z t } t∈N , the sequence of allocations, in the following way. Let {Z 0 t } t∈N and {Z 1 t } t∈N be two independent sequences of independent random variables uniformly distributed in [n]. Here Z 0 t represents the primary allocation of the t-th ball, while {Z 1 t } t∈N is used as a pool of secondary allocations. Denote by r t the number of rejections among the first t primary allocations.
Set r 0 = 0 and, for the t-th allocation, inductively set In other words, we look at the history of the process up to time (t − 1) and at Z 0 t and apply f to determine whether to accept or reject the primary allocation. If we reject it, we allocate the ball to the next unused secondary allocation from our pool, which is {Z 1 rt }. We introduce the following notation. For any t ≤ ρn, m ∈ [n] denote Thus, L t (m) is the load of the m-th bin at time t, A t (m) describes how many times bin m is suggested as a primary allocation among the first t allocations and B t (m) describes how many of the first t secondary allocations are into bin m.

Preliminaries
We take advantage of a comparison lemma of Mitzenmacher and Upfal, which we reproduce here, relating the balls-and-bins model with independent Poisson random variables. Denote by N 0 the set of natural numbers together with 0. Given two vectors We prove two useful corollaries of this lemma.

Upper bound on MaxLoad f ρn ([n])
For n ≥ 3, denote L = 2 log n/ log log n . Let f be the L-threshold strategy, i.e., that rejects the primary allocation of the t-th ball if and only if A t−1 (Z 0 t ) ≥ L. The main statement of this section is the following.  where E k is the event that there is a bin m for which B k (m) ≥ (1 + η)L. Notice that if E r occurs then for any 0 ≤ k ≤ ρn, either r > k or E k occurs. Hence, for any 0 ≤ k ≤ ρn we get P (E r ) ≤ P (r > k) + P (E k ) .

(4.2)
We now bound the two probabilities on the right hand side.
To bound P(r > k), notice that under the L-threshold strategy, the number of rejections before time t is For a single Poisson(ρ) random variable and for n large enough so that L > 2ρe, we have Hence, by Markov's inequality, for k ≥ 2nρ L L! we have, for n sufficiently large, where the last inequality follows from the definition L and the fact that for sufficiently large n we have L! < L L < √ n.
For k ≤ 3nρ L L! and n sufficiently large we have Taking a union bound, we obtain By Stirling's approximation for all L > 1 we have L! > 3 L e L . Hence, for any n ≥ n 0 (ρ) sufficiently large. Putting (4.5) and (4.7) into (4.2), the proposition follows.

Lower bound on
MaxLoad g ρn ([n]) for any strategy g Let = (n) = 2 log n/ log log n . In this section we prove the following proposition, from which the optimality of the threshold strategy in Theorem 1.1 is an immediate corollary.
To prove Proposition 5.1 we use the following lemma, whose contra-positive, roughly speaking, says the following. For any "large" set of bins S, under any strategy, after allocating ρn/2 balls, with relatively high probability the allocations will either include many bins in S (the event E c ) or quite a few of them will fall in the same bin in S (the event F c ). By iterating this lemma 2 times we'll be able to guarantee that, with high probability, either one of these iterations caused high load, or they piled up to cause it.
Lemma 5.2. Let ε, ρ > 0 and n sufficiently large (depending on ρ and ε) and denote ζ = ρ/8e . For any 1 ≤ k ≤ 2 , t > ρn/2 and S ⊂ [n] such that |S| ≥ nζ k and any strategy g, we have Proof. Write T = nζ k+1 and denote so that E is the event that less than 2T bins in S were suggested as primary allocations until time T , while F is the event that no bin in S would received (2 − ε) − k secondary allocations among the first T secondary allocations. By applying Lemma 3.3 with θ = ρ 2 and observing that 2T ≤ 2ζ|S| ≤ θ|S| 2e , we obtain Where in the rightmost inequality we used the fact that k < 2 . By applying Lemma 3.2 with a = (2 − ε) − k and θ = ζ k+1 , Letting n be large enough, and observing that for such n we have (a+1)(k+1) where the two rightmost inequalities use the fact that 2 ≥ n, while c 2 and are both sub-polynomial in n for any c > 0. We claim that E c ∩ F c ⊆ E c ∪ F c . Indeed, notice that if the number of retries is at most T and there are at least 2T bins in S which were chosen as the primary allocation, then there are at least T nonempty bins in S. Thus, {r t ≤ T } ∩ E c ⊂ E c . Also, if the number of retries is more then T , and the first T secondary allocations cause a load of at least (2 − ε) − k in some bin in S, then this bin has a load of at least (2 − ε) − k. Thus, {r t > T } ∩ F c ⊂ F c . Hence, E ∩ F ⊂ E ∪ F . From our bounds on P(E ) and P(F ) the proposition follows.
Proof of Proposition 5.1. Fix ε, ρ > 0 and let g be a thinning strategy. We divide our process into s = (2 − ε) stages each consisting of the allocation of w = ρn 2 balls so that the k-th stage process consists of Z (k−1)w+1 , . . . , Z kw . These are followed by a final stage in which the remaining balls are allocated. Denote S k = {m ∈ [n] : A kw (m) ≥ k}. For ζ = ρ/8e , we define E k = {|S k | < nζ k } and L k = {MaxLoad g kw < (2 − ε) }. By applying Lemma 5.2 to the k-th stage process with S = S k we obtain that P(E k+1 ∩ L k+1 | E c k ) ≤ exp(−n ε/4 ).
The see this, observe that the size of S k+1 is at least the number of bins in S k which were allocated at least one ball in the k-th stage process and that MaxLoad g (k+1)w is at least k plus the maximum number of balls that were allocated in the k-th stage process to a single bin in S k .
The power of thinning in balanced allocation Observe that L k+1 ⊆ L k we use the law of total probability to obtain P(E k+1 ∩L k+1 ) = P(E k+1 ∩L k+1 ∩E k )+P(E k+1 ∩L k+1 ∩E c k ) ≤ P(E k ∩L k )+P(E k+1 ∩L k+1 | E c k ) Since E 0 ∩ L 0 = ∅, we may use induction to deduce that for sufficiently large n we have, P (E s ∩ L s ) ≤ s k=1 P(E k ∩ L k | E c k−1 ) ≤ s exp(−n ε/4 ) ≤ exp(−n ε/5 ).