• 沒有找到結果。

DX亂數產生器之經驗研究分析

N/A
N/A
Protected

Academic year: 2021

Share "DX亂數產生器之經驗研究分析"

Copied!
8
0
0

加載中.... (立即查看全文)

全文

(1)國 立 交 通 大 學. 統計學系. 碩 士 論 文. DX 亂數產生器之經驗分析研究 An Empirical Study on DX Random Number Generators. 研 究 生:林季盈. 指導教授:洪志真. 中 華 民 國 九十三 年 七 月. 教授.

(2) DX 亂數產生器之經驗分析研究 An Empirical Study on DX Random Number Generators. 研 究 生:林季盈. Student:Chi-Ying Lin. 指導教授:洪志真. Advisor:Jyh-Jen Horng Shiau. 國 立 交 通 大 學 統 計 學 系 碩 士 論 文. A Thesis Submitted to Institute of Statistics College of Science National Chiao Tung University in partial Fulfillment of the Requirements for the Degree of Master In Statistics July 2004 Hsinchu, Taiwan, Republic of China. 中華民國九十三年七月.

(3) DX 亂數產生器之經驗分析研究. 學生:林季盈. 指導教授:洪志真 博士. 國立交通大學統計學系研究所 碩士班. 摘要 亂數產生器的用途在很多的應用上扮演一個非常重要的角色,像是加密系統,模 擬, 統計方法的分析也都必須倚賴亂數。這些研究的品質及可信度必須要有一個 好的亂數產生器來支持。且參數 B=16807,C=0,M=2147483647 之 LCG 是現 在電腦套裝軟體中常見的基本亂數產生器,但是它的週期短,只能在一維空間均 勻分佈,況且它無法通過 Diehard 這一套檢驗亂數產生器的系統檢驗。 DX-k-s 是一套高維均勻分佈,有效率,週期長,且可用來配備於各種電腦的亂數產生器。 我們主要研究的目的就是要探討這一套亂數產生器用 Diehard 來檢驗的表現。根 據我們的實驗結果報告,DX-k-s 幾乎通過了所有 Diehard 裡的檢驗法。而且分析 檢驗結果,我們發現 DX 之參數 k,s,和 B 對 DX-k-s 在 Diehard 裡的表現並無 顯 著 影 響 。 我 們 也 特 別 檢 驗 了 參 數 M= =2147427929 和 B=521816 的 DX-1511-4,這個亂數產生器的週期等於 ,而且它可以在 1511 維以內的空間均勻 分佈。現今鮮少有亂數產生器可以通過 Diehard 裡的所有檢驗法,而 DX-1511-4 辦到了。 總而言之,由我們的檢驗結果來評估,DX 是一套相當好,值得推薦的 亂數產生器。.

(4) An Empirical Study of DX Random Number Generators. Student: Chi-Ying Lin. Advisor: Dr. Jyh-Jen Horng Shiau. Institute of Statistics National Chiao Tung University. ABSTRACT Random numbers are used in many modern applications, such as computer games, the generation of cryptographic keys, simulation studies, and many scientific experiments. Quality of these applications and studies rely heavily on the quality of the random number generator (RNG) used. LCG with B=16807, C=0, M=2147483647 is very popular and used as a default RNG in many computer systems; but it does not pass all the tests in the Diehard test suite [19]. DX-k-s generators, proposed recently by Deng and Xu [4], is a system of High-dimensional uniformly, Efficient, Long-cycle, and Portable uniform random number generators. The main objective of this study is to investigate the empirical performance of the DX-k-s random number generators. We test DX-k-s random number generators by the Diehard test suite with a well-planned experimental design. According to the results of our experiments, DX family generators pass almost all the tests in Diehard and the parameters, k, s, and B do not significantly affect the performances of the RNGs under study. We also test a particular generator DX-1511-4 with M= =2147427929 and B=521816. This generator has a very long period of and is equi-distributed up to 1511 dimensions. In particular, DX-1511-4 passes all the tests in Diehard. We conclude that, based on our empirical study, DX-k-s generators is a very good family of RNGs..

