关闭 More 保存 重做 撤销 预览

   
关闭   当前为简洁模式,您可以更新模块,修改模块属性和数据,要使用完整的拖拽功能,请点击进入高级模式

重播

上一主題 下一主題
»
太子妃
翻译小组
当前积分:4016
帖子    739
新博币    1 提现
提现    0
     
    2148 0 | 显示全部楼层 |倒序浏览
    线性同余方法(LCG)是个产生伪随机数的方法。

    它是根据递归公式:

    N j + 1 ( A × N j + B ) ( mod M ) {\displaystyle N_{j+1}\equiv (A imes N_{j}+B){\pmod {M}}}

    其中 A , B , M {\displaystyle A,B,M} 是产生器设定的常数。

    LCG的周期最大为 M {\displaystyle M} ,但大部分情况都会少于M。要令LCG达到最大周期,应符合以下条件:

    B , M {\displaystyle B,M} 互质; M {\displaystyle M} 的所有质因数都能整除 A 1 {\displaystyle A-1} ;若 M {\displaystyle M} 是4的倍数, A 1 {\displaystyle A-1} 也是; A , B , N 0 {\displaystyle A,B,N_{0}} 都比 M {\displaystyle M} 小; A , B {\displaystyle A,B} 是正整数。

    [micxp_threadbk] [micxp_title] 随机性 参见 参考文献 外部链接 [/micxp_title] [#] 因为通过线性同余方法构建的伪随机数生成器的内部状态可以轻易地由其输出演算得知,所以此种伪随机数生成器属于统计学伪随机数生成器。 设计密码学的应用必须至少使用密码学安全伪随机数生成器,故需要避免由线性同余方法获得的随机数在密码学中的应用。 [##]
    • Mersenne Twister
    [###]
    • S.K. Park and K.W. Miller. Random Number Generators: Good Ones Are Hard To Find. Communications of the ACM. 1988, 31 (10): 1192–1201. doi:10.1145/63039.63042. 
    • D. E. Knuth. The Art of Computer Programming, Volume 2: Seminumerical Algorithms, Third Edition. Addison-Wesley, 1997. ISBN 0-201-89684-2. Section 3.2.1: The Linear Congruential Method, pp. 10–26.
    • P. L'Ecuyer. Tables of Linear Congruential Generators of Different Sizes and Good Lattice Structure. Mathematics of Computation. 1999, 68 (225): 249–260. doi:10.1090/S0025-5718-99-00996-5. 
    • Press, WH; Teukolsky, SA; Vetterling, WT; Flannery, BP, Section 7.1.1. Some History, Numerical Recipes: The Art of Scientific Computing 3rd, New York: Cambridge University Press, 2007, ISBN 978-0-521-88068-8 
    • Gentle, James E., (2003). Random Number Generation and Monte Carlo Methods, 2nd edition, Springer, ISBN 0-387-00178-6.
    • Joan Boyar. Inferring sequences produced by pseudo-random number generators. Journal of the ACM. 1989, 36 (1): 129–141. doi:10.1145/58562.59305.  (in this paper, efficient algorithms are given for inferring sequences produced by certain pseudo-random number generators).
    [####]
    • The simulation Linear Congruential Generator visualizes the correlations between the pseudo-random numbers when manipulating the parameters.
    • Security of Random Number Generation: An Annotated Bibliography
    • Linear Congruential Generators post to sci.math
    • The "Death of Art" computer art project at Goldstein Technologies LLC, uses an LCG to generate 33,554,432 images
    • P. L'Ecuyer and R. Simard, ``TestU01: A C Library for Empirical Testing of Random Number Generators, May 2006, Revised November 2006, ACM Transactions on Mathematical Software, 33, 4, Article 22, August 2007.
    • Additive Congruential Method : maths and logic behind its spread
    分类:
    • 随机
    • 同余
    隐藏分类:
    • 自2014年9月缺少注脚的条目
    [/micxp_threadbk]
    个人签名

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    快速回复 返回顶部 返回列表