Professional Documents
Culture Documents
CST-501 Simulation (Period 7) : Presented by Daw Ank Phyu Win Associate Professor
CST-501 Simulation (Period 7) : Presented by Daw Ank Phyu Win Associate Professor
CST-501 Simulation (Period 7) : Presented by Daw Ank Phyu Win Associate Professor
Simulation (Period 7)
Presented by
Associate Professor
Generation of Random Numbers
n ( 3) (modulo 10)
0 ( 3) (modulo 10) 5
1 ( 3) (modulo 10) 8
2 ( 3) (modulo 10) 1
Homework
3 ( 3) (modulo 10) 4
to generate a sequence of eight random integer
4 ( 3) (modulo 10) 7
numbers between 0 and 7 such that ≡ (5 1) (modulo
5 ( 3) (modulo 10) 0
6 ( 3) (modulo 10) 3 8) and 1
7 ( 3) (modulo 10) 6 to generate a sequence of five two-digit random
8 ( 3) (modulo 10) 9 integer numbers such that ≡ (61 27) (modulo 100)
9 ( 3) (modulo 10) 2 and 10
Problem 22.3-2
• to convert uniform random numbers from problem 22.3-1
• for n =1, 2, . . . , 12
Problem 22.3-4.
• to generate a sequence of three three-digit random integer numbers
• xn+1 ≡ (201xn + 503) (modulo 1,000) and x0 = 485.
Problem 22.3-5.
• to generate a sequence of five random integer numbers between 0 and 31
• xn+1 ≡ (13xn + 15) (modulo 32) and x0 =14.
•to convert these random integer numbers to uniform random numbers as closely as possible.