(5) Acknowledgement. 我終於畢業了!首先我由衷感謝我敬愛的洪志真老師,感謝她這幾年來的耐 心;有些時候,她像個朋友,讓我毫無戒心的把心事、生活中遇到的困擾一一向 她傾訴,有些時候她像個心靈嚮導,給我一些建議,舒緩我心裡的障礙。這一次 論文能夠順利的完成,賴於老師的殷殷叮囑,時時刻刻提醒我不要放棄;我永遠 也不會忘記老師幫忙批改,糾正論文寫法這一段時間,陪我到晚上 10 點多,讓我 心裡諸多過意不去。老師之於我的一切,我都只有感動與無限感激。 另外,我要感謝 Joy,謝謝她在我寫論文的時期,給予無數的意見與信心建立, PowerPoint 的製作,沒有她從旁幫忙,我還真欲哭無淚!接下來一段時間是 Joy 要拿博士學位的關鍵時期,希望老天爺庇祐她順利拿到博士學位。當然有需要我 的地方,我一定也會義不容辭;比如說,幫忙倒茶水! 由於爸爸媽媽是公務人員,我是由阿媽一手帶大的,精明的阿媽影響我很多, 如今她九十六歲高齡需要人照顧,我很慶幸寫論文這段期間有機會親手反哺她對 我的恩情,也希望老天爺保佑她每一天能夠心安且身無病痛;最終,我要感謝的 是我最摯愛的家人,爸爸以禪的智慧來面對我的狀況,媽媽總是以最樂觀的態度 引導我,弟弟最愛與我分享他讀過的名人經驗來鼓勵我,而最可愛美麗的妹妹常 用她甜美的笑容來支持我,並告訴我: 「姊!我相信妳一定可以的!」家永遠是最 溫暖的避風港,我有一個可愛健康的家庭,這裡的每一個小孩都會愈來愈成長茁 壯!我親愛的弟弟、妹妹,咱們一起加油! 僅此向所有關心我的朋友致上最誠摯的謝意! 季盈 2004.7.

(6) CONTENTS Chinese Abstract ………………………………………………………… English Abstract ………………………………………………………… Acknowledgements …………………………………………………… ………………………………………………………… Table of Contents ………………………………………………………… List of Tables ………………………………………………………… List of Figures Introduction …………………………………………… Chapter One Literature Review ……………………………………… Chapter Two Pseudo-random Number Generators ………………… 2.1 Linear Congruential Generator : LCG ……………… 2.2 Multiple Recursive Generator : MRG ………………… 2.3 Fast Multiple Recursive Generator : FMRG…………… 2.4 A System of Generators by Deng & Xu : DX ………… 2.5 Chapter Three An Empirical Study …………………………………… Introduction …………………………………………… 3.1 C program ………………………………………………… 3.2 Initial Seeds for 5 Replicates…………………………… 3.3 Selection of B’s …………………………………………… 3.4 KS-test in Diehard Test Suite ………………………… 3.5 Tests in Diehard Suite ………………………………… 3.6 Design of the Experiment ……………………………… 3.7 Chapter Four Result of the Empirical Studies ………………………… Tests of Random Numbers and Our Experiment Results 4.1 ANOVA & Discussion …………………………………… 4.2 A Comparison Study with LCG………………………… 4.3 4.4 DX-1511-4 with M=2 31 -55719 and B=521816 ………… Conclusion ……………………………………………… Chapter Five ……………………………………………………………… Reference ……………………………………………………………… Appendix I ……………………………………………………………… Appendix II ……………………………………………………………… Appendix III. i ii iii iv v vi 1 3 3 3 4 5 5 8 8 8 8 8 9 9 10 12 12 13 14 14 15 16 18 21 23.

