ArticleslgStudy

mathematics

RANDU

RANDU is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand RANDU rather than just read about it. In short: RANDU is an obsolete method for generating random numbers used primarily in the 1960s and 1970s. It is a linear congruential generator (LCG) of the Park–Miller type defined by the recurrence V j + 1 = 65539 ⋅ V j mod 2 31 {\displaystyle V_{j+1}=65539\cdot V_{j}{\bmod {2}}^{31}} with the initial seed number V 0 {\displaystyle V_{0}} as an odd number.

RANDU — main illustration
RANDU — illustration

Key takeaways

  • RANDU belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect RANDU to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of RANDU from memory before moving on to harder problems.

Reference excerpt

RANDU is an obsolete method for generating random numbers used primarily in the 1960s and 1970s. It is a linear congruential generator (LCG) of the Park–Miller type defined by the recurrence

V j + 1 = 65539 ⋅ V j mod 2 31 {\displaystyle V_{j+1}=65539\cdot V_{j}{\bmod {2}}^{31}}

with the initial seed number V 0 {\displaystyle V_{0}} as an odd number. It generates pseudorandom integers V j {\displaystyle V_{j}} which are uniformly distributed in the interval [0, 231 − 1], but in practical applications are often mapped into pseudorandom rationals X j {\displaystyle X_{j}} in the interval (0, 1), by the formula

X j = V j 2 31 . {\displaystyle X_{j}={\frac {V_{j}}{2^{31}}}.}

IBM's RANDU is widely considered to be one of the most ill-conceived random number generators ever designed, and was described as "truly horrible" by Donald Knuth. It fails the spectral test badly for dimensions greater than 2, as shown below. The reason for choosing these particular values for the multiplier and modulus had been that with a 32-bit-integer word size, the arithmetic of mod 231 and 65539 = 2 16 + 3 {\displaystyle 65539=2^{16}+3} calculations could be done quickly, using bitwise operators in hardware, but the values were chosen for computational convenience, not statistical quality.

Problems with multiplier and modulus For any linear congruential generator with modulus m used to generate points in n-dimensional space, the points fall in no more than ( n ! × m ) 1 / n {\displaystyle (n!\times m)^{1/n}} parallel hyperplanes. This indicates that low-modulus LCGs are unsuited to high-dimensional Monte Carlo simulation. For m = 231 and n = 3, an LCG could have up to 2344 planes, theoretical maximum. A much tighter upper bound is proved in the same Marsaglia paper to be the sum of the absolute values of all the coefficients of the hyperplanes in standard form. That is, if the hyperplanes are of the form Ax1 + Bx2 + Cx3 = some integer such as 0, 1, 2 etc, then the maximum number of planes is |A| + |B| + |C|. Now we examine the values of multiplier 65539 and modulus 231 chosen for RANDU. Consider the following calculation where every term should be taken mod 231. Start by writing the recursive relation as

x k + 2 = ( 2 16 + 3 ) x k + 1 = ( 2 16 + 3 ) 2 x k , {\displaystyle x_{k+2}=(2^{16}+3)x_{k+1}=(2^{16}+3)^{2}x_{k},}

which after expanding the quadratic factor becomes

x k + 2 = ( 2 32 + 6 ⋅ 2 16 + 9 ) x k = [ 6 ⋅ ( 2 16 + 3 ) − 9 ] x k {\displaystyle x_{k+2}=(2^{32}+6\cdot 2^{16}+9)x_{k}=[6\cdot (2^{16}+3)-9]x_{k}}

(because 232 mod 231 = 0) and allows us to show the correlation between three points as

x k + 2 = 6 x k + 1 − 9 x k . {\displaystyle x_{k+2}=6x_{k+1}-9x_{k}.}

… excerpt ends here. Continue reading the full article.

Illustrations

RANDU: Three-dimensional plot of 100,000 values generated with RANDU. Each point represents 3 consecutive pseudorandom values. It is clearly seen that the points fall in 15 two-dimensional planes.
Three-dimensional plot of 100,000 values generated with RANDU. Each point represents 3 consecutive pseudorandom values. It is clearly seen that the points fall in 15 two-dimensional planes.

Worked examples

Example 1 — a first encounter with RANDU

Start with the simplest possible case. Write down what RANDU claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to RANDU before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about RANDU ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of RANDU

In research
RANDU appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses RANDU in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
RANDU is common in secondary-school and first-year university syllabi. It links to neighbouring topics Pseudorandom number generators, so understanding it makes those chapters shorter.
In everyday life
Look for RANDU outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study RANDU in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what RANDU means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain RANDU out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is RANDU in simple terms?

RANDU is an obsolete method for generating random numbers used primarily in the 1960s and 1970s. It is a linear congruential generator (LCG) of the Park–Miller type defined by the recurrence V j + 1 = 65539 ⋅ V j mod 2 31 {\displaystyle V_{j+1}=65539\cdot V_{j}{\bmod {2}}^{31}} with the initial see…

Why does RANDU matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study RANDU?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on RANDU.

Tags

  • Pseudorandom number generators

Keep exploring