{"title":"生成二进制万有引力的渐进最优算法","authors":"Luc Devroye , Dimitrios Los","doi":"10.1016/j.matcom.2024.08.034","DOIUrl":null,"url":null,"abstract":"<div><p>In the balls-into-bins setting, <span><math><mi>n</mi></math></span> balls are thrown uniformly at random into <span><math><mi>n</mi></math></span> bins. The naïve way to generate the final load vector takes <span><math><mrow><mi>Θ</mi><mrow><mo>(</mo><mi>n</mi><mo>)</mo></mrow></mrow></math></span> time. However, it is well-known that this load vector has with high probability bin cardinalities of size <span><math><mrow><mi>Θ</mi><mrow><mo>(</mo><mfrac><mrow><mo>log</mo><mi>n</mi></mrow><mrow><mo>log</mo><mo>log</mo><mi>n</mi></mrow></mfrac><mo>)</mo></mrow></mrow></math></span>. Here, we present an algorithm in the RAM model that generates the bin cardinalities of the final load vector in the optimal <span><math><mrow><mi>Θ</mi><mrow><mo>(</mo><mfrac><mrow><mo>log</mo><mi>n</mi></mrow><mrow><mo>log</mo><mo>log</mo><mi>n</mi></mrow></mfrac><mo>)</mo></mrow></mrow></math></span> time in expectation and with high probability.</p><p>Further, the algorithm that we present is still optimal for any <span><math><mrow><mi>m</mi><mo>∈</mo><mrow><mo>[</mo><mi>n</mi><mo>,</mo><mi>n</mi><mo>log</mo><mi>n</mi><mo>]</mo></mrow></mrow></math></span> balls and can also be used as a building block to efficiently simulate more involved load balancing algorithms. In particular, for the <span>Two-Choice</span> 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.</p></div>","PeriodicalId":49856,"journal":{"name":"Mathematics and Computers in Simulation","volume":"228 ","pages":"Pages 147-155"},"PeriodicalIF":4.4000,"publicationDate":"2024-09-02","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"An asymptotically optimal algorithm for generating bin cardinalities\",\"authors\":\"Luc Devroye , Dimitrios Los\",\"doi\":\"10.1016/j.matcom.2024.08.034\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<div><p>In the balls-into-bins setting, <span><math><mi>n</mi></math></span> balls are thrown uniformly at random into <span><math><mi>n</mi></math></span> bins. The naïve way to generate the final load vector takes <span><math><mrow><mi>Θ</mi><mrow><mo>(</mo><mi>n</mi><mo>)</mo></mrow></mrow></math></span> time. However, it is well-known that this load vector has with high probability bin cardinalities of size <span><math><mrow><mi>Θ</mi><mrow><mo>(</mo><mfrac><mrow><mo>log</mo><mi>n</mi></mrow><mrow><mo>log</mo><mo>log</mo><mi>n</mi></mrow></mfrac><mo>)</mo></mrow></mrow></math></span>. Here, we present an algorithm in the RAM model that generates the bin cardinalities of the final load vector in the optimal <span><math><mrow><mi>Θ</mi><mrow><mo>(</mo><mfrac><mrow><mo>log</mo><mi>n</mi></mrow><mrow><mo>log</mo><mo>log</mo><mi>n</mi></mrow></mfrac><mo>)</mo></mrow></mrow></math></span> time in expectation and with high probability.</p><p>Further, the algorithm that we present is still optimal for any <span><math><mrow><mi>m</mi><mo>∈</mo><mrow><mo>[</mo><mi>n</mi><mo>,</mo><mi>n</mi><mo>log</mo><mi>n</mi><mo>]</mo></mrow></mrow></math></span> balls and can also be used as a building block to efficiently simulate more involved load balancing algorithms. In particular, for the <span>Two-Choice</span> 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.</p></div>\",\"PeriodicalId\":49856,\"journal\":{\"name\":\"Mathematics and Computers in Simulation\",\"volume\":\"228 \",\"pages\":\"Pages 147-155\"},\"PeriodicalIF\":4.4000,\"publicationDate\":\"2024-09-02\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Mathematics and Computers in Simulation\",\"FirstCategoryId\":\"100\",\"ListUrlMain\":\"https://www.sciencedirect.com/science/article/pii/S037847542400346X\",\"RegionNum\":2,\"RegionCategory\":\"数学\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q1\",\"JCRName\":\"COMPUTER SCIENCE, INTERDISCIPLINARY APPLICATIONS\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Mathematics and Computers in Simulation","FirstCategoryId":"100","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S037847542400346X","RegionNum":2,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"COMPUTER SCIENCE, INTERDISCIPLINARY APPLICATIONS","Score":null,"Total":0}
An asymptotically optimal algorithm for generating bin cardinalities
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.
期刊介绍:
The aim of the journal is to provide an international forum for the dissemination of up-to-date information in the fields of the mathematics and computers, in particular (but not exclusively) as they apply to the dynamics of systems, their simulation and scientific computation in general. Published material ranges from short, concise research papers to more general tutorial articles.
Mathematics and Computers in Simulation, published monthly, is the official organ of IMACS, the International Association for Mathematics and Computers in Simulation (Formerly AICA). This Association, founded in 1955 and legally incorporated in 1956 is a member of FIACC (the Five International Associations Coordinating Committee), together with IFIP, IFAV, IFORS and IMEKO.
Topics covered by the journal include mathematical tools in:
•The foundations of systems modelling
•Numerical analysis and the development of algorithms for simulation
They also include considerations about computer hardware for simulation and about special software and compilers.
The journal also publishes articles concerned with specific applications of modelling and simulation in science and engineering, with relevant applied mathematics, the general philosophy of systems simulation, and their impact on disciplinary and interdisciplinary research.
The journal includes a Book Review section -- and a "News on IMACS" section that contains a Calendar of future Conferences/Events and other information about the Association.