# Consider a linear congruential

1. Consider a linear congruential random number generator withparameters a = 3,

m = 16, and c=0.

• Select the seed X0 = 3, and generate 3 random variables usingthis generator.
• What is the period of this generator?

SOLUTION:

From given data,

Consider alinear congruential random number generator with parameters a = 3,m= 16, and c=0.

a = 3,

m = 16,

c=0.

The recurrence relation to define generator is

Xn+1 = (a Xn+c) mod m

here X is sequence of random numbers

and X0 is referred to seed which is also called startvalue.

Select the seedX0 = 3, and generate 3 random variables using thisgenerator.

No we have X0 = 3, we need to generate three randomnumbers with it

as we are starting with n = 0 (X0)

X1 = (a*X0 + c ) mod m

X1 = (3*3 + 0) mod 16

X1 = 9 mod 16

X1 = 9

Now let us try X2

X2 = (a * X1 + 0) mod 16

X2 = (3*9 + 0) mod 16

X2 = 27 mod 16

X2 = 11

Now X3

X3 = (a * X2 + 0) mod 16

X3 = (3* 11 + 0) mod 16

X3 = 33 mod 16

X3 = 1

What is theperiod of this generator

Period of Generator :

When c = 0 then generator is call multiplicative congruentialgenerator and period of MCG is at most m

##### "Our Prices Start at \$11.99. As Our First Client, Use Coupon Code GET15 to claim 15% Discount This Month!!" Pages (275 words)
Standard price: \$0.00
Client Reviews
4.9
Sitejabber
4.6
Trustpilot
4.8
Our Guarantees
100% Confidentiality
Information about customers is confidential and never disclosed to third parties.
Original Writing
We complete all papers from scratch. You can get a plagiarism report.
Timely Delivery
No missed deadlines – 97% of assignments are completed in time.
Money Back