NivaarExam PrepOfficial exam papers ↗

23-Ind-A6 Systems Simulation · December 2013

Question 11 of 14: Question 11 (Part D, Set 1 — Custom LCG)

Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)

Notes on this paper

National Exams — December 2013 — 98-Ind-A6 Systems Simulation. Three-hour, closed-book exam; one of two permitted calculators (Sharp or Casio), one 8.5″×11.0″ aid sheet (both sides). Format: 14 sub-questions across four parts — Part A (do 1 of 2, 25 marks), Part B (do 3 of 5, 15 marks), Part C (do 1 of 3, 10 marks), Part D (do 2 of 4, 20 marks); 7 questions, 70 marks constitute a complete paper. All fourteen sub-questions are solved below for completeness (the source restarts its own numbering at 1 within each Part). Statistical tables (Normal, t, chi-square, F) were supplied with the exam; the values below are the same table values obtained by direct computation.

Reference texts: Banks, Carson, Nelson & Nicol, Discrete-Event System Simulation (5th ed., Pearson) — simulation study design, random-number generation, input/output data analysis, variance reduction, verification & validation, queueing simulation; Montgomery, Design and Analysis of Experiments (9th ed., Wiley) — factorial designs and ANOVA.

Question 11 (Part D, Set 1 — Custom LCG) (10 marks)

Question text not reproduced: the examination questions are © Engineers and Geoscientists BC. Open the official past paper (linked at the top of this page) to read the question, then follow the worked solution below.

Given. Multiplicative congruential generator $x_{n+1}=(a\,x_n+c)\bmod m$ with $x_0=123$, $m=64$, $c=0$, $a=5$.

Find. (a) $x_1,x_2$ and the corresponding $U(0,1)$ draws; (b) the maximum achievable period and why; (c)–(d) conceptual answers.

  1. (a) Next two values. $$x_1 = (5\times123)\bmod64 = 615\bmod64 = \boxed{39},\qquad u_1 = 39/64 = 0.6094.$$ $$x_2 = (5\times39)\bmod64 = 195\bmod64 = \boxed{3},\qquad u_2 = 3/64 = 0.0469.$$
  2. (b) Maximum possible period. This is a MULTIPLICATIVE congruential generator ($c=0$) with $m=2^b$ ($64=2^6$). For this family the full period $m$ is unreachable (that requires $c\ne0$); the theoretical maximum is $$P_{max} = m/4 = 64/4 = \boxed{16},$$ achieved when the multiplier satisfies $a\equiv3$ or $5\pmod 8$ and the seed $x_0$ is odd. Here $a=5\equiv5\pmod8$ and $x_0=123$ is odd, so this generator DOES reach the maximum: iterating from $x_1=39$ cycles through exactly the 16 values $\{39,3,15,11,55,19,31,27,7,35,47,43,23,51,63,59\}$ before repeating (the seed 123 itself is a one-step transient into this cycle, not part of it).
  3. (c) Repeatability. A generator is repeatable if, given the same seed $x_0$, it reproduces the EXACT SAME sequence of pseudo-random numbers every time it is run. This matters because it lets Angus re-run a simulation scenario identically for debugging (isolating whether a change in output came from a code change or from different random draws), lets other engineers reproduce and verify his results, and is the mechanism that makes common-random-number variance reduction (Question 9) possible at all — CRN requires synchronizing the SAME stream across configurations, which only means something if the stream is repeatable.
  4. (d) Chaining two generators. No — the resulting stream is not "more random," and can be worse. $X_{2,i+1}$ is a deterministic function of $X_{1,i}$, which is itself a deterministic function of the single original seed $x_0$; feeding one generator's output into a second generator's seed does not introduce any new source of randomness, it only re-maps the SAME underlying deterministic sequence through an extra deterministic transformation. In practice this composition can actively hurt statistical quality: it can shorten the effective period (bounded by the shorter of the two generators' own cycles, or by however the seeding map folds the first generator's range into the second's valid seed space) and can introduce subtle correlations between $X_{1,i}$ and $X_{2,i+1}$ that a single well-tested generator would not have. Genuine improvement comes from choosing ONE generator with a long, well-tested period and good statistical (spectral) properties — not from chaining ad hoc generators together.
QuantityResult
Next two generator values$x_1=39\ (u_1=0.6094)$, $x_2=3\ (u_2=0.0469)$
Maximum possible period16 (achieved by this generator)
(d) chaining generatorsNo more random — still fully determined by $x_0$; can shorten period/introduce correlation