An asymptotically optimal algorithm for generating bin cardinalities

Luc Devroye,Dimitrios Los
2024-04-10
Abstract:In the balls-into-bins setting, $n$ balls are thrown uniformly at random into $n$ bins. The naïve way to generate the final load vector takes $\Theta(n)$ time. However, it is well-known that this load vector has with high probability bin cardinalities of size $\Theta(\frac{\log n}{\log \log n})$. Here, we present an algorithm in the RAM model that generates the bin cardinalities of the final load vector in the optimal $\Theta(\frac{\log n}{\log \log n})$ time in expectation and with high probability.
Data Structures and Algorithms,Discrete Mathematics
What problem does this paper attempt to address?