scispace - formally typeset
Search or ask a question
Journal ArticleDOI

An Efficient Method for Generating Discrete Random Variables with General Distributions

01 Sep 1977-ACM Transactions on Mathematical Software (ACM)-Vol. 3, Iss: 3, pp 253-256
TL;DR: The fast generation of discrete random variables with arbitrary frequency distributions is discussed, related to rejection techniques but differs from them in that all samples comprising the input data contribute to the samples in the target distribution.
Abstract: The fast generation of discrete random variables with arbitrary frequency distributions is discussed. The proposed method is related to rejection techniques but differs from them in that all samples comprising the input data contribute to the samples in the target distribution. The software implementation of the method requires at most two memory references and a comparison. The method features good accuracy and modest storage requirements. I t is particularly useful in small computers with limited memory capacity.
Citations
More filters
Journal ArticleDOI
TL;DR: This chapter reviews the main methods for generating random variables, vectors and processes in non-uniform random variate generation, and provides information on the expected time complexity of various algorithms before addressing modern topics such as indirectly specified distributions, random processes, and Markov chain methods.

3,304 citations


Additional excerpts

  • ...Walker (1974, 1977) showed that one can construct in time O(N) a table (qi, ri), 1 ≤ i ≤ N , such that the following method works: pick a uniform integer Z from 1, 2, . . . , N ....

    [...]

Book
16 Apr 1986
TL;DR: A survey of the main methods in non-uniform random variate generation can be found in this article, where the authors provide information on the expected time complexity of various algorithms, before addressing modern topics such as indirectly specified distributions, random processes and Markov chain methods.
Abstract: This is a survey of the main methods in non-uniform random variate generation, and highlights recent research on the subject. Classical paradigms such as inversion, rejection, guide tables, and transformations are reviewed. We provide information on the expected time complexity of various algorithms, before addressing modern topics such as indirectly specified distributions, random processes, and Markov chain methods. Authors’ address: School of Computer Science, McGill University, 3480 University Street, Montreal, Canada H3A 2K6. The authors’ research was sponsored by NSERC Grant A3456 and FCAR Grant 90-ER-0291. 1. The main paradigms The purpose of this chapter is to review the main methods for generating random variables, vectors and processes. Classical workhorses such as the inversion method, the rejection method and table methods are reviewed in section 1. In section 2, we discuss the expected time complexity of various algorithms, and give a few examples of the design of generators that are uniformly fast over entire families of distributions. In section 3, we develop a few universal generators, such as generators for all log concave distributions on the real line. Section 4 deals with random variate generation when distributions are indirectly specified, e.g, via Fourier coefficients, characteristic functions, the moments, the moment generating function, distributional identities, infinite series or Kolmogorov measures. Random processes are briefly touched upon in section 5. Finally, the latest developments in Markov chain methods are discussed in section 6. Some of this work grew from Devroye (1986a), and we are carefully documenting work that was done since 1986. More recent references can be found in the book by Hörmann, Leydold and Derflinger (2004). Non-uniform random variate generation is concerned with the generation of random variables with certain distributions. Such random variables are often discrete, taking values in a countable set, or absolutely continuous, and thus described by a density. The methods used for generating them depend upon the computational model one is working with, and upon the demands on the part of the output. For example, in a ram (random access memory) model, one accepts that real numbers can be stored and operated upon (compared, added, multiplied, and so forth) in one time unit. Furthermore, this model assumes that a source capable of producing an i.i.d. (independent identically distributed) sequence of uniform [0, 1] random variables is available. This model is of course unrealistic, but designing random variate generators based on it has several advantages: first of all, it allows one to disconnect the theory of non-uniform random variate generation from that of uniform random variate generation, and secondly, it permits one to plan for the future, as more powerful computers will be developed that permit ever better approximations of the model. Algorithms designed under finite approximation limitations will have to be redesigned when the next generation of computers arrives. For the generation of discrete or integer-valued random variables, which includes the vast area of the generation of random combinatorial structures, one can adhere to a clean model, the pure bit model, in which each bit operation takes one time unit, and storage can be reported in terms of bits. Typically, one now assumes that an i.i.d. sequence of independent perfect bits is available. In this model, an elegant information-theoretic theory can be derived. For example, Knuth and Yao (1976) showed that to generate a random integer X described by the probability distribution {X = n} = pn, n ≥ 1, any method must use an expected number of bits greater than the binary entropy of the distribution, ∑

3,217 citations

01 Jan 2009
TL;DR: The PENELOPE as mentioned in this paper computer code system performs Monte Carlo simulation of coupled electron-photon transport in arbitrary materials for a wide energy range, from a few hundred eV to about 1 GeV.
Abstract: The computer code system PENELOPE (version 2008) performs Monte Carlo simulation of coupled electron-photon transport in arbitrary materials for a wide energy range, from a few hundred eV to about 1 GeV. Photon transport is simulated by means of the standard, detailed simulation scheme. Electron and positron histories are generated on the basis of a mixed procedure, which combines detailed simulation of hard events with condensed simulation of soft interactions. A geometry package called PENGEOM permits the generation of random electron-photon showers in material systems consisting of homogeneous bodies limited by quadric surfaces, i.e., planes, spheres, cylinders, etc. This report is intended not only to serve as a manual of the PENELOPE code system, but also to provide the user with the necessary information to understand the details of the Monte Carlo algorithm.

1,675 citations