(7) List of Tables. Table 1. Selected B of each DX random number generator ………………………………. 26. Table 2. The KSTEST values of Diehard tests for DX-1511-4 with B=521816 and various seeds. 27. Table 3. The KSTEST values of Overlapping Sums Test (Test 1) ……………………………. 28. Table 4. The KSTEST values of Runs Test (Test 2a) …………………………………………. 29. Table 5. The KSTEST values of Runs Test (Test 2b) …………………………………………. 30. Table 6. The KSTEST values of Runs Test (Test 2c) …………………………………………. 31. Table 7. The KSTEST values of Runs Test (Test 2d) …………………………………………. 32. Table 8. The KSTEST values of Random Spheres Test (Test 3) ……………………………. 33. Table 9. The KSTEST values of Parking Lot Test (Test 4) …………………………………. 34. Table 10. The KSTEST values of Birthday Spacings (Test 5)…………………………………. 35. Table 11. The KSTEST values of Count the 1’s in Specific Bytes (Test 6) …………………. 36. Table 12. The KSTEST values of Ranks of 6x8 Matrices (Test 7) …………………………. 37. Table 13. The KSTEST values of Ranks of 31x31 and 32x32 matrices (Test 8a) …………. 38. Table 14. The KSTEST values of Ranks of 31x31 and 32x32 matrices (Test 8b) …………. 39. Table 15. The KSTEST values of Monkey Tests on 20-bit Words (Test 10) ………………. 40. Table 16. The KSTEST values of The Craps Test (Test 11a) ………………………………. 41. Table 17. The KSTEST values of The Craps Test (Test 11b) ………………………………. 42. Table 18. The KSTEST values of Minimum Distance Test (Test 12) ………………………. 43. Table 19. The KSTEST values of Overlapping Permutations (Test 13a) …………………. 44. Table 20. The KSTEST values of Overlapping Permutations (Test 13b) …………………. 45. Table 21. The KSTEST values of Sparse Occupancy Tests OPSO, OQSO, DNA (Test 14a). 46. Table 22. The KSTEST values of Sparse Occupancy Tests OPSO, OQSO, DNA (Test 14b). 47. Table 23. The KSTEST values of Sparse Occupancy Tests OPSO, OQSO, DNA (Test 14c). 48. Table 24. The KSTEST values of The Squeeze Test (Test 15) ……………………………. 49. Table 25. The KSTEST values of Summary (Summary Test) ………………………………. 50. Table 26. The KSTEST values of each test for LCG with B=7 and various seeds …………. 51. Table 27. The KSTEST values of each test for LCG with B=11 and various seeds …………. 51. Table 28. The KSTEST values of each test for LCG with B=14 and various seeds ………. 51. Table 29. The KSTEST values of each test for LCG with B=22 and various seeds ………. 51. Table 30. The KSTEST values of each test for LCG with B=28 and various seeds ………. 52. Table 31. The KSTEST values of each test for LCG with B=16807 and various seeds……. 52. Table 32. The KSTEST values of each test for LCG with B=16810 and various seeds……. 52. Table 33. The KSTEST values of each test for LCG with B=16812 and various seeds……. 52.

(8) Table 34. The KSTEST values of each test for LCG with B=16814 and various seeds……. 53. Table 35. The KSTEST values of each test for LCG with B=16820 and various seeds……. 53. Table 36. The KSTEST values of each test for LCG with B=46259 and various seeds……. 53. Table 37. The KSTEST values of each test for LCG with B=46260 and various seeds……. 53. Table 38. The KSTEST values of each test for LCG with B=46266 and various seeds……. 54. Table 39. The KSTEST values of each test for LCG with B=46267 and various seeds……. 54. Table 40. The KSTEST values of each test for LCG with B=46268 and various seeds……. 54. Table 41. ANOVA tables of DX-102 for each test …………………………………………. 55. Table 42. ANOVA tables of DX-120 for each test ……………………………………………. 57. Table 43. ANOVA tables of FMRG for each test ……………………………………………. 59. Table 44. ANOVA tables of DX for each test …………………………………………………. 61. Table 45. ANOVA tables of FMRG & DX for each test………………………………………. 64. Table 46. ANOVA tables of LCG for each test ………………………………………………. 66. Table 47. The performance of DX-120-s, s=1, 2, 3, 4 with start seed 12345 in test: Count the 1’s in a Stream of Bytes………………………………………………………………………. 67. Table 48. The 234 p-values collected from various tests of Diehard performed on different RNGs with same initial seed=12345. Comparison same modulus 231-1 of DX-102-1 with B=820 and 5 FISH LCGs. …………………………………………………. 68. List of Figures. Figure 1. Frequencies of KSTEST values <0.05 of 11 RNGs grouped by the test …………. 69. Figure 2. Frequencies of KSTEST values <0.05 of 11 RNGs grouped by the RNG. 69. ……….

(9)

參考文獻

相關文件

• A language in ZPP has two Monte Carlo algorithms, one with no false positives and the other with no

Tests the loop condition before executing the loop body The .ENDW directive marks the end of

(4) If a live-in foreign worker tests positive after a rapid COVID-19 test or a PCR test and is isolated or hospitalized and on leaving hospital subject to home quarantine, home

Jing Yu, NTU, Taiwan Values at Algebraic Points.. Thiery 1995) Suppose the Drinfeld module ρ is of rank 1. Drinfeld modules corresponding to algebraic points can be defined over ¯

You are given the wavelength and total energy of a light pulse and asked to find the number of photons it

volume suppressed mass: (TeV) 2 /M P ∼ 10 −4 eV → mm range can be experimentally tested for any number of extra dimensions - Light U(1) gauge bosons: no derivative couplings. =&gt;

incapable to extract any quantities from QCD, nor to tackle the most interesting physics, namely, the spontaneously chiral symmetry breaking and the color confinement.. 

• Formation of massive primordial stars as origin of objects in the early universe. • Supernova explosions might be visible to the most