Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
124 tokens/sec
GPT-4o
8 tokens/sec
Gemini 2.5 Pro Pro
47 tokens/sec
o3 Pro
5 tokens/sec
GPT-4.1 Pro
38 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

An asymptotically optimal algorithm for generating bin cardinalities (2404.07011v2)

Published 10 Apr 2024 in cs.DS and cs.DM

Abstract: In the balls-into-bins setting, $n$ balls are thrown uniformly at random into $n$ bins. The na\"{i}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. 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\"{i}ve simulation.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (41)
  1. Balanced allocations. SIAM J. Comput., 29(1):180–200, 1999. doi:10.1137/S0097539795288490.
  2. Parallel randomized load balancing. Random Structures & Algorithms, 13(2):159–188, 1998. doi:10.1002/(SICI)1098-2418(199809)13:2<159::AID-RSA3>3.3.CO;2-Z.
  3. Sampling from binomial and Poisson distributions: A method with bounded computation times. Computing, 25(3):193–208, 1980. doi:10.1007/BF02241999.
  4. A. C. Atkinson. The computer generation of Poisson random variables. Journal of the Royal Statistical Society. Series C (Applied Statistics), 28(1):29–35, 1979. doi:10.2307/2346807.
  5. An efficient two-stage procedure for generating random variates from the multinomial distribution. The American Statistician, 38(3):216–219, 1984.
  6. Simulating a coupon collector. In Shlomi Dolev, Jonathan Katz, and Amnon Meisels, editors, 6th International Symposium on Cyber Security, Cryptology, and Machine Learning (CSCML’22), volume 13301 of Lecture Notes in Computer Science, pages 66–77. Springer, 2022. doi:10.1007/978-3-031-07689-3_5.
  7. Balanced allocations: the heavily loaded case. SIAM J. Comput., 35(6):1350–1385, 2006. doi:10.1137/S009753970444435X.
  8. Concentration Inequalities - A Nonasymptotic Theory of Independence. Oxford University Press, 2013. doi:10.1093/ACPROF:OSO/9780199535255.001.0001.
  9. Generating sorted lists of random numbers. ACM Trans. Math. Softw., 6(3):359–364, 1980. doi:10.1145/355900.355907.
  10. Herman Chernoff. A measure of asymptotic efficiency for tests of a hypothesis based on the sum of observations. The Annals of Mathematical Statistics, 23(4):493 – 507, 1952. doi:10.1214/aoms/1177729330.
  11. Acceptance-rejection techniques for sampling from the gamma and beta distributions. Technical report, Stanford University, 1974.
  12. Charles S. Davis. The computer generation of multinomial random variates. Computational Statistics & Data Analysis, 16(2):205–217, 1993. doi:https://doi.org/10.1016/0167-9473(93)90115-A.
  13. Luc Devroye. Generating the maximum of independent identically distributed random variables. Computers & Mathematics with Applications, 6(3):305–315, 1980. doi:https://doi.org/10.1016/0898-1221(80)90039-5.
  14. Luc Devroye. The computer generation of Poisson random variables. Computing, 26(3):197–207, 1981. doi:10.1007/BF02243478.
  15. Luc Devroye. A simple algorithm for generating random variates with a log-concave density. Computing, 33(3-4):247–257, 1984. doi:10.1007/BF02242271.
  16. Luc Devroye. Lecture Notes on Bucket Algorithms. Springer Science + Business Media, LLC, 1986. doi:https://doi.org/10.1007/978-1-4899-3531-1.
  17. Luc Devroye. Non-Uniform Random Variate Generation. Springer, 1986. doi:10.1007/978-1-4613-8643-8.
  18. Luc Devroye. A simple generator for discrete log-concave distributions. Computing, 39(1):87–91, 1987. doi:10.1007/BF02307716.
  19. Luc Devroye. Generation of random objects. In Proceedings of the 24th Winter Simulation Conference, Arlington, VA, USA, December 13-16, 1992, pages 270–279. ACM Press, 1992. doi:10.1145/167293.167349.
  20. The power of thinning in balanced allocation. Electron. Commun. Probab., 26:Paper No. 34, 8, 2021. doi:10.1214/21-ecp400.
  21. George S. Fishman. Sampling from the Poisson distribution on a computer. Computing, 17(2):147–156, 1976. doi:10.1007/BF02276759.
  22. Gaston H. Gonnet. Expected length of the longest probe sequence in hash code searching. J. ACM, 28(2):289–304, 1981. doi:10.1145/322248.322254.
  23. Fast generation of order statistics. ACM Trans. Model. Comput. Simul., 12(2):83–93, 2002. doi:10.1145/566392.566393.
  24. Automatic Nonuniform Random Variate Generation. Springer Berlin, Heidelberg, 2004. doi:https://doi.org/10.1007/978-3-662-05946-3.
  25. Wolfgang Hörmann. A universal generator for discrete log-concave distributions. Computing, 52(1):89–96, 1994. doi:10.1007/BF02243398.
  26. Wolfgang Hörmann. A rejection technique for sampling from T-concave distributions. ACM Trans. Math. Softw., 21(2):182–193, 1995. doi:10.1145/203082.203089.
  27. Approximated two choices in randomized load balancing. In Proceedings of 15th International Symposium on Algorithms and Computation (ISAAC’04), volume 3341, pages 545–557. Springer-Verlag, 2004. doi:10.1007/978-3-540-30551-4_48.
  28. Urn Models and Their Application: An Approach to Modern Discrete Probability Theory. Wiley Series in Probability and Mathematical Statistics. John Wiley & Sons, New York-London-Sydney, 1977.
  29. Advances in urn models during the past two decades. In Advances in Combinatorial Methods and Applications to Probability and Statistics, Stat. Ind. Technol., pages 203–257. Birkhäuser Boston, Boston, MA, 1997.
  30. Efficient PRAM simulation on a distributed memory machine. Algorithmica, 16(4-5):517–542, 1996. doi:10.1007/BF01940878.
  31. Random allocations. Scripta Series in Mathematics. John Wiley & Sons, New York-London-Sydney, 1978.
  32. Balanced Allocations with Incomplete Information: The Power of Two Queries. In 13th Innovations in Theoretical Computer Science Conference (ITCS’22), volume 215, pages 103:1–103:23, Dagstuhl, Germany, 2022. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.ITCS.2022.103.
  33. Balanced Allocations: Caching and Packing, Twinning and Thinning. In 33rd Annual ACM-SIAM Symposium on Discrete Algorithms (SODA’22), pages 1847–1874, Alexandria, Virginia, 2022. SIAM. doi:10.1137/1.9781611977073.74.
  34. Hosam M. Mahmoud. Pólya urn models. Texts in Statistical Science Series. CRC Press, Boca Raton, FL, 2009.
  35. Michael Mitzenmacher. On the analysis of randomized load balancing schemes. Theory Comput. Syst., 32(3):361–386, 1999. doi:10.1007/S002240000122.
  36. The power of two random choices: a survey of techniques and results. In Handbook of Randomized Computing, Vol. I, II, volume 9 of Comb. Optim., pages 255–312. Kluwer Acad. Publ., Dordrecht, Netherlands, 2001. doi:10.1007/978-1-4615-0013-1_9.
  37. “Balls into bins”—a simple and tight analysis. In 2nd International Workshop on Randomization and Computation (RANDOM’98), volume 1518, pages 159–170. Springer, Barcelona, Spain, 1998. doi:10.1007/3-540-49543-6_13.
  38. Poisson random variate generation. Technical report, Purdue University, 1981.
  39. Ernst Stadlober. Sampling from Poisson, binomial and hypergeometric distributions: ratio of uniforms as a simple and fast alternative. PhD thesis, Technische Universität Graz, 1989.
  40. Ernst Stadlober. The ratio of uniforms approach for generating discrete random variates. Journal of Computational and Applied Mathematics, 31(1):181–189, 1990. doi:https://doi.org/10.1016/0377-0427(90)90349-5.
  41. Udi Wieder. Hashing, load balancing and multiple choice. Found. Trends Theor. Comput. Sci., 12(3-4):275–379, 2017. doi:10.1561/0400000070.

Summary

We haven't generated a summary for this paper yet.