---
abstract: 'We propose a natural process for allocating $n$ balls into $n$ bins that are organized as the vertices of an undirected graph $G$. Each ball first chooses a vertex $u$ in $G$ uniformly at random. Then the ball performs a local search in $G$ starting from $u$ until it reaches a vertex with local minimum load, where the ball is finally placed on. In our main result, we prove that this process yields a maximum load of only $\Theta(\log \log n)$ on expander graphs. In addition, we show that for $d$-dimensional grids the maximum load is $\Theta\Big( \big(\frac{\log n}{\log \log n}\big)^{\frac{1}{d+1}}\Big)$. Finally, for almost regular graphs with minimum degree $\Omega(\log n)$, we prove that the maximum load is constant and also reveal a fundamental difference between random and arbitrary tie-breaking rules.'
author:
- 'Paul Bogdan[^1]'
- 'Thomas Sauerwald[^2]'
- 'Alexandre Stauffer[^3]'
- 'He Sun[^4]'
bibliography:
- 'ballbin.bib'
title: Balls into Bins via Local Search
---

Introduction
============

It is well known that if each of $n$ balls is placed sequentially into one of $n$ bins chosen independently and uniformly at random, then the highest loaded bin is likely to contain $\Theta\big(\frac{\log n}{\log\log n}\big)$ balls. We call this process the $1$-choice process. Alternatively, in the $d$-choice process, each ball is allowed to choose $d$ bins independently and uniformly at random and is placed in the least loaded among the $d$ bins. It was shown by @ABKU99 and @KLH96 that the maximum load reduces drastically to $\Theta\big(\frac{\log\log n}{\log d}\big)$ in the $d$-choice process. The constants omitted in the $\Theta$ are known [@ABKU99] and can be improved by considering more careful tie-breaking rules as shown by @V03. @BCSV06 extended these results to the case where the number of balls is larger than the number of bins.

In some applications, it is important to allow each ball to choose bins in a *correlated* way. For example, such correlations occur naturally in distributed systems, where the bins represent processors that are interconnected as a graph and the balls represent tasks that need to be assigned to processors. From a pratical point of view, letting each task choose $d$ *independent* random bins may be undesirable, since the cost of accessing two bins which are far away in the graph may be higher than accessing two bins which are nearby. Furthermore, in some contexts, tasks are actually created by the processors, which are then able to forward tasks to other processors to achieve a more balanced load distribution. In such settings, allocating balls close to the processor that created it is certainly very desirable as it reduces the costs of probing the load of a processor and allocating the task.

We propose a very natural and simple process for allocating balls into bins that are interconnected as a graph. We refer to this process as *local search allocation*. At each step, a ball is “born” in a bin chosen independently and uniformly at random, which we call the *birthplace* of the ball. Then, starting from its birthplace, the ball performs a *local search* in the graph, where in each step the ball moves to the adjacent bin with the smallest load, provided that the load is strictly smaller than the load of the bin the ball is currently in. Unless otherwise stated, we assume that ties are broken uniformly at random. The local search ends when the ball visits the first vertex that is a *local minimum*, which is a vertex for which no neighbor has a smaller load. After that, the next ball is born and is allocated according to the procedure described above, and this process is repeated. See Figure \[fig:localsearch\] for an illustration.

=\[circle, color=black, inner sep=2pt, fill=black\] =\[line width=0.5pt\]

=\[circle, color=black, inner sep=2pt, fill=black\] =\[line width=0.5pt\]

(0.8,2) – (7,5); (1) at (1,2) \[label=below:$1$\]; (2) at (2,2) \[label=below:$2$\]; (3) at (3,2) \[label=below:$3$\]; (4) at (4,2) \[label=below:$4$\]; (5) at (5,2) \[label=below:$5$\]; (6) at (6,2) \[label=below:$6$\]; (7) at (3.5,1) \[label=below:$(a)$\]; (1) – (2) – (3) – (4) – (5) – (6); (1)++(0.33,2.85) to ++(0,-2.6) to ++(-0.7,0) to ++ (0,2.6); (2)++(0.33,2.85) to ++(0,-2.6) to ++(-0.7,0) to ++ (0,2.6); (3)++(0.33,2.85) to ++(0,-2.6) to ++(-0.7,0) to ++ (0,2.6); (4)++(0.33,2.85) to ++(0,-2.6) to ++(-0.7,0) to ++ (0,2.6); (5)++(0.33,2.85) to ++(0,-2.6) to ++(-0.7,0) to ++ (0,2.6); (6)++(0.33,2.85) to ++(0,-2.6) to ++(-0.7,0) to ++ (0,2.6);

[ (1,2.6) circle (.25cm) ]{}; [ (2,2.6) circle (.25cm) ]{}; [ (3,2.6) circle (.25cm) ]{}; [ (3,3.1) circle (.25cm) ]{}; [ (4,2.6) circle (.25cm) ]{}; [ (4,3.1) circle (.25cm) ]{}; [ (4,3.6) circle (.25cm) ]{}; [ (5,2.6) circle (.25cm) ]{}; [ (5,3.1) circle (.25cm) ]{}; [ (6,2.6) circle (.25cm) ]{}; [ (6,3.1) circle (.25cm) ]{}; [ (6,3.6) circle (.25cm) ]{};

(0.5,2) – (7,5); (1) at (1,2) \[label=below:$1$\]; (2) at (2,2) \[label=below:$2$\]; (3) at (3,2) \[label=below:$3$\]; (4) at (4,2) \[label=below:$4$\]; (5) at (5,2) \[label=below:$5$\]; (6) at (6,2) \[label=below:$6$\]; (7) at (3.5,1) \[label=below:$(b)$\]; (1) – (2) – (3) – (4) – (5) – (6); (1)++(0.33,2.85) to ++(0,-2.6) to ++(-0.7,0) to ++ (0,2.6); (2)++(0.33,2.85) to ++(0,-2.6) to ++(-0.7,0) to ++ (0,2.6); (3)++(0.33,2.85) to ++(0,-2.6) to ++(-0.7,0) to ++ (0,2.6); (4)++(0.33,2.85) to ++(0,-2.6) to ++(-0.7,0) to ++ (0,2.6); (5)++(0.33,2.85) to ++(0,-2.6) to ++(-0.7,0) to ++ (0,2.6); (6)++(0.33,2.85) to ++(0,-2.6) to ++(-0.7,0) to ++ (0,2.6); (4,4.1) – (3.2,3.7); (3,3.6) – (2.2,3.2); (4,5.5) – (4,4.4); (7) at (4,6.7) \[label=below:ball $i$\]; [ (1,2.6) circle (.25cm) ]{}; [ (2,2.6) circle (.25cm) ]{}; [ (2,3.1) circle (.25cm) ]{}; [ (3,2.6) circle (.25cm) ]{}; [ (3,3.1) circle (.25cm) ]{}; [ (3,3.6) circle (.22cm) ]{}; [ (4,2.6) circle (.25cm) ]{}; [ (4,3.1) circle (.25cm) ]{}; [ (4,3.6) circle (.25cm) ]{}; [ (4,4.1) circle (.22cm) ]{}; [ (5,2.6) circle (.25cm) ]{}; [ (5,3.1) circle (.25cm) ]{}; [ (6,2.6) circle (.25cm) ]{}; [ (6,3.1) circle (.25cm) ]{}; [ (6,3.6) circle (.25cm) ]{};

(0.5,2) – (7,5); (1) at (1,2) \[label=below:$1$\]; (2) at (2,2) \[label=below:$2$\]; (3) at (3,2) \[label=below:$3$\]; (4) at (4,2) \[label=below:$4$\]; (5) at (5,2) \[label=below:$5$\]; (6) at (6,2) \[label=below:$6$\]; (7) at (3.5,1) \[label=below:$(c)$\]; (1) – (2) – (3) – (4) – (5) – (6); (1)++(0.33,2.85) to ++(0,-2.6) to ++(-0.7,0) to ++ (0,2.6); (2)++(0.33,2.85) to ++(0,-2.6) to ++(-0.7,0) to ++ (0,2.6); (3)++(0.33,2.85) to ++(0,-2.6) to ++(-0.7,0) to ++ (0,2.6); (4)++(0.33,2.85) to ++(0,-2.6) to ++(-0.7,0) to ++ (0,2.6); (5)++(0.33,2.85) to ++(0,-2.6) to ++(-0.7,0) to ++ (0,2.6); (6)++(0.33,2.85) to ++(0,-2.6) to ++(-0.7,0) to ++ (0,2.6); (4.2,4.1) – (4.8,3.7); (4,5.5) – (4,4.4); (7) at (4,6.7) \[label=below:ball $i+1$\]; [ (1,2.6) circle (.25cm) ]{}; [ (2,2.6) circle (.25cm) ]{}; [ (2,3.1) circle (.25cm) ]{}; [ (3,2.6) circle (.25cm) ]{}; [ (3,3.1) circle (.25cm) ]{}; [ (4,2.6) circle (.25cm) ]{}; [ (4,3.1) circle (.25cm) ]{}; [ (4,3.6) circle (.25cm) ]{}; [ (4,4.1) circle (.22cm) ]{}; [ (5,2.6) circle (.25cm) ]{}; [ (5,3.1) circle (.25cm) ]{}; [ (5,3.6) circle (.25cm) ]{}; [ (6,2.6) circle (.25cm) ]{}; [ (6,3.1) circle (.25cm) ]{}; [ (6,3.6) circle (.25cm) ]{};

(0.5,2) – (7,5); (1) at (1,2) \[label=below:$1$\]; (2) at (2,2) \[label=below:$2$\]; (3) at (3,2) \[label=below:$3$\]; (4) at (4,2) \[label=below:$4$\]; (5) at (5,2) \[label=below:$5$\]; (6) at (6,2) \[label=below:$6$\]; (7) at (3.5,1) \[label=below:$(d)$\]; (1) – (2) – (3) – (4) – (5) – (6); (1)++(0.33,2.85) to ++(0,-2.6) to ++(-0.7,0) to ++ (0,2.6); (2)++(0.33,2.85) to ++(0,-2.6) to ++(-0.7,0) to ++ (0,2.6); (3)++(0.33,2.85) to ++(0,-2.6) to ++(-0.7,0) to ++ (0,2.6); (4)++(0.33,2.85) to ++(0,-2.6) to ++(-0.7,0) to ++ (0,2.6); (5)++(0.33,2.85) to ++(0,-2.6) to ++(-0.7,0) to ++ (0,2.6); (6)++(0.33,2.85) to ++(0,-2.6) to ++(-0.7,0) to ++ (0,2.6); (3,5.5) – (3,3.9); (7) at (3,6.7) \[label=below:ball $i+2$\]; [ (1,2.6) circle (.25cm) ]{}; [ (2,2.6) circle (.25cm) ]{}; [ (2,3.1) circle (.25cm) ]{}; [ (3,2.6) circle (.25cm) ]{}; [ (3,3.1) circle (.25cm) ]{}; [ (4,2.6) circle (.25cm) ]{}; [ (4,3.1) circle (.25cm) ]{}; [ (4,3.6) circle (.25cm) ]{}; [ (5,2.6) circle (.25cm) ]{}; [ (5,3.1) circle (.25cm) ]{}; [ (5,3.6) circle (.25cm) ]{}; [ (3,3.6) circle (.25cm) ]{}; [ (6,2.6) circle (.25cm) ]{}; [ (6,3.1) circle (.25cm) ]{}; [ (6,3.6) circle (.25cm) ]{};

In this paper we analyze the asymptotic behavior of the maximum load obtained when $n$ balls are allocated to $n$ bins as $n\to\infty$. The main question is whether the local search allocation ensures a small load amount like the $d$-choice process with $d {\geqslant}2$. Our main result gives a positive answer for the important case where the $n$ balls are allocated to $n$ bins which are organized as the vertices of an *expander* graph. We show, in this case, that the maximum load is $\Theta(\log \log n)$, which has the same order of magnitude as of the $d$-choice process (refer to Theorem \[thm:expander\] for a more general statement of [Theorem \[thm:main\]]{} below).

\[thm:main\] Let $G$ be any expander graph with constant maximum degree. Then, as $n\to\infty$, the maximum load after $n$ balls are allocated is $\Theta(\log \log n)$ with probability $1-o(1)$.

\[rem:tiebreaking\][ Theorem \[thm:main\] holds also when ties are not broken uniformly at random but by means of a fixed permutation. In this tie-breaking procedure, for each vertex $v\in V$, we associate an arbitrary permutation $\xi_v$ of the neighbors of $v$. Then, whenever a ball is currently at $v$ during its local search, the ball breaks ties by using the order in the permutation $\xi_v$. With this tie-breaking procedure, the local search allocation is a *deterministic* function of the birthplaces of the balls and the permutations $\{\xi_v\}_{v\in V}$. ]{}

Before discussing and comparing our main result with existing results, we proceed to state our other results. Recall that, unless otherwise stated, we assume that in the local search allocation ties are broken uniformly at random. An important instance for applications is when the bins are organized as a ring or a grid. The theorem below establishes the maximum load in this case up to constant factors.

\[thm:torus\] Let $G$ be any $d$-dimensional grid graph, where $d{\geqslant}1$ is any integer constant. Then, as $n\to\infty$, the maximum load after $n$ balls are allocated is $\Theta\left( \Big(\frac{\log n}{\log \log n}\Big)^{\frac{1}{d+1}}\right)$ with probability $1-o(1)$.

In comparison to [Theorem \[thm:main\]]{}, the above theorem shows that the maximum load can be quite high on graphs with small expansion. Besides the expansion, it is also conceivable that a large degree ensures a small maximum load. The next theorem confirms this intuition by showing that a constant maximum load is obtained for any almost regular graph with minimum degree $\Omega(\log n)$, where a graph is *almost regular* if the ratio between the minimum and maximum degrees is a constant. This class of graphs includes hypercubes and Erdős-Rényi random graphs with average degree $(1+{\varepsilon})\log n$, for any ${\varepsilon}>0$.

\[thm:dense\] Let $G$ be any almost regular graph with minimum degree $\Omega(\log n)$. Then, as $n\to\infty$, the maximum load after $n$ balls are allocated is ${\mathcal{O}}(1)$ with probability $1-o(1)$.

In the next two theorems, we do not restrict the local search allocation to break ties uniformly at random. In particular, we show that deviating from the usual random tie breaking rule can dramatically increase the maximum load. Here, as in Remark \[rem:tiebreaking\], we define a tie-breaking rule as a collection of variables $\{\xi_v\}_{v\in V}$, where each $\xi_v$ is a permutation of the neighbors of $v$.

\[thm:tiebreaking\] For any $d=\omega(1)$ as $n \rightarrow \infty$, there is a $d$-regular graph and a choice of $\{\xi_v\}_{v\in V}$ for which the maximum load after $n$ balls are allocated is at least $\Omega\big( \min \big\{ d^{1/4}, \frac{\log n}{\log d} \big\}\big)$ with probability $1-o(1)$.

To highlight the difference between random tie breaking and arbitrary tie breaking, Theorem \[thm:tiebreaking\] establishes that there exists a $d$-regular graph $G$ with $d=\Theta(\log n)$ and a tie-breaking rule for which the maximum load in $G$ is $\Omega((\log n)^{1/4})$. On the other hand, by Theorem \[thm:dense\] we have that breaking ties uniformly at random leads to a constant maximum load in $G$.

Our final result establishes some lower bounds on the maximum load. These lower bounds hold for arbitrary tie-breaking rules.

\[thm:lowerbounds\] For any graph with maximum degree $\Delta$, the maximum load after $n$ balls are allocated is at least $\Omega\left( \frac{\log \log n}{\log \Delta} \right)$ with probability $1-o(1)$ as $n \rightarrow \infty$. Furthermore, for any integer $2 {\leqslant}d {\leqslant}\frac{\log n}{{\mathrm{e}}}$, there is a $d$-regular graph for which the maximum load after $n$ balls are allocated is at least $\Omega \left(\sqrt{ \frac{\log n}{d \cdot \log \left(  \frac{\log n}{d} \right)}} \right)$ with probability $1-o(1)$ as $n \rightarrow \infty$.

The combination of [Theorem \[thm:tiebreaking\]]{} and the second statement of [Theorem \[thm:lowerbounds\]]{} shows that the two conditions concerning the degree and the random tie breaking in [Theorem \[thm:dense\]]{} are not only sufficient but also necessary for obtaining a constant maximum load.

While in the $d$-choice process a ball only probes the load of up to $d$ bins, the local search allocation may probe the load of $\omega(1)$ bins for some balls. However, the number of bins whose load a given ball can probe is bounded above by $\Delta$ times the load of the birthplace of the ball, where $\Delta$ is the maximum degree of $G$. Therefore, the [*expected*]{} number of probed bins per ball is at most $\Delta$ and, for the case of expander graphs with constant maximum degree, [Theorem \[thm:main\]]{} implies that the maximum number of probed bins per ball is ${\mathcal{O}}(\log \log n)$.

An important feature of our local search allocation is that it maintains a smooth load distribution (cf. Lemma \[lem:balanced\]); i.e., the load difference for each edge of $G$ is at most one and balls are only placed in bins whose load is a local minimum. Hence, if each ball is controlled by an agent who strives for a minimization of their load, then the agents have a natural incentive to follow the local search allocation.

It is also important to remark that our process uses only a small amount of randomness. For instance, when ties are broken by means of a *deterministic* collection of $\{\xi_v\}_{v\in V}$, the only randomness comes from the birthplaces of the balls, which requires only $n \log_2 n$ random bits. From this perspective, it is comparable to the process by @MPS02, which use the same number of random bits and achieves a maximum load of ${\mathcal{O}}(\log \log n)$ as well.

