0
1.1kviews
State the properties of random numbers. What are the problems or errors than can occur while generating pseudo random numbers?

Use the the mixed congruentual method to generate of sequence of three two-digit random integers between 0 and 24 with X0=13, a=9, and c=35.

1 Answer
0
6views

Recursion Relation is,

$x_{i+1}=\left(a x_{i+c}\right) \bmod m$ for i = 0,1,2

for $i=0, \quad x_{1}=((9 \times 13)+35) \bmod 25=152 \mathrm{mod} 25=2$

for $i=1, \quad x_{2}=((9 \times 2)+35) \bmod 25=(53) \bmod 25=3$

for $i=2, \quad x_{3}=((9 \times 3)+35) \bmod 25=62 \bmod 25=12$

for $ i = 3, \quad x_{4}=((9 \times 12)+35) \bmod 25=143 \bmod 25=18$

for $ i =4, \quad x_{5}=((9 \times 18)+35) \bmod 25=197 \bmod 25=22$

Now, $R i=\frac{x_i}{m}=\frac{x_{i}}{25}$

Hence,

$R_{1}=0.08$

$R_{2}=0.12$

$B_{3}=0.48$

$R_{4}=0.72$

$R_{5}=0.88$

Please log in to add an answer.