7-Random_number_generation

7-Random_number_generation - SYSC4005/5001 Winter 2010...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

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

Unformatted text preview: SYSC4005/5001 Winter 2010 Winter 2010 Slides are based on the texts: -Discrete Event System Simulation, by Banks et al-Discrete Event Simulation: A first Course, by Leemis and Park Random Number Generation 1 Professor John Lambadaris 2 SYSC4005/5001 Winter 2010 Purpose & Overview ¡ Discuss the generation of random numbers. ¡ Introduce the subsequent testing for randomness: ¢ Frequency test ¢ Autocorrelation test. Professor John Lambadaris 3 SYSC4005/5001 Winter 2010 Properties of Random Numbers ¡ Two important statistical properties: ¢ Uniformity ¢ Independence. ¡ Random Number, R i , must be independently drawn from a uniform distribution with pdf: pdf for uniformly distributed random numbers ⎩ ⎨ ⎧ ≤ ≤ = otherwise , 1 , 1 ) ( x x f 2 1 2 ) ( 1 2 1 = = = ∫ x xdx R E 0.5 Professor John Lambadaris 4 SYSC4005/5001 Winter 2010 Generation of Pseudo-Random Numbers ¡ “Pseudo”, because generating numbers using a known method removes the potential for true randomness. ¡ Goal: To produce a sequence of numbers in [ 0,1 ] that simulates, or imitates, the ideal properties of random numbers (RN). ¡ Important considerations in RN routines: ¢ Fast ¢ Portable to different computers ¢ Have sufficiently long cycle ¢ Replicable ¢ Closely approximate the ideal statistical properties of uniformity and independence. Professor John Lambadaris 5 SYSC4005/5001 Winter 2010 Techniques for Generating Random Numbers ¡ Linear Congruential Method (LCM). ¡ Combined Linear Congruential Generators (CLCG). ¡ Random-Number Streams. Professor John Lambadaris 6 SYSC4005/5001 Winter 2010 Linear Congruential Method ¡ To produce a sequence of integers, X 1 , X 2 , … between and m-1 by following a recursive relationship: ¡ The selection of the values for a , c , m , and X drastically affects the statistical properties and the cycle length. ¡ The random integers are being generated [ 0,m-1 ], and to convert the integers to random numbers in [0,1): ,... 2 , 1 , , , mod ) ( condition initial given 1 = = + = + i X m c aX X i i The multiplier The increment The modulus ,... 2 , 1 , = = i m X R i i Professor John Lambadaris 7 SYSC4005/5001 Winter 2010 Example ¡ Use X = 27 , a = 17 , c = 43 , and m = 100 . ¡ The X i and R i values are: X 1 = (17*27+43) mod 100 = 502 mod 100 = 2, R 1 = 0.02; X 2 = (17*2+43) mod 100 = 77, R 2 = 0.77 ; X 3 = (17*77+43) mod 100 = 52, R 3 = 0.52; … , 100 mod ) 43 17 ( 1 + = + i i X X Professor John Lambadaris 8 SYSC4005/5001 Winter 2010 Characteristics of a Good Generator ¡ Maximum Density ¢ The values assumed by R i , i = 1,2,… , leave no large gaps on [0,1] ¢ Problem: Instead of continuous, each R i is discrete ¢ Solution: a very large integer for modulus m ¡ Maximum Period ¢ To achieve maximum density and avoid cycling (within the period)....
View Full Document

This note was uploaded on 04/16/2010 for the course SCE sysc5001 taught by Professor Lambadaris during the Spring '10 term at Carleton CA.

Page1 / 26

7-Random_number_generation - SYSC4005/5001 Winter 2010...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online