Table of Contents
Fetching ...

An asymptotically optimal algorithm for generating bin cardinalities

Luc Devroye, Dimitrios Los

TL;DR

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 is presented.

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 $Θ(n)$ time. However, it is well-known that this load vector has with high probability bin cardinalities of size $Θ(\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 $Θ(\frac{\log n}{\log \log n})$ time in expectation and with high probability. Further, the algorithm that we present is still optimal for any $m \in [n, n \log n]$ balls and can also be used as a building block to efficiently simulate more involved load balancing algorithms. In particular, for the Two-Choice algorithm, which samples two bins in each step and allocates to the least-loaded of the two, we obtain roughly a quadratic speed-up over the naïve simulation.

An asymptotically optimal algorithm for generating bin cardinalities

TL;DR

An algorithm in the RAM model that generates the bin cardinalities of the final load vector in the optimal time in expectation and with high probability is presented.

Abstract

In the balls-into-bins setting, balls are thrown uniformly at random into bins. The naïve way to generate the final load vector takes time. However, it is well-known that this load vector has with high probability bin cardinalities of size . Here, we present an algorithm in the RAM model that generates the bin cardinalities of the final load vector in the optimal time in expectation and with high probability. Further, the algorithm that we present is still optimal for any balls and can also be used as a building block to efficiently simulate more involved load balancing algorithms. In particular, for the Two-Choice algorithm, which samples two bins in each step and allocates to the least-loaded of the two, we obtain roughly a quadratic speed-up over the naïve simulation.
Paper Structure (12 sections, 5 theorems, 24 equations, 1 algorithm)

This paper contains 12 sections, 5 theorems, 24 equations, 1 algorithm.

Key Result

Theorem 1

For any $n \leq m \leq n \log n$, alg:one_choice generates the vector of bin cardinalities for the $\mathsf{Multinomial}(m; 1/n, \ldots, 1/n)$ distribution in time in expectation and with probability at least $1 - o_n(1)$.

Theorems & Definitions (8)

  • Theorem 1
  • Lemma 2
  • proof
  • Corollary 3
  • Theorem 4
  • proof : Proof of \ref{['thm:aux_main_theorem']}
  • Theorem 5
  • proof