Post a New Question

Data Structures and Algorithms

posted by .

The "random" numbers produced by computers aren't purely random. They are actually pseudo-random, meaning that they are produced by mathematical formulas that simulate randomness.The linear congruential generator takes a seed X0 and generates subsequent pseudo-random numbers using the formula:

Xn+1=(aXn+c) mod m

X1 is the first pseudo-random number generated, X2 is the second, and so on. Let R be the 2000th pseudo-random number generated by the linear congruential generator when X0=42, a=25, c=31, and m=2^20. What are the last three digits of R?

  • Data Structures and Algorithms -

    938

  • Data Structures and Algorithms -

    If the question asks for the last digits, you could code and evaluate the recursive formula to get the results.
    If you would like a check, you are welcome. The sum of the 3 last digits is 20.

Answer This Question

First Name:
School Subject:
Answer:

Related Questions

More Related Questions

Post a New Question