Simulation Simulation Modeling and Performance Analysis with - - PowerPoint PPT Presentation

simulation simulation
SMART_READER_LITE
LIVE PREVIEW

Simulation Simulation Modeling and Performance Analysis with - - PowerPoint PPT Presentation

Computer Science, Informatik 4 Communication and Distributed Systems Simulation Simulation Modeling and Performance Analysis with Discrete-Event Simulation g y Dr. Mesut Gne Computer Science, Informatik 4 Communication and Distributed


slide-1
SLIDE 1

Computer Science, Informatik 4 Communication and Distributed Systems

Simulation Simulation

Modeling and Performance Analysis with Discrete-Event Simulation g y

  • Dr. Mesut Güneş
slide-2
SLIDE 2

Computer Science, Informatik 4 Communication and Distributed Systems

Chapter 6

Random-Number Generation

slide-3
SLIDE 3

Computer Science, Informatik 4 Communication and Distributed Systems

Contents Contents Properties of Random Numbers Properties of Random Numbers Generation of Pseudo-Random Numbers

  • Linear Congruential Method

Tests for Random Numbers

  • Dr. Mesut Güneş

Chapter 6. Random-Number Generation 3

slide-4
SLIDE 4

Computer Science, Informatik 4 Communication and Distributed Systems

Purpose & Overview Purpose & Overview Discuss the generation of random numbers. Discuss the generation of random numbers. Introduce the subsequent testing for randomness:

  • Frequency test
  • Autocorrelation test.
  • Dr. Mesut Güneş

Chapter 6. Random-Number Generation 4

slide-5
SLIDE 5

Computer Science, Informatik 4 Communication and Distributed Systems

Properties of Random Numbers Properties of Random Numbers

  • Two important statistical properties:

Two important statistical properties:

  • Uniformity
  • Independence.
  • Random Number, Ri, must be independently drawn from a uniform

distribution with pdf:

⎨ ⎧ ≤ ≤ = 1 , 1 ) ( x x f ⎩ ⎨

  • therwise

, ) ( f 1

1 2 1

x

pdf for random numbers

2 1 2 ) (

1

= = =∫ x xdx R E

  • Dr. Mesut Güneş

Chapter 6. Random-Number Generation 5

slide-6
SLIDE 6

Computer Science, Informatik 4 Communication and Distributed Systems

Generation of Pseudo-Random Numbers Generation of Pseudo Random Numbers

  • Dr. Mesut Güneş

Chapter 6. Random-Number Generation 6

slide-7
SLIDE 7

Computer Science, Informatik 4 Communication and Distributed Systems

Generation of Pseudo-Random Numbers Generation of Pseudo-Random Numbers

  • “Pseudo”, because generating numbers using a known method

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) imitates, the ideal properties of random numbers (RN).

  • Important considerations in RN routines:
  • Fast
  • Portable to different computers
  • Have sufficiently long cycle
  • Replicable

Replicable

  • Closely approximate the ideal statistical properties of uniformity and

independence

  • Dr. Mesut Güneş

Chapter 6. Random-Number Generation 7

slide-8
SLIDE 8

Computer Science, Informatik 4 Communication and Distributed Systems

Generation of Pseudo-Random Numbers Generation of Pseudo-Random Numbers Problems when generating pseudo-random numbers Problems when generating pseudo random numbers

  • The generated numbers might not be uniformly distributed
  • The generated numbers might be discrete-valued instead of

continuous-valued

  • The mean of the generated numbers might be too high or too low
  • The variance of the generated numbers might be too high or too
  • The variance of the generated numbers might be too high or too

low

  • There might be dependence:
  • Autocorrelation between numbers
  • Numbers successively higher or lower than adjacent numbers
  • Several Numbers above the mean followed by several numbers

Several Numbers above the mean followed by several numbers below the mean

  • Dr. Mesut Güneş

Chapter 6. Random-Number Generation 8

slide-9
SLIDE 9

Computer Science, Informatik 4 Communication and Distributed Systems

Techniques for Generating Random Numbers Techniques for Generating Random Numbers

  • Dr. Mesut Güneş

Chapter 6. Random-Number Generation 9

slide-10
SLIDE 10

Computer Science, Informatik 4 Communication and Distributed Systems

Techniques for Generating Random Numbers Techniques for Generating Random Numbers

  • Linear Congruential Method (LCM)

