Genrate-rv - CDA6530 Performance Models of Computers and Networks CDA6530 Performance Models of Computers and Networks Chapter 5 Generating Random

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

View Full Document Right Arrow Icon
DA6530: Performance Models of Computers and Networks CDA6530: Performance Models of Computers and Networks hapter 5: Generating Random Number Chapter 5: Generating Random Number and Random Variables
Background image of page 1

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

View Full DocumentRight Arrow Icon
bjective Objective se computers to simulate stochastic Use computers to simulate stochastic processes earn how to generate random variables Learn how to generate random variables Discrete r.v. Continuous r.v. Basis for many system simulations 2
Background image of page 2
Pseudo Random Number Generation (PRNG) x = a x - mod m n n 1 Multiplicative congruential generator x n = {0, 1, , m-1} x /m is used to approx. distr. U(0,1) n x 0 is the initial “seed” Requirements: No. of variables that can be generated before o o a ab es a ca be ge e a ed be o e repetition begins is large For any seed, the resultant sequence has the “ ppearance” of being independent appearance of being independent The values can be computed efficiently on a computer 3
Background image of page 3

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

View Full DocumentRight Arrow Icon
x = a x mod m n n-1 m should be a large prime number For a 32-bit machine (1 bit is sign) m=2 31 -1 = 2,147,483,647 a = 7 5 = 16,807 or a 36- it machine For a 36 bit machine m= 2 35 -31 a = 5 5 x n = (ax n-1 + c) mod m Mixed congruential generator 4
Background image of page 4
C Programming Language In C Programming Language Int rand(void) Return int value between 0 and RAND_MAX RAND_MAX default value may vary between
Background image of page 5

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

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

This note was uploaded on 01/14/2012 for the course CDA 6530 taught by Professor Zou during the Fall '11 term at University of Central Florida.

Page1 / 20

Genrate-rv - CDA6530 Performance Models of Computers and Networks CDA6530 Performance Models of Computers and Networks Chapter 5 Generating Random

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

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