Batched ranged random integer generation

Nevin Brackett‐Rozinsky, Daniel Lemire
{"title":"Batched ranged random integer generation","authors":"Nevin Brackett‐Rozinsky, Daniel Lemire","doi":"10.1002/spe.3369","DOIUrl":null,"url":null,"abstract":"SummaryPseudorandom values are often generated as 64‐bit binary words. These random words need to be converted into ranged values without statistical bias. We present an efficient algorithm to generate multiple independent uniformly‐random bounded integers from a single uniformly‐random binary word, without any bias. In the common case, our method uses one multiplication and no division operations per value produced. In practice, our algorithm can more than double the speed of unbiased random shuffling for small to moderately large arrays.","PeriodicalId":21899,"journal":{"name":"Software: Practice and Experience","volume":"6 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2024-08-26","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Software: Practice and Experience","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1002/spe.3369","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

SummaryPseudorandom values are often generated as 64‐bit binary words. These random words need to be converted into ranged values without statistical bias. We present an efficient algorithm to generate multiple independent uniformly‐random bounded integers from a single uniformly‐random binary word, without any bias. In the common case, our method uses one multiplication and no division operations per value produced. In practice, our algorithm can more than double the speed of unbiased random shuffling for small to moderately large arrays.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
分批随机整数生成
摘要伪随机值通常以 64 位二进制字的形式生成。需要将这些随机字转换为无统计偏差的有界值。我们提出了一种高效算法,可从单个均匀随机二进制字生成多个独立的均匀随机有界整数,且不会产生任何偏差。在普通情况下,我们的方法产生的每个值只需进行一次乘法运算,无需进行除法运算。在实践中,对于小到中等规模的数组,我们的算法比无偏随机洗牌的速度快一倍以上。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Algorithms for generating small random samples A comprehensive survey of UPPAAL‐assisted formal modeling and verification Large scale system design aided by modelling and DES simulation: A Petri net approach Empowering software startups with agile methods and practices: A design science research Space‐efficient data structures for the inference of subsumption and disjointness relations
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1