arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1910.06437cs.DScs.CR
收藏

是时候放弃梅森旋转算法了

It is high time we let go of the Mersenne Twister

Sebastiano Vigna

AI总结:

本文综述梅森旋转算法在长周期、内存及统计特性上的严重缺陷,指出其不宜作为通用伪随机数生成器,并为用户和实现者提供决策指南。

摘要:

当梅森旋转算法在1997年首次出现时,它是线性映射在$\mathbf F_2$上用于生成伪随机数的一个有力例证。特别是,定义具有长周期的生成器的简便性使得梅森旋转算法获得了大量追随者,尽管这种长周期并非质量的衡量标准,并且它们需要大量的内存。即使在其发表之时,梅森旋转算法的几个缺陷也是可以预见的,但它们被其他有趣的特性所掩盖。如今,梅森旋转算法是C编译器、Python语言、Maple数学计算系统以及许多其他环境中的默认生成器。尽管如此,过去20年积累的知识表明,梅森旋转算法实际上存在严重缺陷,不应被用作通用伪随机数生成器。这些结果中有许多是民间传说,或散布在非常专业的文献中。本文为非专业人士综述了这些结果,提供了新的、简单的、易于理解的例子,旨在作为最终用户或语言实现者的指南,以便他们能够就是否使用梅森旋转算法做出明智的决定。

英文摘要:

When the Mersenne Twister made his first appearance in 1997 it was a powerful example of how linear maps on $\mathbf F_2$ could be used to generate pseudorandom numbers. In particular, the easiness with which generators with long periods could be defined gave the Mersenne Twister a large following, in spite of the fact that such long periods are not a measure of quality, and they require a large amount of memory. Even at the time of its publication, several defects of the Mersenne Twister were predictable, but they were somewhat obscured by other interesting properties. Today the Mersenne Twister is the default generator in C compilers, the Python language, the Maple mathematical computation system, and in many other environments. Nonetheless, knowledge accumulated in the last $20$ years suggests that the Mersenne Twister has, in fact, severe defects, and should never be used as a general-purpose pseudorandom number generator. Many of these results are folklore, or are scattered through very specialized literature. This paper surveys these results for the non-specialist, providing new, simple, understandable examples, and it is intended as a guide for the final user, or for language implementors, so that they can take an informed decision about whether to use the Mersenne Twister or not.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