written 2.8 years ago by | modified 20 months ago by |

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

**1 Answer**

0

659views

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

written 2.8 years ago by | modified 20 months ago by |

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

ADD COMMENT
EDIT

0

0views

written 2.8 years ago by |

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$

ADD COMMENT
EDIT

Please log in to add an answer.