Journal ArticleDOI
TL;DR: The mode of a unimodal importance sampling distribution, like the mode of beta distribution, is used as an estimate of the optimal solution for continuous optimization and Markov chains approach for combinatorial optimization.
Abstract: We present a new and fast method, called the cross-entropy method, for finding the optimal solution of combinatorial and continuous nonconvex optimization problems with convex bounded domains. To find the optimal solution we solve a sequence of simple auxiliary smooth optimization problems based on Kullback-Leibler cross-entropy, importance sampling, Markov chain and Boltzmann distribution. We use importance sampling as an important ingredient for adaptive adjustment of the temperature in the Boltzmann distribution and use Kullback-Leibler cross-entropy to find the optimal solution. In fact, we use the mode of a unimodal importance sampling distribution, like the mode of beta distribution, as an estimate of the optimal solution for continuous optimization and Markov chains approach for combinatorial optimization. In the later case we show almost surely convergence of our algorithm to the optimal solution. Supporting numerical results for both continuous and combinatorial optimization problems are given as well. Our empirical studies suggest that the cross-entropy method has polynomial in the size of the problem running time complexity.

902 citations

BookDOI
TL;DR: The Abstract Object class defines and characterizes all the essential properties every class in this design has in this 404 OBJECT-ORIENTED SIMULATION.
Abstract: Objects. The ~ b s t rac t ~ b j ect forms the fundamental base class for the entire design and all other classes are derived from this base class. The Abstract Object class defines and characterizes all the essential properties every class in this 404 OBJECT-ORIENTED SIMULATION

879 citations

References
More filters
Journal ArticleDOI
TL;DR: A method for generating values of continuous symmetric random variables that is relatively fast, requires essentially no computer memory, and is easy to use is developed.
Abstract: A method for generating values of continuous symmetric random variables that is relatively fast, requires essentially no computer memory, and is easy to use is developed. The method, which uses a uniform zero-one random number source, is based on the inverse function of the lambda distribution of Tukey. Since it approximates many of the continuous theoretical distributions and empirical distributions frequently used in simulations, the method should be useful to simulation practitioners.

430 citations


"An Efficient Method for Generating ..." refers background in this paper

  • ...Commonly used criteria [ 2 , 3] for judging the performance of random number generators include speed, precision, memory requirements, generality of the technique, and ease of implementation....

    [...]

Journal ArticleDOI
TL;DR: A new method for generating discrete random numbers with arbitrary amplitude/frequency distributions is presented, which consists essentially of amplitude manipulation of uniformly distributed, statistically independent sequential numbers.
Abstract: A new method for generating discrete random numbers with arbitrary amplitude/frequency distributions is presented. It consists essentially of amplitude manipulation of uniformly distributed, statistically independent sequential numbers. A digital-hardware implementation of the system features fast single-clock operation, with good statistical properties, and is well suited to software implementation.

201 citations


"An Efficient Method for Generating ..." refers methods in this paper

  • ...These principles have already been used to advantage in the design and construction of a high-speed digital hardware-impleme nted pseudorandom number generator with an arbitrary discrete frequency distribution [ 5 ] and as a generator of uniformly distributed random variables with floating point representation [4]....

    [...]

Journal ArticleDOI

65 citations


"An Efficient Method for Generating ..." refers methods in this paper

  • ...The method proposed by Marsaglia [ 1 ] has all these attributes but must be used with care in a computer with limited memory capacity since the number of memory locations required for the storage of constants appears to be an order of magnitude greater than the number of variables to be generated....

    [...]

Journal ArticleDOI
TL;DR: A new method is presented for generating uniformly distributed pesudorandom numbers with a floating-point representation that features fast single-clock-pulse operation.
Abstract: A new method is presented for generating uniformly distributed pesudorandom numbers with a floating-point representation. The mantissa and exponent are considered as statistically independent variables, the first possessing a uniform frequency distribution and the second a truncated geometric distribution. A digital hardware implementation of the system features fast single-clock-pulse operation.

16 citations


"An Efficient Method for Generating ..." refers methods in this paper

  • ...These principles have already been used to advantage in the design and construction of a high-speed digital hardware-impleme nted pseudorandom number generator with an arbitrary discrete frequency distribution [5] and as a generator of uniformly distributed random variables with floating point representation [ 4 ]....

    [...]

Journal ArticleDOI
TL;DR: A new sampling method, conditional bit sampling, which is suited for hardwired sampling devices because of its generality, simplicity, and accuracy, and agreement between actual and theoretical performance was excellent.
Abstract: Many cases arise in practice where a versatile hardwired pseudorandom number or pseudonoise generator would be extremely useful. General-purpose pseudonoise devices are not available today. We present a new sampling method, conditional bit sampling, which is suited for hardwired sampling devices because of its generality, simplicity, and accuracy. Random variables sampled from an arbitrary distribution are generated bit by bit from high- to low-order bits with the conditional bit algorithm. The result of a comparison of a uniform number to a conditional probability determines whether a bit in the sampled random number is set to one. The conditional probabilities are easily calculated for any probability distribution and must be arranged in special order. Simple Fortran programs make all necessary computations. Agreement between actual and theoretical performance of the conditional bit algorithm was excellent when sampling accuracy was evaluated for several examples of continuous and discrete densities. Sampling from empirically known, perhaps erratic-shaped, densities presents no problems. Only a small memory containing the conditional probabilities needs to be changed to alter the sampled distribution. The conditional bit algorithmic process always remains the same.

4 citations