Ie306 ps2
Ie306 ps2
Date: 07.11.2024
1 Questions
Definition: For given positive integers X0 , a and m; equation (1) defines a
multiplicative congruential generator.
1. Please test whether the Theorem above holds with a function of your
implementation. (We will choose m = 28 , X0 = 13, and k = 2 [a = 19])
Do they have the desired properties of a uniform random number stream?
(Definition and Theorem from lecture notes of Prof. Dr. Barlas)
1
Random Number Stream: = {0.775, 0.6988058, 0.26[ ], 0.41, 0.975, 0.6671289}
3.75
Please let X denote the random variable for inter-arrival times where f (x)
is the pdf of X. Accordingly, please let Y, Z (and g(y) pdf of Y , h(z) pmf
of Z) denote the random variables for service time 1 and service time 2,
respectively. The distributions are as follows:
1
10x
3 if 0 ↓ x ↓ 0.6
f (x) = 5 ↔ 5x if 0.6 < x ↓ 1 (2)
0 else
0.25 if z = 1.6
0.125 if z = 1.7
h(z) = (4)
0.5 if z = 1.8
0.125 if z = 1.9
3. Additionally, for the distributions above, please utilize the streams below
to generate independent, identically distributed X, Y, Z random variables.
Do they produce similar results as in the first PS?
1
IA RN stream: = {0.775, 0.26, 0.975, 0.9, 0.6, 0.9, 0.84375, 0.94375, 1, 0.416( )}
2.4
S1 RN stream: = {0.6988058, 0.6671289, 0.6988058, 0.5934303, 0.6321206,
0.7768698, 0.5934303, 0.4511884}
S2 RN stream: = {0.41, 0.94, 0.20, 0.56, 0.29, 0.12, 0.67, 0.81}
4. From L09 of Gönenç Hoca, please let us go through the Example 8.2
and Example 8.3 (Pages 10-14 both included).
2
① m = 20 Xo = 134 = 2 (a ]
=
↓* 17
or
=-
1
x =
(19 .
13) 2 = 247
Yz
=
(19 .
247/z =
85 . . . .
p-264-depudet ! if
13)
a = -k13
on
on many
and
multiplicative
X
,
o
is odd
13 (taking X
=
=
congruential
generator
&,
& F(x) =
/
X0
Dex
rfzJdt -
-
5x2
2
+ 5x -
15 .
,
0 67XXC
.
2 I x -
1
g(y) + G(y) =
ye +
dt =
1 - et , yz0
,3
0
n + H(z) =
S
24 16 .
0 25 1 61z < 17
,
. .
.
0 .
375 1 74z .
< 18
.
0 .
875 1 8211 9.
.
S 11231 . 9
F()wX
u
= Ou 10 6 .
# Tx -
15 =
-
x2 -
2x + 3=
(x -
1)2 z =
-
(x 1)2
z-
-
IX-11 =
-2 and since 0 .
61x11
>
-
1 -x =
E -
E = x =
1 -
E-
↓
if 06 .
<X = 1
(( v)
F (u) 1 ey y
= -
For >
-
= v = -
=
y ,
() -
1 6 if OU <0 25
,
. .
Forz
1 7
.
if 0 25.
100.375
(
1 8 .
if 0 . 375 u < 0 875
.
1. 9 if 0 .
875 LuLf
I
j
⑤
3 n
T
-
&
-
C
-
↓
II
O
T ·
↑
5 & G
O
o
-
--
s
--
.
-
- 0
·
B
i T
·
·
8 ,
· h
&
&
&
Se
I -