g ( )

  • Combined Linear Congruential Generators (CLCG)
  • Random-Number Streams
  • Dr. Mesut Güneş

Chapter 6. Random-Number Generation 10

slide-11
SLIDE 11

Computer Science, Informatik 4 Communication and Distributed Systems

Linear Congruential Method Linear Congruential Method

  • To produce a sequence of integers X1, X2, … between 0 and m-1

p q g

1 2

by following a recursive relationship:

2 1 mod ) (

1

= + = i m c aX X

i i

,... 2 , 1 , , mod ) (

1

+

+

i m c aX X

i i

The The The modulus

  • The selection of the values for a, c, m, and X0 drastically affects

multiplier increment modulus

The selection of the values for a, c, m, and X0 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: the integers to random numbers: ,... 2 , 1 , = = i m X R

i i

  • Dr. Mesut Güneş

Chapter 6. Random-Number Generation 11

m

slide-12
SLIDE 12

Computer Science, Informatik 4 Communication and Distributed Systems

Linear Congruential Method – Example Linear Congruential Method – Example

  • Use X0 = 27, a = 17, c = 43, and m = 100.

, , ,

  • The Xi and Ri values are:

X1 = (17*27+43) mod 100 = 502 mod 100 = 2, R1 = 0.02; X2 = (17*2 +43) mod 100 = 77, R2 = 0.77; X3 = (17*77+43) mod 100 = 52, R3 = 0.52;

3

( 7 77 3)

  • d 00

5 ,

3

0.5 ; X4= (17*52+43) mod 100 = 27, R3 = 0.27; …

  • Dr. Mesut Güneş

Chapter 6. Random-Number Generation 12

slide-13
SLIDE 13

Computer Science, Informatik 4 Communication and Distributed Systems

Linear Congruential Method – Example Linear Congruential Method – Example

i Xi Xi Xi Xi

Use a = 13 c = 0 and

X0=1 X0=2 X0=3 X0=4 1 1 2 3 4 2 13 26 39 52 3 41 18 59 36

Use a = 13, c = 0, and m = 64 The period of the

3 41 18 59 36 4 21 42 63 20 5 17 34 51 4 6 29 58 23

The period of the generator is very low

7 57 50 43 8 37 10 47 9 33 2 35 10 45 7 10 45 7 11 9 27 12 53 31 13 49 19 13 49 19 14 61 55 15 25 11 16 5 15

  • Dr. Mesut Güneş

Chapter 6. Random-Number Generation

17 1 3

13

slide-14
SLIDE 14

Computer Science, Informatik 4 Communication and Distributed Systems

Characteristics of a Good Generator Characteristics of a Good Generator

  • Maximum Density
  • Such that the values assumed by Ri, i=1,2,… leave no large gaps on

[0,1]

  • Problem: Instead of continuous, each Ri is discrete

i

  • Solution: a very large integer for modulus m
  • Approximation appears to be of little consequence
  • Maximum Period
  • To achieve maximum density and avoid cycling.
  • Achieved by proper choice of a c m and X
  • Achieved by proper choice of a, c, m, and X0.
  • Most digital computers use a binary representation of numbers
  • Speed and efficiency are aided by a modulus, m, to be (or close to) a

power of 2.

  • Dr. Mesut Güneş

Chapter 6. Random-Number Generation 14

slide-15
SLIDE 15

Computer Science, Informatik 4 Communication and Distributed Systems

Random-Numbers in Java Random-Numbers in Java Defined in java.util.Random Defined in java.util.Random

private final static long multiplier = 0x5DEECE66DL; // 25214903917 i t fi l t ti l dd d 0 BL // 11 private final static long addend = 0xBL; // 11 private final static long mask = (1L << 48) - 1; // 281474976710655 protected int next(int bits) { protected int next(int bits) { long oldseed, nextseed; ...

  • ldseed = seed.get();

nextseed = (oldseed * multiplier + addend) & mask; ... return (int)(nextseed >>> (48 - bits)); // >>> Unsigned right shift }

  • Dr. Mesut Güneş

Chapter 6. Random-Number Generation 15

slide-16
SLIDE 16

Computer Science, Informatik 4 Communication and Distributed Systems

Combined Linear Congruential Generators Combined Linear Congruential Generators

  • Reason: Longer period generator is needed because of the

Reason: Longer period generator is needed because of the increasing complexity of simulated systems.

  • Approach: Combine two or more multiplicative congruential

generators.

  • Let Xi,1, Xi,2, …, Xi,k, be the i-th output from k different multiplicative

congruential generators.

  • The j-th generator:
  • Has prime modulus mj and multiplier aj and period is mj -1
  • Produces integers Xi,j is approx ~ Uniform on integers in [1, mj – 1]

g

i,j

pp g [

j

]

  • Wi,j = Xi,j - 1 is approx ~ Uniform on integers in [0, mj - 2]
  • Dr. Mesut Güneş

Chapter 6. Random-Number Generation 16

slide-17
SLIDE 17

Computer Science, Informatik 4 Communication and Distributed Systems

Combined Linear Congruential Generators Combined Linear Congruential Generators

  • Suggested form:

Sugges ed o

1 mod ) 1 (

1 1

− ⎟ ⎟ ⎞ ⎜ ⎜ ⎛ − = ∑

m X X

k j i j i

⎪ ⎪ ⎨ ⎧ > = 1 , Hence,

1 i i i

X m X R ) (

1 1 , ⎟

⎠ ⎜ ⎝∑

= j j i i

⎪ ⎪ ⎩ ⎨ = − , 1 ,

1 1 i i

X m m

The coefficient: Performs the subtraction Xi,1-1

) 1 ) ( 1 )( 1 (

  • The maximum possible period is:

1 2 1

2 ) 1 )...( 1 )( 1 (

− − − =

k k

m m m P

  • Dr. Mesut Güneş

Chapter 6. Random-Number Generation 17

slide-18
SLIDE 18

Computer Science, Informatik 4 Communication and Distributed Systems

Combined Linear Congruential Generators Combined Linear Congruential Generators

  • Example: For 32-bit computers, combining k = 2 generators with

a p e

  • 3

b t co pute s, co b g k ge e ato s t m1 = 2147483563, a1 = 40014, m2 = 2147483399 and a2 = 40692. The algorithm becomes:

Step 1: Select seeds

  • X1,0 in the range [1, 2147483562] for the 1st generator
  • X2,0 in the range [1, 2147483398] for the 2nd generator.

Step 2: For each individual generator, X1,j+1 = 40014 X1,j mod 2147483563 X2,j+1 = 40692 X2,j mod 2147483399

Step 3:

Xj+1 = (X1,j+1 - X2,j+1 ) mod 2147483562

Step 4: Return Step 4: Return

⎪ ⎪ ⎪ ⎨ ⎧ > =

+ + +

, 2147483563

1 1 1 j j j

X X R

S S b k 2

⎪ ⎪ ⎩ =

+

, 2147483563 2147483562

1 j

X

  • Dr. Mesut Güneş

Chapter 6. Random-Number Generation 18

Step 5: Set j = j+1, go back to step 2.

  • Combined generator has period: (m1 – 1)(m2 – 1)/2 ~ 2 x 1018
slide-19
SLIDE 19

Computer Science, Informatik 4 Communication and Distributed Systems

Random-Numbers in Excel 2003 Random-Numbers in Excel 2003 In Excel 2003 new Random Number Generator In Excel 2003 new Random Number Generator

30269 d 171 X X 00} {1,...,300 Z Y, X, ∈ 30307 mod 172 Y Y 30269 mod 171 X X ⋅ = ⋅ = 1 0 mod Y X R 30323 mod 170 Z Z ⎟ ⎞ ⎜ ⎛ + + = ⋅ = Z 1.0 mod 30323 30307 30269 R ⎟ ⎠ ⎜ ⎝ + + =

It is stated that this method produces more than 10^13 numbers

  • Dr. Mesut Güneş

Chapter 6. Random-Number Generation 19

slide-20
SLIDE 20

Computer Science, Informatik 4 Communication and Distributed Systems

Random-Numbers Streams Random-Numbers Streams

  • The seed for a linear congruential random-number generator:

g g

  • Is the integer value X0 that initializes the random-number sequence.
  • Any value in the sequence X0, X1, …, XP, X0 can be used to “seed” the generator.
  • A random-number stream:
  • Refers to a starting seed taken from the sequence X0, X1, …, XP.
  • If the streams are b values apart, then stream i could be defined by starting seed:

⎣ ⎦

P

i X S 2 1 = =

  • Older generators: b = 105; Newer generators: b = 1037.

⎣ ⎦

b i b i

i X S , , 2 , 1

) 1 (

K = =

  • A single random-number generator with k streams can act like k distinct

virtual random-number generators

  • To compare two or more alternative systems.
  • Advantageous to dedicate portions of the pseudo-random number sequence to

the same purpose in each of the simulated systems.

  • Dr. Mesut Güneş

Chapter 6. Random-Number Generation 20

slide-21
SLIDE 21

Computer Science, Informatik 4 Communication and Distributed Systems

Tests for Random Numbers Tests for Random Numbers

  • Dr. Mesut Güneş

Chapter 6. Random-Number Generation 21

slide-22
SLIDE 22

Computer Science, Informatik 4 Communication and Distributed Systems

Tests for Random Numbers Tests for Random Numbers

  • Two categories:

Two categories:

  • Testing for uniformity:

H0: Ri ~ U[0,1] H1: Ri ≁ U[0,1]

  • Failure to reject the null hypothesis, H0, means that evidence of non-

uniformity has not been detected.

  • Testing for independence:

H0: Ri ~ independently H1: Ri ≁ independently

1 i

p y

  • Failure to reject the null hypothesis, H0, means that evidence of

dependence has not been detected.

  • Level of significance α, the probability of rejecting H0 when it is true:

α = P( reject H0 | H0 is true)

  • Dr. Mesut Güneş

Chapter 6. Random-Number Generation 22

slide-23
SLIDE 23

Computer Science, Informatik 4 Communication and Distributed Systems

Tests for Random Numbers Tests for Random Numbers

  • When to use these tests:

When to use these tests:

  • If a well-known simulation language or random-number generator is

used, it is probably unnecessary to test

  • If the generator is not explicitly known or documented e g

spreadsheet

  • If the generator is not explicitly known or documented, e.g., spreadsheet

programs, symbolic/numerical calculators, tests should be applied to many sample numbers.

  • Types of tests:
  • Theoretical tests: evaluate the choices of m, a, and c without actually

eo et ca tests e a uate t e c o ces o m, a, a d c t out actua y generating any numbers

  • Empirical tests: applied to actual sequences of numbers produced.
  • Our emphasis

Our emphasis.

  • Dr. Mesut Güneş

Chapter 6. Random-Number Generation 23

slide-24
SLIDE 24

Computer Science, Informatik 4 Communication and Distributed Systems

Frequency Tests Frequency Tests

  • Test of uniformity

Test of uniformity

  • Two different methods:
  • Kolmogorov-Smirnov test
  • Chi-square test
  • Dr. Mesut Güneş

Chapter 6. Random-Number Generation 24

slide-25
SLIDE 25

Computer Science, Informatik 4 Communication and Distributed Systems

Kolmogorov-Smirnov Test Kolmogorov-Smirnov Test

  • Compares the continuous cdf, F(x), of the uniform distribution with

p , ( ), the empirical cdf, SN(x), of the N sample observations.

  • We know:

1 ) ( ≤ ≤ F

  • We know:
  • If the sample from the RNG is R1, R2, …, RN, then the empirical cdf, SN(x)

1 , ) ( ≤ ≤ = x x x F

is:

N x R R x S

i i N

where

  • f

Number ) ( ≤ =

  • Based on the statistic: D = max | F(x) - SN(x)|

N

  • Sampling distribution of D is known
  • Dr. Mesut Güneş

Chapter 6. Random-Number Generation 25

slide-26
SLIDE 26

Computer Science, Informatik 4 Communication and Distributed Systems

Kolmogorov-Smirnov Test Kolmogorov-Smirnov Test

  • The test consists of the following steps

Kolmogorov-Smirnov Critical Values

g p

  • Step 1: Rank the data from smallest to largest

R(1) ≤ R(2) ≤ ... ≤ R(N)

  • Step 2: Compute

⎬ ⎫ ⎨ ⎧

+

R i D ⎭ ⎬ ⎫ ⎩ ⎨ ⎧ − − = ⎭ ⎬ ⎩ ⎨ − =

≤ ≤ − ≤ ≤ +

N i R D R N D

i N i i N i

1 max max

) ( 1 ) ( 1

St 3 C t D (D+ D ) ⎭ ⎬ ⎩ ⎨

≤ ≤

N

i N i ) ( 1

  • Step 3: Compute D = max(D+, D-)
  • Step 4: Get Dα for the significance level α
  • Step 5: If D ≤ Dα accept, otherwise reject H0
  • Dr. Mesut Güneş

Chapter 6. Random-Number Generation 26

slide-27
SLIDE 27

Computer Science, Informatik 4 Communication and Distributed Systems

Kolmogorov-Smirnov Test Kolmogorov-Smirnov Test

  • Example: Suppose N=5 numbers: 0.44, 0.81, 0.14, 0.05, 0.93.

Example: Suppose N 5 numbers: 0.44, 0.81, 0.14, 0.05, 0.93.

Step 1:

Arrange R(i) from smallest to largest i 1 2 3 4 5 R(i) 0.05 0.14 0.44 0.81 0.93

Step 1: Step 2:

D+ = max {i/N – R(i)}

(i)

i/N 0.20 0.40 0.60 0.80 1.00 i/N – R(i) 0.15 0.26 0.16

  • 0.07

Step 2: Step 3: D = max(D+, D-) = 0.26

D - = max {R(i) - (i-1)/N} R(i) – (i-1)/N 0.05

  • 0.04

0.21 0.13

Step 4: For α = 0.05, Dα = 0.565 > D Hence, H0 is not rejected.

  • Dr. Mesut Güneş

Chapter 6. Random-Number Generation 27

slide-28
SLIDE 28

Computer Science, Informatik 4 Communication and Distributed Systems

Chi-square Test Chi-square Test

  • Chi-square test uses the sample statistic:

q p

n i i

E O

2 2

) (

n is the # of classes Ei is the expected # in the i-th class

=

= Χ

i i i i

E E O

1 2

) (

Oi is the observed # in the i-th class

  • Approximately the chi-square distribution with n-1 degrees of freedom

F th if di t ib ti E th t d b i h l i

  • For the uniform distribution, Ei, the expected number in each class is:

n

  • bservatio
  • f

# total the is N where , n N Ei =

  • Valid only for large samples, e.g. N ≥ 50
  • Dr. Mesut Güneş

Chapter 6. Random-Number Generation 28

slide-29
SLIDE 29

Computer Science, Informatik 4 Communication and Distributed Systems

Chi-square Test – Example Chi-square Test – Example

  • Example with 100

Interval Upper Limit Oi Ei Oi-Ei (Oi-Ei)^2 (Oi-Ei)^2/Ei

p numbers from [0,1]

  • α=0.05

10 i t l

1 0.1 10 10 2 0.2 9 10

  • 1

1 0.1 3 0.3 5 10

  • 5

25 2.5

  • 10 intervals
  • X2

0.05,9 = 16.9

  • Accept since

4 0.4 6 10

  • 4

16 1.6 5 0.5 16 10 6 36 3.6 6 0 6 13 10 3 9 0 9

Accept, since

  • X2

0=11.2 < X2 0.05,9

6 0.6 13 10 3 9 0.9 7 0.7 10 10 8 0.8 7 10

  • 3

9 0.9 9 0 9 10 10 9 0.9 10 10 10 1.0 14 10 4 16 1.6 S 100 100 11.2

X2

0=11.2

  • Dr. Mesut Güneş

Chapter 6. Random-Number Generation 29

slide-30
SLIDE 30

Computer Science, Informatik 4 Communication and Distributed Systems

Tests for Autocorrelation Tests for Autocorrelation Autocorrelation is concerned with dependence between p numbers in a sequence Example:

0.12 0.01 0.23 0.28 0.89 0.31 0.64 0.28 0.83 0.93 0.99 0.15 0.33 0.35 0.91 0.41 0.60 0.27 0.75 0.88

Numbers at 5-th, 10-th, 15-th, ... are very similar

0.68 0.49 0.05 0.43 0.95 0.58 0.19 0.36 0.69 0.87

Numbers can be

  • Low
  • High
  • High
  • Alternating
  • Dr. Mesut Güneş

Chapter 6. Random-Number Generation 30

slide-31
SLIDE 31

Computer Science, Informatik 4 Communication and Distributed Systems

Tests for Autocorrelation Tests for Autocorrelation

  • Testing the autocorrelation between every m numbers (m is a.k.a.

g y ( the lag), starting with the i-th number

  • The autocorrelation ρim between numbers: Ri, Ri+m, Ri+2m, Ri+(M+1)m
  • M is the largest integer such that

N )m (M i ≤ + + 1

  • M is the largest integer such that
  • Hypothesis:

N )m (M i ≤ + + 1 yp

dependent are numbers if t independen are numbers if

, : , :

1

≠ =

i im

H H ρ ρ

  • If the values are uncorrelated:
  • For large values of M the distribution of the estimator of ρ

denoted ρ ˆ dependent are numbers if

, :

1

im

H ρ

  • For large values of M, the distribution of the estimator of ρim, denoted

is approximately normal.

im

ρ

  • Dr. Mesut Güneş

Chapter 6. Random-Number Generation 31

slide-32
SLIDE 32

Computer Science, Informatik 4 Communication and Distributed Systems

Tests for Autocorrelation Tests for Autocorrelation

  • Test statistics is:

im

Z ρ ˆ ˆ =

  • Z0 is distributed normally with mean = 0 and variance = 1, and:

im

ρ

σ ˆ ˆ

. R R M ρ

M )m (k i km i im

25 1 1 ˆ

1

− ⎥ ⎦ ⎤ ⎢ ⎣ ⎡ ⋅ + =

+ + +

) (M M σ M

im

ρ k

1 12 7 13 ˆ 1 + + = ⎦ ⎣ +

=

  • If ρim > 0, the subsequence has positive autocorrelation
  • High random numbers tend to be followed by high ones and vice versa

) (M 1 12 +

  • High random numbers tend to be followed by high ones, and vice versa.
  • If ρim < 0, the subsequence has negative autocorrelation
  • Low random numbers tend to be followed by high ones and vice versa
  • Dr. Mesut Güneş

Chapter 6. Random-Number Generation 32

  • Low random numbers tend to be followed by high ones, and vice versa.
slide-33
SLIDE 33

Computer Science, Informatik 4 Communication and Distributed Systems

Example Example

  • Test whether the 3rd, 8th, 13th, and so on, for the numbers on Slide

Test whether the 3 , 8 , 13 , and so on, for the numbers on Slide 24.

  • Hence, α = 0.05, i = 3, m = 5, N = 30, and M = 4

25 ) 36 . )( 05 . ( ) 05 . )( 27 . ( ) 27 . )( 33 . ( ) 33 . )( 28 . ( ) 28 . )( 23 . ( 1 4 1 ˆ35 − ⎥ ⎦ ⎤ ⎢ ⎣ ⎡ + + + + + = . ρ 128 7 ) 4 ( 13 1945 . ) )( ( ) )( ( + − = ⎦ ⎣ σ 516 . 1 1280 1945 . 128 . 1 4 12

ˆ35

− = − = = + = Z ) ( σ ρ

  • z0 025 = 1.96 hence, the hypothesis is not rejected.

1280 .

  • Dr. Mesut Güneş

Chapter 6. Random-Number Generation 33

0.025

.96 e ce, e ypo es s s

  • ejec ed
slide-34
SLIDE 34

Computer Science, Informatik 4 Communication and Distributed Systems

Shortcomings Shortcomings

  • The test is not very sensitive for small values of M, particularly when

The test is not very sensitive for small values of M, particularly when the numbers being tested are on the low side.

  • Problem when “fishing” for autocorrelation by performing numerous

t t tests:

  • If α = 0.05, there is a probability of 0.05 of rejecting a true hypothesis.
  • If 10 independence sequences are examined,
  • The probability of finding no significant autocorrelation, by chance

alone, is 0.9510 = 0.60.

  • Hence, the probability of detecting significant autocorrelation when it

Hence, the probability of detecting significant autocorrelation when it does not exist = 40%

  • Dr. Mesut Güneş

Chapter 6. Random-Number Generation 34

slide-35
SLIDE 35

Computer Science, Informatik 4 Communication and Distributed Systems

Summary Summary

  • In this chapter, we described:

In this chapter, we described:

  • Generation of random numbers
  • Testing for uniformity and independence
  • Caution:
  • Even with generators that have been used for years, some of which still

g y , in use, are found to be inadequate.

  • This chapter provides only the basics
  • Also even if generated numbers pass all the tests some underlying
  • Also, even if generated numbers pass all the tests, some underlying

pattern might have gone undetected.

  • Dr. Mesut Güneş

Chapter 6. Random-Number Generation 35