---
title: "Properties and generation techniques of RN"
subject: "Simulation and Modeling"
chapter: 6
key: "semester_8/simulation_and_modeling:rn-properties-generation-techniques"
source: https://www.bctengineer.com/q/semester_8/simulation_and_modeling/rn-properties-generation-techniques
site: BCT Engineering
---

# Properties and generation techniques of RN

Simulation and Modeling · Chapter 6: Random Number

- Asked in: 2074 Bhadra, 2+6 marks
- Video: [Random Numbers -System Modelling & Simulation |Properties of Random Numbers |Generation of Pseudo RN](https://www.youtube.com/watch?v=otuwEdCRoww) — Infinite Love
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_8/simulation_and_modeling/rn-properties-generation-techniques
- Whole chapter: https://www.bctengineer.com/md/semester_8/simulation_and_modeling/chapter-6

## Question

What are the properties of random number? Explain the techniques of generation of random number with appropriate example.

## Short answer

Random numbers require uniformity and independence; generators should be fast, reproducible, and have long periods. Techniques include mid-square, mid-product, linear congruential, multiplicative congruential, additive congruential, and physical sources, each illustrated with examples such as LCG a=5, c=3, m=16.

## Answer

#### Properties of random numbers

1. **Uniformity**: numbers are uniformly distributed over [0, 1); each of n equal sub-intervals gets about N/n of N numbers.
2. **Independence**: each number is unrelated to the previous ones.

A good generator should also be fast, use little memory, have a long period (full cycle), be reproducible from a seed and pass statistical tests.

#### Generation techniques

Computer-generated (pseudo-random) numbers are produced by a formula. R = X/m maps integers to [0, 1).

**1. Mid-square method.** Square the seed, take the middle digits.
Seed 1234: 1234^2 = 01522756, so next is 5227 (R = 0.5227); 5227^2 = 27321529 gives 3215 (0.3215); then 3362. It can quickly degenerate: seed 2100 gives 4100, 8100, 6100, 2100 and repeats.

**2. Mid-product method.** Multiply two consecutive numbers and take the middle digits: 5731 x 7182 = 41160042 gives 1600; 7182 x 1600 = 11491200 gives 4912.

**3. Linear congruential method.** X(n+1) = (a X(n) + c) mod m.

Example: a = 5, c = 3, m = 16, X0 = 7.

| n | X(n) | R = X/16 |
|---|---|---|
| 1 | 6 | 0.375 |
| 2 | 1 | 0.0625 |
| 3 | 8 | 0.5 |
| 4 | 11 | 0.6875 |
| 5 | 10 | 0.625 |
| 6 | 5 | 0.3125 |
| 7 | 12 | 0.75 |
| 8 | 15 | 0.9375 |

It repeats after 16 numbers (full period). Full period is obtained when c and m are relatively prime, a - 1 is divisible by every prime factor of m, and by 4 if m is divisible by 4. Usually m = 2^b.

**4. Multiplicative congruential method.** X(n+1) = a X(n) mod m (c = 0). Example: a = 13, m = 64, X0 = 1 gives 13, 41, 21, 17, 29, 57, 37, 33.

**5. Additive congruential method.** X(n) = (X(n-1) + X(n-k)) mod m. With k = 2, m = 100 and seeds 65, 89: 54, 43, 97, 40, 37.

**6. Other:** built-in library functions, random number tables and physical (hardware) generators.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. If [0,1) is divided into n equal classes and N numbers are generated, how many should fall in each class?
   A. About N/n
   B. About N x n
   C. About n/N
   D. Exactly zero or one
   Answer: A. Uniformity means each class gets about N/n of the N numbers. (Key point: Uniformity)

2. Which is a condition for full period of a linear congruential generator?
   A. c and m must be relatively prime
   B. c must be 0
   C. m must be odd
   D. a must equal m
   Answer: A. Full period needs c and m relatively prime, a - 1 divisible by every prime factor of m (and by 4 if 4 divides m). (Key point: Full period conditions)

3. For a = 5, c = 3, m = 16, X0 = 7, what are X1 and R1?
   A. X1 = 38, R1 = 2.375
   B. X1 = 6, R1 = 0.375
   C. X1 = 7, R1 = 0.4375
   D. X1 = 1, R1 = 0.0625
   Answer: B. (5 x 7 + 3) mod 16 = 38 mod 16 = 6, and R = 6/16 = 0.375. (Key point: LCG numeric example)

4. What distinguishes the multiplicative congruential method from the mixed one?
   A. It uses c = 0
   B. It uses squaring of the seed
   C. It uses two earlier values
   D. It uses a table
   Answer: A. The multiplicative form is X(n+1) = a X(n) mod m, i.e. with increment c = 0. (Key point: Multiplicative method)

## Related in Simulation and Modeling

- [Random number generation methods](https://www.bctengineer.com/question.md?key=semester_8%2Fsimulation_and_modeling%3Arn-generation-methods) — Simulation and Modeling, chapter 6
- [Random number properties and Gap test](https://www.bctengineer.com/question.md?key=semester_8%2Fsimulation_and_modeling%3Arn-properties-gap-test) — Simulation and Modeling, chapter 6, asked 4×
- [Random number properties; KS test algorithm](https://www.bctengineer.com/question.md?key=semester_8%2Fsimulation_and_modeling%3Arn-properties-ks-algorithm) — Simulation and Modeling, chapter 6
- [Random number; problems in generating pseudo-random](https://www.bctengineer.com/question.md?key=semester_8%2Fsimulation_and_modeling%3Arn-problems-pseudo-random) — Simulation and Modeling, chapter 6
- [Short note: Convolution in random number](https://www.bctengineer.com/question.md?key=semester_8%2Fsimulation_and_modeling%3Aconvolution-short-note) — Simulation and Modeling, chapter 6
- [Properties of random numbers](https://www.bctengineer.com/question.md?key=semester_8%2Fsimulation_and_modeling%3Arn-properties) — Simulation and Modeling, chapter 6

## Related in other subjects

- [Continuous random variable; pdf properties](https://www.bctengineer.com/question.md?key=semester_5%2Fprobability_and_statistics%3Acontinuous-rv-pdf-properties) — Probability and Statistics, chapter 3
- [Stagnation properties and Mach number relations](https://www.bctengineer.com/question.md?key=semester_7%2Fturbo_machines%3Astagnation-temperature-pressure-relations) — Turbo Machines, chapter 4
- [DSB-FC generation using square law modulator](https://www.bctengineer.com/question.md?key=semester_6%2Fcommunication_systems%3Adsbfc-square-law-modulator) — Communication Systems, chapter 2
