This generator shares all known problems of RANDU. Also, this as well as any other generator with a period of only a few thousand numbers are not suitable for any serious simulation study.
- The following generator is used in the University of Sheffield Pascal system for Prime computers:
xn = 16,807xn-1 mod 231
Since the multiplier 16,807 is not of the form 8i ± 3, this generator does not have the maximum possible period of 231-2. This generator is also used in the subroutine UNIFORM of the SAS statistical package. However, in this case, a shuffle technique is used to improve its randomness.
- SIMULA on UNIVAC uses the following generator:
xn = 513xn-1 mod 235
Although this generator has the maximum possible period of 233, Park and Miller (1988) claim that it does not have good randomness properties.
- The UNIX operating system supports the following mixed LCG:
xn = (1,103,515,245xn-1 + 12,345)mod 232
- Like all LCGs with modulus m = 2k, the binary representation of xns has a cyclic bit pattern. See Section 26.8 for further discussion on this issue.
Over the years, a number of random-number generators have been proposed in the literature. Most proposals start with a list of problems with the previously proposed generators. Thus, many generators that were considered good at one time are no longer considered good.
The purpose of the preceding list is to warn new analysts not to attempt inventing a new generator. Designing a new generator sounds trivial at first, but many generators proposed by expert statisticians have later been found to have undesirable properties. Therefore, it is better to use an established generator that has been tested thoroughly than to invent a new one.
26.7 SEED SELECTION
Ordinarily, the seed value used to initialize a random-number generator should not affect the results of the simulation. However, a wrong combination of a seed and a random generator may lead to erroneous conclusions. In this section we discuss some of the guidelines for proper selection of seeds.
If the generator has a full period and only one random variable is required, any seed value is as good as any other. However, considerable care is required in selecting seeds for simulations requiring random numbers for more than one variable. Such simulations are called multistream simulations. In fact, most simulations are multistream simulations. For example, a simulation of a single queue requires generating random arrival and random service times. This simulation would require two streams of random numbers: one for interarrival times and the other for service times. Most of the guidelines that follow are for multistream simulations. The first two apply to both single-stream and multistream simulations.
- 1. Do not use zero. Although a seed value of zero is fine for mixed LCGS, it would make a multiplicative LCG or a Tausworthe generator stick at zero.
- 2. Avoid even values. Even values are often as good as odd values. In fact, for full-period generators, all nonzero seed values are equally good. If a generator is not a full-period generator, for example, a multiplicative LCG with modulus m = 2k, the seed should be odd. If possible, it is better to avoid generators that have too many conditions on seed values or whose performance (period and randomness) depends upon the seed value.
- 3. Do not subdivide one stream. Using a single stream for all variables is a common mistake. For example, if {u1, u2,...} is the sequence generated using a single seed u0, the analyst may use u2 to generate interarrival times, u2 to generate service times, and so forth. This may result in a strong correlation between the two variables.
- 4. Use nonoverlapping streams. Each stream requires a separate seed. If the two seeds are such that the two streams overlap, there will be a correlation between the streams, and the resulting sequences will not be independent. Consider a trivial example of starting both streams for a single queue with the same seed values (a rather common mistake). The sequence of random numbers {u1, u2,...} used to generate the arrival and service) times would be identical in this case, and values of un that result in long interarrival times may also result in large service times. In other words, the service times and interarrival times may be positively correlated. This may lead to misleading conclusions.
The right way to select a seed is to ensure that the sequences do not overlap at all. Thus, if {u0,u1,...} is the sequence of random numbers starting with u0 and we need, for instance, 10,000 numbers for interarrival times and 10,000 for service times, we should select u0 as the seed for the first stream, u10,000 as the seed for the second stream, u20,000 as the seed for the third stream, and so on. Random number un can be easily determined by writing a test program that calls the random-number generator n times starting with u0. It is also possible to directly calculate the nth number in sequence without generating the intermediate values.
TABLE 26.2 Seeds for Generating Sequences 100,000 Apart for the LCG: xn = 75xn-1mod(231 - 1)
|
|
x100,000i
| x100,000(i + 1)
| x100,000(i + 2)
| x100,000(i + 3)
|
|
1
| 46831,694
| 1,841,581,359
| 1,193,163,244
|
727,633,698
| 933,588,178
| 804,159,733
| 1,671,059,989
|
1,061,288,424
| 1,961,692,154
| 1,227,283,347
| 1,171,034,773
|
276,090,261
| 1,066,728,069
| 209,208,115
| 554,590,007
|
721,958,466
| 1,371,272,478
| 675,466,456
| 1,095,462,486
|
1,808,217,256
| 2,095,021,727
| 1769349045
| 904,914315
|
373,135,028
| 717,419,739
| 881,155,353
| 1,489,529,863
|
1,521,138,112
| 298,370,230
| 1,140,279,430
| 1,335,826,707
|
706,178,559
| 110,356,601
| 884,434,366
| 962,338,209
|
1,341,315,363
| 709,314,158
| 591,449,447
| 431,918,286
|
851,767,375
| 606,179,079
| 1,500,869,201
| 1,434,868,289
|
263,032,577
| 753,643,799
| 202,794,285
| 715,851,524
|
|