# Data Structures and Algorithms

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?

1. 0
2. 0
3. 4
1. 938

1. 0
2. 0
posted by Aryaman
2. 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.

1. 0
2. 0
posted by MathMate

## Similar Questions

1. ### ap stats need help

Continuous Random Variable, I Let X be a random number between 0 and 1 produced by the idealized uniform random number generator described. Find the following probabilities: a.P(0¡ÜX¡Ü0.4) b.P(0.4¡ÜX¡Ü1) c.P(0.3¡ÜX0.5)
2. ### Math

A toothpaste company did a survey at the mall. They found that 42.5% of those surveyed brushed their teeth twice a day. Which random numbers would you generate on a computer spreadsheet to simulate the survey? a. random integers
3. ### Probability

For each of the following statements, determine whether it is true (meaning, always true) or false (meaning, not always true). Here, we assume all random variables are discrete, and that all expectations are well-defined and
4. ### Math

In a table of random digits, each digit is to occur with a probability of 0.1. a) A student examines a list of 200 random digits and counts only eleven 4’s and thus claims that the table is not really random. Explain the error
5. ### probability

A random experiment of tossing a die twice is performed. Random variable X on this sample space is defined to be the sum of two numbers turning up on the toss. Find the discrete probability distribution for the random variable X
6. ### ap stats

Continuous Random Variable, I Let X be a random number between 0 and 1 produced by the idealized uniform random number generator described. Find the following probabilities: a.P(0less than or equal to X less than or equal to 0.4)
7. ### stats

Continuous Random Variable, I Let X be a random number between 0 and 1 produced by the idealized uniform random number generator described. Find the following probabilities: a.P(0less than or equal to X less than or equal to 0.4)
8. ### algebra

Which of the following are examples of inferential statistics? Check all that apply. A.Finding the average (mean) of a set of numbers B.Testing every lightbulb produced by a company to confirm that each one works C.Testing random
9. ### AP Statistics

A researcher wishes to compare the effects of 2 fertilizers on the yield of a soybean crop. She has 20 plots of land available and she decides to use a paired experiment — using 10 pairs of plots. Thus, she will: a. Use a table
10. ### Stats

Let Y be a random number between 0 and 1 produced by the idealized uniform random number generator with density curve pictured in the following figure: P(

More Similar Questions