[**Further Related Work.**]{} The work that is most related to ours is that of @KP06. They analyzed a balls-into-bins model where each ball chooses a pair of adjacent bins uniformly at random and is placed in the bin with the smaller load. They proved that, for any $d$-regular graph, the maximum load after $n$ balls are allocated is $\log \log n + {\mathcal{O}}\big(1+ \frac{\log n}{\log (d/ \log^4 n)}\big)$, and also showed an almost matching lower bound. Hence, to retain the maximum load of ${\mathcal{O}}(\log \log n)$ from the 2-choice process, the degree $d$ must be as large as $\Omega(n^{\Omega(1/(\log \log n))})$. In contrast, our local search allocation achieves a maximum load of ${\mathcal{O}}(\log \log n)$ even for a large class of constant-degree graphs. The model from @KP06 was also studied implicitly in @PTW10, where the authors analyzed the [*gap*]{} defined as the difference between the maximum and average load. They proved that, even if the number of balls $m$ is much larger than the number of bins $n$, the gap is $\Theta(\log n)$ for expander graphs and, for the cycle, the gap is between $\Omega(\log n)$ and ${\mathcal{O}}(n \log n)$, i.e., independent of the number of balls.

In a different context, @AHKV03 studied a related graph-based coupon collector process. In this process, each ball performs a local search but distinguishes only between empty and nonempty bins. Therefore, each ball is allocated either to its birthplace or to one of its neighbors. The authors analyzed the number of balls required until all bins are non-empty.

There are several other variations of balls-into-bins models for which the power of two choices has been analyzed (we refer to [@MRS01] for a survey). For instance, @BM05 considered a multidimensional version where balls correspond to $0/1$ vectors. @B08 analyzed balanced allocations on hypergraphs, extending the model of [@KP06] for allocations on graphs. Among other results, the author obtained a constant maximum load for an almost regular hypergraph if each hyperedge consists of $d=\Theta(\log n)$ bins, which is comparable to our result for dense graphs ([Theorem \[thm:dense\]]{}).

Local search is a generic method to solve optimization problems and several recent studies in algorithmic game theory involve local search-based processes. In contrast to our model, these processes usually start from a state where all tasks are assigned and allow, either sequentially or in parallel, tasks to be reallocated by using so-called improvement steps (a.k.a. selfish steps). For various settings, lower and upper bounds on the number of improvement steps until a Nash equilibrium is found have been shown [@EKM07; @FGGHM07; @G04]. We note that the total number of improvement steps in our process is always bounded by ${\mathcal{O}}(n)$ with probability $1-o(1)$, regardless of the underlying graph.

