Uniform and Exponential Random Floating Point Number Generation
|
|
- Sherman Farmer
- 5 years ago
- Views:
Transcription
1 Uniform and Exponential Random Floating Point Number Generation Thomas Morgenstern Hochschule Harz, Friedrichstr , D Wernigerode Summary. Pseudo random number generators approximate sequences of independent real random numbers. The output lies within the finite subset of computer numbers and therefore can not be random as real numbers. Classical random number generators produce only a small part of floating-point numbers. Many small numbers are missed and the output can even not be random as floating-point numbers. We give examples of simple simulation studies that lead to wrong results. The common empirical tests are not sensitive enough to detect these deficits. By generating mantissa and exponent independently we successfully construct new uniform and exponential random number generators based on a linear congruential generator. The results of the simulation studies are improved. Knuths empirical tests show no evidence against these generators. We also develop an empirical test adapted to the floating-point numbers format. Key words: random number generation, floating point numbers, stochastic simulation, stochastic programming, statistical tests 2000 Mathematics Subject Classification: 65C10 1 Introduction Randomized algorithms like Monte Carlo simulation require long sequences of random numbers (x i ) i N. These sequences are asked to be samples of independent and identically distributed (i.i.d.) random variables (X i ) i N. Random numbers produced by algorithmic random number generators (RNG) are never random, but should appear to be random to the uninitiated. We call these generators pseudorandom number generators [1]. They should pass statistical tests of the i.i.d. hypothesis [2]. In fact, no pseudo RNG can pass all statistical tests. So we may say that bad RNGs are those that fail simple tests, whereas good RNGs fail only complicated tests that are very hard hard to find and to run [3, 4].
2 2 Thomas Morgenstern 1.1 Definitions To formalize pseudorandom number generators, we follow [2, 3, 5]: Definition 1. A (pseudo-) random number generator (RNG) is a structure (S, t, O, o) where S is a finite set of states, t : S S a transition function, O an output space, and o : S O an output function. s 0 is the initial state evolveing according to s i = t(s i 1 ). The output at step i is u i = o(s i ) O. u 0, u 1, u 2,... are called the random numbers produced by the RNG. Example 1. A good linear congruential generator (LCG), is LCG16807 introduced by Lewis, Goodman and Miller in [6]. It uses m = , a = 7 5, S = Z m and the transition function s i+1 := s i mod For values in O = (0, 1) one usually uses the output function u i := z i Simulation Examples We consider examples showing that some basic simulation tasks in physics or engineering fail, when classical pseudorandom number generators are used. Example 2. Consider a radio signal r(t) = sin(2 π f t) with frequency f. We want to determine the Energy E = T r 2 (t) dt by Monte-Carlo integration. 0 We use the generator from Ex. 1 to produce n random numbers u i and simulate time instances t i := 2 π f T u i. For a medium frequency signal (MF) f = Hz 1 MHz, a micro wave signal (UHF) f = Hz 1 GHz and n = 2 30 random numbers we get the results in Table 1. Table 1. Energy of sin, MC Simulation with LCG16807, n = 2 30 MF UHF T = 1 s T = 1 s T = s T = s 0.0 Example 3. We consider the signal r(t) = e d t sin(2 π f t) with damping d and again calculate the signal energy by Monte-Carlo integration. For the MF signal, the generator from Ex. 1 and n := 2 30 numbers we get the results in Table 2 (incl. true values).
3 Uniform and Exponential Random Floating Point Number Generation 3 Table 2. Energy of damped signals, MC Simulation with LCG16807, n = 2 30 d = 10 E = d = 250 E = T = 1 s T = 1 s T = s T = s Discrete Random Numbers On a digital computer the output is a subset of finitely many discrete numbers o(s) F R. As a finite set has measure 0 within the real numbers we can immediately construct tests these generators fail. Therefore the random numbers generated can not to be i.i.d. real numbers. They are distributed according to a discrete distribution on a finite subset of computer numbers. Definition 2. A floating point number v F(b, p, e min, e max ) with basis b, p significant digits, significand c and exponent e {e min,..., e max } has the value v := ( 1) s c b 1 p b e. A normal floating point number v 0 has digit d 0 0 and a denormal floating point number has d 0 = 0 and e = e min. 2.1 Lower Bits Test We will see, that the generator from Ex. 1 with floating point number output o(s) F(2, 24, 126, 127) generates only a small fraction of these numbers the output can not even be random as floating point numbers. The usual goodness of fit tests (e.g. χ 2 -square, Kolmogorov-Smirnov) are not very sensitive to the of computer numbers used. These tests classify the numbers in relatively few intervals determined by the first significant bits. Testing the last significant bits of random numbers requires some care (see [1, p. 13]). But the states s i of LCG16807 in Ex. 1 could be called super uniform and even the lower bits are uniformly distributed. Testing the b lower bits of the states with a χ 2 -test gives the results in Table 3. Table χ 2 -tests, n = 2 20 states, 3 and 6 lower bits probability occurrences probability occurrences p < p < p < p < p p 9
4 4 Thomas Morgenstern We use the generator from Ex. 1, the output space O = F(2, 24, 126, 127) and the output function o(z) := z If we test the b lower bits of the significands c with a χ 2 test, we get the results in Table 4. Table χ 2 -tests, n = 2 20 significands, 3 and 6 lower bits probability occurrences probability occurrences p < p < p < p < p < p < p p 1 Clearly the generator LCG16807 with this output function fails our test. The reason for this is that the last significant bits of the generated small numbers are 0. 3 Floating Point Number Generation 3.1 Uniform Random Floating Point Numbers We have to construct new generators improving the simulations and passing this test. These new generators generate the exponent e and the significand c independently in two steps and generate denormal numbers as well. Let (S, t, O, o) be a good integer RNG with output O = [0, 2 q 1 ) N 0. We can construct a floating point number generator like in Table 5. Table 5. Floating Point Number Generator Step 1 (exponent generation) e := 1; efound := false; denormal := false; while (e e min and (not efound) ) do i := q 2; while (o(s) < 2 i and i > 0) i := i 1; e := e + (i q + 2); if (i > 0) efound := true; end do; if (e < e min) then e := e min; denormal := true end if; Step 2 (mantissa generation) if (not denormal) then c := 2 q 1 + o(s) else c := o(s) end if; u := ( 1) 0 c 2 1 q 2 e ;
5 Uniform and Exponential Random Floating Point Number Generation Exponential Random Floating Point Numbers In the same fashion we can construct a floating point number generator with exponentially distributed numbers (see Table 6). Table 6. Exponential Floating Point Number Generator Step 1 e := 0; efound := false; while (not efound) do i := q 2; while (o(s) < 2 i and i > 0) i := i 1; e := e + (q 2 i); if (i > 0) efound := true; end do; Step 2 c := 2 q 1 + o(s); u := e + q log 2 (c); 4 Simulation Results We use the generator from Ex. 1 to construct a random floating point generator FloatLCG2 as in Table 5. Example 4. We continue our example 2 with the generator FloatLCG2 and get the results in Table 7. Table 7. Energy of sin, MC Simulation with FloatLCG2, n = 2 30 MF T = 1 s T = s UHF T = 1 s T = s Example 5. We continue our example 3 with the generator FloatLCG2 and get the results in Table 8. Table 8. Energy of damped signals, MC Simulation with FloatLCG2, n = 2 30 d = 10 E = d = 250 E = T = 1 s T = 1 s T = s T = s
6 6 Thomas Morgenstern 5 Mantissa Test We take 20 times n = 2 20 random floating point numbers and test the lower 1, 3 and 6 bits of the mantissa with the χ 2 test. The lowest probability found once for the last 2 bits test is p = Testing the last 3 bits one once finds p = All test values are non-suspicious. Our floating point generator FloatLCG2 passes the test. 6 Conclusions The new pseudorandom number generator FloatLCG2 for generation of uniform random binary floating point numbers is better and solves a wider class of problems than the generators with classical output function. It also passes Knuth s suite of empirical tests [1] and our test, sensitive to floating point numbers. The concept can be used to generate exponential random floating point numbers. But some further work is still required. References [1] Knuth D E (1998) The art of computer programming. Vol. 2: Seminumerical algorithms. third edition, Addison-Wesley, Reading, Mass. [2] L Ecuyer P (1994) Uniform random number generation. Annals of Operations Research 53: [3] L Ecuyer P (2004) Random number generation. In: Gentle J E, Hrdle W, Mori Y, (eds) Handbook of computational statistics. Concepts and methods. Springer, Berlin Heidelberg New York [4] L Ecuyer P (2001) Software for uniform random number generation: Distinguishing the good and the bad. In: Proceedings of the 2001 Winter Simulation Conference. Pistacaway NJ., IEEE Press [5] L Ecuyer P (1998) Random number generation. In: Banks J (ed) Handbook on Simulation. John Wiley, Hoboken, NJ. [6] Lewis P A S, Goodman, A S, Miller, J M (1969) A pseudo-random number generator for the system/360. In: IBM System s Journal 8: [7] ANSI / IEEE Std 754 (1985) IEEE Standard for Binary Floating-Point Arithmetic [8] Morgenstern T (2006) Uniform Random Binary Floating Point Number Generation. In: Proceedings of the 2. Wernigerder Automatisierungs- und Informatiktage. Hochschule Harz, Wernigerode
Uniform Random Binary Floating Point Number Generation
Uniform Random Binary Floating Point Number Generation Prof. Dr. Thomas Morgenstern, Phone: ++49.3943-659-337, Fax: ++49.3943-659-399, tmorgenstern@hs-harz.de, Hochschule Harz, Friedrichstr. 57-59, 38855
More informationUniform Random Number Generators
JHU 553.633/433: Monte Carlo Methods J. C. Spall 25 September 2017 CHAPTER 2 RANDOM NUMBER GENERATION Motivation and criteria for generators Linear generators (e.g., linear congruential generators) Multiple
More informationA Repetition Test for Pseudo-Random Number Generators
Monte Carlo Methods and Appl., Vol. 12, No. 5-6, pp. 385 393 (2006) c VSP 2006 A Repetition Test for Pseudo-Random Number Generators Manuel Gil, Gaston H. Gonnet, Wesley P. Petersen SAM, Mathematik, ETHZ,
More information2 P. L'Ecuyer and R. Simard otherwise perform well in the spectral test, fail this independence test in a decisive way. LCGs with multipliers that hav
Beware of Linear Congruential Generators with Multipliers of the form a = 2 q 2 r Pierre L'Ecuyer and Richard Simard Linear congruential random number generators with Mersenne prime modulus and multipliers
More informationHow do computers represent numbers?
How do computers represent numbers? Tips & Tricks Week 1 Topics in Scientific Computing QMUL Semester A 2017/18 1/10 What does digital mean? The term DIGITAL refers to any device that operates on discrete
More informationCPSC 531: Random Numbers. Jonathan Hudson Department of Computer Science University of Calgary
CPSC 531: Random Numbers Jonathan Hudson Department of Computer Science University of Calgary http://www.ucalgary.ca/~hudsonj/531f17 Introduction In simulations, we generate random values for variables
More informationPseudo-Random Numbers Generators. Anne GILLE-GENEST. March 1, Premia Introduction Definitions Good generators...
14 pages 1 Pseudo-Random Numbers Generators Anne GILLE-GENEST March 1, 2012 Contents Premia 14 1 Introduction 2 1.1 Definitions............................. 2 1.2 Good generators..........................
More informationTae-Soo Kim and Young-Kyun Yang
Kangweon-Kyungki Math. Jour. 14 (2006), No. 1, pp. 85 93 ON THE INITIAL SEED OF THE RANDOM NUMBER GENERATORS Tae-Soo Kim and Young-Kyun Yang Abstract. A good arithmetic random number generator should possess
More informationRandom Number Generation. CS1538: Introduction to simulations
Random Number Generation CS1538: Introduction to simulations Random Numbers Stochastic simulations require random data True random data cannot come from an algorithm We must obtain it from some process
More informationStochastic Simulation of Communication Networks
Stochastic Simulation of Communication Networks Part 2 Amanpreet Singh (aps) Dr.-Ing Umar Toseef (umr) (@comnets.uni-bremen.de) Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 2-1 Table of Contents 1
More informationReview of Statistical Terminology
Review of Statistical Terminology An experiment is a process whose outcome is not known with certainty. The experiment s sample space S is the set of all possible outcomes. A random variable is a function
More informationSources of randomness
Random Number Generator Chapter 7 In simulations, we generate random values for variables with a specified distribution Ex., model service times using the exponential distribution Generation of random
More informationRandom Numbers. Pierre L Ecuyer
1 Random Numbers Pierre L Ecuyer Université de Montréal, Montréal, Québec, Canada Random numbers generators (RNGs) are available from many computer software libraries. Their purpose is to produce sequences
More informationIntroduction CSE 541
Introduction CSE 541 1 Numerical methods Solving scientific/engineering problems using computers. Root finding, Chapter 3 Polynomial Interpolation, Chapter 4 Differentiation, Chapter 4 Integration, Chapters
More informationepub WU Institutional Repository
epub WU Institutional Repository Günter Tirler and Peter Dalgaard and Wolfgang Hörmann and Josef Leydold An Error in the Kinderman-Ramage Method and How to Fix It Paper Original Citation: Tirler, Günter
More informationIndependent Events. Two events are independent if knowing that one occurs does not change the probability of the other occurring
Independent Events Two events are independent if knowing that one occurs does not change the probability of the other occurring Conditional probability is denoted P(A B), which is defined to be: P(A and
More informationRandom Number Generators - a brief assessment of those available
Random Number Generators - a brief assessment of those available Anna Mills March 30, 2003 1 Introduction Nothing in nature is random...a thing appears random only through the incompleteness of our knowledge.
More informationHow does the computer generate observations from various distributions specified after input analysis?
1 How does the computer generate observations from various distributions specified after input analysis? There are two main components to the generation of observations from probability distributions.
More information2008 Winton. Review of Statistical Terminology
1 Review of Statistical Terminology 2 Formal Terminology An experiment is a process whose outcome is not known with certainty The experiment s sample space S is the set of all possible outcomes. A random
More informationLecture 1: January 16
CS271 Randomness & Computation Spring 2018 Instructor: Alistair Sinclair Lecture 1: January 16 Disclaimer: These notes have not been subjected to the usual scrutiny accorded to formal publications. They
More informationB. Maddah ENMG 622 Simulation 11/11/08
B. Maddah ENMG 622 Simulation 11/11/08 Random-Number Generators (Chapter 7, Law) Overview All stochastic simulations need to generate IID uniformly distributed on (0,1), U(0,1), random numbers. 1 f X (
More informationSome long-period random number generators using shifts and xors
Introduction Some long-period random number generators using shifts and xors Richard P. Brent MSI & RSISE, ANU Canberra, ACT 0200 CTAC06@rpbrent.com Marsaglia recently proposed a class of uniform random
More informationStatistische Methoden der Datenanalyse. Kapitel 3: Die Monte-Carlo-Methode
1 Statistische Methoden der Datenanalyse Kapitel 3: Die Monte-Carlo-Methode Professor Markus Schumacher Freiburg / Sommersemester 2009 Basiert auf Vorlesungen und Folien von Glen Cowan und Abbildungen
More informationS6880 #6. Random Number Generation #2: Testing RNGs
S6880 #6 Random Number Generation #2: Testing RNGs 1 Testing Uniform RNGs Theoretical Tests Outline 2 Empirical Tests for Independence Gap Tests Runs Test Coupon Collectors Test The Poker Test 3 Other
More informationSome long-period random number generators using shifts and xors
ANZIAM J. 48 (CTAC2006) pp.c188 C202, 2007 C188 Some long-period random number generators using shifts and xors Richard P. Brent 1 (Received 6 July 2006; revised 2 July 2007) Abstract Marsaglia recently
More informationLehmer Random Number Generators: Introduction
Lehmer Random Number Generators: Introduction Revised version of the slides based on the book Discrete-Event Simulation: a first course LL Leemis & SK Park Section(s) 21, 22 c 2006 Pearson Ed, Inc 0-13-142917-5
More informationFinally, a theory of random number generation
Finally, a theory of random number generation F. James, CERN, Geneva Abstract For a variety of reasons, Monte Carlo methods have become of increasing importance among mathematical methods for solving all
More informationA NEW RANDOM NUMBER GENERATOR USING FIBONACCI SERIES
International J. of Math. Sci. & Engg. Appls. (IJMSEA) ISSN 0973-9424, Vol. 11 No. I (April, 2017), pp. 185-193 A NEW RANDOM NUMBER GENERATOR USING FIBONACCI SERIES KOTTA NAGALAKSHMI RACHANA 1 AND SOUBHIK
More informationSimulation. Where real stuff starts
1 Simulation Where real stuff starts ToC 1. What is a simulation? 2. Accuracy of output 3. Random Number Generators 4. How to sample 5. Monte Carlo 6. Bootstrap 2 1. What is a simulation? 3 What is a simulation?
More informationPhysical Tests for Random Numbers. in Simulations. P.O. Box 9 (Siltavuorenpenger 20 C) FIN{00014 University of Helsinki. Finland
Physical Tests for Random Numbers in Simulations I. Vattulainen, 1;2 T. Ala{Nissila, 1;2 and K. Kankaala 2;3 1 Research Institute for Theoretical Physics P.O. Box 9 (Siltavuorenpenger 20 C) FIN{00014 University
More informationGenerating Uniform Random Numbers
1 / 43 Generating Uniform Random Numbers Christos Alexopoulos and Dave Goldsman Georgia Institute of Technology, Atlanta, GA, USA March 1, 2016 2 / 43 Outline 1 Introduction 2 Some Generators We Won t
More informationSystems Simulation Chapter 7: Random-Number Generation
Systems Simulation Chapter 7: Random-Number Generation Fatih Cavdur fatihcavdur@uludag.edu.tr April 22, 2014 Introduction Introduction Random Numbers (RNs) are a necessary basic ingredient in the simulation
More informationLecture 20. Randomness and Monte Carlo. J. Chaudhry. Department of Mathematics and Statistics University of New Mexico
Lecture 20 Randomness and Monte Carlo J. Chaudhry Department of Mathematics and Statistics University of New Mexico J. Chaudhry (UNM) CS 357 1 / 40 What we ll do: Random number generators Monte-Carlo integration
More informationMore General Functions Is this technique limited to the monomials {1, x, x 2, x 3,...}?
More General Functions Is this technique limited to the monomials {1, x, x 2, x 3,...}? Interpolation with General Sets of Functions For a general set of functions {ϕ 1,..., ϕ n }, solve the linear system
More informationSome long-period random number generators using shifts and xors
Some long-period random number generators using shifts and xors Richard. P. Brent 2 July 2007 Abstract Marsaglia recently introduced a class of xorshift random number generators (RNGs) with periods 2 n
More informationHow does the computer generate observations from various distributions specified after input analysis?
1 How does the computer generate observations from various distributions specified after input analysis? There are two main components to the generation of observations from probability distributions.
More informationGenerating Uniform Random Numbers
1 / 41 Generating Uniform Random Numbers Christos Alexopoulos and Dave Goldsman Georgia Institute of Technology, Atlanta, GA, USA 10/13/16 2 / 41 Outline 1 Introduction 2 Some Lousy Generators We Won t
More informationGenerating Uniform Random Numbers
1 / 44 Generating Uniform Random Numbers Christos Alexopoulos and Dave Goldsman Georgia Institute of Technology, Atlanta, GA, USA 10/29/17 2 / 44 Outline 1 Introduction 2 Some Lousy Generators We Won t
More informationMonte Carlo Methods. Jesús Fernández-Villaverde University of Pennsylvania
Monte Carlo Methods Jesús Fernández-Villaverde University of Pennsylvania 1 Why Monte Carlo? From previous chapter, we want to compute: 1. Posterior distribution: π ³ θ Y T,i = f(y T θ,i)π (θ i) R Θ i
More informationDUBLIN CITY UNIVERSITY
DUBLIN CITY UNIVERSITY SAMPLE EXAMINATIONS 2017/2018 MODULE: QUALIFICATIONS: Simulation for Finance MS455 B.Sc. Actuarial Mathematics ACM B.Sc. Financial Mathematics FIM YEAR OF STUDY: 4 EXAMINERS: Mr
More informationPERIOD LENGTHS OF CHAOTIC PSEUDO-RANDOM NUMBER GENERATORS
PERIOD LENGTHS OF CHAOTIC PSEUDO-RANDOM NUMBER GENERATORS Jörg Keller Hanno Wiese FernUniversität in Hagen LG Parallelität und VLSI 58084 Hagen, Germany joerg.keller@fernuni-hagen.de ABSTRACT Cryptographic
More informationAlgorithms and Networking for Computer Games
Algorithms and Networking for Computer Games Chapter 2: Random Numbers http://www.wiley.com/go/smed What are random numbers good for (according to D.E. Knuth) simulation sampling numerical analysis computer
More informationComparison of Random Number Generators in Particle Swarm Optimization Algorithm
2014 IEEE Congress on Evolutionary Computation (CEC) July 6-11, 2014, Beijing, China Comparison of Random Number Generators in Particle Swarm Optimization Algorithm Ke Ding and Ying Tan Abstract Intelligent
More informationCSCE 564, Fall 2001 Notes 6 Page 1 13 Random Numbers The great metaphysical truth in the generation of random numbers is this: If you want a function
CSCE 564, Fall 2001 Notes 6 Page 1 13 Random Numbers The great metaphysical truth in the generation of random numbers is this: If you want a function that is reasonably random in behavior, then take any
More informationResolution-Stationary Random Number Generators
Resolution-Stationary Random Number Generators Francois Panneton Caisse Centrale Desjardins, 1 Complexe Desjardins, bureau 2822 Montral (Québec), H5B 1B3, Canada Pierre L Ecuyer Département d Informatique
More informationStatistics, Data Analysis, and Simulation SS 2013
Mainz, May 2, 2013 Statistics, Data Analysis, and Simulation SS 2013 08.128.730 Statistik, Datenanalyse und Simulation Dr. Michael O. Distler 2. Random Numbers 2.1 Why random numbers:
More informationarxiv: v1 [math.co] 8 Feb 2013
ormal numbers and normality measure Christoph Aistleitner arxiv:302.99v [math.co] 8 Feb 203 Abstract The normality measure has been introduced by Mauduit and Sárközy in order to describe the pseudorandomness
More informationStochastic Simulation of
Stochastic Simulation of Communication Networks -WS 2014/2015 Part 2 Random Number Generation Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 2-1 Table of Contents 1 General Introduction 2 Random Number
More informationCryptographic Pseudo-random Numbers in Simulation
Cryptographic Pseudo-random Numbers in Simulation Nick Maclaren University of Cambridge Computer Laboratory Pembroke Street, Cambridge CB2 3QG. A fruitful source of confusion on the Internet is that both
More informationUniform random numbers generators
Uniform random numbers generators Lecturer: Dmitri A. Moltchanov E-mail: moltchan@cs.tut.fi http://www.cs.tut.fi/kurssit/tlt-2707/ OUTLINE: The need for random numbers; Basic steps in generation; Uniformly
More informationIE 581 Introduction to Stochastic Simulation. One page of notes, front and back. Closed book. 50 minutes. Score
One page of notes, front and back. Closed book. 50 minutes. Score Schmeiser Page 1 of 4 Test #1, Spring 2001 1. True or false. (If you wish, write an explanation of your thinking.) (a) T Data are "binary"
More informationPSEUDORANDOM NUMBER GENERATORS BASED ON THE WEYL SEQUENCE
COMPUTATIONAL METHODS IN SCIENCE AND TECHNOLOGY 5, 81-85 (1999) PSEUDORANDOM NUMBER GENERATORS BASED ON THE WEYL SEQUENCE K. W. WOJCIECHOWSKI Institute of Molecular Physics, Polish Academy of Sciences
More informationRandom numbers and generators
Chapter 2 Random numbers and generators Random numbers can be generated experimentally, like throwing dice or from radioactive decay measurements. In numerical calculations one needs, however, huge set
More informationBinary Floating-Point Numbers
Binary Floating-Point Numbers S exponent E significand M F=(-1) s M β E Significand M pure fraction [0, 1-ulp] or [1, 2) for β=2 Normalized form significand has no leading zeros maximum # of significant
More informationFast Fraction-Integer Method for Computing Multiplicative Inverse
Fast Fraction-Integer Method for Computing Multiplicative Inverse Hani M AL-Matari 1 and Sattar J Aboud 2 and Nidal F Shilbayeh 1 1 Middle East University for Graduate Studies, Faculty of IT, Jordan-Amman
More informationComparison of Random Number Generators in Particle Swarm Optimization Algorithm
Comparison of Random Number Generators in Particle Swarm Optimization Algorithm Ke Ding and Ying Tan Abstract Intelligent optimization algorithms are very effective to tackle complex problems that would
More informationSimulation. Where real stuff starts
Simulation Where real stuff starts March 2019 1 ToC 1. What is a simulation? 2. Accuracy of output 3. Random Number Generators 4. How to sample 5. Monte Carlo 6. Bootstrap 2 1. What is a simulation? 3
More informationCME 302: NUMERICAL LINEAR ALGEBRA FALL 2005/06 LECTURE 5. Ax = b.
CME 302: NUMERICAL LINEAR ALGEBRA FALL 2005/06 LECTURE 5 GENE H GOLUB Suppose we want to solve We actually have an approximation ξ such that 1 Perturbation Theory Ax = b x = ξ + e The question is, how
More informationChapter 1 Computer Arithmetic
Numerical Analysis (Math 9372) 2017-2016 Chapter 1 Computer Arithmetic 1.1 Introduction Numerical analysis is a way to solve mathematical problems by special procedures which use arithmetic operations
More informationContents Functions Remarks and examples Methods and formulas Acknowledgments References Also see
Title stata.com Random-number functions Contents Functions Remarks and examples Methods and formulas Acknowledgments References Also see Contents rbeta(a,b) rbinomial(n,p) rchi2(df) rexponential(b) rgamma(a,b)
More informationWorkshop on Heterogeneous Computing, 16-20, July No Monte Carlo is safe Monte Carlo - more so parallel Monte Carlo
Workshop on Heterogeneous Computing, 16-20, July 2012 No Monte Carlo is safe Monte Carlo - more so parallel Monte Carlo K. P. N. Murthy School of Physics, University of Hyderabad July 19, 2012 K P N Murthy
More informationNew Minimal Weight Representations for Left-to-Right Window Methods
New Minimal Weight Representations for Left-to-Right Window Methods James A. Muir 1 and Douglas R. Stinson 2 1 Department of Combinatorics and Optimization 2 School of Computer Science University of Waterloo
More informationPrimality Testing SURFACE. Syracuse University. Per Brinch Hansen Syracuse University, School of Computer and Information Science,
Syracuse University SURFACE Electrical Engineering and Computer Science Technical Reports College of Engineering and Computer Science 6-1992 Primality Testing Per Brinch Hansen Syracuse University, School
More informationB.N.Bandodkar College of Science, Thane. Random-Number Generation. Mrs M.J.Gholba
B.N.Bandodkar College of Science, Thane Random-Number Generation Mrs M.J.Gholba Properties of Random Numbers A sequence of random numbers, R, R,., must have two important statistical properties, uniformity
More informationRandom Number Generation. Stephen Booth David Henty
Random Number Generation Stephen Booth David Henty Introduction Random numbers are frequently used in many types of computer simulation Frequently as part of a sampling process: Generate a representative
More informationComplexity Analysis of a Fast Modular Multiexponentiation Algorithm
Complexity Analysis of a Fast Modular Multiexponentiation Algorithm Haimin Jin 1,, Duncan S. Wong, Yinlong Xu 1 1 Department of Computer Science University of Science and Technology of China China jhm113@mail.ustc.edu.cn,
More informationMean Intensity. Same units as I ν : J/m 2 /s/hz/sr (ergs/cm 2 /s/hz/sr) Function of position (and time), but not direction
MCRT: L5 MCRT estimators for mean intensity, absorbed radiation, radiation pressure, etc Path length sampling: mean intensity, fluence rate, number of absorptions Random number generators J Mean Intensity
More informationcse 311: foundations of computing Fall 2015 Lecture 12: Primes, GCD, applications
cse 311: foundations of computing Fall 2015 Lecture 12: Primes, GCD, applications n-bit unsigned integer representation Represent integer x as sum of powers of 2: If x = n 1 i=0 b i 2 i where each b i
More informationS. R. Tate. Stable Computation of the Complex Roots of Unity, IEEE Transactions on Signal Processing, Vol. 43, No. 7, 1995, pp
Stable Computation of the Complex Roots of Unity By: Stephen R. Tate S. R. Tate. Stable Computation of the Complex Roots of Unity, IEEE Transactions on Signal Processing, Vol. 43, No. 7, 1995, pp. 1709
More informationA TEST OF RANDOMNESS BASED ON THE DISTANCE BETWEEN CONSECUTIVE RANDOM NUMBER PAIRS. Matthew J. Duggan John H. Drew Lawrence M.
Proceedings of the 2005 Winter Simulation Conference M. E. Kuhl, N. M. Steiger, F. B. Armstrong, and J. A. Joines, eds. A TEST OF RANDOMNESS BASED ON THE DISTANCE BETWEEN CONSECUTIVE RANDOM NUMBER PAIRS
More informationComputation of the error functions erf and erfc in arbitrary precision with correct rounding
Computation of the error functions erf and erfc in arbitrary precision with correct rounding Sylvain Chevillard Arenaire, LIP, ENS-Lyon, France Sylvain.Chevillard@ens-lyon.fr Nathalie Revol INRIA, Arenaire,
More informationFast Cryptanalysis of the Matsumoto-Imai Public Key Scheme
Fast Cryptanalysis of the Matsumoto-Imai Public Key Scheme P. Delsarte Philips Research Laboratory, Avenue Van Becelaere, 2 B-1170 Brussels, Belgium Y. Desmedt Katholieke Universiteit Leuven, Laboratorium
More informationOn the influence of non-perfect random numbers on probabilistic algorithms
On the influence of non-perfect random numbers on probabilistic algorithms Markus Maucher Bioinformatics Group University of Ulm 01.07.09 Outline 1 Motivation and introduction 2 Theoretical results 3 Experimental
More informationLearning Theory. Machine Learning CSE546 Carlos Guestrin University of Washington. November 25, Carlos Guestrin
Learning Theory Machine Learning CSE546 Carlos Guestrin University of Washington November 25, 2013 Carlos Guestrin 2005-2013 1 What now n We have explored many ways of learning from data n But How good
More informationcse 311: foundations of computing Fall 2015 Lecture 11: Modular arithmetic and applications
cse 311: foundations of computing Fall 2015 Lecture 11: Modular arithmetic and applications arithmetic mod 7 a + 7 b = (a + b) mod 7 a 7 b = (a b) mod 7 5 6 0 1 2 4 3 + 0 1 2 3 4 5 6 0 0 1 2 3 4 5 6 1
More informationConstruction of Equidistributed Generators Based on Linear Recurrences Modulo 2
Construction of Equidistributed Generators Based on Linear Recurrences Modulo 2 Pierre L Ecuyer and François Panneton Département d informatique et de recherche opérationnelle Université de Montréal C.P.
More informationNotes for Chapter 1 of. Scientific Computing with Case Studies
Notes for Chapter 1 of Scientific Computing with Case Studies Dianne P. O Leary SIAM Press, 2008 Mathematical modeling Computer arithmetic Errors 1999-2008 Dianne P. O'Leary 1 Arithmetic and Error What
More informationModern Methods of Data Analysis - WS 07/08
Modern Methods of Data Analysis Lecture III (29.10.07) Contents: Overview & Test of random number generators Random number distributions Monte Carlo The terminology Monte Carlo-methods originated around
More informationStream Ciphers. Çetin Kaya Koç Winter / 20
Çetin Kaya Koç http://koclab.cs.ucsb.edu Winter 2016 1 / 20 Linear Congruential Generators A linear congruential generator produces a sequence of integers x i for i = 1,2,... starting with the given initial
More informationRandom Number Generators: Metrics and Tests for Uniformity and Randomness
Random Number Generators: Metrics and Tests for Uniformity and Randomness E. A. Yfantis and J. B. Pedersen Image Processing, Computer Vision and Machine Intelligence Lab School of Computer Science College
More informationWhat Every Programmer Should Know About Floating-Point Arithmetic DRAFT. Last updated: November 3, Abstract
What Every Programmer Should Know About Floating-Point Arithmetic Last updated: November 3, 2014 Abstract The article provides simple answers to the common recurring questions of novice programmers about
More informationPreliminary statistics
1 Preliminary statistics The solution of a geophysical inverse problem can be obtained by a combination of information from observed data, the theoretical relation between data and earth parameters (models),
More informationArithmetic and Error. How does error arise? How does error arise? Notes for Part 1 of CMSC 460
Notes for Part 1 of CMSC 460 Dianne P. O Leary Preliminaries: Mathematical modeling Computer arithmetic Errors 1999-2006 Dianne P. O'Leary 1 Arithmetic and Error What we need to know about error: -- how
More informationRandom Number Generators
1/18 Random Number Generators Professor Karl Sigman Columbia University Department of IEOR New York City USA 2/18 Introduction Your computer generates" numbers U 1, U 2, U 3,... that are considered independent
More informationarxiv:hep-lat/ v2 10 Aug 1993
1 A Comparative Study of Some Pseudorandom Number Generators I. Vattulainen 1, K. Kankaala 1,2, J. Saarinen 1, and T. Ala-Nissila 1,3 arxiv:hep-lat/9304008 v2 10 Aug 1993 1 Department of Electrical Engineering
More information2008 Winton. Statistical Testing of RNGs
1 Statistical Testing of RNGs Criteria for Randomness For a sequence of numbers to be considered a sequence of randomly acquired numbers, it must have two basic statistical properties: Uniformly distributed
More informationChapter 4 Number Representations
Chapter 4 Number Representations SKEE2263 Digital Systems Mun im/ismahani/izam {munim@utm.my,e-izam@utm.my,ismahani@fke.utm.my} February 9, 2016 Table of Contents 1 Fundamentals 2 Signed Numbers 3 Fixed-Point
More informationSpectral Analysis of the MIXMAX Random Number Generators
Submitted to iinforms Journal on Computing manuscript (Please, provide the manuscript number!) Authors are encouraged to submit new papers to INFORMS journals by means of a style file template, which includes
More informationLecture 7. Floating point arithmetic and stability
Lecture 7 Floating point arithmetic and stability 2.5 Machine representation of numbers Scientific notation: 23 }{{} }{{} } 3.14159265 {{} }{{} 10 sign mantissa base exponent (significand) s m β e A floating
More informationRandom walk tests for pseudo-random number generators
Mathematical Communications 6(001), 135-13 135 Random walk tests for pseudo-random number generators Smile Markovski, Danilo Gligoroski and Verica Bakeva Abstract. It is well known that there are no perfectly
More informationIE 581 Introduction to Stochastic Simulation. One page of notes, front and back. Closed book. 50 minutes. Score
One page of notes, front and back. Closed book. 50 minutes. Score Schmeiser Page 1 of 4 Test #1, Spring 2001 1. True or false. (If you wish, write an explanation of your thinking.) (a) T F Data are "binary"
More informationElliptic Curve DRNGs. Çetin Kaya Koç Winter / 21
Elliptic Curve DRNGs http://koclab.org Çetin Kaya Koç Winter 2017 1 / 21 Elliptic Curve DRNGs Linear Congruential Generator Power Generator Naor-Reingold Generator Dual EC RNG http://koclab.org Çetin Kaya
More informationHochdimensionale Integration
Oliver Ernst Institut für Numerische Mathematik und Optimierung Hochdimensionale Integration 14-tägige Vorlesung im Wintersemester 2010/11 im Rahmen des Moduls Ausgewählte Kapitel der Numerik Contents
More informationNew Strategy for Doubling-Free Short Addition-Subtraction Chain
Applied Mathematics & Information Sciences 2(2) (2008), 123 133 An International Journal c 2008 Dixie W Publishing Corporation, U. S. A. New Strategy for Doubling-Free Short Addition-Subtraction Chain
More informationFuture Generation Computer Systems 16 (1999) Accepted 17 March Draft
Future Generation Computer Systems 16 (1999) 291 305 Generating high-quality random numbers in parallel by cellular automata Abstract Marco Tomassini a,, Moshe Sipper b, Mosé Zolla a, Mathieu Perrenoud
More informationComputer Arithmetic. MATH 375 Numerical Analysis. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Computer Arithmetic
Computer Arithmetic MATH 375 Numerical Analysis J. Robert Buchanan Department of Mathematics Fall 2013 Machine Numbers When performing arithmetic on a computer (laptop, desktop, mainframe, cell phone,
More informationSlides 3: Random Numbers
Slides 3: Random Numbers We previously considered a few examples of simulating real processes. In order to mimic real randomness of events such as arrival times we considered the use of random numbers
More informationHands-on Generating Random
CVIP Laboratory Hands-on Generating Random Variables Shireen Elhabian Aly Farag October 2007 The heart of Monte Carlo simulation for statistical inference. Generate synthetic data to test our algorithms,
More informationChapter 4: Monte Carlo Methods. Paisan Nakmahachalasint
Chapter 4: Monte Carlo Methods Paisan Nakmahachalasint Introduction Monte Carlo Methods are a class of computational algorithms that rely on repeated random sampling to compute their results. Monte Carlo
More informationCounting Prime Numbers with Short Binary Signed Representation
Counting Prime Numbers with Short Binary Signed Representation José de Jesús Angel Angel and Guillermo Morales-Luna Computer Science Section, CINVESTAV-IPN, Mexico jjangel@computacion.cs.cinvestav.mx,
More information