Balanced Allocations: The Weighted Case

  • Kunal Talwar ,
  • Udi Wieder

ACM Symposium on Theory of Computing (STOC) |

Published by Association for Computing Machinery, Inc.

Publication

We investigate balls-and-bins processes where m weighted balls are placed into n bins using the “power of two choices” paradigm, whereby a ball is inserted into the less loaded of two randomly chosen bins. The case where each of the m balls has unit weight had been studied extensively. In a seminal paper Azar ηl showed that when m=n the most loaded bin has Θ(log log n) balls with high probability. Surprisingly, the gap in load between the heaviest bin and the average bin does not increase with m and was shown by Berenbrink ηl to be Θ(log log n) with high probability for arbitrarily large m. We generalize this result to the weighted case where balls have weights drawn from an arbitrary weight distribution. We show that as long as the weight distribution has finite second moment and satisfies a mild technical condition, the gap between the weight of the heaviest bin and the weight of the average bin is independent of the number balls thrown. This is especially striking when considering heavy tailed distributions such as Power-Law and Log-Normal distributions. In these cases, as more balls are thrown, heavier and heavier weights are encountered. Nevertheless with high probability, the imbalance in the load distribution does not increase. Furthermore, if the fourth moment of the weight distribution is finite, the expected value of the gap is shown to be independent of the number of balls.