Font Size: a A A

The Methods For Generating The Random Numbers: Linear Congruence Generator

Posted on:2008-04-07Degree:MasterType:Thesis
Country:ChinaCandidate:N FuFull Text:PDF
GTID:2120360212495757Subject:Computational Mathematics
Abstract/Summary:PDF Full Text Request
The history of random number generator is long. In the early time there had been the methods for generating the random number by hand. Such as throwing the dices, drawing straws. It can be seen that the application of the random number is in common. Thus, with the method of Monte-Carlo comes, the old ways could not satisfy the need by more random numbers in computing data. Prom the invention of the computer, which is popular for people generating random numbers by using. It is always making use of mathematics generate random numbers, which is the simplest and easiest. It uses less memories and computes faster, even more you can compute the data repeatedly. People called the random numbers , which are generated by computer pseudo random numbers, for these numbers are generated by the given algorithm, which are not the real random numbers. But if the algorithm is accurate, the generated numbers , which are independent each other, distributed symmetrically in the Held [0, 1] and have the character of statistics well. These numbers can be seen the real random numbers. In many ways of generating random numbers, the method of linear congruence is welcomed for its simple principle and fast computational speed. From the 1950s, the linear congruence generator is used in common, and the basic formula is: In this formula, a is rnultiplicator, c is increment, M is module, T is period. According to remainder operation, with the module M, the numbers which generated by LCG are all smaller than M , and when T = M, the period T achieves the full period. Large numbers of results proof that there is no infection with the selection of x0 but the a and c can influence the period T, the property of the LCG seriously. Therefore, choosing the parameters properly is very important.The LCG mainly include the Mixture-LCG, Multiplication-LCG, and prime number multiply-LCG(PMMLCG). Except c in mixture-LCG is not 0,c in and are both 0. It is better for defining c as 0 for what can increase the speed of computing random numbers, and c could no influence T. Thus Multiplication-LCG can not achieve the full period. PMMLCG can makeT = M - 1 by define the value a and M:1. Set M is the biggest prime number which is less thau(?)2n;2. Set a is the prime element in M;If these two conditions above are satisfied T = M—1. PMMLCG is better than Mixture-LCG and Multiplication-LCG .Now many random number generators(rng) are given by PMMLCG in the internet.In fact, at present the biggest period of the LCG in theory is 2256, for the restriction of the terminal string on computer. and if the RNG is LCG, it exists long periods relevance and dimension gridding sparseness structure, which two drawbacks will lead to much even and regular distribution produced by random sequence. It means we cannot complete with single generator if produce longer period and better random generator. In 1965 Maclaren and Marsaglia propose combined generator's concept ,that is using the second combined generator to disturb the first one, the concrete methods is, known two LCG G1 and G21. makeG1 generate in all k random numbers, these numbers are saved in the vectorT = (t1, t2,…,tk) in sequence, take n = 1;2. rnakeG2generate a random numberj, and 1≤j≤k;3. make xn= tj, then G1generates a random again y, makej = y, take = n = n + 1; 4. repeat the above process 2-3, get the number sequence xn, it is the sequence which the combined generator generate, if the module G1 is M, makern = xn/M, then r n is the random number which distributes in (0,1) equally.It is based on random sequence which is produced by RNG. Another RNG disrupts the preceding one ,that is a new random sequence got through re-arrange. Though available select for two or more single random sequence, we can get a more excellent random sequence than a single random sequence which produce a long period and statistics one. Because of its increasing periods, combined generator's checkup is more complex. If we use the appliance computer or commercial vehicle to function a RNG whose period is over 236, maybe it will last nearly one year continually running. We can realize that through using professional computers. Prom this we could assume and references for combined generator's characters. On a largely scale, the quality of combined generators are dependent on two independent random sequence's characters (especially the period's influence of the first RNG , because the shorter of the periods will lead to overlap number's periods even continuous repetition at some particular parts, which reduces the whole combined generator's randomness and distribution of inequality) and the selection of primary the vector's value k. But it is worth to assure that random sequence actually does not exist long periods relevant and sparseness gridding structure, and it does not control by computer mantissa byte's length. So nowadays it becomes a hot discussion-how to combine several or more RNG to make them more excellent and theoretical periods are close to infinite RNG.It is also important to judge the RNG good or not. There are two basic methods, namely, parameter-test and uniformity-test. For there are so many kinds of methods to test the property of the RNG and some of those are hard to achieve. The thesis here gives several methods and ignores more contents.The thesis supplies several simple's procedure, which available to basic study and checkup for scholars. If we do not take consideration into the number value's overflow, which is short of computer's , in order to convenient and fast. We can do basic check, while doing a big data's demonstration is show and complicate. According to writer's limited ability and energy, there are not enough and deep research findings involved.
Keywords/Search Tags:Generating
PDF Full Text Request
Related items