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.

Respond to this Question

First Name
School Subject
Your Answer

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) d.P(0.3(<X<0.5) …
  2. 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) b.P(0.4 …
  3. 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) b.P(0.4 …
  4. statistics

    samples of size n=900 are randomly selected from the population of numbers (0 through 9) produced by a random-number generator, and the proportion of numbers greater than 5 is found for each sample. what is the shape distribution of …
  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 and …
  6. algebra

    Which of the following are examples of inferential statistics?
  7. 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(<Y<0.4) = P(0.4<Y<1) = P(0.3<Y<0.5)+
  8. 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?
  9. Math, Please Help!

    Suppose a dot is placed at random in a 10 x 10 graph grid in which squares have been numbered from 1 to 100 with no number repeated. Now simulate choosing 100 numbers at random between 1 and 100 inclusive. How many numbers might you …
  10. 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 in …

More Similar Questions