开源二项随机变量生成算法的平均运行时间
On the Average Runtime of an Open Source Binomial Random Variate Generation Algorithm
AI总结:
本文分析BTPE算法生成二项随机变量的平均运行时间,证明其随n增大收敛于常数,并通过开源Java库实验验证。
摘要:
BTPE算法(二项、三角形、平行四边形、指数)由Kachitvichyanukul和Schmeiser提出,是生成二项随机变量较快且应用广泛的算法之一。Cicirello的开源Java库$\rho\mu$包含了BTPE的实现以及多种其他随机数相关工具。在本报告中,我探讨了从二项分布$B(n,p)$生成随机值时BTPE算法的平均情况运行时间。从Kachitvichyanukul和Schmeiser关于接受-拒绝采样迭代期望次数的公式出发,我分析了当$n$趋于无穷大时的极限行为,并证明了BTPE的平均运行时间收敛于一个常数。我对$\rho\mu$库中的开源Java实现进行了插桩,以实验验证该分析。
英文摘要:
The BTPE algorithm (Binomial, Triangle, Parallelogram, Exponential) of Kachitvichyanukul and Schmeiser is one of the faster and more widely utilized algorithms for generating binomial random variates. Cicirello's open source Java library, $ρμ$, includes an implementation of BTPE as well as a variety of other random number related utilities. In this report, I explore the average case runtime of the BTPE algorithm when generating random values from binomial distribution $B(n,p)$. Beginning with Kachitvichyanukul and Schmeiser's formula for the expected number of acceptance-rejection sampling iterations, I analyze the limit behavior as $n$ approaches infinity, and show that the average runtime of BTPE converges to a constant. I instrument the open source Java implementation from the $ρμ$ library to experimentally validate the analysis.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。