Safe bin capacity for throwing balls into bins without overflows

42 Views Asked by At

Suppose that we throw $n$ balls at random into $b$ bins, each with a capacity of $c$ balls. Given $n$ and $b$, what is a safe choice for $c$ such that there is at most a $q$ probability that any bin overflows its capacity? Or conversely, what is a safe choice for $c$ such that there is at least a $1 - q$ probability that no bin overflows its capacity?

Obviously $c = n$ is always a safe choice if we want $q = 0$. But we can be much more efficient if we allow a small chance of an overflow, e.g. $q = 10^{-6}$.


If I am not mistaken the probability of a particular bin not overflowing is $\Pr[X \leq c]$ where $X \sim \mathrm{Binomial}(n, 1/b)$. Using the Chernoff bound for the tail of the binomial distribution we find

$$\Pr[X \leq c] \leq \exp\left(-n D\left(c/n \,\|\, 1/b\right)\right)$$

where $D(a \,\|\, p) = a \ln \frac{a}{p} + (1-a)\ln\frac{1-a}{1-p}$ is the Kullback–Leibler divergence.

But I don't know how to extend this bound to no bin overflowing. The bins are not independent after all, e.g. when throwing $5$ balls into $2$ bins of capacity $2$ the probability a particular bin overflows is $< 1$, but by the pigeonhole principle the probability any bin overflows is $1$. Also, the above bound does not seem trivial to invert to find a function for picking $c$ given $n, b$.