Also our focus is upon e ciency and e ectiveness when

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: illustrate the properties of some random number generators. Also, our focus is upon e ciency and e ectiveness when using random number generators in large-scale computations. Random number generators should not be chosen at random. { Donald Knuth (1986) Consistent with the previous citation, we advise a modicum of caution in the use of pseudorandom numbers - especially in large-scale problems. There is an interesting anecdote from Knuth, who went to great lengths to implement what he thought was to be a superior random number generator. However, upon testing, it was found to produce very poor random numbers, illustrating that it is easy for even the experts a priori to misinterpret quality. The following comments derive from painful personal experiences of one of the authors. When problems arise with random number generators, they are exceedingly di cult to isolate. Often, the problem can be isolated only by replacing the existing random number generator with one which is de nitely superior (although perhaps much slower). To make a selection of a superior generator requires both knowledge of the generator currently in use and sometimes requires in-depth knowledge of the properties of general random number generators. Problems rarely occur when solving small test problems (those for which analytical or experimental answers are known). Instead, problems arise in large scale, substantial examples involving perhaps millions or even billions of random numbers - where debugging is di cult due to the massive amount of data. Finally, in large-scale problems where one is porting a scalar to a vector or massively parallel algorithm, the random numbers usually are accessed in a di erent order. Thus it is sometimes not possible to duplicate the run exactly. The results converge only asymptotically, as the number of trials increases. Thus, when problems occur, it is very di cult to isolate the problem to the random number generator because one tends to trace program execution an event step at a time, and it is only in aggregate over many random numbers that the behavior of the random number generator is awed. In e ect, one \loses sight of the forest for all of the trees." Typically, in desperation and as a last resort after many days of debugging, one changes the random number generator and voila - the problem disappears! 8 The truly cautious researcher assesses di erent random number generators as the continuum analyst makes re nements to a grid | better and better random number generators are employed, until the answers are independent of the random number generator. This is rarely, if ever, done in practice. Waxing philosophical, one wonders what number of Monte Carlo simulations may have been performed where the answers may in fact be incorrect, but not grossly incorrect, due to a aw inherent in the random number generator used. Traditionally, we cavalierly accept the random number generator on the architecture of interest. Fortunately, due to the early and well publicized mistakes made using random number generators, their properties were thoroughly investigated by the mathematics community, primarily in the 1950's. Most of the random number generators in use today were designed with cognizance of past pitfalls and are adequate for almost all applications. However, we conclude this section with a rm caveat emptor! 2.1 Desirable Properties When performing Monte Carlo simulation, we use random numbers to determine: (1) attributes (such as outgoing direction, energy, etc.) for launched particles, and (2) interactions of particles with the medium. Viewing this process physically, the following properties are desirable: The attributes of particles should not be correlated. That is, the attributes of each particle should be independent of those attributes of any other particle. The attributes of particles should be able to ll the entire attribute space in a manner which is consistent with the physics. For example, if we are launching particles into a hemispherical space above a surface, then we should be able to approach completely lling the hemisphere with outgoing directions, as we approach an in nite number of particles launched. At the very least, \holes" or sparseness in the outgoing directions should not a ect the answers signi cantly. Also, if we are sampling from an energy distribution, with an increasing number of particles, we should be able to duplicate the energy distribution better and better, until our simulated distribution is \good enough." Mathematically speaking, the sequence of random numbers used to e ect a Monte Carlo model should possess the following properties: Uncorrelated Sequences - The sequences of random numbers should be serially uncorre- lated. This means that any subsequence of random numbers should not be correlated with any other subsequence of random numbers. Most especially, n-tuples of random numbers should be independent of one another. For example, if we are using the random number generator to generate outgoing directions so as to ll the hemispherical space above a point (or area), we should generate no unaccepta...
View Full Document

This document was uploaded on 01/28/2014.

Ask a homework question - tutors are online