Basic properties {#sec:prelim}
================

We start with some notation. Let $G=(V,E)$ be an undirected, connected graph, where the $n$ vertices represent $n$ bins to which $n$ balls should be allocated. For each node $v\in V$, denote by $X_v^{(i)}$ the load of $v$ right after the $i$th ball is allocated. Thus, we initially have $X_v^{(0)}=0$ for all $v\in V$. Let $X_{\max}^{(n)} $ be the maximum load after $n$ balls have been allocated; i.e., $$X_{\max}^{(n)} = \max_{v\in V} X_v^{(n)}.$$ Let $U_i \in V$ be the birthplace of ball $i$, so $U_i$ is a uniformly random sample from $V$. Recall that in the $1$-choice process, for all $i{\geqslant}1$, ball $i$ is allocated to $U_i$. For any $v\in V$, let ${\overline}X_v^{(n)}$ be the load of $v$ after $n$ balls are allocated according to the $1$-choice process. In symbols, we have $${\overline}X_v^{(n)} = |\{i\in [1,n] \colon U_i=v\}|.$$ With this, define the maximum load for the $1$-choice process as $${\overline}X_{\max}^{(n)} :=\max_{v\in V} {\overline}X_v^{(n)}.$$

Now, for two vectors $A=(a_1,a_2,\ldots,a_n)$ and $A'=(a_1',a_2',\ldots,a_n')$ such that $\sum_{i=1}^n a_i = \sum_{i=1}^n a_i'$, we say that $A$ *majorizes* $A'$ if, for each $\kappa=1,2,\ldots,n$, the sum of the $\kappa$ largest entries of $A$ is at least the sum of the $\kappa$ largest entries of $A'$. More formally, if $j_1,j_2,\ldots,j_n$ are distinct numbers such that $a_{j_1}{\geqslant}a_{j_2} {\geqslant}\cdots {\geqslant}a_{j_n}$ and $j_1',j_2',\ldots,j_n'$ are distinct numbers such that $a'_{j_1'}{\geqslant}a'_{j_2'} {\geqslant}\cdots {\geqslant}a'_{j_n'}$, then $$\text{$A$ majorizes $A'$ if }\sum_{i=1}^\kappa a_{j_i} {\geqslant}\sum_{i=1}^\kappa a'_{j_i'} \quad\text{for all $\kappa=1,2,\ldots,n$.}$$ The lemma below establishes that the load vector obtained by the $1$-choice process majorizes the load vector obtained by the local search allocation. As a consequence, the maximum load of our local search allocation process is ${\mathcal{O}}( \log n / (\log \log n))$ for any graph.

\[lem:1choice\] For any fixed $k{\geqslant}0$, we can couple $X^{(k)}$ and ${\overline}X^{(k)}$ so that, with probability 1, ${\overline}X^{(k)}$ majorizes $X^{(k)}$. Consequently, we have that, for all $k{\geqslant}0$, ${\overline}X_{\max}^{(k)}$ stochastically dominates $X_{\max}^{(k)}$.

The proof is by induction on $k$. Clearly, for $k=0$, we have $X_v^{(0)}= {\overline}X_v^{(0)}=0$ for all $v\in V$. Now, assume that we can couple $X^{(k-1)}$ with ${\overline}X^{(k-1)}$ so that ${\overline}X^{(k-1)}$ majorizes $X^{(k-1)}$. Now let $j_1,j_2,\ldots, j_n$ be distinct elements of $V$ so that $X_{j_1}^{(k-1)} {\geqslant}X_{j_2}^{(k-1)} {\geqslant}\cdots {\geqslant}X_{j_n}^{(k-1)}$. Similarly, let $j_1',j_2',\ldots, j_n'$ be distinct elements of $V$ so that ${\overline}X_{j'_1}^{(k-1)} {\geqslant}{\overline}X_{j'_2}^{(k-1)} {\geqslant}\cdots {\geqslant}{\overline}X_{j'_n}^{(k-1)}$. Now let $\ell$ be a uniformly random integer from $1$ to $n$. Then, for the process $(X_v^{(k)})_{v\in V}$, we let the $k$th ball be born at vertex $j_\ell$ and define $\iota$ such that $j_\iota$ is the vertex to which the $k$th ball is allocated. Note that, $\iota {\geqslant}\ell$. For the process $({\overline}X_v^{(k)})_{v\in V}$, we set the birthplace of the $k$th ball to $j_\ell'$. Therefore, for any $\kappa=1,2,\ldots,n$, we have $$\sum_{i=1}^\kappa  {\overline}X_{j'_i}^{(k)}
      = \sum_{i=1}^\kappa  {\overline}X_{j'_i}^{(k-1)} + {\mathbf{1}\left(\kappa {\geqslant}\ell\right)}
      {\geqslant}\sum_{i=1}^\kappa  X_{j_i}^{(k-1)} + {\mathbf{1}\left(\kappa {\geqslant}\ell\right)}
      {\geqslant}\sum_{i=1}^\kappa  X_{j_i}^{(k-1)} + {\mathbf{1}\left(\kappa {\geqslant}\iota\right)}
      = \sum_{i=1}^\kappa  X_{j_i}^{(k)},$$ where the first inequality follows by the induction hypothesis and the second inequality holds since $\iota {\geqslant}\ell$.

For any $v\in V$, let $N_v$ be the set of neighbors of $v$ in $G$. The next lemma establishes that the local search allocation always maintains a *smoothed* load vector in the sense that the load of any two adjacent vertices differs by at most $1$.

\[lem:balanced\] For any $k{\geqslant}0$, any $v\in V$ and any $u\in N_v$, we have that $|X_v^{(k)}-X_{u}^{(k)}|{\leqslant}1$.

In order to obtain a contradiction, suppose that $X_v^{(k)} {\geqslant}X_u^{(k)} +2$, and let $j$ be the last ball allocated to $v$. Then, we have that $$X_v^{(j-1)} = X_v^{(k)} - 1 {\geqslant}X_u^{(k)} + 1 {\geqslant}X_u^{(j-1)} + 1.$$ Therefore, the moment the $j$th ball is born, vertex $v$ has at least one neighbor with load strictly smaller than $v$. Therefore, ball $j$ is not allocated to $v$, establishing a contradiction.

For any vertex $v\in V$ and integer $r{\geqslant}0$, let $N_v^r$ be the set of vertices of $G$ whose distance to $v$ is exactly $r$ (in particular, $N_v^0=\{v\}$), and let $B_v^r$ be the set of vertices of $G$ whose distance to $v$ is at most $r$; then $B_v^r=\bigcup\nolimits_{i=0}^r N_v^i$. Below we show that, if for a given $v\in V$ we have an upper bound for the number of balls allocated to $B_v^r$, then we obtain an upper bound for the load of $v$.

\[lem:characterization\] Let $v$ be an arbitrary vertex of $G$. Suppose that there exists an integer $r{\geqslant}1$ and a positive $\Psi$, that may depend on $n$, such that the total number of balls allocated to the vertices of $B_v^r$ is at most $\Psi |B_v^r|$; i.e., $
      \sum_{u\in B_v^r} X_u^{(n)} {\leqslant}\Psi |B_v^r|.
   $ Then, we have that $$X_v^{(n)} {\leqslant}\Psi + \sum_{i=0}^r i \frac{|N_v^i|}{|B_v^r|}.$$

Note that, by Lemma \[lem:balanced\], for any $u\in N_v^i$, we have $X_u^{(n)} {\geqslant}X_v^{(n)}-i$. Using this and the condition of the lemma, we obtain $$\Psi |B_v^r|
      {\geqslant}\sum_{u\in B_v^r} X_u^{(n)}
      {\geqslant}\sum_{i=0}^r (X_v^{(n)}-i) |N_v^i|
      = X_v^{(n)} |B_v^r| - \sum_{i=0}^r i |N_v^i|.$$

Complementing the previous lemma, we now prove a lower bound on the maximum load that depends only on the number of balls born at a subset of vertices and the cardinality of a small ball around that subset.

\[lem:characterizationlower\] For any subset $S \subseteq V$, let $\Phi_{S}:=\sum_{i=1}^n {\mathbf{1}\left( U_i \in S \right)}$ be the number of balls born in $S$. Then, the maximum load $\beta:= X_{\max}^{(n)}$ satisfies the following inequality: $$\beta \cdot |B_{S}^{\beta} |{\geqslant}\Phi_{S},$$ where $B_{S}^{\beta} := \bigcup_{s\in S} B_s^{\beta}$ is the set of vertices with distance at most $\beta$ from $S$.

If the maximum load is $\beta$, then every ball born at some vertex $u$ is allocated in $B_{u}^{\beta}$, and clearly the load of any vertex in $B_{S}^{\beta}$ is at most $\beta$. Combining these two insights yields $$\Phi_{S} {\leqslant}\sum_{u \in B_{S}^{\beta}} X_u^{(n)} {\leqslant}\beta \cdot |B_{S}^{\beta}|,$$ and therefore the maximum load $\beta$ must satisfy $
     \beta \cdot |B_{S}^{\beta}| {\geqslant}\Phi_{S}.
   $

For the next two lemmas, we need ties to be broken either uniformly at random or by means of a fixed permutation $\xi_v$ of the neighbors of $v$ for each $v\in V$. The next lemma establishes that the load vector $X^{(n)}$ satisfies a Lipschitz condition, which will turn out to be crucial in our proofs.

\[lem:lipschitz\] Let $k{\geqslant}1$ be fixed and $u_1,u_2,\ldots,u_k \in V$ be arbitrary. Let $(X^{(k)}_v)_{v\in V}$ be the load of the vertices of $G$ after the local search allocation places $k$ balls with birthplaces $u_1,u_2,\ldots,u_k$. Let $i\in \{1,2,\ldots,k\}$ be fixed, and let $(Y^{(k)}_v)_{v\in V}$ be the load of the vertices of $G$ after the local search allocation places $k$ balls with birthplaces $u_1,u_2,\ldots,u_{i-1},u_i',u_{i+1},u_{i+2},\ldots,u_k$, where $u_i'\in V$ is arbitrary. In other words, $Y_v^{(k)}$ is obtained from $X_v^{(k)}$ by changing the birthplace of the $i$th ball from $u_i$ to $u_i'$. Assume that, for both processes, the local search allocation breaks ties either uniformly at random or via the permutations $\{ \xi_v \}_{v\in V}$ described in Remark \[rem:tiebreaking\]. Then, there exists a coupling such that $$\sum_{v\in V} |X_v^{(k)} - Y_v^{(k)}| {\leqslant}2.
      \label{eq:lipschitz}$$

We refer to the process defining the variables $X^{(k)}$ as the $X$ process, and we refer to the process defining the variables $Y^{(k)}$ as the $Y$ process. If ties are broken uniformly at random, then for each $v\in V$ and $i{\geqslant}1$, we define $\xi_v^{(i)}$ to be an independent and uniformly random permutation of the neighbors of $v$. We use this permutation for both the $X$ and $Y$ processes to break ties when ball $i$ is at vertex $v$. Then, since the first $i-1$ balls have the same birthplaces in both processes, we have that $$X_v^{(i-1)} = Y_v^{(i-1)} \quad\text{ for all $v\in V$}.
      \label{eq:prefixunchanged}$$ Now, when adding the $i$th ball, we let $v_i$ be the vertex to which this ball is allocated in the $X$ process and $v_i'$ be the vertex to which this ball is allocated in the $Y$ process. If $v_i=v_i'$, then $X_u^{(i)}=Y_u^{(i)}$ for all $u\in V$ and  holds. More generally, we have that $$X_{v_i}^{(i)}=Y_{v_i}^{(i)}+{\mathbf{1}\left(v_i \neq v_{i}'\right)},
       \quad Y_{v'_i}^{(i)}=X_{v'_i}^{(i)}+{\mathbf{1}\left(v_i \neq v_{i}'\right)}
       \quad\text{and}\quad X_{u}^{(i)}=Y_{u}^{(i)} \text{ for $u \in V\setminus \{v_i,v_i'\}$.}
       \label{eq:desiredproperty}$$ If $i=k$, then this implies  and the lemma holds.

For the case $i<k$, we add ball $i+1$ and are going to define $v_{i+1}$ and $v_{i+1}'$ so that  holds with $i$ replaced by $i+1$. Then the proof of the lemma is completed by induction. We assume that $v_i\neq v_{i}'$, otherwise  clearly holds. We note that $v_{i+1}$ and $v_{i+1}'$ will not be in the same way as $v_i$ and $v_i'$. The role of $v_{i+1}$ and $v_{i+1}'$ is to be the only vertices whose loads in the $X$ and $Y$ processes are different. The definition of $v_{i+1}$ and $v_{i+1}'$ will vary depending on the situation. For this, let ball $i+1$ be born at $u_{i+1}$ and define $w$ to be the vertex on which ball $i+1$ is allocated in the $X$ process and $w'$ to be the vertex on which ball $i+1$ is allocated in the $Y$ process. We can assume that $w\neq w'$, otherwise  holds with $i$ replaced by $i+1$ by setting $v_{i+1}=v_i$ and $v_{i+1}'=v_i'$.

Now we analyze ball $i+1$. It is crucial to note that, during the local search of ball $i+1$, if it does not enter $v_i$ in the $Y$ process and does not enter $v_i'$ in the $X$ process, then ball $i+1$ follows the same path in both processes. Since we are in the case $w\neq w'$, we can assume without loss of generality that ball $i+1$ eventually visits $v_i$ in the $Y$ process. In this case, since the local search performed by ball $i$ in the $X$ process stops at vertex $v_i$, we have that $v_i$ is a local minimum for ball $i+1$ in process $Y$, which implies that $w'=v_i$. (The case when ball $i+1$ visits $v_i'$ in the $X$ process follows by a symmetric argument.) So, since $w\neq w'$, we have $X_{v_i}^{(i+1)}=Y_{v_i}^{(i+1)}$. Then we let $v_{i+1}=w$. If $w=v_i'$, we set $v_{i+1}'=w$ and  holds since $X_u^{(i+1)}=Y_u^{(i+1)}$ for all $u\in V$. Otherwise we set $v_{i+1}'=v_i'$, and  holds as well.

The following is a consequence of Lemma \[lem:lipschitz\].

\[lem:monotonicity\] Let $k{\geqslant}1$ be fixed and $u_1,u_2,\ldots,u_k \in V$ be arbitrary. Let $(X^{(k)}_v)_{v\in V}$ be the load of the vertices after $k$ balls are allocated with birthplaces $u_1,u_2,\ldots,u_k$. Let $i\in \{1,2,\ldots,k\}$ be fixed, and let $(Z^{(i,k)}_v)_{v\in V}$ be the load of the vertices of $G$ after $k-1$ balls are allocated with birthplaces $u_1,u_2,\ldots,u_{i-1},u_{i+1},u_{i+2},\ldots,u_k$. In other words, $Z_v^{(i,k)}$ is obtained from $X_v^{(k)}$ by removing ball $i$. Assume that, for both processes, the local search allocation breaks ties either uniformly at random or via the variables $(\xi_v)_{v\in V}$ described in Remark \[rem:tiebreaking\]. Then, there exists a coupling such that $$\sum_{v\in V} |X_v^{(k)} - Z_v^{(i,k)}| =1.$$

Let $G'$ be the graph obtained from $G$ by adding an isolated node $w$; i.e., $G'$ has vertex set $V\cup \{w\}$ and the same edge set as $G$. Applying [Lemma \[lem:lipschitz\]]{} to $G'$ with the same choice of $u_1,\ldots,u_k\in V$ and with $u_{i}'=w$ gives $$\sum_{v \in V \cup \{w\} } \left| X_v^{(k)} - Y_v^{(k)} \right| = 2.$$ Since $Y_{w}^{(k)} = 1$, $X_w^{(k)} = 0$ and $Z_{v}^{(i,k)} = Y_v^{(k)}$ for any $v \in V$, we conclude that $$\sum_{v \in V } \left| X_v^{(k)} - Z_v^{(i,k)} \right| = \sum_{v \in V } \left| X_v^{(k)} - Y_v^{(k)} \right| = 1.$$

We now use Lemma \[lem:monotonicity\] to prove a type of subadditivity property. In a simpler statement, we show that, if for $k$ independent of copies of the local search allocation with $m$ balls the maximum load is at most $x$, then the maximum load obtained after placing $km$ balls via local search allocation is at most $kx$.

\[lem:subadditivity\] For any $1 {\leqslant}z {\leqslant}n$, and any $x{\geqslant}0$, it holds that $${\mathbf{Pr} \left[\,X_{\max}^{(n)} {\geqslant}\lceil n/z \rceil \cdot x\,\right]} {\leqslant}\lceil n/z \rceil \cdot {\mathbf{Pr} \left[\,X_{\max}^{(z)} {\geqslant}x\,\right]}.$$

Let $U_1,U_2,\ldots,U_n$ be independent uniform random samples from $V$. Then, $X_{\max}^{(n)}$ is the maximum load after $n$ balls are added to $G$ with birthplaces $U_1,U_2,\ldots,U_n$. We define $k:=\lceil n/z \rceil$ independent copies of the local search allocation, where in the first copy we allocate $z$ balls according to the birthplaces $U_1,U_2,\ldots,U_{z}$, in the second copy we allocate $z $ balls according to the birthplaces $U_{z+ 1},U_{z+2},\ldots,U_{2z}$ and so on and so forth. Hence, in total we allocate $\lceil n/z \rceil \cdot z {\geqslant}n$ balls. Let $M_1,M_2,\ldots,M_k$ be the maximum load of each copy, respectively, after $z$ balls are allocated. Then, we claim that $X_{\max}^{(n)} {\leqslant}X_{\max}^{(k \cdot z)} {\leqslant}\sum_{i=1}^k M_i$. This follows since, for each copy $i$, after allocating the $z$ balls, we can successively add more balls in such a way that all vertices have load exactly $M_i$ in copy $i$. Then, by taking the union of all copies, we obtain a balls-into-bins process with $\sum_{i=1}^k  M_i$ balls, $n$ of which have birthplaces $U_1,U_2,\ldots,U_n$. Then, by Lemma \[lem:monotonicity\], the maximum load in this process, which is $\sum_{i=1}^k M_i$, is at least $X_{\max}^{(n)}$. Therefore, $$\begin{aligned}
      {\mathbf{Pr} \left[\,X_{\max}^{(n)} {\geqslant}\lceil n/z \rceil \cdot x\,\right]}
      &{\leqslant}{\mathbf{Pr} \left[\,\sum\nolimits_{i=1}^k M_i {\geqslant}\lceil n/z \rceil \cdot x\,\right]}\\
      &{\leqslant}{\mathbf{Pr} \left[\,\bigcup\nolimits_{i=1}^k \{ M_i {\geqslant}x\}\,\right]}
      {\leqslant}k \,{\mathbf{Pr} \left[\,X_{\max}^{(z)} {\geqslant}x\,\right]}.
   \end{aligned}$$

Expander graphs {#sec:expander}
===============

In this section we give the proof of our main result, Theorem \[thm:main\], which establishes an upper bound for the maximum load after $n$ balls are allocated to the vertices of an expander graph. In fact, we can prove this theorem in a more general setting. As before, for each $u\in V$ and $r=1,2,\ldots$, we define $N_u^r$ to be the set of vertices of $V$ whose distance to $u$ is exactly $r$, and $B_u^r$ to be the set of vertices of $V$ whose distance to $u$ is at most $r$; in symbols, $$N_u^r = \{ v\in V \colon \text{graph distance between $u$ and $v$ is $r$}\}
   \quad\text{ and }\quad
   B_u^r = \bigcup_{i=0}^r N_u^i.$$ We say that $G$ has *exponential growth* if there exists a constant $\phi>0$ so that $$|B_u^r| {\geqslant}\min \left\{ \exp(\phi r), \frac{n}{2} \right\} \text{ for all $u\in V$ and $r{\geqslant}0$.}
   \label{eq:expgrowth}$$ Note that any graph with exponential growth has a diameter of ${\mathcal{O}}(\log n)$. Moreover, if $G$ is an expander, then it has exponential growth. Therefore, Theorem \[thm:main\] follows from the theorem below.

\[thm:expander\] If $G$ has the exponential growth property defined in  and bounded degrees, then there exists a positive constant $C$ so that, as $n\to\infty$, $${\mathbf{Pr} \left[\,X_{\max}^{(n)} {\geqslant}C \log \log n\,\right]} {\leqslant}n^{-\omega(1)}.$$

We devote the remainder of this section to prove Theorem \[thm:expander\]. We start with a high level description of the proof. We claim that, for any vertex $v$ and some properly chosen $r_0={\mathcal{O}}(\log\log n)$, $${\mathbf{Pr} \left[\,\sum_{u\in B_v^{r_0}} X_u^{(n)} {\geqslant}C |B_v^{r_0}|\,\right]} {\leqslant}n^{-\omega(1)};
   \label{eq:claim}$$ i.e., with very high probability, the number of balls allocated to the vertices of $B_v^{r_0}$ is at most $C|B_v^{r_0}|$. Having established , the proof follows immediately by applying Lemma \[lem:characterization\] and taking the union bound over all $v$. Now, in order to prove , we use that Lemma \[lem:lipschitz\] establishes that the load of the vertices satisfies a Lipschitz condition; i.e., if the birthplace of one ball is changed, the load vector can only change in two vertices. Therefore, we can apply Azuma’s inequality to bound the probability that $\sum_{u\in B_v^{r_0}} X_u^{(n)} {\geqslant}C |B_v^{r_0}|$; however, for $r_0={\mathcal{O}}(\log\log n)$, the probability bound obtained via Azuma’s inequality is not small enough to take the union bound over $v\in V$ later. Nevertheless, Azuma’s inequality gives a small enough bound when applied to any radii larger than some $R\gg r_0$. Then, the idea is to control the number of balls allocated to $B_v^{R-1}$ by using the bounds obtained for all radii $r{\geqslant}R$, and then apply an inductive argument to finally establish .

The main intuition why this analysis works is because a ball can only be allocated inside $B_v^{r}$ if the ball is either born inside $B_v^{r}$ or it is born in a vertex $u$ at distance $j$ to $B_v^{r}$ but whose load, at the moment the ball is born, is at least $j$. This is true because, at each time a ball moves from a vertex $u$ to a vertex $u'\in N_u$ during the local search, the load of $u$ must be strictly larger than the load of $u'$. In other words, the ball traverses a *load decreasing path* from its birthplace to the vertex on which the ball is placed. Therefore, for a ball allocated in $B_v^{r}$, the larger the distance between the birthplace of this ball and $B_v^r$, the smaller the number of possibilities for the birthplace of the ball since these vertices must have a large load at the moment the ball is born. This, in a high-level description, gives that if we change the birthplace of a ball to a uniformly random vertex, the load of the vertices inside $B_v^r$ does not change with high probability. This allows us to control the variance of the Lipschitz condition and apply a more refined version of Azuma’s inequality to move from radius $r$ to radius $r-1$ inductively until we reach radius $r_0$. We remark that we actually need to control not only the number of balls allocated to $B_v^r$ for all $r\in[r_0,R]$, but also the number of balls allocated to nodes in $B_v^r$ whose load is at least $\ell$ for all $r\in [r_0,R]$ and many values of $\ell$. We defer the details for the rigorous argument below.

Now we proceed to the rigorous argument. We start by showing that the load at any given vertex has an exponential tail.

\[lem:exptail\] Let $v$ be any given vertex of $V$ and let $\Delta$ be the maximum degree of $G$. Then, for any $z{\geqslant}8{\mathrm{e}}\Delta$, $${\mathbf{Pr} \left[\,X_v^{(n)} {\geqslant}z\,\right]} {\leqslant}2\left(\frac{4{\mathrm{e}}\Delta}{z}\right)^z.$$

We start defining a sequence of vertices $w_0,w_1,\ldots$ and time steps $t_0 > t_1 > \cdots$ such that, for every $j{\geqslant}1$, ball $t_j$ is born at vertex $w_j$ and allocated to $w_{j-1}$. We start by setting $w_0=v$ and $t_0=n$. Inductively for $j {\geqslant}1$, we let $t_j$ be the last ball allocated to $w_{j-1}$ before time $t_{j-1}$ and set $w_j$ to be the vertex at which ball $t_j$ is born. So, for $j=1$, $t_1$ is the last ball allocated to $w_0$ and $w_1$ is the vertex where ball $t_1$ is born. Note that, whenever $X_{v}^{(n)}{\geqslant}z$, if $w_1=w_0$, we know that $X_{w_1}^{(t_1)}{\geqslant}z-1$. On the other hand, if $w_1\neq w_0$, then we have that $X_{w_1}^{(t_1)}{\geqslant}z+d(w_0,w_1)-1$, where $d(u,v)$ is the graph distance between $u$ and $v$. More general, for all $\ell {\geqslant}1$, we have that $$X_{w_\ell}^{(t_\ell)} {\geqslant}z+\sum_{j=1}^{\ell}(d(w_{j-1},w_j)-1).$$ We continue this procedure until we find a value of $\ell$ such that $X_{w_\ell}^{(t_\ell)}=0$. Note that, for each $j$, we have $X_{w_j}^{(t_j)} - X_{w_{j-1}}^{(t_{j-1})}{\geqslant}-1$; consequently, we can have $X_{w_\ell}^{(t_\ell)}=0$ only for $\ell {\geqslant}z$. In order to obtain an upper bound for ${\mathbf{Pr} \left[\,X_v^{(n)} {\geqslant}z\,\right]}$, we apply the first-moment method over all possible sequences $(w_1,w_2,\ldots,w_\ell) \in V^{\ell}$ and $t_1 > t_2 > \cdots > t_\ell$, for every $\ell{\geqslant}1$, such that $\sum_{j=1}^\ell (d(w_{j-1},w_j)-1) {\leqslant}-z$. With this, we have $$\begin{aligned}
      \lefteqn{{\mathbf{Pr} \left[\,X_v^{(n)} {\geqslant}z\,\right]}}\notag\\
      &{\leqslant}\sum_{\ell{\geqslant}z}\sum_{w_1,w_2,\ldots w_\ell \atop t_1 > t_2 > \cdots > t_\ell} {\mathbf{1}\left(\sum_{j=1}^\ell (d(w_{j-1},w_j)-1) {\leqslant}-z\right)} {\mathbf{Pr} \left[\,\bigcap\nolimits_{j=1}^\ell \{\text{ball $t_j$ is born at $w_j$}\}\,\right]}\nonumber\\
      &{\leqslant}\sum_{\ell{\geqslant}z}\sum_{w_1,w_2,\ldots w_\ell \atop t_1 > t_2 > \cdots > t_\ell} {\mathbf{1}\left(\sum_{j=1}^\ell (d(w_{j-1},w_j)-1) {\leqslant}-z\right)} \frac{1}{n^{\ell}}.
      \label{eq:summing}
   \end{aligned}$$ Let $\lambda_i = d(w_{j-1},w_j)-1\in\{-1,0,1,\ldots\}$. For any fixed $\ell$, we can estimate the number of possible sequences by counting the number of possibilities to choose $\lambda_j$ and $t_j$ so that $\sum_{j=1}^\ell \lambda_j {\leqslant}-z$, and then counting the number of possibilities to choose the $w_j$ accordingly. Clearly, there are at most $\binom{n}{\ell}$ ways to choose the $t_j$. Let $k{\geqslant}z$ be the number of values of $j$ for which $\lambda_j=-1$. Then, the other $\ell-k$ values of $\lambda_j$ are all non-negative and must sum to at most $k-z$. With this, we can bound above the number of choices for the $t_j$ and $\lambda_j$ by $$\binom{n}{\ell} \sum_{k = z}^\ell \binom{\ell}{k} \binom{\ell-z}{k-z}
      {\leqslant}\left(\frac{{\mathrm{e}}\cdot n}{\ell}\right)^\ell 2^{\ell-z} \sum_{k = z}^\ell \binom{\ell}{k}
      {\leqslant}\left(\frac{{\mathrm{e}}\cdot n}{\ell}\right)^\ell 2^{2\ell-z}.
      \label{eq:nt}$$ Once the $\lambda_j$ are fixed, the number of choices for the $w_j$ is at most $$\prod_{j=1}^\ell \Delta^{\lambda_j+1}
      {\leqslant}\Delta^{\ell-z}.
      \label{eq:nw}$$ Plugging the estimates in  and  into , we have $${\mathbf{Pr} \left[\,X_v^{(n)} {\geqslant}z\,\right]}
      {\leqslant}\sum_{\ell{\geqslant}z} \left(\frac{{\mathrm{e}}\cdot n}{\ell}\right)^\ell \cdot \frac{2^{2\ell-z} \Delta^{\ell-z}}{n^\ell}
      {\leqslant}\sum_{\ell{\geqslant}z} \left(\frac{4{\mathrm{e}}\cdot \Delta }{\ell}\right)^\ell
      {\leqslant}\sum_{\ell{\geqslant}z} \left(\frac{4{\mathrm{e}}\cdot \Delta }{z}\right)^\ell
      {\leqslant}2 \left(\frac{4{\mathrm{e}}\cdot\Delta }{z}\right)^z,$$ where the last inequality uses the fact that $z{\geqslant}8{\mathrm{e}}\cdot\Delta$.

Throughout the section, we fix an arbitrary vertex $v$ and bound the number of balls allocated to the vertices of $B_v^r$ for all $r_0 {\leqslant}r {\leqslant}R$, where $$r_0 := \min\Big\{r \colon |B_v^r| {\geqslant}\log^{10}n\Big\}
   \quad\text{and}\quad
   R := \min\Big\{r \colon |B_v^r| {\geqslant}\frac{n}{4\Delta}\Big\}.
   \label{eq:defr}$$ We will consider the balls $(B_v^r)_{r{\geqslant}r_0}$, and will bound the number of vertices in $B_v^r$ with load at least $\ell$ for all integers $\ell \in [\ell_0,\ell_1]$, where $$\ell_0 := 8{\mathrm{e}}\cdot\Delta^2
   \quad\text{and}\quad
   \ell_1 := \frac{\log n}{4 \log (2\Delta)}.
   \label{eq:defell}$$ Then, for all $r$ and $\ell$, define $$\Lambda_{r,\ell} = \{u\in B_v^r \colon X_u^{(n)} {\geqslant}\ell\}.$$ In order to control $\Lambda_{r,\ell}$, we will need to estimate the probability that the $n$th ball changes the load of vertices in $B_v^r$. For this last value, we need to control the load of the vertices after $n-1$ balls have arrived. Then, we define $$\Lambda_{r,\ell}^{{\star}}:= \{u\in B_v^r \colon X_u^{(n-1)} {\geqslant}\ell\}.$$ Note that $\Lambda_{r,\ell}^{{\star}}\subseteq \Lambda_{r,\ell}$. By Lemma \[lem:exptail\], we have that, for $\ell{\geqslant}\ell_0$ and any $r{\geqslant}1$, $${\mathbf{E} \left[\,|\cup_{k{\geqslant}0}\Lambda_{r+k,\ell+k}|\,\right]}
   {\leqslant}\sum_{k{\geqslant}0} |B_v^{r+k}| 2\left(\frac{4{\mathrm{e}}\cdot\Delta}{\ell+k}\right)^{\ell+k}
   {\leqslant}|B_v^r| \sum_{k{\geqslant}0} \Delta^{k} 2\left(\frac{1}{2\Delta}\right)^{\ell+k}
   {\leqslant}4(2\Delta)^{-\ell} |B_v^r|.
   \label{eq:mgexp}$$ Next define $$\Lambda_{\ell}^{{\star}}:= \left\{ u \in V \colon X_{u}^{(n-1)} {\geqslant}\ell \right \},$$ hence, $\Lambda_{\ell}^{{\star}}= \bigcup_{r=1}^{\infty} \Lambda_{r,\ell}^{{\star}}$. and define the event $$\begin{aligned}
   L_{R}^{{\star}}= \bigcap_{\ell=\ell_0}^{6 \ell_1} \Big\{ |\Lambda_{\ell}^{{\star}}| {\leqslant}\frac{n}{4 \Delta} \cdot (2 \Delta)^{-\ell} + \frac{\log^7 n}{\ell} \Big\}\enspace.
   \label{eq:defLR}\end{aligned}$$ From now on let $\mathcal{F}_i$ be the $\sigma$-algebra induced by the configuration obtained after $i$ balls are placed. More formally, if $U_1,U_2,\ldots,U_i$ are the birthplaces of the first $i$ balls and, for each $v\in V$ and $j=1,2,\ldots,i$, we define $\xi_v^{(j)}$ to be an independent uniformly random permutation of the neighbors of $v$, where $\{\xi_v^{(j)}\}_{v\in V}$ are the permutations used to break ties uniformly at random for ball $j$, then $\mathcal{F}_i$ is the $\sigma$-algebra induced by $U_1,\ldots,U_i$ and $\{\xi_v^{(j)}\}_{v\in V, 1{\leqslant}j {\leqslant}i}$.

\[lem:larger\] Let $v\in V$ be fixed, and let $R$ and $L^{{\star}}_R$ be as defined in  and , respectively. Then, there exist $n_0$ so that, for all $n{\geqslant}n_0$, we have $${\mathbf{Pr} \left[\,L_R^{{\star}}\,\right]}{\geqslant}1-2 n^{-\log^5 n}.$$

Recall that by [Lemma \[lem:1choice\]]{}, there is a coupling such that with probability $1$, ${\overline}X^{(n)}$ majorizes $ X^{(n)}$. Hence the claim follows directly by [Lemma \[lem:thomasrepair\]]{} and a union bound over all $\ell$ with $\ell_0 {\leqslant}\ell {\leqslant}\ell_1$.

For any $r$ with $1{\leqslant}r < R$ and any $\ell{\geqslant}\ell_0$, in order to bound the number of vertices in $\Lambda_{r,\ell}$, we will look at the probability that the $n$-th ball affects $\Lambda_{r,\ell}$. In other words, we control the probability that $\Lambda_{r,\ell}$ is different from $\Lambda_{r,\ell}^{{\star}}$. Note that it is only possible that $\Lambda_{r,\ell}\neq \Lambda_{r,\ell}^{{\star}}$ if the $n$-th ball is born at a vertex of $\Lambda_{r,\ell-1}^{{\star}}$ or if it is born at a vertex of $N_v^{r+k}$ with load at least $\ell-1+k$ for some $k{\geqslant}1$; we shall bound this last set of vertices by $\Lambda_{r+k,\ell-1+k}$. We define inductively for $r<R$ $$L_{r,\ell_0-1}^{{\star}}= L_{r+1,\ell_1}^{{\star}}\quad \text{ and } \quad
   L_{R-1,\ell_0-1}^{{\star}}= L_R^{{\star}}$$ and, for $\ell{\geqslant}\ell_0$, $$L_{r,\ell}^{{\star}}= L_{r,\ell-1}^{{\star}}\cap \Big\{\big|\Lambda_{r,\ell}^{{\star}}\big| {\leqslant}8 |B_v^{r}|(2\Delta)^{-\ell}+\frac{\log^7 n}{\ell}\Big\}.
   \label{eq:defLr}$$

The next lemma establishes that, with high probability, the last ball cannot affect the load of a small set of vertices.

\[lem:addend\] Let $v$ be any fixed vertex, $r{\geqslant}1$ and $\ell{\geqslant}\ell_0$. Then, there exists a positive constant $c=c(\Delta)$ such that $${\mathbf{Pr} \left[\, \bigcup\nolimits_{u\in \Lambda_{r,\ell-1}^{{\star}}} \{X_u^{(n-1)}\neq X_u^{(n)}\} {\,\middle\vert\,}L_{r,\ell-1}^{{\star}}\,\right]}
      {\leqslant}\frac{c|B_v^{r}|(2\Delta)^{-\ell}}{n} + \frac{3\log^7 n\log \log n}{n}.$$

Note that the $n$-th ball can only change the load of a vertex in $\Lambda_{r,\ell-1}^{{\star}}$ if it is born at a vertex of $B_v^r$ of load at least $\ell-1$ or if it is born at a vertex $u\in N_v^{r+k}$ with $X_u^{(n-1)}{\geqslant}\ell-1+k$ for some $k{\geqslant}1$. Fixing any realization for the birthplaces of the first $n-1$ balls, and thereby fixing the sets $\Lambda_{r,\ell}^{{\star}}$ for all $r$ and $\ell$, we have the following upper bound $${\mathbf{Pr} \left[\,\bigcup\nolimits_{u\in \Lambda_{r,\ell-1}^{{\star}}} \{X_u^{(n-1)}\neq X_u^{(n)}\} {\,\middle\vert\,}\mathcal{F}_{n-1}\,\right]}
      {\leqslant}\frac{|\Lambda_{r,\ell-1}^{{\star}}|}{n} + \frac{|\bigcup_{k=1}^\infty\Lambda_{r+k,\ell-1+k}^{{\star}}|}{n},$$ where the probability above is taken over the choice of $U_n$ only. Note that $L_{r,\ell-1}^{{\star}}$ is measurable with respect to $\mathcal{F}_{n-1}$ since the birthplace of the $n$-th ball is independent of any event in $\mathcal{F}_{n-1}$. Then, for $\ell > \ell_0$, we obtain $$\begin{aligned}
      &{\mathbf{Pr} \left[\,\bigcup\nolimits_{u\in \Lambda_{r,\ell-1}^{{\star}}} \{X_u^{(n-1)}\neq X_u^{(n)}\} {\,\middle\vert\,}L_{r,\ell-1}^{{\star}}\,\right]}\\
      &{\leqslant}\frac{8|B_v^{r}|(2\Delta)^{-\ell+1}+\frac{\log^7 n}{\ell-1}}{n} + \sum_{k=1}^{R-r} \frac{8|B_v^{r+k}|(2\Delta)^{-\ell+1-k}+\frac{\log^7 n}{\ell-1+k}}{n} + \frac{8|B_v^{R}|(2\Delta)^{-\ell-R+r} + \frac{\log^ 7 n}{\ell-1} }{n},
   \end{aligned}$$ where the last term comes from $L^{{\star}}_R$. Using the bounds $|B_v^{r+k}|{\leqslant}|B_v^r|\Delta^k$ and $|B_v^{R}|{\leqslant}|B_v^r|\Delta^{R-r}$, we obtain $$\begin{aligned}
      &{\mathbf{Pr} \left[\,\bigcup\nolimits_{u\in \Lambda_{r,\ell}^{{\star}}} \{X_u^{(n-1)}\neq X_u^{(n)}\} {\,\middle\vert\,}L_{r,\ell-1}^{{\star}}\,\right]}\\
      &{\leqslant}\frac{8|B_v^{r}|(2\Delta)^{-\ell+1}+\frac{\log^7 n}{\ell-1}}{n} + \sum_{k=1}^{R-r+1} \frac{8|B_v^{r}|\Delta^{k}(2\Delta)^{-\ell+1-k}}{n} + \sum_{k=0}^{R-r} \frac{\log^7 n}{(\ell-1+k) n}\\
      &{\leqslant}\frac{8|B_v^{r}|(2\Delta)^{-\ell+1}+\frac{\log^7 n}{\ell-1}}{n} + \frac{16|B_v^{r}|(2\Delta)^{-\ell+1}}{n} + \frac{2\log^7 n\log\log n}{n}\\
      &{\leqslant}\frac{24|B_v^{r}|(2\Delta)^{-\ell+1}}{n} + \frac{3\log^7 n\log \log n}{n}.
   \end{aligned}$$ For $\ell=\ell_0$, we simply bound $|\Lambda_{r,\ell_0-1}^{{\star}}|$ by $|B_v^r|$, which gives that $$\begin{aligned}
      &{\mathbf{Pr} \left[\,\bigcup\nolimits_{u\in \Lambda_{r,\ell_0}^{{\star}}} \{X_u^{(n-1)}\neq X_u^{(n)}\} {\,\middle\vert\,}L_{r,\ell_0}^{{\star}}\,\right]}\\
      &{\leqslant}\frac{|B_v^{r}|}{n} + \sum_{k=1}^{R-r+1} \frac{8|B_v^{r}|\Delta^{k}(2\Delta)^{-\ell_0+1-k}}{n} + \sum_{k=0}^{R-r} \frac{\log^7 n}{(\ell_0-1+k) n}\\
      &{\leqslant}\frac{|B_v^{r}|}{n}+\frac{16|B_v^{r}|(2\Delta)^{-\ell_0+1}}{n} + \frac{2\log^7 n\log\log n}{n}.
   \end{aligned}$$

Now, for any $i{\geqslant}1$, $r\in [r_0,R]$ and $\ell\in[\ell_0,\ell_1]$, we define $\Upsilon_{r,\ell}^i\subseteq V^i$ as the set $$\Upsilon_{r,\ell}^i = \left\{(u_1,u_2,\ldots,u_i)\in V^i \colon {\mathbf{Pr} \left[\,L_{r,\ell}^{{\star}}{\,\middle\vert\,}\bigcap\nolimits_{j=1}^{j_0} \{U_j=u_j\}\,\right]} {\geqslant}1-\frac{1}{n^2} \text{ for all $j_0=1,2,\ldots,i$}\right\}.
   \label{eq:goodseq}$$ Intuitively, for any given $r$, $\ell$ and $i$, the set $\Upsilon_{r,\ell}^i$ contains the *good* birthplace for the first $i$ balls so that the event $L_{r,\ell}^{{\star}}$ is likely to occur, conditioning on any prefix of the birthplaces.

While [Lemma \[lem:addend\]]{} considered the effect of the last ball $n$, the following lemma studies the effect of replacing the birthplace of ball $i$ by a randomly chosen bin.

\[lem:switch\] Let $i$, $\ell$, $r$ and $v$ be fixed. Let $f\colon V^n \to \mathbb{Z}$ be an increasing function that depends only on $(X_{v'}^{(n)})_{v'\in \Lambda_{r,\ell}}$ and is $1$-Lipschitz. Let $W_0,W_1,\ldots,W_{n-i}$ and ${\widehat}W_0$ be i.i.d. random variables chosen uniformly from $V$. Then, if $(u_1,u_2,\ldots,u_{i-1})\in \Upsilon_{r,\ell}^{i-1}$, we have $$\begin{aligned}
      &{\mathbf{Pr} \left[\,f(u_1,\ldots,u_{i-1},W_0,W_1,\ldots,W_{n-i})\neq f(u_1,\ldots,u_{i-1},{\widehat}W_0,W_{1},\ldots,W_{n-i})\,\right]}\\
      &{\leqslant}\frac{6c |B_v^r|(2\Delta)^{-\ell+1}}{n} + \frac{18\log^7 n\log\log n}{n}+ \frac{5}{n^2},
   \end{aligned}$$ where $c$ is the constant from Lemma \[lem:addend\].

In this proof all the probabilities are taken conditional on $U_j=u_j$ for all $j=1,2,\ldots,i-1$, but we will omit this dependence from the notation. The idea is to relate the probability above to $${\mathbf{Pr} \left[\,f(u_1,\ldots,u_{i-1},W_{1},\ldots,W_{n-i},W_0)\neq f(u_1,\ldots,u_{i-1},W_{1},\ldots,W_{n-i},{\widehat}W_0)\,\right]},$$ which corresponds to changing the $n$-th ball instead of the $i$-th ball; this will allow us to apply Lemma \[lem:addend\].

Consider the three events below: $$\begin{aligned}
      E_1 &= \big\{f(u_1,\ldots,u_{i-1},W_0,W_{1},\ldots,W_{n-i})\neq f(u_1,\ldots,u_{i-1},W_{1},\ldots,W_{n-i},W_0)\big\}\\
            {\widehat}E_1&= \big\{f(u_1,\ldots,u_{i-1},{\widehat}W_0,W_{1},\ldots,W_{n-i})\neq f(u_1,\ldots,u_{i-1},W_{1},\ldots,W_{n-i},{\widehat}W_0)\big\} \\
                  E_\mathrm{end} &= \big\{f(u_1,\ldots,u_{i-1},W_{1},\ldots,W_{n-i},W_0)\neq f(u_1,\ldots,u_{i-1},W_{1},\ldots,W_{n-i},{\widehat}W_0)\big\}.
   \end{aligned}$$ Clearly, $f(u_1,\ldots,u_{i-1},W_0,W_1,\ldots,W_{n-i})$ and $f(u_1,\ldots,u_{i-1},{\widehat}W_0,W_{1},\ldots,W_{n-i})$ can only be different if at least one of $E_1$, ${\widehat}E_1$ or $E_\mathrm{end}$ happen. Therefore, we can write $$\begin{aligned}
      &{\mathbf{Pr} \left[\,f(u_1,\ldots,u_{i-1},W_0,W_1,\ldots,W_{n-i})\neq f(u_1,\ldots,u_{i-1},{\widehat}W_0,W_{1},\ldots,W_{n-i})\,\right]}\nonumber\\
      &{\leqslant}{\mathbf{Pr} \left[\,E_1\,\right]} + {\mathbf{Pr} \left[\,{\widehat}E_1\,\right]} + {\mathbf{Pr} \left[\,E_\mathrm{end}\,\right]}.
      \label{eq:decomp}
   \end{aligned}$$

We start with the term ${\mathbf{Pr} \left[\,E_\mathrm{end}\,\right]}$. Let $I_\mathrm{end}$ be the event that $L_{r,\ell-1}^{{\star}}$ happens given that the birthplaces of the first $n-1$ balls are according to the sequence $(u_1,\ldots,u_{i-1},W_{1},\ldots,W_{n-i})$. If $Y_u^{(n)}$ is the load of vertex $u$ when $n$ balls are added with birthplaces $u_1$, $u_2$, $\ldots$, $u_{i-1}$, $W_1$, $W_2$, $\ldots$, $W_{n-i}$, $W_0$ and ${\widehat}Y_u^{(n)}$ is the load of vertex $u$ when $n$ balls are added with birthplaces $u_1$, $u_2$, $\ldots$, $u_{i-1}$, $W_1$, $W_2$, $\ldots$, $W_{n-i}$, ${\widehat}W_0$, we have that $$\begin{aligned}
      {\mathbf{Pr} \left[\,E_\mathrm{end}\,\right]}
      &{\leqslant}{\mathbf{Pr} \left[\,I_\mathrm{end}^\mathrm{c}\,\right]} +
         {\mathbf{Pr} \left[\,\bigcup_{u\in B_v^r}\left( \{Y_u^{(n-1)}\neq Y_u^{(n)}\} \cap \{Y_u^{(n)} {\geqslant}\ell\}\right) \cap I_\mathrm{end}\,\right]}\nonumber\\
      &\quad+ {\mathbf{Pr} \left[\,\bigcup_{u\in B_v^r} \left(\{{\widehat}Y_u^{(n-1)}\neq {\widehat}Y_u^{(n)}\} \cap \{{\widehat}Y_u^{(n)} {\geqslant}\ell\}\right) \cap I_\mathrm{end}\,\right]},
      \label{eq:eend}
   \end{aligned}$$ where ${\mathbf{Pr} \left[\,I_\mathrm{end}^\mathrm{c}\,\right]} {\leqslant}n^{-2}$ by  since $(u_1,\ldots,u_{i-1})\in\Upsilon_{r,\ell}^{i-1}$ and $W_1,\ldots,W_{n-i}$ are i.i.d. uniform samples from $V$. The other two terms in [equation ]{} can be bounded by Lemma \[lem:addend\].

Now it remains to bound ${\mathbf{Pr} \left[\,E_1\,\right]}$, since by symmetry we have ${\mathbf{Pr} \left[\,E_1\,\right]}={\mathbf{Pr} \left[\,{\widehat}E_1\,\right]}$. In order to bound ${\mathbf{Pr} \left[\,E_1\,\right]}$, we consider all cyclic permutations of $(u_1,\ldots,u_{i-1},W_0,W_1,\ldots,W_{n-i})$. More specifically, we first compare $$f(u_1,\ldots,u_{i-1},W_0,W_1,\ldots,W_{n-i})
      \quad\text{with}\quad
      f(u_1,\ldots,u_{i-1},W_1,W_{2},\ldots,W_{n-i},W_0),$$ then we compare $$f(u_1,\ldots,u_{i-1},W_1,W_{2},\ldots,W_{n-i},W_0)
      \quad\text{with}\quad
      f(u_1,\ldots,u_{i-1},W_2,W_3,\ldots,W_{n-i},W_0,W_1),$$ and so on and so forth until we compare $$f(u_1,\ldots,u_{i-1},W_{n-i},W_0,W_1,\ldots,W_{n-i-1})
      \quad\text{with}\quad
      f(u_1,\ldots,u_{i-1},W_0,W_1,\ldots,W_{n-i}).$$ In order to do this, we define a graph $H$ whose vertex set is $\{0,1,\ldots,n-i\}\times V^{n-i+1}$; so the vertices of $H$ have the form $(j,z_0,z_1,\ldots,z_{n-i})$. We let each vertex of $H$ have exactly one outgoing edge and one incoming edge by having a directed edge from each vertex $(j,z_0,z_1,\ldots,z_{n-i})$ to $(j',z_1,z_2,\ldots,z_{n-i},z_0)$ where $j'=j+1 \pmod{n-i+1}$. With this, the sequence $$\begin{aligned}
      (0,z_0,z_1,\ldots,z_{n-i}),
      (1,z_1,\ldots,z_{n-i},z_0),
      \ldots,
      (j,z_j,\ldots,z_{n-i},z_0,z_1,\ldots,z_{j-1}),
      \ldots,\\
      (n-i,z_{n-i},z_0,\ldots,z_{n-i-1}),
      (0,z_0,z_1,\ldots,z_{n-i})
   \end{aligned}$$ forms a directed cycle in $H$. Since each vertex has in-degree and out-degree equal to one, we have that each connected component of $H$ is a directed cycle with $n-i+1$ vertices. Now, for any vertex $(j,z_0,z_1,\ldots,z_{n-i})$ of $H$, we say that the edge from $(j,z_0,z_1,\ldots,z_{n-i})$ to $(j+1,z_1,z_2,\ldots,z_{n-i},z_0)$ is *$f$-increasing* if $$f(u_1,u_2,\ldots,u_{i-1},z_0,z_1,\ldots,z_{n-i})<f(u_1,u_2,\ldots,u_{i-1},z_1,z_2,\ldots,z_{n-i},z_0).$$ Similarly we say that the edge is *$f$-decreasing* if the opposite inequality holds: $$f(u_1,u_2,\ldots,u_{i-1},z_0,z_1,\ldots,z_{n-i})>f(u_1,u_2,\ldots,u_{i-1},z_1,z_2,\ldots,z_{n-i},z_0).$$

Since $f$ is $1$-Lipschitz and integer-valued, for any directed cycle, the number of $f$-increasing edges is the same as the number of $f$-decreasing edges, and therefore the number of $f$-increasing edges in $H$ is the same as the number of $f$-decreasing edges.

Note that choosing a sequence $(W_0,W_1,\ldots,W_{n-i})$ uniformly at random from $V^{n-i+1}$ and a number $k$ uniformly at random from $\{0,1,\ldots,n-i\}$ gives a uniformly random vertex of $H$. Similarly, if we choose a vertex $(j,z_0,z_1,\ldots,z_{n-i})$ uniformly at random from the vertex set of $H$, then $(z_0,z_1,\ldots,z_{n-i})$ is a uniform sample from $V^{n-i+1}$. Since each vertex of $H$ has a unique outgoing edge, one can choose a uniformly random edge of $H$ by choosing the outgoing edge of an uniformly random vertex of $H$.

We fix a uniformly random vertex $(j,z_0,z_1,\ldots,z_{n-i})$ of $H$ and let $e$ be its unique outgoing edge; i.e., $e$ is the edge from $(j,z_0,z_1,\ldots,z_{n-i})$ to $(j+1,z_1,\ldots,z_{n-i},z_0)$. Therefore, $${\mathbf{Pr} \left[\,E_1\,\right]} {\leqslant}{\mathbf{Pr} \left[\,\text{$e$ is $f$-increasing}\,\right]} + {\mathbf{Pr} \left[\,\text{$e$ is $f$-decreasing}\,\right]} = 2\,{\mathbf{Pr} \left[\,\text{$e$ is $f$-increasing}\,\right]}.
      \label{eq:inconly}$$ Let $Y_u^{(k)}$ be the load of vertex $u$ after $k$ balls are added with birthplaces given by the sequence $(u_1,\ldots,u_{i-1},z_0,\ldots,z_{n-i})$ and let ${\widehat}Y_u^{(k)}$ be the load of vertex $u$ after $k$ balls are added with birthplaces given by the sequence $(u_1,\ldots,u_{i-1},z_1,\ldots,z_{n-i},z_0)$.

Note that, by Lemma \[lem:monotonicity\], removing a ball cannot increase the load of any vertex; this gives that $$Y_u^{(n)} {\geqslant}{\widehat}Y_u^{(n-1)} \quad \text{for all $u\in V$}.$$ Therefore, $e$ can only be $f$-increasing if ${\widehat}Y_u^{(n)} \neq {\widehat}Y_u^{(n-1)}$ and ${\widehat}Y_u^{(n)}{\geqslant}\ell$ for some $u\in B_v^r$. Let $I_e$ be the indicator that $L_{r,\ell-1}^{{\star}}$ holds given that the birthplaces of the balls are according to the sequence $(u_1,\ldots,u_{i-1},z_1,\ldots,z_{n-i},z_0)$. Hence, using , we have $${\mathbf{Pr} \left[\,E_1\,\right]} {\leqslant}2\,{\mathbf{Pr} \left[\,\bigcup\nolimits_{u\in B_v^r}\left( \{{\widehat}Y_u^{(n-1)}\neq {\widehat}Y_u^{(n)}\} \cap \{{\widehat}Y_u^{(n)} {\geqslant}\ell\}\right)  \, \mid \, I_e\,\right]} + 2\,{\mathbf{Pr} \left[\,I_e^\mathrm{c}\,\right]}.$$ By [equation ]{}, ${\mathbf{Pr} \left[\,I_e^\mathrm{c}\,\right]} {\leqslant}n^{-2}$ and the other term can be bounded by Lemma \[lem:addend\]. Then, we put this and  into to complete the proof.

Now we will use an inductive argument to bound the probability that $L_{r,\ell}$ happens for all $r$ and $\ell$.

\[lem:lambda\] There exists a positive constant $c'$ such that, for any $v\in V$, $r<R$ and any integer $\ell\in [\ell_0,\ell_1]$, we have $${\mathbf{Pr} \left[\,|\Lambda_{r,\ell}|> 8|B_v^r|(2\Delta)^{-\ell} + \frac{\log^7 n}{\ell}\,\right]}
      {\leqslant}\exp(-\log^4n) + n^2 \cdot {\mathbf{Pr} \left[\,(L_{r,\ell-1}^{{\star}})^\mathrm{c}\,\right]}$$ for all large enough $n$.

Recall that, by Lemma \[lem:exptail\], we have $${\mathbf{E} \left[\,| \Lambda_{r,\ell}|\,\right]}
      {\leqslant}2|B_v^{r}| \left(\frac{4{\mathrm{e}}\cdot\Delta}{\ell}\right)^{\ell} {\leqslant}4|B_v^r|\left(2\Delta\right)^{-\ell}.$$ Define the stopping time $$\tau = n \land \min\{j \colon (U_1,U_2,\ldots,U_j) \not \in \Upsilon_{r,\ell}^j\},$$ where for any two numbers $a \land b := \min \{a,b\}$. Let $X_i = {\mathbf{E} \left[\, | \Lambda_{r,\ell} | \mid \mathcal{F}_i\,\right]}$ and $Z_i = X_{i \land \tau}$. Note that $Z_i$ is a martingale since $\tau$ is a stopping time. Moreover, $\tau$ is a *bounded* stopping time and, using the optional stopping theorem, we have that ${\mathbf{E} \left[\,Z_\tau\,\right]}={\mathbf{E} \left[\,Z_0\,\right]}={\mathbf{E} \left[\,X_0\,\right]}$. We want to bound the conditional variance of $Z_i-Z_{i-1}$ uniformly over all $i$, which is given by $$\begin{aligned}
      {\mathbf{Var}_{U_i} \left[\,Z_i-Z_{i-1} {\,\middle\vert\,}\mathcal{F}_{i-1}\,\right]} &= {\mathbf{E}_{U_i} \left[\,(Z_i - Z_{i-1})^2 {\,\middle\vert\,}\mathcal{F}_{i-1}\,\right]} - \left( {\mathbf{E}_{U_i} \left[\,Z_i - Z_{i-1} {\,\middle\vert\,}\mathcal{F}_{i-1}\,\right]} \right)^2 \\ &= {\mathbf{E}_{U_i} \left[\,(Z_i - Z_{i-1})^2 {\,\middle\vert\,}\mathcal{F}_{i-1}\,\right]},
   \end{aligned}$$ where the variance and expectation are taken over the choice of $U_i$ only. Now, we write $$\begin{aligned}
      &{\mathbf{E}_{U_i} \left[\,(Z_i - Z_{i-1})^2 {\,\middle\vert\,}\mathcal{F}_{i-1}\,\right]}\\
      &= {\mathbf{E}_{U_i} \left[\,(Z_i - Z_{i-1})^2{\mathbf{1}\left(\tau {\geqslant}i\right)} {\,\middle\vert\,}\mathcal{F}_{i-1}\,\right]}
         + {\mathbf{E}_{U_i} \left[\,(Z_i - Z_{i-1})^2{\mathbf{1}\left(\tau < i\right)} {\,\middle\vert\,}\mathcal{F}_{i-1}\,\right]}\\
      &= {\mathbf{E}_{U_i} \left[\,(Z_i - Z_{i-1})^2{\mathbf{1}\left(\tau {\geqslant}i\right)} {\,\middle\vert\,}\mathcal{F}_{i-1}\,\right]},
   \end{aligned}$$ since $Z_i=Z_{i-1}$ whenever $\tau< i$. We want to bound $${\mathbf{E}_{U_i} \left[\,(Z_i - Z_{i-1})^2 {\,\middle\vert\,}\bigcap\nolimits_{j=1}^{i-1} \{U_j=u_j\}\,\right]},$$ uniformly over all $(u_1,u_2,\ldots,u_{i-1})\in \Upsilon_{r,\ell}^{i-1}$. Let $\zeta_u$ be the value of $Z_i$ when $U_i=u$ and let ${\overline}\zeta = \frac{1}{n}\sum_{u\in V}\zeta_u$. Then we have $${\mathbf{E}_{U_i} \left[\,(Z_i - Z_{i-1})^2 {\,\middle\vert\,}\bigcap\nolimits_{j=1}^{i-1} \{U_j=u_j\}\,\right]}
      = \frac{1}{n} \sum_{u \in V} (\zeta_u-{\overline}\zeta)^2.$$ Since $X_i$ is 1-Lipschitz we have $|\zeta_u-\zeta_{u'}|{\leqslant}1$ for all $u,u' \in V$. With this, we can write $$\frac{1}{n} \sum_{u \in V} (\zeta_u-{\overline}\zeta)^2
      {\leqslant}\frac{1}{n} \sum_{u\in V} |\zeta_u-{\overline}\zeta|
      = \frac{1}{n} \sum_{u\in V}\Big|\sum_{u'\in V}\frac{1}{n}(\zeta_{u} - \zeta_{u'})\Big|
      {\leqslant}\frac{1}{n^2} \sum_{u\in V}\sum_{u'\in V}\left|\zeta_{u} - \zeta_{u'}\right|.$$ Now, using Lemma \[lem:switch\], we have that $$\frac{1}{n^2} \sum_{u\in V}\sum_{u'\in V}\left|\zeta_{u} - \zeta_{u'}\right|
      {\leqslant}\frac{6c|B_v^r|(2\Delta)^{-\ell+1}}{n}+\frac{18\log^7 n \log\log n}{n} + \frac{5}{n^2},$$ which gives that $${\mathbf{E}_{U_i} \left[\,(Z_i - Z_{i-1})^2 {\,\middle\vert\,}\mathcal{F}_{i-1}\,\right]}
      {\leqslant}\frac{6c|B_v^r|(2\Delta)^{-\ell+1}}{n}+\frac{18\log^7 n \log\log n}{n} + \frac{5}{n^2},$$ uniformly over $i$. Now, note that, for any $\lambda>0$, $$\begin{aligned}
      {\mathbf{Pr} \left[\,|X_n-X_0|>\lambda\,\right]}
      &{\leqslant}{\mathbf{Pr} \left[\,\{|X_n-X_0|>\lambda\}\cap \{\tau {\geqslant}n\} \,\right]} + {\mathbf{Pr} \left[\,\tau < n\,\right]}\\
      &= {\mathbf{Pr} \left[\,\{|Z_n-Z_0|>\lambda\}\cap \{\tau {\geqslant}n\} \,\right]} + {\mathbf{Pr} \left[\,\tau < n\,\right]}.
   \end{aligned}$$ Also, we have that for any $1 {\leqslant}i {\leqslant}n$, $$\begin{aligned}
       &{\mathbf{Pr} \left[\,(L_{r,\ell-1}^{{\star}})^\mathrm{c}\,\right]}  \\
       &= \sum_{j_0=1}^{i} {\mathbf{Pr} \left[\,  (L_{r,\ell-1})^{c} \cap \left\{ (U_1,\ldots,U_{j_0}) \not\in \Upsilon_{r, \ell-1}^{j_0} \right\} \cap \left( \bigcap\nolimits_{k=1}^{j_0-1} \{(U_1,\ldots,U_{k}) \in \Upsilon_{r, \ell-1}^{k}\} \right) \,\right]} \\
       & \quad\, + {\mathbf{Pr} \left[\, (L_{r,\ell-1}^{{\star}})^\mathrm{c} \cap \left( \bigcap\nolimits_{k=1}^i \{ (U_1,\ldots,U_{k}) \in \Upsilon_{r, \ell-1}^{k}   \} \right)   \,\right]} \\
       &{\geqslant}{\mathbf{Pr} \left[\,(U_1,\ldots,U_i) \not\in \Upsilon_{r,\ell-1}^i\,\right]} \cdot \frac{1}{n^2}.
    \end{aligned}$$ This gives that $${\mathbf{Pr} \left[\,\tau < n\,\right]}
      {\leqslant}{\mathbf{Pr} \left[\,(U_1,\ldots,U_{n-1}) \not \in \Upsilon_{r,\ell-1}^{n-1}\,\right]}
      {\leqslant}n^2\cdot {\mathbf{Pr} \left[\,(L_{r,\ell-1}^{{\star}})^\mathrm{c}\,\right]}.$$ Then, applying the version of Azuma’s inequality from Lemma \[lem:azumavar\], we have $$\begin{aligned}
      &{\mathbf{Pr} \left[\,|\Lambda_{r,\ell}|> 8|B_v^r|(2\Delta)^{-\ell} + \frac{\log^7 n}{\ell}\,\right]}\\
      &{\leqslant}{\mathbf{Pr} \left[\,|Z_n-Z_0|> 4|B_v^r|(2\Delta)^{-\ell} + \frac{\log^7 n}{\ell}\,\right]} + n^2 \cdot {\mathbf{Pr} \left[\,(L_{r,\ell-1}^{{\star}})^\mathrm{c}\,\right]}\\
      &{\leqslant}\exp\left(-\frac{(4|B_v^r|(2\Delta)^{-\ell}+\frac{\log^7 n}{\ell})^2}{14c|B_v^r|(2\Delta)^{-\ell}+37\log^7 n\log\log n}\right) + n^2 \cdot {\mathbf{Pr} \left[\,(L_{r,\ell-1}^{{\star}})^\mathrm{c}\,\right]}.
   \end{aligned}$$ If $|B_v^r|(2\Delta)^{-\ell} {\geqslant}\log^7n\log\log n$, the exponential term above is at most $$\exp\left(-\frac{(4|B_v^r|(2\Delta)^{-\ell})^2}{(14c+37)|B_v^r|(2\Delta)^{-\ell}}\right)
      {\leqslant}\exp\left(-\frac{16 |B_v^r|(2\Delta)^{-\ell}}{14c+37}\right)
      {\leqslant}\exp\left(-\log^4n\right);$$ otherwise we bound above the exponential term by $$\exp\left(-\frac{(\frac{\log^7n}{\ell})^2}{(14c+37)\log^7n\log\log n}\right)
      {\leqslant}\exp\left(-\frac{\log^7n}{(14c+37)\ell^2\log\log n}\right)
      {\leqslant}\exp\left(-\log^4n\right),$$ where the last inequality holds for all large enough $n$ since $\ell{\leqslant}\ell_1=O(\log n)$.

First note that the lower bound on the maximum load is established by Theorem \[thm:lowerbounds\]. So we now prove the upper bound. Let $v$ be an arbitrary vertex of $V$. We start the proof by showing that there exist positive constants $C$ and $c$ such that, for all large enough $n$, it holds that $${\mathbf{Pr} \left[\,\sum_{u\in B_v^{r_0}} X_u^{(n)} > C |B_v^{r_0}|\,\right]} {\leqslant}\exp\left(-c \log^3n\right).
      \label{eq:mainstep}$$ Then, it follows by Lemma \[lem:characterization\] that $$X_v^{(n)} {\leqslant}C + \sum_{i=0}^{r_0} \frac{|N_v^i|}{|B_v^{r_0}|}.$$ Note that $\sum_{i=0}^r \frac{|N_v^i|}{|B_v^{r_0}|}$ is the average distance between $v$ and a vertex in $B_v^{r_0}$, which is at most $r_0$. Therefore, we obtain $X_v^{(n)} {\leqslant}C + r_0$. By the definition of $r_0$, we have $|B_v^{r_0}| {\leqslant}\Delta \log^{10}n$. Combing this with the exponential growth property of $G$ yields $$r_0 {\leqslant}\frac{1}{\phi}   \log |B_v^{r_0}| = {\mathcal{O}}(\log\log n),$$ where $\phi$ is the parameter defined by [equation ]{}.

It remains to establish . First note that $$\sum_{u\in B_v^{r_0}} X_u^{(n)}
      = \sum_{\ell=1}^\infty |\Lambda_{r_0,\ell}|
      {\leqslant}|B_v^{r_0}|\ell_0 + \sum_{\ell=\ell_0+1}^\infty |\Lambda_{r_0,\ell}|.$$ Therefore, we have that $${\mathbf{Pr} \left[\,\sum_{u\in B_v^{r_0}} X_u^{(n)} > C |B_v^{r_0}|\,\right]}
      {\leqslant}{\mathbf{Pr} \left[\,\sum_{\ell=\ell_0}^\infty |\Lambda_{r_0,\ell}| > (C-\ell_0)|B_v^{r_0}|\,\right]}.$$ Now, if $|\Lambda_{r_0,\ell}| {\leqslant}8|B_v^{r_0}|(2\Delta)^{-\ell}+\frac{\log^7 n}{\ell}$ for all $\ell=\ell_0,\ell_0+1,\ldots,\ell_1$, then $\sum_{\ell=\ell_0}^\infty |\Lambda_{r_0,\ell}| {\leqslant}(C-\ell_0)|B_v^{r_0}|$ for some large enough $C$ since $|B_v^{r_0}|{\geqslant}\log^{10}n$. For any given $\ell$, using Lemma \[lem:lambda\], we have $${\mathbf{Pr} \left[\,|\Lambda_{r_0,\ell}| > 8|B_v^{r_0}|(2\Delta)^{-\ell}+\frac{\log^7 n}{\ell}\,\right]}
      {\leqslant}\exp(-\log^4n) + n^2 \cdot {\mathbf{Pr} \left[\,(L_{r_0,\ell-1}^{{\star}})^\mathrm{c}\,\right]}.
      \label{eq:wantedbd}$$ By definition of $L_{r,\ell}^{{\star}}$ (cf. ), we have that $$\begin{aligned}
      {\mathbf{Pr} \left[\,(L_{r_0,\ell-1}^{{\star}})^\mathrm{c}\,\right]}
      &{\leqslant}{\mathbf{Pr} \left[\,|\Lambda_{r_0,\ell-1}^{{\star}}| > 8|B_v^{r_0}|(2\Delta)^{-\ell+1}+\frac{\log^7 n}{\ell-1}\,\right]}+{\mathbf{Pr} \left[\,(L_{r_0,\ell-2}^{{\star}})^\mathrm{c}\,\right]}\\
      &{\leqslant}{\mathbf{Pr} \left[\,|\Lambda_{r_0,\ell-1}| > 8|B_v^{r_0}|(2\Delta)^{-\ell+1}+\frac{\log^7 n}{\ell-1}\,\right]}+{\mathbf{Pr} \left[\,(L_{r_0,\ell-2}^{{\star}})^\mathrm{c}\,\right]}\\
      &{\leqslant}\exp(-\log^4n) + (n^2+1){\mathbf{Pr} \left[\,(L_{r_0,\ell-2}^{{\star}})^\mathrm{c}\,\right]},
   \end{aligned}$$ where the second inequality follows since $\Lambda_{r_0,\ell-1}^{{\star}}\subseteq \Lambda_{r_0,\ell-1}$ and last inequality follows from Lemma \[lem:lambda\]. Applying this into , we have $$\begin{aligned}
      &{\mathbf{Pr} \left[\,|\Lambda_{r_0,\ell}| > 8|B_v^{r_0}|(2\Delta)^{-\ell}+\frac{\log^7 n}{\ell}\,\right]}\\
      &{\leqslant}\exp(-\log^4n) + (n^2+1)\exp(-\log^4n) + (n^2+1)^2{\mathbf{Pr} \left[\,(L_{r_0,\ell-2}^{{\star}})^\mathrm{c}\,\right]}\\
      &{\leqslant}\sum_{k=0}^{\ell-\ell_0} (n^2+1)^k \exp(-\log^4n) + (n^2+1)^{\ell-\ell_0+1} {\mathbf{Pr} \left[\,(L_{r_0+1,\ell_1}^{{\star}})^\mathrm{c}\,\right]}.
   \end{aligned}$$ Using the same argument, we obtain for any $r$ that $$\begin{aligned}
      {\mathbf{Pr} \left[\,(L_{r,\ell_1}^{{\star}})^\mathrm{c}\,\right]}
      &{\leqslant}\sum_{k=0}^{\ell_1-\ell_0} (n^2+1)^k \exp(-\log^4n) + (n^2+1)^{\ell_1-\ell_0+1} {\mathbf{Pr} \left[\,(L_{r+1,\ell_1}^{{\star}})^\mathrm{c}\,\right]}\\
      &{\leqslant}\sum_{j=0}^{R-r-1} \sum_{k=0}^{\ell_1-\ell_0} (n^2+1)^{\ell_1j+ k} \exp(-\log^4n) + (n^2+1)^{\ell_1 (R-r)} {\mathbf{Pr} \left[\,(L_{R}^{{\star}})^\mathrm{c}\,\right]}.
   \end{aligned}$$ Using [Lemma \[lem:larger\]]{}, $${\mathbf{Pr} \left[\,(L_{R}^{{\star}})^\mathrm{c}\,\right]} {\leqslant}2 n^{-\log^5 n},$$ and plugging this into , and using the union bound over $\ell$, we obtain that $${\mathbf{Pr} \left[\, \bigcup\nolimits_{\ell=\ell_0}^{\ell_1}\Big\{|\Lambda_{r_0,\ell}| > 8|B_v^{r_0}|(2\Delta)^{-\ell}+\frac{\log^7 n}{\ell}\Big\}\,\right]}{\leqslant}\exp(-c \log^3n)$$ for some positive constant $c$, which establishes (\[eq:mainstep\]).

Grid graphs {#sec:grid}
===========

In this section, we analyze the maximum load of the local allocation process on any $d$-dimensional grid, where $d$ is an arbitrary constant. We show that the maximum load is $\Theta \Big( \left( \frac{\log n}{\log \log n} \right)^{\frac{1}{d+1}} \Big)$. Interestingly, the analysis on the grid turns out to be much easier than the analysis on expander graphs, as on grid graphs the number of paths the local search could follow is much smaller.

Formally, we define the $d$-dimensional grid by the vertex set $V=\{u: u=(u_1,\ldots,u_d), u_i=0,\ldots, n^{1/d}-1\}$ and edge set $E=\{ \{u, v\} : \mathrm{dist}(u,v)=1 \}$, where $$\mathrm{dist}(u,v)=\sum_{i=1}^d\mathrm{dist}(u_i,v_i),\quad\mbox{and}\quad
\mathrm{dist}(u_i,v_i)= \min\left\{|u_i-v_i|, n^{1/d}-|u_i-v_i|\right\}.$$

We start with the *upper bound*. Within this proof, we use the following notation: $$\widetilde{B}_u^r:=\{v\in V: \mathrm{dist}(u_i,v_i){\leqslant}r, \forall i=1,\ldots,d\}.$$ Roughly speaking, $\widetilde{B}_{u}^r$ can be seen as the “$\ell_\infty$-version” of the set $B_u^r$ used in [Section \[sec:expander\]]{}. Note that for any $r {\leqslant}n^{1/d}/2-1/2$, $|\widetilde{B}_{u}^r| = (2r+1)^d$. We first define an event that gives an upper bound for the number of balls born in $\widetilde{B}_{u}^r$ for various $u$ and $r$: $$\begin{aligned}
  \mathcal{E} &:= \bigcap_{u \in V} \bigcap_{r=(4d)^d \big(\frac{\log n}{\log \log n}\big)^{\frac{1}{d+1}}}^{n^{1/d}/2}
     \left\{  \sum_{v \in \widetilde{B}_{u}^r} Z_v^{(n)} {\leqslant}\rho(r) \right\},\end{aligned}$$ where $\rho(r) := 4{\mathrm{e}}\cdot (d+1) (\frac{\log n}{\log \log n})^{\frac{1}{d+1}}  \cdot (3 r)^{d}$ and $Z_v^{(n)}=\sum_{i=1}^n {\mathbf{1}\left( U_i=v  \right)}$ is the number of balls born on $v$ during the first $n$ rounds.

To prove that $\mathcal{E}$ holds with high probability, fix any vertex $u \in V$ and $r{\geqslant}(4d)^d (\frac{\log n}{\log \log n})^{\frac{1}{d+1}}$. We have $$\begin{aligned}
 \lefteqn{{\mathbf{Pr} \left[\,  \sum_{v \in \widetilde{B}_{u}^r} Z_v^{(n)} {\geqslant}\rho(r)        \,\right]}}\\
 &{\leqslant}\binom{n}{\rho(r)} \left( \frac{|\widetilde{B}_{u}^r|}{n} \right)^{\rho(r)}
    {\leqslant}\left( \frac{{\mathrm{e}}\cdot n}{\rho(r)} \right)^{\rho(r)} \left( \frac{(2r+1)^{d}}{n} \right)^{\rho(r)} \\
 &{\leqslant}\left( \frac{{\mathrm{e}}\cdot (3r)^{d}}{4{\mathrm{e}}\cdot (d+1) (\frac{\log n}{\log \log n})^{\frac{1}{d+1}}  \cdot  (3r)^{d} }  \right)^{4 {\mathrm{e}}\cdot (d+1) (\frac{\log n}{\log \log n})^{\frac{1}{d+1}} \cdot (3 r)^{d}} {\leqslant}n^{-3}.\end{aligned}$$ Taking the union bound over the $n$ vertices and at most $n/2$ possible values for $r$ yields ${\mathbf{Pr} \left[\, \mathcal{E} \,\right]} {\geqslant}1 - n^{-1}$.

Assuming that $\mathcal{E}$ occurs, we now infer the upper bound on the maximum load. Assume for the sake of contradiction that the maximum load is in the interval $[\alpha/2,
\alpha]$ where $\alpha$ is any value larger than $16{\mathrm{e}}\cdot (16d)^d (d+1) ( \frac{\log n}{\log \log n})^{\frac{1}{d+1}}$. Let $u \in V$ be a vertex with $X_u^{(n)} \in [\alpha/2,\alpha]$. Since the maximum load is at most $\alpha$, only balls that are born in $\widetilde{B}^{2\alpha}_{u}$ can reach $\widetilde{B}^{\alpha}_{u}$. Since $\mathcal{E}$ occurs, we know for $r = 2 \alpha$ that $$\begin{aligned}
    \sum_{v \in \widetilde{B}^{2 \alpha}_{u}} Z_v^{(n)} &{\leqslant}4{\mathrm{e}}\cdot (d+1) \left(\frac{\log n}{\log \log n}\right)^{1/(d+1)} \cdot (6 \alpha)^{d}. \label{eq:contraone}\end{aligned}$$ On the other hand, if $u$ has load at least $\alpha/2$, then $$\begin{aligned}
  \sum_{v \in \widetilde{B}^{2 \alpha}_{u}} Z_v^{(n)}
  &{\geqslant}\left|\widetilde{B}^{\alpha/(4d)}_{u} \right| \cdot \left( \frac{\alpha}{2} - d \cdot \frac{\alpha}{4d} \right) \notag \\
  &{\geqslant}\left( \frac{\alpha}{2d} \right)^{d} \cdot \frac{\alpha}{4} = \frac{1}{4} \cdot \frac{\alpha}{(16d)^d} \cdot    (8 \alpha)^{d} \notag \\
  &{\geqslant}4 {\mathrm{e}}\cdot(d+1)\cdot \left(\frac{\log n}{\log \log n} \right)^{\frac{1}{d+1}} \cdot (8 \alpha)^{d},
  \label{eq:contratwo}\end{aligned}$$ where the last step used our lower bound on $\alpha$. The desired contradiction follows now from (\[eq:contraone\]) and (\[eq:contratwo\]), and the proof of the upper bound is complete. Now we proceed to establish the *lower bound*. It is a well-known fact (cf. [@MU05 Lemma 5.12]) that with probability at least $1-n^{-1}$, there is a vertex $u \in V$ on which at least $\frac{\log n}{\log \log n}$ balls are born. Applying [Lemma \[lem:characterizationlower\]]{} with $S=\{u \}$, $\Phi_{S} = \frac{\log n}{\log \log n} $ implies that the maximum load $\beta:=X_{\max}^{(n)}$ satisfies $$\beta \cdot |B_{u}^{\beta}| {\geqslant}\frac{\log n}{\log \log n}.$$ Hence, as $|B_{u}^{\beta}| {\leqslant}|\widetilde{B}_{u}^{\beta}| {\leqslant}(2 \beta + 1)^{d}$ and $d$ is a constant, we obtain that $\beta=\Omega\left( \Big(\frac{\log n}{\log \log n}\Big)^{\frac{1}{d+1}}\right)$.

Dense graphs {#sec:densegraph}
============

In this section, we analyze [*dense*]{} graphs which we define as graphs where the minimum degree is $\Omega(\log n)$ and the ratio between the maximum and minimum degrees is constant. This includes, for instance, the $\log n$-dimensional hypercube and Erdős-Rényi random graphs with average degree $(1+{\varepsilon}) \log n$, for any ${\varepsilon}>0$. The key idea of the analysis is that as long as less than $\alpha$ balls are allocated, where $\alpha < n$, every vertex has a constant fraction of neighbors which have received no ball, and hence, the maximum load is bounded by $1$. Lemma \[lem:subadditivity\] implies then that after $n$ balls are allocated, the maximum load is at most $n/\alpha$. To make the analysis work, we need to assume that ties are broken uniformly at random; i.e., whenever a ball has more than one vertex to be forwarded to, the vertex is chosen independently and uniformly at random among the set of possible vertices.

We divide the process of allocating the $n$ balls into different phases, where each phase allocates a batch of consecutive $\alpha {\leqslant}n$ balls (hence the number of phases is $\lceil n/ \alpha \rceil$). Then, by subadditivity (cf. Lemma \[lem:subadditivity\]), the maximum load at the end is at most $\lceil n/ \alpha \rceil$ times the maximum load of a single phase.

Let $G$ be an almost regular graph with minimum degree $\delta = c \cdot \log n$ and maximum degree $\Delta {\leqslant}C \cdot \delta$, where $c > 0$ is any value bounded below by a constant and $C {\geqslant}1$ is a constant. For any load assignment of the vertices $(x_u)_{u \in V}$, we define the exponential potential as: $$\Phi((x_u)_{u \in V}) := \sum_{u \in V} \exp\left(\sigma \cdot \sum_{v \in N_u} x_v\right),$$ where $\sigma := \max \{ 4 \log (n) / \delta, 1 \} = {\mathcal{O}}(1)$. We also define for any $1 {\leqslant}t {\leqslant}n$, $$\Phi^{(t)} := \Phi((X_u^{(t)})_{u \in V}) = \sum_{u \in V} \exp\left(\sigma \cdot \sum_{v \in N_u} X_v^{(t)}\right),$$ hence $\Phi^{(0)} = n$. Our goal is to bound the expected multiplicative increase in $\Phi^{(t+1)}$ compared to $\Phi^{(t)}$. In order to do that, we will actually also assume that $\Phi^{(t)}$ is small.

Specifically, assume that $(x_u)_{u \in V}$ be any vector in $(\mathbb{N} \cup \{0\})^{n}$ such that $\Phi((x_u)_{u \in V}) {\leqslant}n \cdot {\mathrm{e}}^{\delta/2}$ and suppose that the load vector at the end of round $t$ is $(x_u)_{u \in V}$, i.e., $X^{(t)} = x$. Then this implies for every vertex $u \in V$, $$\exp\left( \sigma \cdot \sum_{v \in N_u} X_v^{(t)} \right) {\leqslant}n \cdot {\mathrm{e}}^{\delta /2} = {\mathrm{e}}^{\log n + \delta/2},$$ and consequently, $\sum_{v \in N_u} X_v^{(t)} {\leqslant}(1/\sigma) \cdot (\log n + \delta/2) {\leqslant}\delta/4 + \delta/2 = (3/4) \delta$. Hence, there are at least ${\operatorname{deg}}(u) - (3/4) \delta {\geqslant}(1/4) \delta$ neighbors of $u$ which have no ball, where ${\operatorname{deg}}(u)$ is the degree of vertex $u$. In particular, this implies that the next ball $t+1$ will be allocated either on its birthplace or at a direct neighbor. Therefore, $$\begin{aligned}
 \lefteqn{{\mathbf{Pr} \left[\, \sum_{v\in N_u} X_v^{(t+1)}  =  \sum_{v\in N_u} X_v^{(t+1)} + 1 \, \mid \, X^{(t)} = x  \,\right]} }\notag\\
 &{\leqslant}\sum_{v \in N_u} \sum_{w \in N_v\cup \{v\}} {\mathbf{Pr} \left[\, \mbox{ball $t+1$ born at $w$ and allocated on $v$} \, \mid \, X^{(t)} = x \,\right]} \notag \\
 &{\leqslant}\sum_{v \in N_u} \left( \sum_{w \in N_v} \left( \frac{1}{n} \cdot \frac{4}{\delta} \right) + \frac{1}{n} \right) {\leqslant}\frac{5 C \Delta}{n}. \label{eq:boundprob}\end{aligned}$$ This yields,$$\begin{aligned}
\lefteqn{ {\mathbf{E} \left[\,   \Phi^{(t+1)} \, \mid \,  X^{(t)}=x   \,\right]}} \notag \\ &{\leqslant}\sum_{u \in V } \Biggl( {\mathbf{Pr} \left[\,  \sum_{v\in N_u} X_v^{(t+1)} =  \sum_{v\in N_u} X_v^{(t)} + 1 \, \mid \, X^{(t)}=x  \,\right]}  \cdot \exp\left(\sigma \cdot \big(\sum_{v\in N_u} X_v^{(t)}+1\big)\right) \notag \\ &\quad\qquad\, + {\mathbf{Pr} \left[\, \sum_{v\in N_u} X_v^{(t+1)}  =  \sum_{v\in N_u} X_v^{(t)} \, \mid \, X^{(t)}=x \,\right]} \cdot \exp\left(\sigma \cdot  \sum_{v\in N_u} X_v^{(t)}\right) \Biggr) \notag \\
 &=  \sum_{u \in V } \left( {\mathrm{e}}^{\sigma} \cdot {\mathbf{Pr} \left[\,  \sum_{v\in N_u} X_v^{(t+1)} = \sum_{v\in N_u} X_v^{(t)} + 1 \, \mid \, X^{(t)}=x  \,\right]} + 1 \right) \cdot \exp\left(\sigma \cdot \sum_{v\in N_u} X_v^{(t)}\right) \notag \\
 &{\leqslant}\left(1 + {\mathrm{e}}^{\sigma} \cdot \frac{5 C \Delta}{n} \right) \cdot \Phi^{(t)}, \label{eq:potential}\end{aligned}$$ where (\[eq:potential\]) follows from (\[eq:boundprob\]). Note that if we only consider the allocation of $\alpha := n/({\mathrm{e}}^{\sigma} \cdot 25 C^2  ) = \Theta(n)$ balls, then we have $$\left(1 +  {\mathrm{e}}^{\sigma} \cdot \frac{5 C \Delta}{n}  \right)^{\alpha} {\leqslant}{\mathrm{e}}^{\Delta / (5 C) } {\leqslant}{\mathrm{e}}^{\delta / 4 }.$$ Define $\Psi^{(t)} := \min \{  \Phi^{(t)}, n \cdot {\mathrm{e}}^{\delta/2} \}$. Then, since $\Phi^{(t)}$ is increasing in $t$, [equation ]{} yields $$\begin{aligned}
 {\mathbf{E} \left[\, \Psi^{(t+1)}  \,\right]} &{\leqslant}\left(1 + {\mathrm{e}}^{\sigma} \cdot \frac{5 C \Delta}{n} \right) \cdot \Psi^{(t)}\end{aligned}$$ and thus inductively, $
 {\mathbf{E} \left[\, \Psi^{(\alpha)}  \,\right]} {\leqslant}\left(1 + {\mathrm{e}}^{\sigma} \cdot \frac{5 C \Delta}{n} \right)^{\alpha} \cdot \Psi^{(0)} {\leqslant}{\mathrm{e}}^{\delta/4} \cdot n.
$ Hence, applying Markov’s inequality gives $
 {\mathbf{Pr} \left[\,  \Psi^{(\alpha)} < {\mathrm{e}}^{\delta/2} \cdot n        \,\right]} {\geqslant}1 - {\mathrm{e}}^{-\delta/4}.
$ By definition of $\Psi^{(\alpha)}$, if $\Psi^{(\alpha)} < {\mathrm{e}}^{\delta/2} \cdot n$, then $\Psi^{(\alpha)} = \Phi^{(\alpha)}$. Hence, $
 {\mathbf{Pr} \left[\,  \Phi^{(\alpha)} <  {\mathrm{e}}^{\delta/2} \cdot n        \,\right]} {\geqslant}1 - {\mathrm{e}}^{-\delta/4},
$ as required. If $\Phi^{(\alpha)} <  {\mathrm{e}}^{\delta/2} \cdot n$ occurs, then since every vertex has at least one neighbor with load zero, the maximum load after the allocation of $\alpha$ balls is $1$. Then, we use subadditivity (cf. Lemma \[lem:subadditivity\]) to conclude that the maximum load after all $\lceil n/\alpha \rceil \cdot \alpha$ balls are allocated is at most $1 \cdot \lceil n/\alpha \rceil$ with probability at least $1- \lceil n/\alpha \rceil \cdot o(1) = 1-o(1)$.

Impact of tie-breaking rules {#sec:tiebreaking}
============================

We now analyze the effect of employing different tie-breaking rules. We first describe the construction of the graph $G$, which will be a $d$-regular graph, where $d=\omega(1)$ as $n \rightarrow \infty$. Additionally, we may assume that $d {\leqslant}\sqrt{n}$, since otherwise the claimed lower bound is trivial. For the construction of $G$, we assume that there is an integer $k$ such that $1 + \sum_{i=0}^{k-1} d \cdot (d-1)^{i} = n$. Note that $k=\Theta( \log n / \log d)$. Then, let $G$ be a balanced tree with root $s$ so that $$|N_s^{i}| = d \cdot (d-1)^{i-1} \quad \, \mbox{for any $i {\geqslant}1$}.$$ Hence $G$ is a tree where all vertices except for the leaves and the root have $d-1$ successors; the root has $d$ successors, and the leaves have no successor. Hence, the root has degree $d$, the inner vertices have degree $d$ as well and the leaves have degree $1$. Further, note that the number of leaves is $d \cdot (d-1)^{k-1}$. In order to make the graph $d$-regular, we simply add edges among the leaves in $G$ so that, after all edges have been added, every leaf has degree $d$ (this is possible, since the number of edges to add is smaller than the total number of leaves).

We choose $\alpha := \min \left\{  (d-1)^{1/4}, k - 2 \right\} $. The process of allocating the $n$ balls will be divided into $\alpha$ phases and in each phase we consider the allocation of $n/\alpha$ balls. To prove the desired lower bound, we focus on the vertices in $B_{s}^{2\alpha}$.

Next, we define an event that essentially shows that there are always enough balls so that the tie-breaking rule can send balls towards the root: $$\begin{aligned}
 \mathcal{E} := \bigcap_{p=1}^{\alpha} \bigcap_{\ell=1}^{2 \alpha} \left\{ \forall u \in N^{\ell}_s \, \exists   v \in N_u  \cap N_s^{\ell+1} \colon Z_{p}(v) {\geqslant}2 \right\},\end{aligned}$$ where $Z_{p}(v) := \sum_{t=(p-1)\cdot (n/\alpha)+1}^{p \cdot (n/\alpha)} {\mathbf{1}\left( U_t = v \right)}$ is the number of balls born on $v$ in phase $p$. Hence the event $\mathcal{E}$ means that for each vertex in $N^{\ell}_s$, there is in each phase at least one neighbor in $N^{\ell+1}_s$ on which two balls are born; hence, for at least one ball we may be able to use the tie-breaking rule and forward the ball towards the root $s$.

Let us estimate the probability that the event $\mathcal{E}$ occurs. First, for any fixed $u \in N_s^{\ell}$ and $v \in N_u \cap N^{\ell+1}_s$ $$\begin{aligned}
 {\mathbf{Pr} \left[\,  Z_{p}(v) {\geqslant}2     \,\right]} &{\geqslant}\binom{n/\alpha}{2}\cdot \frac{1}{n^2} \cdot \left(1 - \frac{1}{n} \right)^{n/\alpha-2} {\geqslant}\frac{1}{8 \alpha^2}.\end{aligned}$$ Since the events $\{ Z_{p}(v) {\geqslant}2 \}_{v \in N_u}$, are negatively correlated, we have that, for any fixed $u \in N^{\ell}_s$, $$\begin{aligned}
 {\mathbf{Pr} \left[\,  \exists v \in N_u \cap N^{\ell+1}_s: Z_{p}(v) {\geqslant}2        \,\right]} &{\geqslant}1 - \left(1 - \frac{1}{8 \alpha^2} \right)^{d-1} {\geqslant}1 - \exp\left( - \frac{d-1}{8 \alpha^2} \right).\end{aligned}$$ Hence, $$\begin{aligned}
 {\mathbf{Pr} \left[\, \mathcal{E} \,\right]} &{\geqslant}1 - \sum_{p=1}^{\alpha} \sum_{\ell=1}^{2\alpha} \sum_{u \in N^{\ell}_s} {\mathbf{Pr} \left[\,\neg    \left( \exists v \in N_u \cap N^{\ell+1}_s: Z_{p}(v) {\geqslant}2     \right) \,\right]} \notag \\
 &{\geqslant}1 - \alpha \cdot \sum_{\ell=1}^{2 \alpha} |N_{s}^{\ell}| \cdot \exp\left( - \frac{d-1}{8 \alpha^2} \right)   {\geqslant}1 - \exp\left( - \frac{d-1}{8 \alpha^2}     \right) \cdot \alpha \cdot 2 d (d-1)^{2\alpha-1}. \label{eq:proba}\end{aligned}$$ We now claim that the last term in [equation ]{} is $1-o(1)$. To this end, recall the choice of $\alpha$ and $d = \omega(1)$. First, since $\alpha {\leqslant}(d-1)^{1/4}$, $\exp\left( - \frac{d-1}{8 \alpha^2}     \right) {\leqslant}\exp \big( - \frac{(d-1)^{1/2}}{8}  \big)$, whereas $\alpha \cdot 2d \cdot(d-1)^{2 \alpha-1} {\leqslant}2 d^{3 \alpha} {\leqslant}2 d^{ 3 (d-1)^{1/4}} =2 \cdot \exp \big( \log d \cdot 3 (d-1)^{1/4} \big)$. Hence, as $d \rightarrow \infty$, the probability on the right-hand side in [equation ]{} is $1 - o(1)$; i.e., we have shown that $$\begin{aligned}
 {\mathbf{Pr} \left[\, \mathcal{E} \,\right]} &{\geqslant}1-o(1).
 \end{aligned}$$

(12,6) – (17,6); (1) at (8,14) \[label=left:$s$\]; (2) at (4,12) \[label=left:$$]{};
           \node[knoten] (3) at (8,12) [label=left:$$\]; (4) at (12,12) \[label=left:$$]{};
           \node[knoten] (5) at (3,10) [label=left:$$\]; (6) at (5,10) \[label=left:$$]{};
           \node[knoten] (7) at (7,10) [label=left:$$\]; (8) at (9,10) \[label=left:$$]{};
           \node[knoten] (9) at (11,10) [label=left:$$\]; (10) at (13,10) \[label=left:$$]{};
           \node[knoten] (11) at (2.5,8) [label=left:$$\]; (12) at (3.5,8) \[label=left:$$]{};
           \node[knoten] (13) at (4.5,8) [label=left:$$\]; (14) at (5.5,8) \[label=left:$$]{};
           \node[knoten] (15) at (6.5,8) [label=left:$$\]; (16) at (7.5,8) \[label=left:$$]{};
           \node[knoten] (17) at (8.5,8) [label=left:$$\]; (18) at (9.5,8) \[label=left:$$]{};
           \node[knoten] (19) at (10.5,8) [label=left:$$\]; (20) at (11.5,8) \[label=left:$$]{};
           \node[knoten] (21) at (12.5,8) [label=left:$$\]; (22) at (13.5,8) \[label=left:$$\]; (23) at (2.25,6) \[\]; (24) at (2.75,6) \[\]; (25) at (3.25,6) \[\]; (26) at (3.75,6) \[\]; (27) at (4.25,6) \[\]; (28) at (4.75,6) \[\]; (29) at (5.25,6) \[\]; (30) at (5.75,6) \[\]; (31) at (6.25,6) \[\]; (32) at (6.75,6) \[\]; (33) at (7.25,6) \[\]; (34) at (7.75,6) \[\]; (35) at (8.25,6) \[\]; (36) at (8.75,6) \[\]; (37) at (9.25,6) \[\]; (38) at (9.75,6) \[\]; (39) at (10.25,6) \[\]; (40) at (10.75,6) \[\]; (41) at (11.25,6) \[\]; (42) at (11.75,6) \[\]; (43) at (12.25,6) \[\]; (44) at (12.75,6) \[\]; (45) at (13.25,6) \[\]; (46) at (13.75,6) \[\]; (1) – (2); (1) – (3); (1) – (4); (2) – (5); (2) – (6); (3) – (7); (3) – (8); (4) – (9); (4) – (10); (5) – (11); (5) – (12); (6) – (13); (6) – (14); (7) – (15); (7) – (16); (8) – (17); (8) – (18); (9) – (19); (9) – (20); (10) – (21); (10) – (22); (11) – (23); (11) – (24); (12) – (25); (12) – (26); (13) – (27); (13) – (28); (14) – (29); (14) – (30); (15) – (31); (15) – (32); (16) – (33); (16) – (34); (17) – (35); (17) – (36); (18) – (37); (18) – (38); (19) – (39); (19) – (40); (20) – (41); (20) – (42); (21) – (43); (21) – (44); (22) – (45); (22) – (46); [[$ \mathbf{x}$]{}]{}in [1,2,...,46]{} [[ ([[$ \mathbf{x}$]{}]{})++(0.196,1.4) to ++(0,-1.2) to ++(-0.40,0) to ++ (0,1.2);]{}; ]{} [[$ \mathbf{x}$]{}]{}in [1,...,46]{} [ [ ([[$ \mathbf{x}$]{}]{})++(0,0.42) circle (.17cm); ]{}; ]{}

(12,6) – (17,6); (1) at (8,14) \[label=left:$s$\]; (2) at (4,12) \[label=left:$$]{};
           \node[knoten] (3) at (8,12) [label=left:$$\]; (4) at (12,12) \[label=left:$$]{};
           \node[knoten] (5) at (3,10) [label=left:$$\]; (6) at (5,10) \[label=left:$$]{};
           \node[knoten] (7) at (7,10) [label=left:$$\]; (8) at (9,10) \[label=left:$$]{};
           \node[knoten] (9) at (11,10) [label=left:$$\]; (10) at (13,10) \[label=left:$$]{};
           \node[knoten] (11) at (2.5,8) [label=left:$$\]; (12) at (3.5,8) \[label=left:$$]{};
           \node[knoten] (13) at (4.5,8) [label=left:$$\]; (14) at (5.5,8) \[label=left:$$]{};
           \node[knoten] (15) at (6.5,8) [label=left:$$\]; (16) at (7.5,8) \[label=left:$$]{};
           \node[knoten] (17) at (8.5,8) [label=left:$$\]; (18) at (9.5,8) \[label=left:$$]{};
           \node[knoten] (19) at (10.5,8) [label=left:$$\]; (20) at (11.5,8) \[label=left:$$]{};
           \node[knoten] (21) at (12.5,8) [label=left:$$\]; (22) at (13.5,8) \[label=left:$$\]; (23) at (2.25,6) \[\]; (24) at (2.75,6) \[\]; (25) at (3.25,6) \[\]; (26) at (3.75,6) \[\]; (27) at (4.25,6) \[\]; (28) at (4.75,6) \[\]; (29) at (5.25,6) \[\]; (30) at (5.75,6) \[\]; (31) at (6.25,6) \[\]; (32) at (6.75,6) \[\]; (33) at (7.25,6) \[\]; (34) at (7.75,6) \[\]; (35) at (8.25,6) \[\]; (36) at (8.75,6) \[\]; (37) at (9.25,6) \[\]; (38) at (9.75,6) \[\]; (39) at (10.25,6) \[\]; (40) at (10.75,6) \[\]; (41) at (11.25,6) \[\]; (42) at (11.75,6) \[\]; (43) at (12.25,6) \[\]; (44) at (12.75,6) \[\]; (45) at (13.25,6) \[\]; (46) at (13.75,6) \[\]; (1) – (2); (1) – (3); (1) – (4); (2) – (5); (2) – (6); (3) – (7); (3) – (8); (4) – (9); (4) – (10); (5) – (11); (5) – (12); (6) – (13); (6) – (14); (7) – (15); (7) – (16); (8) – (17); (8) – (18); (9) – (19); (9) – (20); (10) – (21); (10) – (22); (11) – (23); (11) – (24); (12) – (25); (12) – (26); (13) – (27); (13) – (28); (14) – (29); (14) – (30); (15) – (31); (15) – (32); (16) – (33); (16) – (34); (17) – (35); (17) – (36); (18) – (37); (18) – (38); (19) – (39); (19) – (40); (20) – (41); (20) – (42); (21) – (43); (21) – (44); (22) – (45); (22) – (46); [[$ \mathbf{x}$]{}]{}in [1,2,...,46]{} [[ ([[$ \mathbf{x}$]{}]{})++(0.196,1.4) to ++(0,-1.2) to ++(-0.40,0) to ++ (0,1.2);]{}; ]{} [[$ \mathbf{x}$]{}]{}in [1,...,46]{} [ [ ([[$ \mathbf{x}$]{}]{})++(0,0.42) circle (.17cm); ]{}; ]{} [[$ \mathbf{x}$]{}]{}in [1,...,10]{} [ [ ([[$ \mathbf{x}$]{}]{})++(0,0.78) circle (.17cm); ]{}; ]{}

(12,16) – (17,16); (1) at (8,14) \[label=left:$s$\]; (2) at (4,12) \[label=left:$$]{};
           \node[knoten] (3) at (8,12) [label=left:$$\]; (4) at (12,12) \[label=left:$$]{};
           \node[knoten] (5) at (3,10) [label=left:$$\]; (6) at (5,10) \[label=left:$$]{};
           \node[knoten] (7) at (7,10) [label=left:$$\]; (8) at (9,10) \[label=left:$$]{};
           \node[knoten] (9) at (11,10) [label=left:$$\]; (10) at (13,10) \[label=left:$$]{};
           \node[knoten] (11) at (2.5,8) [label=left:$$\]; (12) at (3.5,8) \[label=left:$$]{};
           \node[knoten] (13) at (4.5,8) [label=left:$$\]; (14) at (5.5,8) \[label=left:$$]{};
           \node[knoten] (15) at (6.5,8) [label=left:$$\]; (16) at (7.5,8) \[label=left:$$]{};
           \node[knoten] (17) at (8.5,8) [label=left:$$\]; (18) at (9.5,8) \[label=left:$$]{};
           \node[knoten] (19) at (10.5,8) [label=left:$$\]; (20) at (11.5,8) \[label=left:$$]{};
           \node[knoten] (21) at (12.5,8) [label=left:$$\]; (22) at (13.5,8) \[label=left:$$\]; (23) at (2.25,6) \[\]; (24) at (2.75,6) \[\]; (25) at (3.25,6) \[\]; (26) at (3.75,6) \[\]; (27) at (4.25,6) \[\]; (28) at (4.75,6) \[\]; (29) at (5.25,6) \[\]; (30) at (5.75,6) \[\]; (31) at (6.25,6) \[\]; (32) at (6.75,6) \[\]; (33) at (7.25,6) \[\]; (34) at (7.75,6) \[\]; (35) at (8.25,6) \[\]; (36) at (8.75,6) \[\]; (37) at (9.25,6) \[\]; (38) at (9.75,6) \[\]; (39) at (10.25,6) \[\]; (40) at (10.75,6) \[\]; (41) at (11.25,6) \[\]; (42) at (11.75,6) \[\]; (43) at (12.25,6) \[\]; (44) at (12.75,6) \[\]; (45) at (13.25,6) \[\]; (46) at (13.75,6) \[\]; (1) – (2); (1) – (3); (1) – (4); (2) – (5); (2) – (6); (3) – (7); (3) – (8); (4) – (9); (4) – (10); (5) – (11); (5) – (12); (6) – (13); (6) – (14); (7) – (15); (7) – (16); (8) – (17); (8) – (18); (9) – (19); (9) – (20); (10) – (21); (10) – (22); (11) – (23); (11) – (24); (12) – (25); (12) – (26); (13) – (27); (13) – (28); (14) – (29); (14) – (30); (15) – (31); (15) – (32); (16) – (33); (16) – (34); (17) – (35); (17) – (36); (18) – (37); (18) – (38); (19) – (39); (19) – (40); (20) – (41); (20) – (42); (21) – (43); (21) – (44); (22) – (45); (22) – (46); [[$ \mathbf{x}$]{}]{}in [1,2,...,46]{} [[ ([[$ \mathbf{x}$]{}]{})++(0.196,1.4) to ++(0,-1.2) to ++(-0.40,0) to ++ (0,1.2);]{}; ]{} [[$ \mathbf{x}$]{}]{}in [1,...,46]{} [ [ ([[$ \mathbf{x}$]{}]{})++(0,0.42) circle (.17cm); ]{}; ]{} [[$ \mathbf{x}$]{}]{}in [1,...,10]{} [ [ ([[$ \mathbf{x}$]{}]{})++(0,0.78) circle (.17cm); ]{}; ]{} [[$ \mathbf{x}$]{}]{}in [1]{} [ [ ([[$ \mathbf{x}$]{}]{})++(0,1.14) circle (.17cm); ]{}; ]{}

It remains to show that if the event $\mathcal{E}$ occurs, then it is possible to break the ties so that we end up with a maximum load of $\alpha$ after the allocation of $n$ balls (see [Figure \[fig:tie\]]{} for an illustration). Our tie-breaking rule follows the simple strategy that, whenever possible, a ball is forwarded to a vertex closer to the root $s$. By [Lemma \[lem:monotonicity\]]{}, we may assume that balls are only generated in the set $B^{\alpha}_s$ and, in each phase, every vertex in this set generates at most two balls. Then after the first phase is completed, every vertex in $B^{2 \alpha}_{s}$ contains at least one ball, since for each such vertex there is at least one neighbor in $B^{2 \alpha+1}_{s}$ on which two balls are born. Moreover, in the second phase, every vertex $u$ in $B^{2\alpha-2}_{s}$ has at least one neighbor $v \in N_u$ in the next level such that: (i) two balls are generated on $v$ in the second phase and (ii) all neighbors of $v$ and $v$ itself have at least one ball at the beginning of phase two. Hence if ties are always broken in the direction towards the root, every vertex in $B^{2 \alpha-2}_s$ will have at least two balls at the end of phase two. Completing the induction, we conclude that at the end of phase $\alpha$, the vertex $s$ will have at least $\alpha$ balls. Overall, we conclude that the maximum load is at least $\alpha$ whenever the event $\mathcal{E}$ occurs. Since $\mathcal{E}$ occurs with probability $1-o(1)$, the proof is complete.

Lower bounds for sparse graphs {#sec:lowerbounds}
==============================

In the first part, we show that the maximum load after $n$ balls are allocated is $\Omega\big(\frac{\log\log n}{\log \Delta}\big)$, where $G$ is any graph with maximum degree $\Delta$. Our arguments are almost the same as in the proof of the lower bound of [Theorem \[thm:torus\]]{}. We are using again the fact that with probability at least $1-n^{-1}$, there is a vertex $u \in V$ on which at least $\frac{\log n}{\log \log n}$ balls are born (cf. [@MU05 Lemma 5.12]). Then, applying [Lemma \[lem:characterizationlower\]]{} with $S=\{u\}$, we obtain that the maximal load $\beta:=X_{\max}^{(n)}$ satisfies $$\beta \cdot |B_{u}^{\beta}| {\geqslant}\frac{\log n}{\log \log n}.$$ Since $|B_{u}^{\beta}| {\leqslant}\Delta^{\beta}$, the above inequality implies that $$\beta \cdot \Delta^{\beta} {\geqslant}\frac{\log n}{\log \log n},$$ which in turn implies that $\beta=\Omega\left( \frac{\log \Big( \frac{ \log n}{\log \log n} \Big)}{\log \Delta} - \log(\beta) \right)$, i.e., $\beta = \Omega\left(  \frac{\log \log n}{\log \Delta}   \right)$.

Now, for the second part, we show that there exists a $d$-regular graph for which the maximum load after $n$ balls are allocated is $\Omega \left(\sqrt{ \frac{\log n}{d \cdot \log \left(  \frac{\log n}{d} \right)} }\right)$. We first describe the construction of the $d$-regular graph $G$. First take $n/(d-1)$ disjoint cliques of size $d-1$ and arrange them in a cycle. Then connect two cliques which are next to each other in the cycle by $d-1$ vertex-disjoint edges. This way we obtain a $d$-regular graph, which can be also defined as the Cartesian product of a cycle of length $n/(d-1)$ and a clique of size $d-1$.

\(51) at (5.95,5.05) ; (52) at (6.05,5.35) ; (53) at (6.35,5.25) ; (54) at (6.25,4.93) ; (61) at (7.10,3.55) ; (62) at (7.20,3.85) ; (63) at (7.50,3.75) ; (64) at (7.40,3.45) ; (71) at (7.03,2.71) ; (72) at (7.13,3.01) ; (73) at (7.43,2.91) ; (74) at (7.33,2.61) ; (81) at (6.60,1.95) ; (82) at (6.70,2.25) ; (83) at (7.00,2.15) ; (84) at (6.90,1.85) ; (91) at (5.45,2.05) ; (92) at (5.55,2.35) ; (93) at (5.85,2.25) ; (94) at (5.75,1.95) ; (101) at (4.95,2.71) ; (102) at (5.05,3.01) ; (103) at (5.35,2.91) ; (104) at (5.25,2.61) ; (111) at (4.80,3.55) ; (112) at (4.90,3.85) ; (113) at (5.20,3.75) ; (114) at (5.10,3.45) ;

\(161) at (6.95,4.39) ; (162) at (7.05,4.69) ; (163) at (7.35,4.59) ; (164) at (7.25,4.29) ;

\(151) at (4.95,4.39) ; (152) at (5.05,4.69) ; (153) at (5.35,4.59) ; (154) at (5.25,4.29) ;

\(51) – (52); (51) – (53); (51) – (54); (52) – (53); (52) – (54); (53) – (54);

\(61) – (62); (61) – (63); (61) – (64); (62) – (63); (62) – (64); (63) – (64);

\(71) – (72); (71) – (73); (71) – (74); (72) – (73); (72) – (74); (73) – (74);

\(81) – (82); (81) – (83); (81) – (84); (82) – (83); (82) – (84); (83) – (84);

\(91) – (92); (91) – (93); (91) – (94); (92) – (93); (92) – (94); (93) – (94);

\(101) – (102); (101) – (103); (101) – (104); (102) – (103); (102) – (104); (103) – (104);

\(111) – (112); (111) – (113); (111) – (114); (112) – (113); (112) – (114); (113) – (114);

\(151) – (152); (151) – (153); (151) – (154); (152) – (153); (152) – (154); (153) – (154);

\(161) – (162); (161) – (163); (161) – (164); (162) – (163); (162) – (164); (163) – (164);

\(51) – (161); (52) – (162); (53) – (163); (54) – (164); (61) – (71); (62) – (72); (63) – (73); (64) – (74); (71) – (81); (72) – (82); (73) – (83); (74) – (84); (81) – (91); (82) – (92); (83) – (93); (84) – (94); (91) – (101); (92) – (102); (93) – (103); (94) – (104); (101) – (111); (102) – (112); (103) – (113); (104) – (114); (151) – (111); (152) – (112); (153) – (113); (154) – (114); (151) – (51); (152) – (52); (153) – (53); (154) – (54);

\(61) – (161); (62) – (162); (63) – (163); (64) – (164);

Let us now consider the number of balls that are born in each clique. This can be seen as the $1$-choice process where $n$ balls are randomly placed into $n/(d-1)$ bins. By @RS98 [Theorem 1, Cases 1 & 2] it follows that, with probability $1-o(1)$, there exists a clique with vertex set $S$, $|S| = d-1$, so that the number of balls born in $S$ is at least $$\Phi_{S} := C \cdot \left( \frac{\log n}{ \log\left( \frac{\log (n/(d-1))}{d-1}  \right)}  \right),$$ for some constant $C > 0$. Now we use [Lemma \[lem:characterizationlower\]]{} with the $\Phi_{S}$ above to conclude that the maximum load $\beta = X_{\max}^{(n)} $ satisfies $$\beta \cdot | B_{S}^{\beta} | {\geqslant}C \cdot \left( \frac{\log n}{ \log\left( \frac{\log (n/(d-1))}{d-1}  \right)}  \right).$$ Since $| B_{S}^{\beta}| {\leqslant}(2 \beta + 1) \cdot d$ and $\log(n/(d-1)) = \Theta(\log n)$, this implies $
 \beta = \Omega \left(  \sqrt{ \frac{\log n}{d \cdot \log (\frac{\log n}{d})}           }           \right).
$

Standard technical results
==========================

\[lem:azuma\] Let $X_0,X_1,\ldots,X_m$ be a martingale such that there exists a fixed positive $c$ for which $|X_i-X_{i-1}|{\leqslant}c$ for all $i$. Then, $${\mathbf{Pr} \left[\,|X_m - X_0| {\geqslant}\lambda\,\right]} {\leqslant}\exp\left(-\frac{\lambda^2}{2c^2m}\right).$$

\[lem:azumavar\] Let $X_0,X_1,\ldots,X_m$ be a martingale adapted to the filtration $\mathcal{F}_i$. Suppose that there exists a fixed positive $c$ for which $|X_i-X_{i-1}|{\leqslant}c$ for all $i$ and there exists $c'$ such that ${\mathbf{E} \left[\,(X_i-X_{i-1})^2 {\,\middle\vert\,}\mathcal{F}_{i-1}\,\right]}{\leqslant}c'$ for all $i$. Then, $${\mathbf{Pr} \left[\,|X_m - X_0| {\geqslant}\lambda\,\right]} {\leqslant}\exp\left(-\frac{\lambda^2}{2c'm + c\lambda /3}\right).$$

For the special case where $X_0,X_1,\ldots,X_m$ are independent Bernoulli random variables, we can apply the above lemma to the random variables $(X_i-{\mathbf{E} \left[\,X_i\,\right]})_i$ with $c'={\mathbf{E} \left[\,X_1\,\right]}$ and $c=1$ to obtain the inequality below.

\[lem:improvedhoeffding\] Let $X_1,\ldots,X_m$ be $m$ independent, identically distributed Bernoulli random variables. Let $X:=\sum_{i=1}^m X_i$. Then, for any $\lambda > 0$, $$\begin{aligned}
 {\mathbf{Pr} \left[\, | X - {\mathbf{E} \left[\,X\,\right]} | {\geqslant}\lambda \,\right]} {\leqslant}\exp \left(- \frac{\lambda^2}{ 2{\mathbf{E} \left[\,X\,\right]} + \lambda/3 }       \right).\end{aligned}$$

\[lem:thomasrepair\] Consider the $1$-choice process $\{ \overline{X}_v^{(n)} \}_{v \in V}$ where $n$ balls are allocated to $n$ bins chosen independently and uniformly at random. Let $\ell_0 := 8 {\mathrm{e}}\Delta^2$ and let $\Lambda_{\ell} := \left\{ u \in V \colon X_{u}^{(n)} {\geqslant}\ell \right \}$. Then, for any $\ell$ with $\ell_0 {\leqslant}\ell = o(\log^2 n)$, $$\begin{aligned}
 {\mathbf{Pr} \left[\,  | \Lambda_{\ell} | {\geqslant}\frac{n}{4 \Delta} \cdot (2 \Delta)^{-\ell} + \frac{\log^7 n}{\ell}  \,\right]} {\leqslant}2 n^{-\log^5 n}.\end{aligned}$$

Fix any $\ell$ with $\ell {\geqslant}\ell_0$. Let $\{ {\widetilde}{X}_{v} \}_{v \in V}$ be $n$ independent poisson random variables with mean $1$. Define ${\widetilde}{\Lambda}_{\ell} := \left\{ u \in V \colon {\widetilde}{X}_{u}^{(n)} {\geqslant}\ell \right \}$. Since $\{ |{\widetilde}{\Lambda}_{\ell}| {\geqslant}\frac{|V|}{4 \Delta} \cdot (2 \Delta)^{-\ell} + \frac{\log^7 |V|}{\ell} \}$ is a monotone event in the number of balls $1 {\leqslant}n {\leqslant}|V|$, it follows by a standard “Poissonization argument” (see, e.g., [@MU05 Corollary 5.11]) $$\begin{aligned}
    {\mathbf{Pr} \left[\, | \Lambda_{\ell} | {\geqslant}\frac{n}{4 \Delta} \cdot (2 \Delta)^{-\ell} + \frac{\log^7 n}{\ell} \,\right]} &{\leqslant}2 \cdot   {\mathbf{Pr} \left[\, {\widetilde}{\Lambda}_{\ell} {\geqslant}\frac{n}{4 \Delta} \cdot (2 \Delta)^{-\ell} + \frac{\log^7 n}{\ell} \,\right]}.
   \end{aligned}$$ To bound the latter probability, let us first estimate ${\mathbf{E} \left[\, |{\widetilde}{\Lambda}_{\ell}| \,\right]}$. First, if $P$ is a Poisson random variable with parameter $1$, then we have the following Chernoff-type inequality ([@AlonSpencer Theorem A.1.15]): for any ${\varepsilon}> 0$, $$\begin{aligned}
    {\mathbf{Pr} \left[\, P {\geqslant}(1 + {\varepsilon}) \,\right]} &{\leqslant}{\mathrm{e}}^{{\varepsilon}} (1+{\varepsilon})^{-(1+{\varepsilon})}.
   \end{aligned}$$ As long as ${\varepsilon}{\geqslant}8 {\mathrm{e}}\Delta^2 - 1 $, we can write $$\begin{aligned}
    {\mathbf{Pr} \left[\, P {\geqslant}1 + {\varepsilon}\,\right]} &{\leqslant}{\mathrm{e}}^{1+{\varepsilon}} (8 {\mathrm{e}}\Delta^2)^{-(1+{\varepsilon})} {\leqslant}(8 \Delta^2)^{-(1+{\varepsilon})},
   \end{aligned}$$ and hence, replacing $1+{\varepsilon}$ by $\ell$ gives $$\begin{aligned}
    {\mathbf{Pr} \left[\, P {\geqslant}\ell\,\right]} &{\leqslant}(8 \Delta^2)^{-\ell}.
   \end{aligned}$$ Now observe that $|{\widetilde}{\Lambda}_{\ell}|$ is stochastically smaller than the sum of $n$ independent Bernoulli random variables $Z_1,\ldots,Z_n$, each with parameter $(8 \Delta^2)^{-\ell}$. Hence, if we denote $Z:=\sum_{i=1}^n Z_i$, then $$\begin{aligned}
    {\mathbf{Pr} \left[\, | {\widetilde}{\Lambda}_{\ell}| {\geqslant}\frac{n}{4 \Delta} \cdot (2 \Delta)^{-\ell} + \frac{\log^7 n}{\ell} \,\right]}
    &{\leqslant}{\mathbf{Pr} \left[\, Z {\geqslant}\frac{n}{4 \Delta} \cdot (2 \Delta)^{-\ell} + \frac{\log^7 n}{\ell} \,\right]}.
   \end{aligned}$$ Note that ${\mathbf{E} \left[\,Z\,\right]} = n \cdot (8 \Delta^2)^{-\ell}$. Hence by [Lemma \[lem:improvedhoeffding\]]{}, $$\begin{aligned}
   {\mathbf{Pr} \left[\, Z {\geqslant}\frac{n}{4 \Delta} \cdot (2 \Delta)^{-\ell} + \frac{\log^7 n}{\ell} \,\right]} &{\leqslant}{\mathbf{Pr} \left[\, Z {\geqslant}{\mathbf{E} \left[\,Z\,\right]} + \frac{\log^7 n}{\ell} + \frac{n}{8 \Delta} \cdot (2 \Delta)^{-\ell} \,\right]}
   \\ &{\leqslant}\exp \left(-    \frac{  \left( \frac{\log^7 n}{\ell} + \frac{n}{8 \Delta} \cdot (2 \Delta)^{-\ell}  \right)^2 }{2 {\mathbf{E} \left[\,Z\,\right]} +  \frac{\log^7 n}{\ell} + \frac{n}{8 \Delta} \cdot (2 \Delta)^{-\ell}   }     \right).
   \end{aligned}$$ To bound the last term, we proceed by a case distinction. The first case is when $\log^7 n / \ell {\geqslant}\frac{n}{8 \Delta} \cdot (2 \Delta)^{-\ell}$. Then also ${\mathbf{E} \left[\,Z\,\right]} {\leqslant}\log^7 n / \ell$ and hence $$\begin{aligned}
   \exp \left(- \frac{  \left( \frac{\log^7 n}{\ell} + \frac{n}{8 \Delta} \cdot (2 \Delta)^{-\ell}  \right)^2 }{2{\mathbf{E} \left[\,Z\,\right]} +  \frac{\log^7 n}{\ell} + \frac{n}{8 \Delta} \cdot (2 \Delta)^{-\ell}}     \right) &{\leqslant}\exp \left( - \frac{ \left(\frac{\log^7 n}{\ell} \right)^2    }{ 4 \cdot \frac{\log^7 n}{\ell}  }
   \right) {\leqslant}n^{-\log^5 n}.
   \end{aligned}$$ Otherwise, $\log^7 n / \ell < \frac{n}{8 \Delta} \cdot (2 \Delta)^{-\ell}$. Then, $$\begin{aligned}
   \exp \left(- \frac{  \left( \frac{\log^7 n}{\ell} + \frac{n}{8 \Delta} \cdot (2 \Delta)^{-\ell}  \right)^2 }{2 {\mathbf{E} \left[\,Z\,\right]} +  \frac{\log^7 n}{\ell} + \frac{n}{8 \Delta} \cdot (2 \Delta)^{-\ell}}        \right) &{\leqslant}\exp \left( - \frac{ \left( \frac{n}{8 \Delta} \cdot (2 \Delta)^{-\ell} \right)^2    }{ 4 \cdot \frac{n}{8 \Delta} \cdot (2 \Delta)^{-\ell}  }
   \right) {\leqslant}n^{-\log^5 n}.
   \end{aligned}$$

Hence, $$\begin{aligned}
   {\mathbf{Pr} \left[\, | \Lambda_{\ell} | {\geqslant}\frac{n}{4 \Delta} \cdot (2 \Delta)^{-\ell} + \frac{\log^7 n}{\ell} \,\right]} &{\leqslant}2 \cdot n^{-\log^5 n}.
   \end{aligned}$$ as desired.

[^1]: Department of Electrical and Computer Engineering, Carnegie Mellon University, Pittsburgh, PA, USA.  Email: .

[^2]: Max Planck Institute for Informatics, Saarbrücken, Germany.  Email: .

[^3]: Microsoft Research, Redmond WA, USA.  Email: .

[^4]: Max Planck Institute for Informatics, Saarbrücken, Germany.  Email: .
