Question

A linear congruential generator has a modulus of 32. How long can its cycle be?

A linear congruential generator has a modulus of 32. How long can its cycle be?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Llinear congruential generator produce a sequence of integers between 0 and m−1 according to:

z_n=(az_{n-1}+c)\;mod\;\;m, i=1,2...

here a is the multiplier,c the increment and m the modulus

A linear congruential generator has full period (cycle length is m) if and only if the following conditions hold:

  • The only positive integer that exactly divides both m and c is 1
  • If q is a prime number that divides m, then q divides a−1
  • If 4 divides m, then 4 divides a−1

Hence, if these condition satisfy, it can be 32

Add a comment
Know the answer?
Add Answer to:
A linear congruential generator has a modulus of 32. How long can its cycle be?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT