| Random number is an important basic resource,which plays an important role in games,mathematics,verification codes and other fields.How to obtain high-quality random numbers is particularly important.In daily life,we can’t always use true random numbers,because the true random number generator has various defects:first,the production cost is high;Second,the entropy source of the true random number generator is easily influenced by various factors.The pseudo-random number generator has many advantages,such as easy acquisition,simple operation and low cost.Pseudorandom number generator can make up for the shortcomings of true random number generator,so it has been widely studied and applied.It is of great significance to study the independence and uniformity of random numbers generated by pseudo-random number generators,so as to make them widely used in simulation and other fields.Among many pseudo-random number generators,linear congruence method is simple in structure,excellent in performance and relatively easy to implement.However,the defects of single linear congruence method are obvious,such as long-period correlation phenomenon(the correlation coefficient between the first half and the second half of random sequence is-1)and sparse grid structure(when successive T random numbers are regarded as the coordinates of a point in T-dimensional space,these points are only scattered on a few hyperplanes in T-dimensional space),which makes random sequence show strong regularity and easy to decipher.In order to overcome the above shortcomings,the following work is carried out:1.The proof method of full period condition of linear congruence method is optimized,which makes the proof method more rigorous.The full period condition is verified by experiments,and the results show that three conditions in the full period condition are indispensable.2.A linear congruence combiner and a linear congruence adder are proposed to improve the quality of generating random numbers.According to the requirements of China’s GM/T 0005-2021,the random numbers generated by linear congruence combiner and linear congruence adder are tested.The results show that the random sequences generated by linear congruence combiner and linear congruence adder can pass more tests compared with single linear congruence method.These tests show that the random numbers generated by linear congruence combiner and linear congruence adder have better uniformity and independence.3.The random number generated by the improved linear congruence method is explored and achieved good results.Random sequences generated by linear congruence combiners or linear congruence stackers are used to explore applications in such scenarios as finding definite integral of functions,games and verification codes,and all show good performance.To sum up,this paper optimizes the proof method of full period condition of linear congruence method,and the proposed linear congruence combiner and linear congruence adder can effectively improve the performance of a single linear congruence method,and the quality of random numbers generated is also greatly improved. |