There is a small but interesting improvement that can be made to the balanced allocation scheme we have described. Again we will place $n$ balls into $n$ bins; We assume here than $n$ is even. Suppose that we divide the $n$ bins into two groups of size $n / 2$. We call the two groups the left group and the right group. For each ball, we independently choose one bin uniformly at random from the left and one bin uniformly at random from the right. We put the ball in the least loaded bin, but if there is a tie we always put the ball in the bin from the left group. With this scheme, the maximum load is reduced to $\ln \ln n / 2 \ln \phi+O(1)$, where $\phi=(1+\sqrt{5}) / 2$ is the golden ratio. This improves the result of Theorem $14.1$ by a constant factor. (Note the two changes to otr original scheme: the bins are split into two groups, and ties are broken in a consistent way; both changes are necessary to obtain the improvement we describe.)
(a) Write a program to compare the performance of the original balanced allocation paradigm with this variation. Run simulations placing $n$ balls into $n$ bins, with each ball having $d=2$ choices. You should try $n=10,000, n=100,000$, and $n=1,000,000$. Repeat each experiment at least 100 times and compute the expectation and variance of the maximum load based on your trials. Describe the extent of the improvement of the new variation.
(b) Adapt Theorem $14.1$ to prove this result. The key idea in how the theorem's proof must change is that we now require two sequences, $\beta_{i}$ and $\gamma_{i}$. Similar to Theorem $14.1, \beta_{i}$ represents a desired upper bound on the number of bins on the left with load at least $i$, and $\gamma_{2}$ is a desired upper bound on the number of bins on the right with load at least $i$. Argue that choosing
$$
\beta_{i+1}=\frac{c_{1} \beta_{t} \gamma_{i}}{n^{2}} \quad \text { and } \quad \gamma_{i+1}=\frac{c_{2} \beta_{i+1} \gamma_{i}}{n^{2}}
$$
for some constants $c_{1}$ and $c_{2}$ is suitable (as long as $\beta_{i}$ and $\gamma_{t}$ are large enough that Chernoff bounds may apply).
Now let $F_{k}$ be the $k$ th Fibonacci number. Apply induction to show that, for sufficiently large $i, \beta_{i} \leq n c_{3} c_{4}^{F_{2 t}}$ and $\gamma_{i} \leq n c_{3} c_{4}^{F_{2 i+1}}$ for some constants $c_{3}$ and $c_{4}$. Following Theorem 14.1, use this to prove the $\ln \ln n / 2 \ln \phi+O(1)$ upper bound.
(c) This variation can easily be extended to the case of $d>2$ choices by splitting the $n$ bins into $d$ ordered groups, choosing one bin uniformly at random from each group, and breaking ties in favor of the group that comes first in the ordering. Suggest what would be the appropriate upper bound on the maximum load for this case, and give an argument backing your suggestion. (You need not give a complete formal proof.)