{"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":4,"journal":{"name":"ACS Applied Energy Materials","volume":null,"pages":null},"PeriodicalIF":5.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\":4,\"journal\":{\"name\":\"ACS Applied Energy Materials\",\"volume\":null,\"pages\":null},\"PeriodicalIF\":5.4000,\"publicationDate\":\"2024-09-02\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"ACS Applied Energy Materials\",\"FirstCategoryId\":\"100\",\"ListUrlMain\":\"https://www.sciencedirect.com/science/article/pii/S037847542400346X\",\"RegionNum\":3,\"RegionCategory\":\"材料科学\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q2\",\"JCRName\":\"CHEMISTRY, PHYSICAL\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"ACS Applied Energy Materials","FirstCategoryId":"100","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S037847542400346X","RegionNum":3,"RegionCategory":"材料科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q2","JCRName":"CHEMISTRY, PHYSICAL","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.
期刊介绍:
ACS Applied Energy Materials is an interdisciplinary journal publishing original research covering all aspects of materials, engineering, chemistry, physics and biology relevant to energy conversion and storage. The journal is devoted to reports of new and original experimental and theoretical research of an applied nature that integrate knowledge in the areas of materials, engineering, physics, bioscience, and chemistry into important energy applications.