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 Θ(lognloglogn). Here, we present an algorithm in the RAM model that generates the bin cardinalities of the final load vector in the optimal Θ(lognloglogn) time in expectation and with high probability.Further, the algorithm that we present is still optimal for any m∈[n,nlogn] 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.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.