<?xml-stylesheet type="text/xsl" href="../styles/pmathml.xsl"?>
<!-- saved from url=(0014)about:internet -->
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:dsi="http://www.w3.org/1999/xlink" xmlns:m="http://www.w3.org/1998/Math/MathML" xml:space="preserve"><head><meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"/><title>G05 Chapter Introduction : NAG Library, Mark 23</title><link rel="stylesheet" href="../styles/libdoc.css" type="text/css"/><script type="text/javascript">
   function showLevel(_levelId){
    var thisLevel = document.getElementById(_levelId);
    var thisplus = document.getElementById( _levelId.concat('plus'));
    var thisminus = document.getElementById( _levelId.concat('minus'));
    if(thisLevel.style.display != "block"){
     thisLevel.style.display = "block";
     thisplus.style.display = "none";
     thisminus.style.display = "inline";
     }
    else{
     thisLevel.style.display = "none";
     thisminus.style.display = "none";
     thisplus.style.display = "inline";
     }
    }
  </script></head><body><hr/><div><a class="chap" href="g05conts.xml">G05 Chapter Contents</a></div><div><a class="chapint" href="../../pdf/G05/g05intro.pdf">G05 Chapter Introduction (PDF version)</a></div>
<div><a class="htmltoc" href="../FRONTMATTER/manconts.xml">NAG Library Manual</a></div><hr/><h1 class="libdoc">NAG Library Chapter Introduction<br/><br/>G05 &#8211; Random Number Generators</h1><div class="htmltoc">
<h2 class="htmltoc"><span class="htmltochead" onclick="showLevel('htmltoc');"><span class="htmltocplus" id="htmltocplus">+</span><span class="htmltocminus" id="htmltocminus">&#8722;</span></span>&#160;Contents</h2>
<div class="htmltocitem" id="htmltoc">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#scope">1&#160;&#160;<b>Scope of the Chapter</b></a>
</div><div class="htmltoc">
<span class="htmltoc" onclick="showLevel('tocbackground');"><span class="htmltocplus" id="tocbackgroundplus">+</span><span class="htmltocminus" id="tocbackgroundminus">&#8722;</span></span>
<a class="htmltoc" href="#background">2&#160;&#160;<b>Background to the Problems</b></a>
<div class="htmltocitem" id="tocbackground">
<div class="htmltoc">
<span class="htmltoc" onclick="showLevel('tocbackground1');"><span class="htmltocplus" id="tocbackground1plus">+</span><span class="htmltocminus" id="tocbackground1minus">&#8722;</span></span>
<a class="htmltoc" href="#background1">2.1&#160;&#160;<b>Pseudorandom Numbers</b></a>
<div class="htmltocitem" id="tocbackground1">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#nagbasicgenerator">2.1.1&#160;&#160;<b>NAG Basic Generator</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#IGenerator">2.1.2&#160;&#160;<b>Wichmann&#8211;Hill I Generator</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#IIGenerator">2.1.3&#160;&#160;<b>Wichmann&#8211;Hill II Generator</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#MerseeneTwister">2.1.4&#160;&#160;<b>Mersenne Twister Generator</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#ACORN">2.1.5&#160;&#160;<b>ACORN Generator</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#LECUYER">2.1.6&#160;&#160;<b>L'Ecuyer MRG32k3a Combined Recursive Generator </b></a>
</div>
</div>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#background2">2.2&#160;&#160;<b>Quasi-random Numbers</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#backgroundscrambledquasi">2.3&#160;&#160;<b>Scrambled Quasi-random Numbers</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#background3">2.4&#160;&#160;<b>Non-uniform Random Numbers</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#background4">2.5&#160;&#160;<b>Copulas</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#otherrandomstructures">2.6&#160;&#160;<b>Other Random Structures</b></a>
</div><div class="htmltoc">
<span class="htmltoc" onclick="showLevel('tocmultiplestreams');"><span class="htmltocplus" id="tocmultiplestreamsplus">+</span><span class="htmltocminus" id="tocmultiplestreamsminus">&#8722;</span></span>
<a class="htmltoc" href="#multiplestreams">2.7&#160;&#160;<b>Multiple Streams of Pseudorandom Numbers</b></a>
<div class="htmltocitem" id="tocmultiplestreams">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#msviadifferentinitialvalues">2.7.1&#160;&#160;<b>Multiple Streams via Different Initial Values (Seeds)</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#MSdifferent">2.7.2&#160;&#160;<b>Multiple Streams via Different Generators</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#MSskip-ahead">2.7.3&#160;&#160;<b>Multiple Streams via Skip-ahead</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#leapfrogging">2.7.4&#160;&#160;<b>Multiple Streams via Leap-frog</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#anexample">2.7.5&#160;&#160;<b>Skip-ahead and Leap-frog for a Linear Congruential Generator (LCG): An Example</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#mtskip">2.7.6&#160;&#160;<b>Skip-ahead and Leap-frog for the Mersenne Twister: An Example</b></a>
</div>
</div>
</div>
</div>
</div><div class="htmltoc">
<span class="htmltoc" onclick="showLevel('tocavailable');"><span class="htmltocplus" id="tocavailableplus">+</span><span class="htmltocminus" id="tocavailableminus">&#8722;</span></span>
<a class="htmltoc" href="#available">3&#160;&#160;<b>Recommendations on Choice and Use of Available Routines</b></a>
<div class="htmltocitem" id="tocavailable">
<div class="htmltoc">
<span class="htmltoc" onclick="showLevel('tocpseudorandomnumbers');"><span class="htmltocplus" id="tocpseudorandomnumbersplus">+</span><span class="htmltocminus" id="tocpseudorandomnumbersminus">&#8722;</span></span>
<a class="htmltoc" href="#pseudorandomnumbers">3.1&#160;&#160;<b>Pseudorandom Numbers</b></a>
<div class="htmltocitem" id="tocpseudorandomnumbers">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#initialization">3.1.1&#160;&#160;<b>Initialization</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#repeatinit">3.1.2&#160;&#160;<b>Repeated initialization</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#basegenerator">3.1.3&#160;&#160;<b>Choice of Base Generator</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#generatingmultiplestreams">3.1.4&#160;&#160;<b>Choice of Method for Generating Multiple Streams</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#available13">3.1.5&#160;&#160;<b>Copulas</b></a>
</div>
</div>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#quasirandomnumbers">3.2&#160;&#160;<b>Quasi-random Numbers</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#available3">3.3&#160;&#160;<b>Programming Advice</b></a>
</div>
</div>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#index">4&#160;&#160;<b>Functionality Index</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#auxindex">5&#160;&#160;<b>Auxiliary Routines Associated with Library Routine Parameters</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#withdrawn">6&#160;&#160;<b>Routines Withdrawn or Scheduled for Withdrawal</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#references">7&#160;&#160;<b>References</b></a>
</div>
</div>
</div><h2 class="standard"><a class="sec" name="scope" id="scope"/>1&#160;&#160;Scope of the Chapter</h2>
<div class="paramtext">This chapter is concerned with the generation of sequences of independent pseudorandom and quasi-random numbers from various distributions,  and the generation of pseudorandom time series from specified time series models.</div><h2 class="standard"><a class="sec" name="background" id="background"/>2&#160;&#160;Background to the Problems</h2><h3 class="standard"><a class="sec" name="background1" id="background1"/>2.1&#160;&#160;Pseudorandom Numbers</h3>
<div class="paramtext">A sequence of pseudorandom numbers is a sequence of numbers generated in some systematic way such that they are independent and statistically indistinguishable from a truly random sequence. A pseudorandom number generator (PRNG) is a mathematical algorithm that, given an initial state, produces a sequence of pseudorandom numbers. A PRNG has several advantages over a true random number generator in that the generated sequence is repeatable, has known mathematical properties and can be implemented without needing any specialist hardware. Many books on statistics and computer science have good introductions to PRNGs, for example <a class="ref" href="#ref150">Knuth (1981)</a> or <a class="ref" href="#ref784">Banks (1998)</a>.</div><div class="paramtext">PRNGs can be split into base generators, and distributional generators. Within the context of this document a base generator is defined as a PRNG that produces a sequence (or stream) of variates (or values) uniformly distributed over the interval <m:math><m:mfenced separators=""><m:mn>0</m:mn><m:mo>,</m:mo><m:mn>1</m:mn></m:mfenced></m:math>. Depending on the algorithm being considered, this interval may be open, closed or half-closed. A distribution generator is a routine that takes variates generated from a base generator and transforms them into variates from a specified distribution, for example a uniform, Gaussian (Normal) or gamma distribution.</div><div class="paramtext">The period (or cycle length) of a base generator is defined as the maximum number of values that can be generated before the sequence starts to repeat. The initial state of the base generator is often called the seed.</div><div class="paramtext">There are six base generators currently available in the NAG Library, these are; a basic linear congruential generator (LCG) (referred to as the NAG basic generator) (see <a class="ref" href="#ref150">Knuth (1981)</a>), two sets of Wichmann&#8211;Hill generators (see <a class="ref" href="#ref547">Maclaren (1989)</a> and <a class="ref" href="#ref787">Wichmann and Hill (2006)</a>), the Mersenne Twister (see <a class="ref" href="#ref785">Matsumoto and Nishimura (1998)</a>), the ACORN generator (see <a class="ref" href="#ref788">Wikramaratna (1989)</a>) and L'Ecuyer generator (see <a class="ref" href="#ref786">L'Ecuyer and Simard (2002)</a>).</div><h4 class="standard"><a class="sec" name="nagbasicgenerator" id="nagbasicgenerator"/>2.1.1&#160;&#160;NAG Basic Generator</h4>
<div class="paramtext">The NAG basic generator is a linear congruential generator (LCG) and, like all linear congruential generators, has the form:

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
 <m:mtable>
   <m:mtr columnalign="left">
     <m:mtd>
       <m:msub><m:mi>x</m:mi><m:mi>i</m:mi></m:msub>
       <m:mo>=</m:mo>
       <m:msub><m:mi>a</m:mi><m:mn>1</m:mn></m:msub>
       <m:msub><m:mi>x</m:mi><m:mrow><m:mi>i</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msub> 
       <m:mi mathvariant="normal">&#160;mod&#160;</m:mi> 
       <m:msub><m:mi>m</m:mi><m:mn>1</m:mn></m:msub>
       <m:mtext>,</m:mtext>
     </m:mtd>
   </m:mtr>
   <m:mtr columnalign="left">
     <m:mtd>
       <m:msub><m:mi>u</m:mi><m:mi>i</m:mi></m:msub>
       <m:mo>=</m:mo>
       <m:mfrac>
	 <m:msub><m:mi>x</m:mi><m:mi>i</m:mi></m:msub>
	 <m:msub><m:mi>m</m:mi><m:mn>1</m:mn></m:msub>
       </m:mfrac>
       <m:mtext>,</m:mtext>
     </m:mtd>
   </m:mtr>
 </m:mtable>
</m:math></td><td class="formula2"/></tr></table></div>

where the <m:math><m:msub><m:mi>u</m:mi><m:mi mathvariant="italic">i</m:mi></m:msub></m:math>, for <m:math><m:mi mathvariant="italic">i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo></m:math>, form the required sequence.</div><div class="paramtext">The NAG basic generator uses <m:math><m:msub><m:mi>a</m:mi><m:mn>1</m:mn></m:msub><m:mo>=</m:mo><m:msup><m:mn>13</m:mn><m:mn>13</m:mn></m:msup></m:math>&#160;and <m:math><m:msub><m:mi>m</m:mi><m:mn>1</m:mn></m:msub><m:mo>=</m:mo><m:msup><m:mn>2</m:mn><m:mn>59</m:mn></m:msup></m:math>, which gives a period of approximately <m:math><m:msup><m:mn>2</m:mn><m:mn>57</m:mn></m:msup></m:math>.</div><div class="paramtext">This generator has been part of the NAG Library since Mark 6 and as such has been widely used. It suffers from no known problems, other than those due to the lattice structure inherent in all linear congruential generators, and, even though the period is relatively short compared to many of the newer generators, it is sufficiently large for many practical problems.</div><div class="paramtext">The performance of the NAG basic generator has been analysed by the Spectral Test, see Section 3.3.4 of <a class="ref" href="#ref150">Knuth (1981)</a>, yielding the following results in the notation of <a class="ref" href="#ref150">Knuth (1981)</a>.
<div class="tablediv"><table class="frame-none" align="center">
  
  
  
  <tbody>
   <tr>
    <td class="libdoc" valign="top" style="width:3em;"><m:math><m:mi>n</m:mi></m:math></td>
    <td class="libdoc" valign="top" align="center" style="width:7.5em;"><m:math><m:msub><m:mi>&#957;</m:mi><m:mi>n</m:mi></m:msub></m:math></td>
    <td class="libdoc" valign="top" align="center" style="width:10.5em;">Upper bound for <m:math><m:msub><m:mi>&#957;</m:mi><m:mi>n</m:mi></m:msub></m:math></td>
   </tr><tr>
    <td class="libdoc" valign="top" style="width:3em;"><m:math><m:mn>2</m:mn></m:math></td>
    <td class="libdoc" valign="top" align="center" style="width:7.5em;"><m:math><m:mn>3.44</m:mn><m:mo>&#215;</m:mo><m:msup><m:mn>10</m:mn><m:mn>8</m:mn></m:msup></m:math></td>
    <td class="libdoc" valign="top" align="center" style="width:10.5em;"><m:math><m:mn>4.08</m:mn><m:mo>&#215;</m:mo><m:msup><m:mn>10</m:mn><m:mn>8</m:mn></m:msup></m:math></td>
   </tr><tr>
    <td class="libdoc" valign="top" style="width:3em;"><m:math><m:mn>3</m:mn></m:math></td>
    <td class="libdoc" valign="top" align="center" style="width:7.5em;"><m:math><m:mn>4.29</m:mn><m:mo>&#215;</m:mo><m:msup><m:mn>10</m:mn><m:mn>5</m:mn></m:msup></m:math></td>
    <td class="libdoc" valign="top" align="center" style="width:10.5em;"><m:math><m:mn>5.88</m:mn><m:mo>&#215;</m:mo><m:msup><m:mn>10</m:mn><m:mn>5</m:mn></m:msup></m:math></td>
   </tr><tr>
    <td class="libdoc" valign="top" style="width:3em;"><m:math><m:mn>4</m:mn></m:math></td>
    <td class="libdoc" valign="top" align="center" style="width:7.5em;"><m:math><m:mn>1.72</m:mn><m:mo>&#215;</m:mo><m:msup><m:mn>10</m:mn><m:mn>4</m:mn></m:msup></m:math></td>
    <td class="libdoc" valign="top" align="center" style="width:10.5em;"><m:math><m:mn>2.32</m:mn><m:mo>&#215;</m:mo><m:msup><m:mn>10</m:mn><m:mn>4</m:mn></m:msup></m:math></td>
   </tr><tr>
    <td class="libdoc" valign="top" style="width:3em;"><m:math><m:mn>5</m:mn></m:math></td>
    <td class="libdoc" valign="top" align="center" style="width:7.5em;"><m:math><m:mn>1.92</m:mn><m:mo>&#215;</m:mo><m:msup><m:mn>10</m:mn><m:mn>3</m:mn></m:msup></m:math></td>
    <td class="libdoc" valign="top" align="center" style="width:10.5em;"><m:math><m:mn>3.33</m:mn><m:mo>&#215;</m:mo><m:msup><m:mn>10</m:mn><m:mn>3</m:mn></m:msup></m:math></td>
   </tr><tr>
    <td class="libdoc" valign="top" style="width:3em;"><m:math><m:mn>6</m:mn></m:math></td>
    <td class="libdoc" valign="top" align="center" style="width:7.5em;"><m:math><m:mn>593</m:mn></m:math></td>
    <td class="libdoc" valign="top" align="center" style="width:10.5em;"><m:math><m:mn>939</m:mn></m:math></td>
   </tr><tr>
    <td class="libdoc" valign="top" style="width:3em;"><m:math><m:mn>7</m:mn></m:math></td>
    <td class="libdoc" valign="top" align="center" style="width:7.5em;"><m:math><m:mn>198</m:mn></m:math></td>
    <td class="libdoc" valign="top" align="center" style="width:10.5em;"><m:math><m:mn>380</m:mn></m:math></td>
   </tr><tr>
    <td class="libdoc" valign="top" style="width:3em;"><m:math><m:mn>8</m:mn></m:math></td>
    <td class="libdoc" valign="top" align="center" style="width:7.5em;"><m:math><m:mn>108</m:mn></m:math></td>
    <td class="libdoc" valign="top" align="center" style="width:10.5em;"><m:math><m:mn>197</m:mn></m:math></td>
   </tr><tr>
    <td class="libdoc" valign="top" style="width:3em;"><m:math><m:mn>9</m:mn></m:math></td>
    <td class="libdoc" valign="top" align="center" style="width:7.5em;"><m:math><m:mn>67</m:mn></m:math></td>
    <td class="libdoc" valign="top" align="center" style="width:10.5em;"><m:math><m:mn>120</m:mn></m:math></td>
   </tr>
  </tbody>
 </table></div>
</div><div class="paramtext">The right-hand column gives an upper bound for the values of <m:math><m:msub><m:mi>&#957;</m:mi><m:mi>n</m:mi></m:msub></m:math>&#160;attainable by any multiplicative congruential generator working modulo <m:math><m:msup><m:mn>2</m:mn><m:mn>59</m:mn></m:msup></m:math>.</div><div class="paramtext">An informal interpretation of the quantities <m:math><m:msub><m:mi>&#957;</m:mi><m:mi>n</m:mi></m:msub></m:math>&#160;is that consecutive <m:math><m:mi>n</m:mi></m:math>-tuples are statistically uncorrelated to an accuracy of <m:math><m:mn>1</m:mn><m:mo>/</m:mo><m:msub><m:mi>&#957;</m:mi><m:mi>n</m:mi></m:msub></m:math>.  This is a theoretical result; in practice the degree of randomness is usually much greater than the above figures might support.  More details are given in <a class="ref" href="#ref150">Knuth (1981)</a>, and in the references cited therein.</div><div class="paramtext">Note that the achievable accuracy drops rapidly as the number of dimensions increases.  This is a property of all multiplicative congruential generators and is the reason why very long periods are needed even for samples of only a few random numbers.</div><h4 class="standard"><a class="sec" name="IGenerator" id="IGenerator"/>2.1.2&#160;&#160;Wichmann&#8211;Hill I Generator</h4>
<div class="paramtext">This series of Wichmann&#8211;Hill base generators (see <a class="ref" href="#ref547">Maclaren (1989)</a>) use a combination of four linear congruential generators and has the form:

<div class="formula-eqn"><a name="eqn1" id="eqn1"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
  <m:mtable>
    <m:mtr columnalign="left">
      <m:mtd>
	<m:msub><m:mi>w</m:mi><m:mi>i</m:mi></m:msub><m:mo>=</m:mo><m:msub><m:mi>a</m:mi><m:mn>1</m:mn></m:msub><m:msub><m:mi>w</m:mi><m:mrow><m:mi>i</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msub> <m:mi mathvariant="normal">&#160;mod&#160;</m:mi> <m:msub><m:mi>m</m:mi><m:mn>1</m:mn></m:msub>
      </m:mtd>
    </m:mtr>
    <m:mtr columnalign="left">
      <m:mtd>
      <m:msub><m:mi>x</m:mi><m:mi>i</m:mi></m:msub><m:mo>=</m:mo><m:msub><m:mi>a</m:mi><m:mn>2</m:mn></m:msub><m:msub><m:mi>x</m:mi><m:mrow><m:mi>i</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msub> <m:mi mathvariant="normal">&#160;mod&#160;</m:mi> <m:msub><m:mi>m</m:mi><m:mn>2</m:mn></m:msub></m:mtd>
    </m:mtr>
    <m:mtr columnalign="left">
      <m:mtd>
	<m:msub><m:mi>y</m:mi><m:mi>i</m:mi></m:msub><m:mo>=</m:mo><m:msub><m:mi>a</m:mi><m:mn>3</m:mn></m:msub><m:msub><m:mi>y</m:mi><m:mrow><m:mi>i</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msub> <m:mi mathvariant="normal">&#160;mod&#160;</m:mi> <m:msub><m:mi>m</m:mi><m:mn>3</m:mn></m:msub>
      </m:mtd>
    </m:mtr>
    <m:mtr columnalign="left">
      <m:mtd>
	<m:msub><m:mi>z</m:mi><m:mi>i</m:mi></m:msub><m:mo>=</m:mo><m:msub><m:mi>a</m:mi><m:mn>4</m:mn></m:msub><m:msub><m:mi>z</m:mi><m:mrow><m:mi>i</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msub> <m:mi mathvariant="normal">&#160;mod&#160;</m:mi> <m:msub><m:mi>m</m:mi><m:mn>4</m:mn></m:msub>
      </m:mtd>
    </m:mtr>
    <m:mtr columnalign="left">
      <m:mtd>
	<m:msub><m:mi>u</m:mi><m:mi>i</m:mi></m:msub>
	<m:mo>=</m:mo>
	<m:mfenced separators="">
	  <m:mfrac>	
	    <m:msub><m:mi>w</m:mi><m:mi>i</m:mi></m:msub>
	    <m:msub><m:mi>m</m:mi><m:mn>1</m:mn></m:msub>
	  </m:mfrac>
	  <m:mo>+</m:mo>
	  <m:mfrac>
	    <m:msub><m:mi>x</m:mi><m:mi>i</m:mi></m:msub> 
	    <m:msub><m:mi>m</m:mi><m:mn>2</m:mn></m:msub>
	  </m:mfrac>
	  <m:mo>+</m:mo>
	  <m:mfrac>
	    <m:msub><m:mi>y</m:mi><m:mi>i</m:mi></m:msub>
	    <m:msub><m:mi>m</m:mi><m:mn>3</m:mn></m:msub>
	  </m:mfrac>
	  <m:mo>+</m:mo>
	  <m:mfrac>
	    <m:msub><m:mi>z</m:mi><m:mi>i</m:mi></m:msub>
	    <m:msub><m:mi>m</m:mi><m:mn>4</m:mn></m:msub>
	  </m:mfrac>
	</m:mfenced>
	<m:mi mathvariant="normal">&#160;mod&#160;</m:mi>
	<m:mn>1</m:mn>
	<m:mtext>,</m:mtext>
      </m:mtd>
    </m:mtr>
  </m:mtable>
</m:math></td><td class="formula-eqn2">
      (1)
     </td></tr></table></div>

where the <m:math><m:msub><m:mi>u</m:mi><m:mi mathvariant="italic">i</m:mi></m:msub></m:math>, for <m:math><m:mi mathvariant="italic">i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo></m:math>, form the required sequence. The NAG Library implementation includes 273 sets of parameters, <m:math><m:msub><m:mi>a</m:mi><m:mi mathvariant="italic">j</m:mi></m:msub><m:mo>,</m:mo><m:msub><m:mi>m</m:mi><m:mi mathvariant="italic">j</m:mi></m:msub></m:math>, for <m:math><m:mi mathvariant="italic">j</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mn>3</m:mn><m:mo>,</m:mo><m:mn>4</m:mn></m:math>, to choose from.</div><div class="paramtext">The constants <m:math><m:msub><m:mi>a</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;are in the range 112 to 127 and the constants <m:math><m:msub><m:mi>m</m:mi><m:mi>j</m:mi></m:msub></m:math>&#160;are prime numbers in the range <m:math><m:mn>16718909</m:mn></m:math>&#160;to <m:math><m:mn>16776971</m:mn></m:math>, which are close to <m:math><m:msup><m:mn>2</m:mn><m:mn>24</m:mn></m:msup><m:mo>=</m:mo><m:mn>16777216</m:mn></m:math>. These constants have been chosen so that each of the resulting 273 generators are essentially independent, all calculations can be carried out in 32-bit integer arithmetic and the generators give good results with the spectral test, see <a class="ref" href="#ref150">Knuth (1981)</a> and <a class="ref" href="#ref547">Maclaren (1989)</a>. The period of each of these generators would be at least <m:math><m:msup><m:mn>2</m:mn><m:mn>92</m:mn></m:msup></m:math>&#160;if it were not for common factors between <m:math><m:mfenced separators=""><m:msub><m:mi>m</m:mi><m:mn>1</m:mn></m:msub><m:mo>-</m:mo><m:mn>1</m:mn></m:mfenced></m:math>, <m:math><m:mfenced separators=""><m:msub><m:mi>m</m:mi><m:mn>2</m:mn></m:msub><m:mo>-</m:mo><m:mn>1</m:mn></m:mfenced></m:math>, <m:math><m:mfenced separators=""><m:msub><m:mi>m</m:mi><m:mn>3</m:mn></m:msub><m:mo>-</m:mo><m:mn>1</m:mn></m:mfenced></m:math>&#160;and <m:math><m:mfenced separators=""><m:msub><m:mi>m</m:mi><m:mn>4</m:mn></m:msub><m:mo>-</m:mo><m:mn>1</m:mn></m:mfenced></m:math>. However, each generator should still have a period of at least <m:math><m:msup><m:mn>2</m:mn><m:mn>80</m:mn></m:msup></m:math>. Further discussion of the properties of these generators is given in <a class="ref" href="#ref547">Maclaren (1989)</a>.</div><h4 class="standard"><a class="sec" name="IIGenerator" id="IIGenerator"/>2.1.3&#160;&#160;Wichmann&#8211;Hill II Generator</h4>
<div class="paramtext">This Wichmann&#8211;Hill base generator (see <a class="ref" href="#ref787">Wichmann and Hill (2006)</a>) is of the same form as that described in <a class="sec" href="#IGenerator">Section 2.1.2</a>, i.e., a combination of four linear congruential generators. In this case <m:math><m:msub><m:mi>a</m:mi><m:mn>1</m:mn></m:msub><m:mo>=</m:mo><m:mn>11600</m:mn></m:math>, <m:math><m:msub><m:mi>m</m:mi><m:mn>1</m:mn></m:msub><m:mo>=</m:mo><m:mn>2147483579</m:mn></m:math>, <m:math><m:msub><m:mi>a</m:mi><m:mn>2</m:mn></m:msub><m:mo>=</m:mo><m:mn>47003</m:mn></m:math>, <m:math><m:msub><m:mi>m</m:mi><m:mn>2</m:mn></m:msub><m:mo>=</m:mo><m:mn>2147483543</m:mn></m:math>, <m:math><m:msub><m:mi>a</m:mi><m:mn>3</m:mn></m:msub><m:mo>=</m:mo><m:mn>23000</m:mn></m:math>, <m:math><m:msub><m:mi>m</m:mi><m:mn>3</m:mn></m:msub><m:mo>=</m:mo><m:mn>2147483423</m:mn></m:math>, <m:math><m:msub><m:mi>a</m:mi><m:mn>4</m:mn></m:msub><m:mo>=</m:mo><m:mn>33000</m:mn></m:math>, <m:math><m:msub><m:mi>m</m:mi><m:mn>4</m:mn></m:msub><m:mo>=</m:mo><m:mn>2147483123</m:mn></m:math>.</div><div class="paramtext">Unlike in the original Wichmann&#8211;Hill generator, these values are too large to carry out the calculations detailed in <a class="eqn" href="#eqn1">(1)</a> using 32-bit integer arithmetic, however, if 

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
 <m:msub><m:mi>w</m:mi><m:mi>i</m:mi></m:msub>
 <m:mo>=</m:mo>
 <m:mn>11600 </m:mn>
 <m:msub><m:mi>w</m:mi><m:mrow><m:mi>i</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msub> 
 <m:mi mathvariant="normal">&#160;mod&#160;</m:mi> 
 <m:mn>2147483579</m:mn>
</m:math></td><td class="formula2"/></tr></table></div>

then setting 

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
 <m:msub><m:mi>W</m:mi><m:mi>i</m:mi></m:msub>
 <m:mo>=</m:mo> 
 <m:mn>11600</m:mn> 
 <m:mfenced separators="">
  <m:msub><m:mi>w</m:mi><m:mrow><m:mi>i</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msub> 
  <m:mi mathvariant="normal">&#160;mod&#160;</m:mi> 
  <m:mn>185127</m:mn>
  </m:mfenced>
  <m:mo>-</m:mo> 
  <m:mn>10379</m:mn> 
  <m:mfenced separators="">
    <m:msub><m:mi>w</m:mi><m:mrow><m:mi>i</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msub> 
    <m:mo>/</m:mo> 
    <m:mn>185127</m:mn>
  </m:mfenced> 
</m:math></td><td class="formula2"/></tr></table></div>

gives

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
  <m:msub><m:mi>w</m:mi><m:mi>i</m:mi></m:msub>
  <m:mo>=</m:mo>
  <m:mfenced open="{" close="" separators="">
    <m:mtable>
      <m:mtr columnalign="left">
	<m:mtd>
	  <m:msub><m:mi>W</m:mi><m:mi>i</m:mi></m:msub> 
	</m:mtd>
	<m:mtd>
	  <m:mtext>&#8203; if &#8203;</m:mtext>
	  <m:msub><m:mi>W</m:mi><m:mi>i</m:mi></m:msub><m:mo>&#8805;</m:mo><m:mn>0</m:mn>
	</m:mtd>
      </m:mtr>
      <m:mtr columnalign="left">
	<m:mtd>
	  <m:mn>2147483579</m:mn><m:mo>+</m:mo><m:msub><m:mi>W</m:mi><m:mi>i</m:mi></m:msub>
	</m:mtd>
	<m:mtd>
	  <m:mtext>&#8203; otherwise</m:mtext>
	</m:mtd>
      </m:mtr>
    </m:mtable>
  </m:mfenced>
</m:math></td><td class="formula2"/></tr></table></div>

and <m:math><m:msub><m:mi>W</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;can be calculated in 32-bit integer arithmetic. Similar expressions exist for <m:math><m:msub><m:mi>x</m:mi><m:mi>i</m:mi></m:msub></m:math>, <m:math><m:msub><m:mi>y</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;and <m:math><m:msub><m:mi>z</m:mi><m:mi>i</m:mi></m:msub></m:math>. The period of this generator is approximately <m:math><m:msup><m:mn>2</m:mn><m:mn>121</m:mn></m:msup></m:math>.</div><div class="paramtext">Further details of implementing this algorithm and its properties are given in <a class="ref" href="#ref787">Wichmann and Hill (2006)</a>. This paper also gives some useful guidelines on testing PRNGs.</div><h4 class="standard"><a class="sec" name="MerseeneTwister" id="MerseeneTwister"/>2.1.4&#160;&#160;Mersenne Twister Generator</h4>
<div class="paramtext">The Mersenne Twister (see <a class="ref" href="#ref785">Matsumoto and Nishimura (1998)</a>) is a twisted generalized feedback shift register generator. The algorithm underlying the Mersenne Twister is as follows:
<table class="standard-100"><tr>
<td style="width:2.1em;" valign="baseline">(i)</td>
<td valign="top">Set some arbitrary initial values <m:math><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub><m:mo>,</m:mo><m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:msub><m:mi>x</m:mi><m:mi>r</m:mi></m:msub></m:math>, each consisting of <m:math><m:mi>w</m:mi></m:math>&#160;bits.</td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(ii)</td>
<td valign="top">Letting

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
   <m:mi>A</m:mi><m:mo>=</m:mo>
   <m:mfenced><m:mtable>
     <m:mtr>
       <m:mtd><m:mn>0</m:mn></m:mtd> 
       <m:mtd><m:msub><m:mi>I</m:mi><m:mrow><m:mi>w</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msub></m:mtd>
     </m:mtr>
     <m:mtr>
       <m:mtd><m:msub><m:mi>a</m:mi><m:mi>w</m:mi></m:msub></m:mtd>
       <m:mtd><m:msub><m:mi>a</m:mi><m:mrow><m:mi>w</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msub><m:mo>&#8943;</m:mo><m:msub><m:mi>a</m:mi><m:mn>1</m:mn></m:msub></m:mtd>
     </m:mtr>
   </m:mtable></m:mfenced>
   <m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

where <m:math><m:msub><m:mi>I</m:mi><m:mrow><m:mi>w</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msub></m:math>&#160;is the <m:math><m:mfenced separators=""><m:mi>w</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mfenced><m:mo>&#215;</m:mo><m:mfenced separators=""><m:mi>w</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mfenced></m:math>&#160;identity matrix and each of the <m:math><m:msub><m:mi>a</m:mi><m:mi>i</m:mi></m:msub><m:mo>,</m:mo><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn></m:math>&#160;to <m:math><m:mi>w</m:mi></m:math>&#160;take a value of either <m:math><m:mn>0</m:mn></m:math>&#160;or <m:math><m:mn>1</m:mn></m:math>&#160;(i.e., they can be represented as bits). Define 

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
  <m:msub>
    <m:mi>x</m:mi>
    <m:mrow><m:mi>i</m:mi><m:mo>+</m:mo><m:mi>r</m:mi></m:mrow>
  </m:msub>
  <m:mo>=</m:mo> 
  <m:mfenced separators="">
    <m:msub>
      <m:mi>x</m:mi>
      <m:mrow><m:mi>i</m:mi><m:mo>+</m:mo><m:mi>s</m:mi></m:mrow>
    </m:msub>
    <m:mo>&#8853;</m:mo> 
    <m:mfenced separators="">
      <m:msubsup>
	<m:mi>x</m:mi>
	<m:mi>i</m:mi>
	<m:mfenced separators="">
	    <m:mi>&#969;</m:mi>
	    <m:mo>:</m:mo>
	    <m:mfenced separators=""><m:mi>l</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mfenced>
	  </m:mfenced>
      </m:msubsup>
      <m:mo>|</m:mo>
      <m:msubsup>
	<m:mi>x</m:mi>
	<m:mrow><m:mi>i</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mrow>
	<m:mfenced separators=""><m:mn>l</m:mn><m:mo>:</m:mo><m:mn>1</m:mn></m:mfenced>
      </m:msubsup>
    </m:mfenced> 
    <m:mi>A</m:mi>
  </m:mfenced>
  <m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

where <m:math>
 <m:msubsup>
   <m:mi>x</m:mi>
   <m:mi>i</m:mi>
   <m:mfenced separators="">
       <m:mi>&#969;</m:mi>
       <m:mo>:</m:mo>
       <m:mfenced separators=""><m:mi>l</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mfenced>
     </m:mfenced>
 </m:msubsup>
 <m:mo>|</m:mo> 
 <m:msubsup>
   <m:mi>x</m:mi>
   <m:mrow><m:mi>i</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mrow>
   <m:mfenced separators=""><m:mn>l</m:mn><m:mo>:</m:mo><m:mn>1</m:mn></m:mfenced>
 </m:msubsup>
</m:math>&#160;indicates the concatenation of the most significant (upper) <m:math><m:mi>w</m:mi><m:mo>-</m:mo><m:mi>l</m:mi></m:math>&#160;bits of <m:math><m:msub><m:mi>x</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;and the least significant (lower) <m:math><m:mi>l</m:mi></m:math>&#160;bits of <m:math><m:msub><m:mi>x</m:mi><m:mrow><m:mi>i</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mrow></m:msub></m:math>.</td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(iii)</td>
<td valign="top">Perform the following operations sequentially:

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
  <m:mtable>
    <m:mtr columnalign="left">
      <m:mtd>
	<m:mi>z</m:mi>
      </m:mtd>
      <m:mtd>
	<m:mo>=</m:mo>
      </m:mtd>
      <m:mtd>
	<m:msub><m:mi>x</m:mi><m:mrow><m:mi>i</m:mi><m:mo>+</m:mo><m:mi>r</m:mi></m:mrow></m:msub> 
	<m:mo>&#8853;</m:mo> 
	<m:mfenced separators="">
	  <m:msub><m:mi>x</m:mi><m:mrow><m:mi>i</m:mi><m:mo>+</m:mo><m:mi>r</m:mi></m:mrow></m:msub>
	  <m:mo>&#8811;</m:mo> 
	  <m:msub><m:mi>t</m:mi><m:mn>1</m:mn></m:msub>
	</m:mfenced>
      </m:mtd>
    </m:mtr>
    <m:mtr columnalign="left">
      <m:mtd>
	<m:mi>z</m:mi>
      </m:mtd>
      <m:mtd>
	<m:mo>=</m:mo>
      </m:mtd>
      <m:mtd>
	<m:mi>z</m:mi> 
	<m:mo>&#8853;</m:mo> 
	<m:mfenced separators="">
	  <m:mfenced separators="">
	    <m:mi>z</m:mi>
	    <m:mo>&#8810;</m:mo> 
	    <m:msub><m:mi>t</m:mi><m:mn>2</m:mn></m:msub>
	  </m:mfenced> 
	  <m:mtext>&#8203; AND &#8203;</m:mtext> 
	  <m:msub><m:mi>m</m:mi><m:mn>1</m:mn></m:msub>
	</m:mfenced>
      </m:mtd>
    </m:mtr>
    <m:mtr columnalign="left">
      <m:mtd>
	<m:mi>z</m:mi>
      </m:mtd>
      <m:mtd>
	<m:mo>=</m:mo>
      </m:mtd>
      <m:mtd>
	<m:mi>z</m:mi> 
	<m:mo>&#8853;</m:mo> 
	<m:mfenced separators="">
	  <m:mfenced separators="">
	    <m:mi>z</m:mi>
	    <m:mo>&#8810;</m:mo> 
	    <m:msub><m:mi>t</m:mi><m:mn>3</m:mn></m:msub>
	  </m:mfenced> 
	  <m:mtext>&#8203; AND &#8203;</m:mtext> 
	  <m:msub><m:mi>m</m:mi><m:mn>2</m:mn></m:msub>
	</m:mfenced>
      </m:mtd>
    </m:mtr>
    <m:mtr columnalign="left">
      <m:mtd>
	<m:mi>z</m:mi>
      </m:mtd>
      <m:mtd>
	<m:mo>=</m:mo>
      </m:mtd>
      <m:mtd>
	<m:mi>z</m:mi> 
	<m:mo>&#8853;</m:mo> 
	<m:mfenced separators="">
	  <m:mi>z</m:mi>
	  <m:mo>&#8811;</m:mo> 
	  <m:msub><m:mi>t</m:mi><m:mn>4</m:mn></m:msub>
	</m:mfenced>
      </m:mtd>
    </m:mtr>
    <m:mtr columnalign="left">
      <m:mtd>
	<m:msub>
	  <m:mi>u</m:mi>
	  <m:mrow><m:mi>i</m:mi><m:mo>+</m:mo><m:mi>r</m:mi></m:mrow>
	</m:msub>
      </m:mtd>
      <m:mtd>
	<m:mo>=</m:mo> 
      </m:mtd>
      <m:mtd>
	<m:mi>z</m:mi><m:mo>/</m:mo>
	<m:mfenced separators="">
	  <m:msup><m:mn>2</m:mn><m:mi>w</m:mi></m:msup>
	  <m:mo>-</m:mo>
	  <m:mn>1</m:mn>
	</m:mfenced>
	<m:mtext>,</m:mtext>
      </m:mtd>
    </m:mtr>
  </m:mtable>
</m:math></td><td class="formula2"/></tr></table></div>

where <m:math><m:msub><m:mi>t</m:mi><m:mn>1</m:mn></m:msub></m:math>, <m:math><m:msub><m:mi>t</m:mi><m:mn>2</m:mn></m:msub></m:math>, <m:math><m:msub><m:mi>t</m:mi><m:mn>3</m:mn></m:msub></m:math>&#160;and <m:math><m:msub><m:mi>t</m:mi><m:mn>4</m:mn></m:msub></m:math>&#160;are integers and <m:math><m:msub><m:mi>m</m:mi><m:mn>1</m:mn></m:msub></m:math>&#160;and <m:math><m:msub><m:mi>m</m:mi><m:mn>2</m:mn></m:msub></m:math>&#160;are bit-masks and &#8216;<m:math><m:mo>&#8811;</m:mo><m:mi>t</m:mi></m:math>&#8217; and &#8216;<m:math><m:mo>&#8810;</m:mo><m:mi>t</m:mi></m:math>&#8217; represent a <m:math><m:mi>t</m:mi></m:math>&#160;bit shift right and left respectively, <m:math><m:mo>&#8853;</m:mo></m:math>&#160;is bit-wise exclusively or (xor) operation and &#8216;AND&#8217; is a bit-wise and operation.</td>
</tr></table>
</div><div class="paramtext">The <m:math><m:msub><m:mi>u</m:mi><m:mrow><m:mi mathvariant="italic">i</m:mi><m:mo>+</m:mo><m:mi>r</m:mi></m:mrow></m:msub></m:math>, for <m:math><m:mi mathvariant="italic">i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo></m:math>, form the required sequence. The supplied implementation of the Mersenne Twister uses the following values for the algorithmic constants:

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
  <m:mtable>
    <m:mtr columnalign="left">
      <m:mtd><m:mi>w</m:mi></m:mtd>
      <m:mtd><m:mo>=</m:mo></m:mtd>
      <m:mtd><m:mn>32</m:mn></m:mtd>
    </m:mtr>
    <m:mtr columnalign="left">
      <m:mtd><m:mi>a</m:mi></m:mtd>
      <m:mtd><m:mo>=</m:mo></m:mtd>
      <m:mtd>
	<m:mtext>0x9908b0</m:mtext>
	<m:mi mathvariant="normal">df</m:mi>
      </m:mtd>
    </m:mtr>
    <m:mtr columnalign="left">
      <m:mtd><m:mi>l</m:mi></m:mtd>
      <m:mtd><m:mo>=</m:mo></m:mtd>
      <m:mtd><m:mn>31</m:mn></m:mtd>
    </m:mtr>
    <m:mtr columnalign="left">
      <m:mtd><m:mi>r</m:mi></m:mtd>
      <m:mtd><m:mo>=</m:mo></m:mtd>
      <m:mtd><m:mn>624</m:mn></m:mtd>
    </m:mtr>
    <m:mtr columnalign="left">
      <m:mtd><m:mi>s</m:mi></m:mtd>
      <m:mtd><m:mo>=</m:mo></m:mtd>
      <m:mtd><m:mn>397</m:mn></m:mtd>
    </m:mtr>
    <m:mtr columnalign="left">
      <m:mtd><m:msub><m:mi>t</m:mi><m:mn>1</m:mn></m:msub></m:mtd>
      <m:mtd><m:mo>=</m:mo></m:mtd>
      <m:mtd><m:mn>11</m:mn></m:mtd>
    </m:mtr>
    <m:mtr columnalign="left">
      <m:mtd><m:msub><m:mi>t</m:mi><m:mn>2</m:mn></m:msub></m:mtd>
      <m:mtd><m:mo>=</m:mo></m:mtd>
      <m:mtd><m:mn>7</m:mn></m:mtd>
    </m:mtr>
    <m:mtr columnalign="left">
      <m:mtd><m:msub><m:mi>t</m:mi><m:mn>3</m:mn></m:msub></m:mtd>
      <m:mtd><m:mo>=</m:mo></m:mtd>
      <m:mtd><m:mn>15</m:mn></m:mtd>
    </m:mtr>
    <m:mtr columnalign="left">
      <m:mtd><m:msub><m:mi>t</m:mi><m:mn>4</m:mn></m:msub></m:mtd>
      <m:mtd><m:mo>=</m:mo></m:mtd>
      <m:mtd><m:mn>18</m:mn></m:mtd>
    </m:mtr>
    <m:mtr columnalign="left">
      <m:mtd><m:msub><m:mi>m</m:mi><m:mn>1</m:mn></m:msub></m:mtd>
      <m:mtd><m:mo>=</m:mo></m:mtd>
      <m:mtd>
	<m:mtext>0x9d2c5680</m:mtext>
      </m:mtd>
    </m:mtr>
    <m:mtr columnalign="left">
      <m:mtd><m:msub><m:mi>m</m:mi><m:mn>2</m:mn></m:msub></m:mtd>
<m:mtd><m:mo>=</m:mo></m:mtd>
	<m:mtd><m:mtext>0xefc60000</m:mtext>
      </m:mtd>
    </m:mtr>
  </m:mtable>
</m:math></td><td class="formula2"/></tr></table></div>

where the notation 0x<span class="italic">DD</span> <m:math><m:mo>&#8230;</m:mo></m:math>&#160;indicates the bit pattern of the integer whose hexadecimal representation is <span class="italic">DD</span> <m:math><m:mo>&#8230;</m:mo></m:math>.</div><div class="paramtext">This algorithm has a period length of approximately <m:math><m:msup><m:mn>2</m:mn><m:mn>19,937</m:mn></m:msup><m:mo>-</m:mo><m:mn>1</m:mn></m:math>&#160;and has been shown to be uniformly distributed in 623 dimensions (see <a class="ref" href="#ref785">Matsumoto and Nishimura (1998)</a>).</div><h4 class="standard"><a class="sec" name="ACORN" id="ACORN"/>2.1.5&#160;&#160;ACORN Generator</h4>
<div class="paramtext">The ACORN generator is a special case of a multiple recursive generator (see <a class="ref" href="#ref788">Wikramaratna (1989)</a> and <a class="ref" href="#ref790">Wikramaratna (2007)</a>). The algorithm underlying ACORN is as follows:
<table class="standard-100"><tr>
<td style="width:2.1em;" valign="baseline"><a name="item1a" id="item1a"/>(i)</td>
<td valign="top">Choose an integer value <m:math><m:mi>k</m:mi><m:mo>&#8805;</m:mo><m:mn>1</m:mn></m:math>.</td>
</tr><tr>
<td style="width:2.1em;" valign="baseline"><a name="item2a" id="item2a"/>(ii)</td>
<td valign="top">Choose an integer value <m:math><m:mi>M</m:mi></m:math>, and an integer seed <m:math><m:msubsup><m:mi>Y</m:mi><m:mn>0</m:mn><m:mfenced separators=""><m:mn>0</m:mn></m:mfenced></m:msubsup></m:math>, such that <m:math><m:mn>0</m:mn><m:mo>&lt;</m:mo><m:msubsup><m:mi>Y</m:mi><m:mn>0</m:mn><m:mfenced separators=""><m:mn>0</m:mn></m:mfenced></m:msubsup><m:mo>&lt;</m:mo><m:mi>M</m:mi></m:math>&#160;and <m:math><m:msubsup><m:mi>Y</m:mi><m:mn>0</m:mn><m:mfenced separators=""><m:mn>0</m:mn></m:mfenced></m:msubsup></m:math>&#160;and <m:math><m:mi>M</m:mi></m:math>&#160;are relatively prime.</td>
</tr><tr>
<td style="width:2.1em;" valign="baseline"><a name="item3a" id="item3a"/>(iii)</td>
<td valign="top">Choose an arbitrary set of <m:math><m:mi>k</m:mi></m:math>&#160;initial integer values, <m:math><m:msubsup><m:mi>Y</m:mi><m:mn>0</m:mn><m:mfenced separators=""><m:mn>1</m:mn></m:mfenced></m:msubsup><m:mo>,</m:mo><m:msubsup><m:mi>Y</m:mi><m:mn>0</m:mn><m:mfenced separators=""><m:mn>2</m:mn></m:mfenced></m:msubsup><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:msubsup><m:mi>Y</m:mi><m:mn>0</m:mn><m:mfenced separators=""><m:mi>k</m:mi></m:mfenced></m:msubsup></m:math>, such that <m:math><m:mn>0</m:mn><m:mo>&#8804;</m:mo> <m:msubsup><m:mi>Y</m:mi><m:mn>0</m:mn><m:mfenced separators=""><m:mi>m</m:mi></m:mfenced></m:msubsup><m:mo>&lt;</m:mo><m:mi>M</m:mi></m:math>, for all <m:math><m:mi>m</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mi>k</m:mi></m:math>.</td>
</tr><tr>
<td style="width:2.1em;" valign="baseline"><a name="item4a" id="item4a"/>(iv)</td>
<td valign="top">Perform the following sequentially:

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
  <m:mtable>
    <m:mtr columnalign="left">
      <m:mtd>
	<m:msubsup>
	  <m:mi>Y</m:mi>
	  <m:mi>i</m:mi>
	  <m:mfenced separators=""><m:mi>m</m:mi></m:mfenced>
	</m:msubsup>
	<m:mo>=</m:mo>
	<m:mfenced separators="">
	  <m:msubsup>
	    <m:mi>Y</m:mi>
	    <m:mi>i</m:mi>
	    <m:mfenced separators=""><m:mi>m</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mfenced>
	  </m:msubsup>
	  <m:mo>+</m:mo>
	  <m:msubsup>
	    <m:mi>Y</m:mi>
	    <m:mrow><m:mi>i</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow>
	    <m:mfenced separators=""><m:mi>m</m:mi></m:mfenced>
	  </m:msubsup>
	</m:mfenced> 
	<m:mi mathvariant="normal">&#160;mod&#160;</m:mi>
	<m:mi>M</m:mi>
      </m:mtd>
    </m:mtr>
  </m:mtable>
</m:math></td><td class="formula2"/></tr></table></div>

for <m:math><m:mi>m</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mi>k</m:mi></m:math>.</td>
</tr><tr>
<td style="width:2.1em;" valign="baseline"><a name="item5a" id="item5a"/>(v)</td>
<td valign="top">Set <m:math><m:msub><m:mi>u</m:mi><m:mi>i</m:mi></m:msub><m:mo>=</m:mo><m:msubsup><m:mi>Y</m:mi><m:mi>i</m:mi><m:mfenced separators=""><m:mi>k</m:mi></m:mfenced></m:msubsup><m:mo>/</m:mo><m:mi>M</m:mi></m:math>.</td>
</tr></table>
</div><div class="paramtext">The <m:math><m:msub><m:mi>u</m:mi><m:mi mathvariant="italic">i</m:mi></m:msub></m:math>, for <m:math><m:mi mathvariant="italic">i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo></m:math>, then form a pseudorandom sequence, with <m:math><m:msub><m:mi>u</m:mi><m:mi>i</m:mi></m:msub> <m:mo>&#8712;</m:mo><m:mfenced open="[" close=")" separators=""><m:mn>0</m:mn><m:mo>,</m:mo><m:mn>1</m:mn></m:mfenced></m:math>, for all <m:math><m:mi>i</m:mi></m:math>.</div><div class="paramtext">Although you can choose any value for <m:math><m:mi>k</m:mi></m:math>, <m:math><m:mi>M</m:mi></m:math>, <m:math><m:msubsup><m:mi>Y</m:mi><m:mn>0</m:mn><m:mfenced separators=""><m:mn>0</m:mn></m:mfenced></m:msubsup></m:math>&#160;and the <m:math><m:msubsup><m:mi>Y</m:mi><m:mn>0</m:mn><m:mfenced separators=""><m:mi>m</m:mi></m:mfenced></m:msubsup></m:math>, within the constraints mentioned in <a class="item" href="#item1a">(i)</a> to <a class="item" href="#item3a">(iii)</a> above, it is recommended that <m:math><m:mi>k</m:mi><m:mo>&#8805;</m:mo><m:mn>10</m:mn></m:math>, <m:math><m:mi>M</m:mi></m:math>&#160;is chosen to be a large power of two with <m:math><m:mi>M</m:mi><m:mo>&#8805;</m:mo><m:msup><m:mn>2</m:mn><m:mn>60</m:mn></m:msup></m:math>&#160;and <m:math><m:msubsup><m:mi>Y</m:mi><m:mn>0</m:mn><m:mfenced separators=""><m:mn>0</m:mn></m:mfenced></m:msubsup></m:math>&#160;is chosen to be odd.</div><div class="paramtext">The period of the ACORN generator, with the modulus <m:math><m:mi>M</m:mi></m:math>&#160;equal to a power of two, and an odd value for <m:math><m:msubsup><m:mi>Y</m:mi><m:mn>0</m:mn><m:mfenced separators=""><m:mn>0</m:mn></m:mfenced></m:msubsup></m:math>&#160;has been shown to be an integer multiple of <m:math><m:mi>M</m:mi></m:math>&#160;(see <a class="ref" href="#ref789">Wikramaratna (1992)</a>). Therefore, increasing <m:math><m:mi>M</m:mi></m:math>&#160;will give a series with a longer period.</div><h4 class="standard"><a class="sec" name="LECUYER" id="LECUYER"/>2.1.6&#160;&#160;L'Ecuyer MRG32k3a Combined Recursive Generator </h4>
<div class="paramtext">The base generator L'Ecuyer MRG32k3a (see <a class="ref" href="#ref786">L'Ecuyer and Simard (2002)</a>) combines two multiple recursive generators:

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
 <m:mtable>
  <m:mtr columnalign="left">
   <m:mtd>
    <m:msub><m:mi>x</m:mi><m:mi>i</m:mi></m:msub>
   </m:mtd>
   <m:mtd><m:mo>=</m:mo></m:mtd>
   <m:mtd>
    <m:msub><m:mi>a</m:mi><m:mrow><m:mn>1</m:mn><m:mn>1</m:mn></m:mrow></m:msub>
    <m:msub><m:mi>x</m:mi><m:mrow><m:mi>i</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msub>
    <m:mo>+</m:mo>
    <m:msub><m:mi>a</m:mi><m:mrow><m:mn>1</m:mn><m:mn>2</m:mn></m:mrow></m:msub>
    <m:msub><m:mi>x</m:mi><m:mrow><m:mi>i</m:mi><m:mo>-</m:mo><m:mn>2</m:mn></m:mrow></m:msub>
    <m:mo>+</m:mo>
    <m:msub><m:mi>a</m:mi><m:mrow><m:mn>1</m:mn><m:mn>3</m:mn></m:mrow></m:msub>
    <m:msub><m:mi>x</m:mi><m:mrow><m:mi>i</m:mi><m:mo>-</m:mo><m:mn>3</m:mn></m:mrow></m:msub>
    <m:mrow><m:mi>mod</m:mi><m:mo>&#8289;</m:mo><m:msub><m:mi>m</m:mi><m:mn>1</m:mn></m:msub></m:mrow>
   </m:mtd>
  </m:mtr>
  <m:mtr>
   <m:mtd>
    <m:msub><m:mi>y</m:mi><m:mi>i</m:mi></m:msub>
   </m:mtd>
   <m:mtd><m:mo>=</m:mo></m:mtd>
   <m:mtd>
    <m:msub><m:mi>a</m:mi><m:mrow><m:mn>2</m:mn><m:mn>1</m:mn></m:mrow></m:msub>
    <m:msub><m:mi>y</m:mi><m:mrow><m:mi>i</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msub>
    <m:mo>+</m:mo>
    <m:msub><m:mi>a</m:mi><m:mrow><m:mn>2</m:mn><m:mn>2</m:mn></m:mrow></m:msub>
    <m:msub><m:mi>y</m:mi><m:mrow><m:mi>i</m:mi><m:mo>-</m:mo><m:mn>2</m:mn></m:mrow></m:msub>
    <m:mo>+</m:mo>
    <m:msub><m:mi>a</m:mi><m:mrow><m:mn>2</m:mn><m:mn>3</m:mn></m:mrow></m:msub>
    <m:msub><m:mi>y</m:mi><m:mrow><m:mi>i</m:mi><m:mo>-</m:mo><m:mn>3</m:mn></m:mrow></m:msub>
    <m:mrow><m:mi>mod</m:mi><m:mo>&#8289;</m:mo><m:msub><m:mi>m</m:mi><m:mn>2</m:mn></m:msub></m:mrow>
   </m:mtd>
  </m:mtr>
  <m:mtr>
   <m:mtd>
    <m:msub><m:mi>z</m:mi><m:mi>i</m:mi></m:msub>
   </m:mtd>
   <m:mtd><m:mo>=</m:mo></m:mtd>
   <m:mtd>
    <m:msub><m:mi>x</m:mi><m:mi>i</m:mi></m:msub>
    <m:mo>-</m:mo>
    <m:msub><m:mi>y</m:mi><m:mi>i</m:mi></m:msub>
    <m:mrow><m:mi>mod</m:mi><m:mo>&#8289;</m:mo><m:msub><m:mi>m</m:mi><m:mn>1</m:mn></m:msub></m:mrow>
   </m:mtd>
  </m:mtr>
  <m:mtr>
   <m:mtd>
    <m:msub><m:mi>u</m:mi><m:mi>i</m:mi></m:msub>
   </m:mtd>
   <m:mtd><m:mo>=</m:mo></m:mtd>
   <m:mtd>
    <m:mfenced separators="">
     <m:msub><m:mi>z</m:mi><m:mi>i</m:mi></m:msub>
     <m:mo>+</m:mo>
     <m:mn>1</m:mn>
    </m:mfenced>
    <m:mo>/</m:mo>
    <m:mi>d</m:mi>
   </m:mtd>
  </m:mtr>
 </m:mtable>
</m:math></td><td class="formula2"/></tr></table></div>

where <m:math>
 <m:msub><m:mi>a</m:mi><m:mrow><m:mn>1</m:mn><m:mn>1</m:mn></m:mrow></m:msub>
 <m:mo>=</m:mo>
 <m:mn>0</m:mn>
</m:math>, <m:math>
 <m:msub><m:mi>a</m:mi><m:mrow><m:mn>1</m:mn><m:mn>2</m:mn></m:mrow></m:msub>
 <m:mo>=</m:mo>
 <m:mn>1403580</m:mn>
</m:math>, <m:math>
 <m:msub><m:mi>a</m:mi><m:mrow><m:mn>1</m:mn><m:mn>3</m:mn></m:mrow></m:msub>
 <m:mo>=</m:mo>
 <m:mn>-810728</m:mn>
</m:math>, <m:math>
 <m:msub><m:mi>m</m:mi><m:mn>1</m:mn></m:msub>
 <m:mo>=</m:mo>
 <m:msup><m:mn>2</m:mn><m:mn>32</m:mn></m:msup><m:mo>-</m:mo><m:mn>209</m:mn>
</m:math>, <m:math>
 <m:msub><m:mi>a</m:mi><m:mrow><m:mn>2</m:mn><m:mn>1</m:mn></m:mrow></m:msub>
 <m:mo>=</m:mo>
 <m:mn>527612</m:mn>
</m:math>, <m:math>
 <m:msub><m:mi>a</m:mi><m:mrow><m:mn>2</m:mn><m:mn>2</m:mn></m:mrow></m:msub>
 <m:mo>=</m:mo>
 <m:mn>0</m:mn>
</m:math>, <m:math>
 <m:msub><m:mi>a</m:mi><m:mrow><m:mn>2</m:mn><m:mn>3</m:mn></m:mrow></m:msub>
 <m:mo>=</m:mo>
 <m:mn>-1370589</m:mn>
</m:math>, <m:math>
 <m:msub><m:mi>m</m:mi><m:mn>2</m:mn></m:msub>
 <m:mo>=</m:mo>
 <m:msup><m:mn>2</m:mn><m:mn>32</m:mn></m:msup><m:mo>-</m:mo><m:mn>22853</m:mn>
</m:math>, and <m:math>
 <m:msub><m:mi>u</m:mi><m:mi>i</m:mi></m:msub>
 <m:mo>,</m:mo>
 <m:mi>i</m:mi>
 <m:mo>=</m:mo>
 <m:mn>1</m:mn>
 <m:mo>,</m:mo>
 <m:mn>2</m:mn>
 <m:mo>,</m:mo><m:mo>&#8230;</m:mo>
</m:math>&#160;form the required sequence.  If <m:math><m:mi>d</m:mi><m:mo>=</m:mo><m:msub><m:mi>m</m:mi><m:mn>1</m:mn></m:msub></m:math>&#160;then <m:math><m:msub><m:mi>u</m:mi><m:mi>i</m:mi></m:msub><m:mo>&#8712;</m:mo><m:mfenced separators="" open="(" close="]"><m:mn>0</m:mn><m:mo>,</m:mo><m:mn>1</m:mn></m:mfenced></m:math>&#160;else if <m:math><m:mi>d</m:mi><m:mo>=</m:mo><m:msub><m:mi>m</m:mi><m:mn>1</m:mn></m:msub><m:mo>+</m:mo><m:mn>1</m:mn></m:math>&#160;then <m:math><m:msub><m:mi>u</m:mi><m:mi>i</m:mi></m:msub><m:mo>&#8712;</m:mo><m:mfenced separators=""><m:mn>0</m:mn><m:mo>,</m:mo><m:mn>1</m:mn></m:mfenced></m:math>.  Combining the two multiple recursive generators (MRG) results in sequences with better statistical properties in high dimensions and longer periods compared with those generated from a single MRG.  The combined generator described above has a period length of approximately <m:math><m:msup><m:mn>2</m:mn><m:mn>191</m:mn></m:msup></m:math>.</div><h3 class="standard"><a class="sec" name="background2" id="background2"/>2.2&#160;&#160;Quasi-random Numbers</h3>
<div class="paramtext">Low discrepancy (quasi-random) sequences are used in numerical integration, simulation and optimization.  Like pseudorandom numbers they are uniformly distributed but they are not statistically independent, rather they are designed to give more even distribution in multidimensional space (uniformity).  Therefore they are often more efficient than pseudorandom numbers in multidimensional Monte&#8211;Carlo methods.</div><div class="paramtext">The quasi-random number generators implemented in this chapter generate a set of points <m:math><m:msup><m:mi>x</m:mi><m:mn>1</m:mn></m:msup><m:mo>,</m:mo><m:msup><m:mi>x</m:mi><m:mn>2</m:mn></m:msup><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:msup><m:mi>x</m:mi><m:mi>N</m:mi></m:msup></m:math>&#160;with high uniformity in the <m:math><m:mi>S</m:mi></m:math>-dimensional unit cube <m:math><m:msup><m:mi>I</m:mi><m:mi>S</m:mi></m:msup><m:mo>=</m:mo><m:msup><m:mfenced separators="" open="[" close="]"><m:mn>0</m:mn><m:mo>,</m:mo><m:mn>1</m:mn></m:mfenced><m:mi>S</m:mi></m:msup></m:math>.  One measure of the uniformity is the discrepancy which is defined as follows:
<ul class="listind"><li class="listind">Given a set of points <m:math><m:msup><m:mi>x</m:mi><m:mn>1</m:mn></m:msup><m:mo>,</m:mo><m:msup><m:mi>x</m:mi><m:mn>2</m:mn></m:msup><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:msup><m:mi>x</m:mi><m:mi>N</m:mi></m:msup><m:mo>&#8712;</m:mo><m:msup><m:mi>I</m:mi><m:mi>S</m:mi></m:msup></m:math>&#160;and a subset <m:math><m:mi>G</m:mi><m:mo>&#8834;</m:mo><m:msup><m:mi>I</m:mi><m:mi>S</m:mi></m:msup></m:math>, define the counting function <m:math><m:msub><m:mi>S</m:mi><m:mi>N</m:mi></m:msub><m:mfenced separators=""><m:mi>G</m:mi></m:mfenced></m:math>&#160;as the number of points <m:math><m:msup><m:mi>x</m:mi><m:mi>i</m:mi></m:msup><m:mo>&#8712;</m:mo><m:mi>G</m:mi></m:math>.  For each <m:math><m:mi>x</m:mi><m:mo>=</m:mo><m:mfenced separators=""><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub><m:mo>,</m:mo><m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:msub><m:mi>x</m:mi><m:mi>S</m:mi></m:msub></m:mfenced><m:mo>&#8712;</m:mo><m:msup><m:mi>I</m:mi><m:mi>S</m:mi></m:msup></m:math>, let <m:math><m:msub><m:mi>G</m:mi><m:mi>x</m:mi></m:msub></m:math>&#160;be the rectangular <m:math><m:mi>S</m:mi></m:math>-dimensional region

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:msub>
  <m:mi>G</m:mi>
  <m:mi>x</m:mi>
 </m:msub>
 <m:mo>=</m:mo>
 <m:mfenced separators="" open="[" close=")"><m:mn>0</m:mn><m:mo>,</m:mo><m:msub>
   <m:mi>x</m:mi>
   <m:mn>1</m:mn>
  </m:msub></m:mfenced>
 <m:mo>&#215;</m:mo>
 <m:mfenced separators="" open="[" close=")"><m:mn>0</m:mn><m:mo>,</m:mo><m:msub>
   <m:mi>x</m:mi>
   <m:mn>2</m:mn>
  </m:msub></m:mfenced>
 <m:mo>&#215;</m:mo><m:mo>&#8943;</m:mo><m:mo>&#215;</m:mo>
 <m:mfenced separators="" open="[" close=")"><m:mn>0</m:mn><m:mo>,</m:mo><m:msub>
   <m:mi>x</m:mi>
   <m:mi>S</m:mi>
  </m:msub></m:mfenced>
</m:math></td><td class="formula2"/></tr></table></div>

with volume <m:math><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub><m:mo>,</m:mo><m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:msub><m:mi>x</m:mi><m:mi>S</m:mi></m:msub></m:math>.  Then the discrepancy of the points <m:math><m:msup><m:mi>x</m:mi><m:mn>1</m:mn></m:msup><m:mo>,</m:mo><m:msup><m:mi>x</m:mi><m:mn>2</m:mn></m:msup><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:msup><m:mi>x</m:mi><m:mi>N</m:mi></m:msup></m:math>&#160;is

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
 <m:msubsup><m:mi>D</m:mi><m:mi>N</m:mi><m:mo>*</m:mo></m:msubsup>
 <m:mfenced separators=""><m:msup><m:mi>x</m:mi><m:mn>1</m:mn></m:msup><m:mo>,</m:mo><m:msup><m:mi>x</m:mi><m:mn>2</m:mn></m:msup><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:msup><m:mi>x</m:mi><m:mi>N</m:mi></m:msup></m:mfenced>
 <m:mo>=</m:mo>
 <m:mrow>
   <m:munder>
    <m:mi mathvariant="normal">sup</m:mi>
    <m:mrow><m:mi>x</m:mi><m:mo>&#8712;</m:mo><m:msup><m:mi>I</m:mi><m:mi>S</m:mi></m:msup></m:mrow>
   </m:munder><m:mspace width="0.25em"/>
  <m:mfenced open="|" close="|" separators="">
   <m:msub><m:mi>S</m:mi><m:mi>N</m:mi></m:msub>
   <m:mfenced separators=""><m:msub><m:mi>G</m:mi><m:mi>x</m:mi></m:msub></m:mfenced>
   <m:mo>-</m:mo>
   <m:mi>N</m:mi>
   <m:munderover><m:mo>&#8721;</m:mo>
<m:mrow><m:mi mathvariant="italic">k</m:mi><m:mo>=</m:mo><m:mn>1</m:mn></m:mrow>
<m:mi>S</m:mi>
</m:munderover>
<m:msub><m:mi>x</m:mi><m:mi>k</m:mi></m:msub>
  </m:mfenced></m:mrow>
<m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

The discrepancy of the first <m:math><m:mi>N</m:mi></m:math>&#160;terms of such a sequence has the form

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:msubsup><m:mi>D</m:mi><m:mi>N</m:mi><m:mo>*</m:mo></m:msubsup><m:mfenced separators=""><m:msup><m:mi>x</m:mi><m:mn>1</m:mn></m:msup><m:mo>,</m:mo><m:msup><m:mi>x</m:mi><m:mn>2</m:mn></m:msup><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:msup><m:mi>x</m:mi><m:mi>N</m:mi></m:msup></m:mfenced><m:mo>&#8804;</m:mo><m:msub><m:mi>C</m:mi><m:mi>S</m:mi></m:msub><m:msup><m:mfenced separators=""><m:mrow><m:mi>log</m:mi><m:mo>&#8289;</m:mo><m:mi>N</m:mi></m:mrow></m:mfenced><m:mi>S</m:mi></m:msup><m:mo>+</m:mo><m:mrow><m:mi mathvariant="italic">O</m:mi><m:mfenced separators=""><m:msup><m:mfenced separators=""><m:mrow><m:mi>log</m:mi><m:mo>&#8289;</m:mo><m:mi>N</m:mi></m:mrow></m:mfenced><m:mrow><m:mi>S</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msup></m:mfenced></m:mrow><m:mtext>&#8195; for all &#8195;</m:mtext><m:mi>N</m:mi><m:mo>&#8805;</m:mo><m:mn>2</m:mn><m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

The principal aim in the construction of low-discrepancy sequences is to find sequences of points in <m:math><m:msup><m:mi>I</m:mi><m:mi>S</m:mi></m:msup></m:math>&#160;with a bound of this form where the constant <m:math><m:msub><m:mi>C</m:mi><m:mi>S</m:mi></m:msub></m:math>&#160;is as small as possible.</li></ul>
</div><div class="paramtext">Three types of low-discrepancy sequences are supplied in this library, these are due to Sobol, Faure and Niederreiter. Two sets of Sobol sequences are supplied, the first is based on work of <a class="ref" href="#ref818">Joe and Kuo (2008)</a> and the second on the work of <a class="ref" href="#ref706">Bratley and Fox (1988)</a>. More information on quasi-random number generation and the Sobol, Faure and Niederreiter sequences in particular can be found in <a class="ref" href="#ref706">Bratley and Fox (1988)</a> and <a class="ref" href="#ref705">Fox (1986)</a>.</div><h3 class="standard"><a class="sec" name="backgroundscrambledquasi" id="backgroundscrambledquasi"/>2.3&#160;&#160;Scrambled Quasi-random Numbers</h3>
<div class="paramtext">Scrambled quasi-random sequences are an extension of standard quasi-random sequences that attempt to eliminate the bias inherent in a quasi-random sequence whilst retaining the low-discrepancy properties. The use of a scrambled sequence allows error estimation of Monte&#8211;Carlo results by performing a number of iterates and computing the variance of the results.</div><div class="paramtext">This implementation of scrambled quasi-random sequences is based on TOMS algorithm 823 and details can be found in the accompanying paper, <a class="ref" href="#ref821">Hong and Hickernell (2003)</a>. Three methods of scrambling are supplied; the first a restricted form of Owen's scrambling (<a class="ref" href="#ref820">Owen (1995)</a>), the second based on the method of <a class="ref" href="#ref822">Faure and Tezuka (2000)</a> and the last method combines the first two.</div><div class="paramtext">Scrambled versions of both Sobol sequences and the Niederreiter sequence can be obtained.</div><div class="paramtext">The efficiency of a simulation exercise may often be increased by the use of variance reduction methods (see <a class="ref" href="#ref242">Morgan (1984)</a>).  It is also worth considering whether a simulation is the best approach to solving the problem.  For example, low-dimensional integrals are usually more efficiently calculated by routines in <a class="chap" href="../D01/d01conts.xml">Chapter D01</a> rather than by Monte&#8211;Carlo integration.</div><h3 class="standard"><a class="sec" name="background3" id="background3"/>2.4&#160;&#160;Non-uniform Random Numbers</h3>
<div class="paramtext">Random numbers from other distributions may be obtained from the uniform random numbers by the use of transformations and rejection techniques, and for discrete distributions, by table based methods.</div><div class="paramtext">
<table class="standard-100"><tr>
<td style="width:2.1em;" valign="baseline">(a)</td>
<td valign="top">Transformation Methods
  <div class="paramtext">For a continuous random variable, if the cumulative distribution function (CDF) is <m:math><m:mi>F</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;then for a uniform <m:math><m:mfenced separators=""><m:mn>0</m:mn><m:mo>,</m:mo><m:mn>1</m:mn></m:mfenced></m:math>&#160;random variate <m:math><m:mi>u</m:mi></m:math>, <m:math><m:mi>y</m:mi><m:mo>=</m:mo><m:msup><m:mi>F</m:mi><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msup><m:mfenced separators=""><m:mi>u</m:mi></m:mfenced></m:math>&#160;will have CDF <m:math><m:mi>F</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>.  This method is only efficient in a few simple cases such as the exponential distribution with mean <m:math><m:mi>&#956;</m:mi></m:math>, in which case <m:math><m:msup><m:mi>F</m:mi><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msup><m:mfenced separators=""><m:mi>u</m:mi></m:mfenced><m:mo>=</m:mo><m:mo>-</m:mo><m:mi>&#956;</m:mi><m:mrow><m:mi>log</m:mi><m:mo>&#8289;</m:mo><m:mi>u</m:mi></m:mrow></m:math>.  Other transformations are based on the joint distribution of several random variables.  In the bivariate case, if <m:math><m:mi>v</m:mi></m:math>&#160;and <m:math><m:mi>w</m:mi></m:math>&#160;are random variates there may be a function <m:math><m:mi>g</m:mi></m:math>&#160;such that <m:math><m:mi>y</m:mi><m:mo>=</m:mo><m:mi>g</m:mi><m:mfenced separators=""><m:mi>v</m:mi><m:mo>,</m:mo><m:mi>w</m:mi></m:mfenced></m:math>&#160;has the required distribution; for example, the Student's <m:math><m:mi>t</m:mi></m:math>-distribution with <m:math><m:mi>n</m:mi></m:math>&#160;degrees of freedom in which <m:math><m:mi>v</m:mi></m:math>&#160;has a Normal distribution, <m:math><m:mi>w</m:mi></m:math>&#160;has a gamma distribution and <m:math><m:mi>g</m:mi><m:mfenced separators=""><m:mi>v</m:mi><m:mo>,</m:mo><m:mi>w</m:mi></m:mfenced><m:mo>=</m:mo><m:mi>v</m:mi><m:msqrt><m:mi>n</m:mi><m:mo>/</m:mo><m:mi>w</m:mi></m:msqrt></m:math>.</div></td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(b)</td>
<td valign="top">Rejection Methods
  <div class="paramtext">Rejection techniques are based on the ability to easily generate random numbers from a distribution (called the envelope) similar to the distribution required.  The value from the envelope distribution is then accepted as a random number from the required distribution with a certain probability; otherwise, it is rejected and a new number is generated from the envelope distribution.</div></td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(c)</td>
<td valign="top">Table Search Methods
  <div class="paramtext">For discrete distributions, if the cumulative probabilities, <m:math><m:msub><m:mi>P</m:mi><m:mi>i</m:mi></m:msub><m:mo>=</m:mo><m:mrow><m:mi>Prob</m:mi><m:mfenced separators=""><m:mi>x</m:mi><m:mo>&#8804;</m:mo><m:mi>i</m:mi></m:mfenced></m:mrow></m:math>, are stored in a table then, given <m:math><m:mi>u</m:mi></m:math>&#160;from a uniform <m:math><m:mfenced separators=""><m:mn>0</m:mn><m:mo>,</m:mo><m:mn>1</m:mn></m:mfenced></m:math>&#160;distribution, the table is searched for <m:math><m:mi>i</m:mi></m:math>&#160;such that <m:math><m:msub><m:mi>P</m:mi><m:mrow><m:mi>i</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msub><m:mo>&lt;</m:mo><m:mi>u</m:mi><m:mo>&#8804;</m:mo><m:msub><m:mi>P</m:mi><m:mi>i</m:mi></m:msub></m:math>.  The returned value <m:math><m:mi>i</m:mi></m:math>&#160;will have the required distribution.  The table searching can be made faster by means of an index, see <a class="ref" href="#ref243">Ripley (1987)</a>.  The effort required to set up the table and its index may be considerable, but the methods are very efficient when many values are needed from the same distribution.</div></td>
</tr></table>
</div><h3 class="standard"><a class="sec" name="background4" id="background4"/>2.5&#160;&#160;Copulas</h3>
<div class="paramtext">A copula is a function that links the univariate marginal distributions with their multivariate distribution. Sklar's theorem (see <a class="ref" href="#ref735">Sklar (1973)</a>) states that if <m:math><m:mi>f</m:mi></m:math>&#160;is an <m:math><m:mi>m</m:mi></m:math>-dimensional distribution function with continuous margins <m:math>
 <m:msub><m:mi>f</m:mi><m:mn>1</m:mn></m:msub>
 <m:mo>,</m:mo>
 <m:msub><m:mi>f</m:mi><m:mn>2</m:mn></m:msub>
 <m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo>
 <m:msub><m:mi>f</m:mi><m:mi>m</m:mi></m:msub>
</m:math>, then <m:math><m:mi>f</m:mi></m:math>&#160;has a unique copula representation, <m:math><m:mi>c</m:mi></m:math>, such that

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>f</m:mi>
 <m:mfenced separators="">
  <m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub>
  <m:mo>,</m:mo>
  <m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub>
  <m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo>
  <m:msub><m:mi>x</m:mi><m:mi>m</m:mi></m:msub>
 </m:mfenced> 
 <m:mo>=</m:mo>
 <m:mi>c</m:mi>
 <m:mfenced separators="">
  <m:msub><m:mi>f</m:mi><m:mn>1</m:mn></m:msub>
  <m:mfenced separators=""><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub></m:mfenced>
  <m:mo>,</m:mo>
  <m:msub><m:mi>f</m:mi><m:mn>2</m:mn></m:msub>
  <m:mfenced separators=""><m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub></m:mfenced>
  <m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo>
  <m:msub><m:mi>f</m:mi><m:mi>m</m:mi></m:msub>
  <m:mfenced separators=""><m:msub><m:mi>x</m:mi><m:mi>m</m:mi></m:msub></m:mfenced>
 </m:mfenced>
</m:math></td><td class="formula2"/></tr></table></div></div><div class="paramtext">The copula, <m:math><m:mi>c</m:mi></m:math>, is a multivariate uniform distribution whose dependence structure is defined by the dependence structure of the multivariate distribution <m:math><m:mi>f</m:mi></m:math>, with

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>c</m:mi>
 <m:mfenced separators="">
  <m:msub><m:mi>u</m:mi><m:mn>1</m:mn></m:msub>
  <m:mo>,</m:mo>
  <m:msub><m:mi>u</m:mi><m:mn>2</m:mn></m:msub>
  <m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo>
  <m:msub><m:mi>u</m:mi><m:mi>m</m:mi></m:msub>
 </m:mfenced> 
 <m:mo>=</m:mo>
 <m:mi>f</m:mi>
 <m:mfenced separators="">
  <m:msubsup><m:mi>f</m:mi><m:mn>1</m:mn><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msubsup>
  <m:mfenced separators=""><m:msub><m:mi>u</m:mi><m:mn>1</m:mn></m:msub></m:mfenced>
  <m:mo>,</m:mo>
  <m:msubsup><m:mi>f</m:mi><m:mn>2</m:mn><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msubsup>
  <m:mfenced separators=""><m:msub><m:mi>u</m:mi><m:mn>2</m:mn></m:msub></m:mfenced>
  <m:mo>,</m:mo><m:mo>&#8230;</m:mo>
  <m:mo>,</m:mo>
  <m:msubsup><m:mi>f</m:mi><m:mi>m</m:mi><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msubsup>
  <m:mfenced separators=""><m:msub><m:mi>u</m:mi><m:mi>m</m:mi></m:msub></m:mfenced>
 </m:mfenced>
</m:math></td><td class="formula2"/></tr></table></div>

where <m:math>
 <m:msub><m:mi>u</m:mi><m:mi>i</m:mi></m:msub> 
 <m:mo>&#8712;</m:mo>
 <m:mfenced separators="" open="[" close="]"><m:mn>0</m:mn><m:mo>,</m:mo><m:mn>1</m:mn></m:mfenced>
</m:math>. This relationship can be used to simulate variates from distributions defined by the dependence structure of one distribution and each of the marginal distributions given by another. For additional information see <a class="ref" href="#ref736">Nelsen (1998)</a> or <a class="ref" href="#ref737">Boye (Unpublished manuscript)</a> and the references therein.</div><h3 class="standard"><a class="sec" name="otherrandomstructures" id="otherrandomstructures"/>2.6&#160;&#160;Other Random Structures</h3>
<div class="paramtext">In addition to random numbers from various distributions, random compound structures can be generated.  These include random time series, random matrices and random samples.</div><h3 class="standard"><a class="sec" name="multiplestreams" id="multiplestreams"/>2.7&#160;&#160;Multiple Streams of Pseudorandom Numbers</h3>
<div class="paramtext">It is often advantageous to be able to generate variates from multiple, independent, streams (or sequences) of random variates. For example when running a simulation in parallel on several processors. There are four ways of generating multiple streams using the routines available in this chapter:
<table class="standard-100"><tr>
<td style="width:2.1em;" valign="baseline">(i)</td>
<td valign="top">using different initial values (seeds);</td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(ii)</td>
<td valign="top">using different generators;</td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(iii)</td>
<td valign="top">skip ahead (also called block-splitting);</td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(iv)</td>
<td valign="top">leap-frogging.</td>
</tr></table>
</div><h4 class="standard"><a class="sec" name="msviadifferentinitialvalues" id="msviadifferentinitialvalues"/>2.7.1&#160;&#160;Multiple Streams via Different Initial Values (Seeds)</h4>
<div class="paramtext">A different sequence of variates can be generated from the same base generator by initializing the generator using a different set of seeds.  The statistical properties of the base generators are only guaranteed within, not between sequences. For example, two sequences generated from two different starting points may overlap if these initial values are not far enough apart. The potential for overlapping sequences is reduced if the period of the generator being used is large. In general, of the four methods for creating multiple streams described here, this is the least satisfactory.</div><div class="paramtext">The one exception to this is the Wichmann&#8211;Hill II generator. The <a class="ref" href="#ref787">Wichmann and Hill (2006)</a> paper describes a method of generating blocks of variates, with lengths up to <m:math><m:msup><m:mn>2</m:mn><m:mn>90</m:mn></m:msup></m:math>, by fixing the first three seed values of the generator (<m:math><m:msub><m:mi>w</m:mi><m:mn>0</m:mn></m:msub></m:math>, <m:math><m:msub><m:mi>x</m:mi><m:mn>0</m:mn></m:msub></m:math>&#160;and <m:math><m:msub><m:mi>y</m:mi><m:mn>0</m:mn></m:msub></m:math>), and setting <m:math><m:msub><m:mi>z</m:mi><m:mn>0</m:mn></m:msub></m:math>&#160;to a different value for each stream required. This is similar to the skip-ahead method described in <a class="sec" href="#MSskip-ahead">Section 2.7.3</a>, in that the full sequence of the Wichmann&#8211;Hill II generator is split into a number of different blocks, in this case with a fixed length of <m:math><m:msup><m:mn>2</m:mn><m:mn>90</m:mn></m:msup></m:math>. But without the computationally intensive initialization usually required for the skip-ahead method.</div><h4 class="standard"><a class="sec" name="MSdifferent" id="MSdifferent"/>2.7.2&#160;&#160;Multiple Streams via Different Generators</h4>
<div class="paramtext">Independent sequences of variates can be generated using a different base generator for each sequence. For example, sequence 1 can be generated using the NAG basic generator, sequence 2 using Mersenne Twister, sequence 3 the ACORN generator and sequence 4 using L'Ecuyer generator. The Wichmann&#8211;Hill I generator implemented in this chapter is, in fact, a series of 273 independent generators. The particular sub-generator to use is selected using the SUBID variable. Therefore, in total, 277 independent streams can be generated with each using a different generator (273 Wichmann&#8211;Hill I generators, and 4 additional base generators).</div><h4 class="standard"><a class="sec" name="MSskip-ahead" id="MSskip-ahead"/>2.7.3&#160;&#160;Multiple Streams via Skip-ahead</h4>
<div class="paramtext">Independent sequences of variates can be generated from a single base generator through the use of block-splitting, or skipping-ahead.  This method consists of splitting the sequence into <m:math><m:mi>k</m:mi></m:math>&#160;non-overlapping blocks, each of length <m:math><m:mi>n</m:mi></m:math>, where <m:math><m:mi>n</m:mi></m:math>&#160;is no smaller than the maximum number of variates required from any of the sequences. For example,

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
  <m:mfrac>
    <m:mrow>
      <m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub>
      <m:mo>,</m:mo>
      <m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub>
      <m:mo>,</m:mo>
      <m:mo>&#8230;</m:mo>
      <m:mo>,</m:mo>
      <m:msub><m:mi>x</m:mi><m:mi>n</m:mi></m:msub>
    </m:mrow>
    <m:mtext>block 1</m:mtext>
  </m:mfrac>
  <m:mo>,</m:mo> 
  <m:mfrac>
    <m:mrow>
      <m:msub><m:mi>x</m:mi><m:mrow><m:mi>n</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mrow></m:msub>
      <m:mo>,</m:mo>
      <m:msub><m:mi>x</m:mi><m:mrow><m:mi>n</m:mi><m:mo>+</m:mo><m:mn>2</m:mn></m:mrow></m:msub>
      <m:mo>,</m:mo>
      <m:mo>&#8230;</m:mo>
      <m:mo>,</m:mo>
      <m:msub><m:mi>x</m:mi><m:mrow><m:mn>2</m:mn><m:mi>n</m:mi></m:mrow></m:msub>
    </m:mrow>
    <m:mtext>block 2</m:mtext>
  </m:mfrac>
  <m:mo>,</m:mo>  
  <m:mfrac>
    <m:mrow>
      <m:msub><m:mi>x</m:mi><m:mrow><m:mn>2</m:mn><m:mi>n</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mrow></m:msub>
      <m:mo>,</m:mo>
      <m:msub><m:mi>x</m:mi><m:mrow><m:mn>2</m:mn><m:mi>n</m:mi><m:mo>+</m:mo><m:mn>2</m:mn></m:mrow></m:msub>
      <m:mo>,</m:mo>
      <m:mo>&#8230;</m:mo>
      <m:mo>,</m:mo>
      <m:msub><m:mi>x</m:mi><m:mrow><m:mn>3</m:mn><m:mi>n</m:mi></m:mrow></m:msub>
    </m:mrow>
    <m:mtext>block 3</m:mtext>
  </m:mfrac>
  <m:mo>,</m:mo>
  <m:mtext>etc.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

where <m:math><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub><m:mo>,</m:mo><m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub><m:mo>,</m:mo><m:mo>&#8230;</m:mo></m:math>&#160;is the sequence produced by the generator of interest. Each of the <m:math><m:mi>k</m:mi></m:math>&#160;blocks provide an independent sequence.</div><div class="paramtext">The skip-ahead algorithm therefore requires the sequence to be advanced a large number of places, as to generate values from say, block <m:math><m:mi>b</m:mi></m:math>, you must skip over the <m:math><m:mfenced separators=""><m:mi>b</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mfenced><m:mi>n</m:mi></m:math>&#160;values in the first <m:math><m:mi>b</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:math>&#160;blocks. Due to their form this can be done efficiently for linear congruential generators and multiple congruential generators. A skip-ahead algorithm is also provided for the Mersenne Twister generator.</div><div class="paramtext">Although skip-ahead requires some additional computation at the initialization stage (to &#8216;fast forward&#8217; the sequence) no additional computation is required at the generation stage.</div><div class="paramtext">This method of producing multiple streams can also be used for the Sobol and Niederreiter quasi-random number generator via the parameter ISKIP in <a class="rout" href="../G05/g05ylf.xml">G05YLF</a>.</div><h4 class="standard"><a class="sec" name="leapfrogging" id="leapfrogging"/>2.7.4&#160;&#160;Multiple Streams via Leap-frog</h4>
<div class="paramtext">Independent sequences of variates can also be generated from a single base generator through the use of leap-frogging.  This method involves splitting the sequence from a single generator into <m:math><m:mi>k</m:mi></m:math>&#160;disjoint subsequences. For example:

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
  <m:mtable>
    <m:mtr>
      <m:mtd><m:mtext>Subsequence 1:</m:mtext></m:mtd>
      <m:mtd columnalign="left">
	<m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub>
	<m:mo>,</m:mo>
	<m:msub><m:mi>x</m:mi><m:mrow><m:mi>k</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mrow></m:msub>
	<m:mo>,</m:mo>
	<m:msub>
	  <m:mi>x</m:mi>
	  <m:mrow><m:mn>2</m:mn><m:mi>k</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mrow>
	</m:msub>
	<m:mo>,</m:mo><m:mo>&#8230;</m:mo>
      </m:mtd>
    </m:mtr>
    <m:mtr>
      <m:mtd><m:mtext>Subsequence 2:</m:mtext></m:mtd>
      <m:mtd columnalign="left">
	<m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub>
	<m:mo>,</m:mo>
	<m:msub><m:mi>x</m:mi><m:mrow><m:mi>k</m:mi><m:mo>+</m:mo><m:mn>2</m:mn></m:mrow></m:msub>
	<m:mo>,</m:mo>
	<m:msub>
	  <m:mi>x</m:mi>
	  <m:mrow><m:mn>2</m:mn><m:mi>k</m:mi><m:mo>+</m:mo><m:mn>2</m:mn></m:mrow>
	</m:msub>
	<m:mo>,</m:mo><m:mo>&#8230;</m:mo>
      </m:mtd>
    </m:mtr>
    <m:mtr>
      <m:mtd><m:mo>&#8942;</m:mo></m:mtd>
      <m:mtd/>
    </m:mtr>
    <m:mtr>
      <m:mtd><m:mtext>Subsequence &#8203;</m:mtext><m:mi>k</m:mi><m:mtext>:</m:mtext></m:mtd>
      <m:mtd columnalign="left">
	<m:msub><m:mi>x</m:mi><m:mi>k</m:mi></m:msub>
	<m:mo>,</m:mo>
	<m:msub><m:mi>x</m:mi><m:mrow><m:mn>2</m:mn><m:mi>k</m:mi></m:mrow></m:msub>
	<m:mo>,</m:mo>
	<m:msub><m:mi>x</m:mi><m:mrow><m:mn>3</m:mn><m:mi>k</m:mi></m:mrow></m:msub>
	<m:mo>,</m:mo><m:mo>&#8230;</m:mo>
	<m:mtext>,</m:mtext>
      </m:mtd>
    </m:mtr>
  </m:mtable>
</m:math></td><td class="formula2"/></tr></table></div>

where <m:math><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub><m:mo>,</m:mo><m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub><m:mo>,</m:mo><m:mo>&#8230;</m:mo></m:math>&#160;is the sequence produced by the generator of interest. Each of the <m:math><m:mi>k</m:mi></m:math>&#160;subsequences then provides an independent stream of variates.</div><div class="paramtext">The leap-frog algorithm therefore requires the generation of every <m:math><m:mi>k</m:mi></m:math>th variate from the base generator. Due to their form this can be done efficiently for linear congruential generators and multiple congruential generators. A leap-frog algorithm is provided for the NAG Basic generator, both the Wichmann&#8211;Hill I and Wichmann&#8211;Hill II generators and L'Ecuyer generator.</div><div class="paramtext">It is known that, dependent on the number of streams required, leap-frogging can lead to sequences with poor statistical properties, especially when applied to linear congruential generators. In addition, leap-frogging can increase the time required to generate each variate. Therefore leap-frogging should be avoided unless absolutely necessary.</div><h4 class="standard"><a class="sec" name="anexample" id="anexample"/>2.7.5&#160;&#160;Skip-ahead and Leap-frog for a Linear Congruential Generator (LCG):  An Example</h4>
<div class="paramtext">As an illustrative example, a brief description of the algebra behind the implementation of the leap-frog and skip-ahead algorithms for a linear congruential generator is given. A linear congruential generator has the form <m:math><m:msub><m:mi>x</m:mi><m:mrow><m:mi>i</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mrow></m:msub><m:mo>=</m:mo><m:msub><m:mi>a</m:mi><m:mn>1</m:mn></m:msub> <m:msub><m:mi>x</m:mi><m:mi>i</m:mi></m:msub> <m:mi mathvariant="normal">&#160;mod&#160;</m:mi> <m:msub><m:mi>m</m:mi><m:mn>1</m:mn></m:msub></m:math>. The recursive nature of a linear congruential generator means that

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
  <m:mtable>
    <m:mtr columnalign="left">
      <m:mtd>
	<m:msub><m:mi>x</m:mi><m:mrow><m:mi>i</m:mi><m:mo>+</m:mo><m:mi>v</m:mi></m:mrow></m:msub>
      </m:mtd>
      <m:mtd>
	<m:mo>=</m:mo>
      </m:mtd>
      <m:mtd columnalign="left">
	<m:msub><m:mi>a</m:mi><m:mn>1</m:mn></m:msub> 
	<m:msub>
	  <m:mi>x</m:mi>
	  <m:mrow><m:mi>i</m:mi><m:mo>+</m:mo><m:mi>v</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow>
	</m:msub>
	<m:mi mathvariant="normal">&#160;mod&#160;</m:mi> 
	<m:msub><m:mi>m</m:mi><m:mn>1</m:mn></m:msub>
      </m:mtd>
    </m:mtr>
    <m:mtr columnalign="left">
      <m:mtd/>  
      <m:mtd><m:mo>=</m:mo></m:mtd>
      <m:mtd columnalign="left">
	<m:msub><m:mi>a</m:mi><m:mn>1</m:mn></m:msub> 
	<m:mfenced separators="">
	  <m:msub><m:mi>a</m:mi><m:mn>1</m:mn></m:msub> 
	  <m:msub>
	    <m:mi>x</m:mi>
	    <m:mrow><m:mi>i</m:mi><m:mo>+</m:mo><m:mi>v</m:mi><m:mo>-</m:mo><m:mn>2</m:mn></m:mrow>
	  </m:msub>
	  <m:mi mathvariant="normal">&#160;mod&#160;</m:mi> 
	  <m:msub><m:mi>m</m:mi><m:mn>1</m:mn></m:msub>
	</m:mfenced> 
	<m:mi mathvariant="normal">&#160;mod&#160;</m:mi> 
	<m:msub><m:mi>m</m:mi><m:mn>1</m:mn></m:msub>
      </m:mtd>
    </m:mtr>
    <m:mtr columnalign="left">
      <m:mtd/>
      <m:mtd>
	<m:mo>=</m:mo>
      </m:mtd>
      <m:mtd columnalign="left">
	<m:msubsup>
	  <m:mi>a</m:mi>
	  <m:mn>1</m:mn>
	  <m:mn>2</m:mn>
	</m:msubsup>
	<m:msub>
	  <m:mi>x</m:mi>
	  <m:mrow><m:mi>i</m:mi><m:mo>+</m:mo><m:mi>v</m:mi><m:mo>-</m:mo><m:mn>2</m:mn></m:mrow>
	</m:msub>
	<m:mi mathvariant="normal">&#160;mod&#160;</m:mi> 
	<m:msub><m:mi>m</m:mi><m:mn>1</m:mn></m:msub>
      </m:mtd>
    </m:mtr>
    <m:mtr>
      <m:mtd/>
      <m:mtd>
	<m:mo>=</m:mo>
      </m:mtd>
      <m:mtd columnalign="left">
	<m:msubsup><m:mi>a</m:mi><m:mn>1</m:mn><m:mi>v</m:mi></m:msubsup>
	<m:msub><m:mi>x</m:mi><m:mi>i</m:mi></m:msub> 
	<m:mi mathvariant="normal">&#160;mod&#160;</m:mi> 
	<m:msub><m:mi>m</m:mi><m:mn>1</m:mn></m:msub>
	<m:mtext>.</m:mtext>
      </m:mtd>
    </m:mtr>
  </m:mtable>
</m:math></td><td class="formula2"/></tr></table></div></div><div class="paramtext">The sequence can therefore be quickly advanced <m:math><m:mi>v</m:mi></m:math>&#160;places by multiplying the current state (<m:math><m:msub><m:mi>x</m:mi><m:mi>i</m:mi></m:msub></m:math>) by <m:math><m:msubsup><m:mi>a</m:mi><m:mn>1</m:mn><m:mi>v</m:mi></m:msubsup> <m:mi mathvariant="normal">&#160;mod&#160;</m:mi> <m:msub><m:mi>m</m:mi><m:mn>1</m:mn></m:msub></m:math>, hence skipping the sequence ahead. Leap-frogging can be implemented by using <m:math><m:msubsup><m:mi>a</m:mi><m:mn>1</m:mn><m:mi>k</m:mi></m:msubsup></m:math>, where <m:math><m:mi>k</m:mi></m:math>&#160;is the number of streams required, in place of <m:math><m:msub><m:mi>a</m:mi><m:mn>1</m:mn></m:msub></m:math>&#160;in the standard linear congruential generator recursive formula, in order to advance <m:math><m:mi>k</m:mi></m:math>&#160;places, rather than one, at each iteration.</div><div class="paramtext">In a linear congruential generator the multiplier <m:math><m:msub><m:mi>a</m:mi><m:mn>1</m:mn></m:msub></m:math>&#160;is constructed so that the generator has good statistical properties in, for example, the spectral test. When using leap-frogging to construct multiple streams this multiplier is replaced with <m:math><m:msubsup><m:mi>a</m:mi><m:mn>1</m:mn><m:mi>k</m:mi></m:msubsup></m:math>, and there is no guarantee that this new multiplier will have suitable properties especially as the value of <m:math><m:mi>k</m:mi></m:math>&#160;depends on the number of streams required and so is likely to change depending on the application. This problem can be emphasised by the lattice structure of linear congruential generators. Similiarly, the value of <m:math><m:msub><m:mi>a</m:mi><m:mn>1</m:mn></m:msub></m:math>&#160;is often chosen such that the computation <m:math><m:msub><m:mi>a</m:mi><m:mn>1</m:mn></m:msub> <m:msub><m:mi>x</m:mi><m:mi>i</m:mi></m:msub> <m:mi mathvariant="normal">&#160;mod&#160;</m:mi> <m:msub><m:mi>m</m:mi><m:mn>1</m:mn></m:msub></m:math>&#160;can be performed efficiently. When <m:math><m:msub><m:mi>a</m:mi><m:mn>1</m:mn></m:msub></m:math>&#160;is replaced by <m:math><m:msubsup><m:mi>a</m:mi><m:mn>1</m:mn><m:mi>k</m:mi></m:msubsup></m:math>, this is often no longer the case.</div><div class="paramtext">Note that, due to rounding, when using a distributional generator, a sequence generated using leap-frogging and a sequence constructed by taking every <m:math><m:mi>k</m:mi></m:math>&#160;value from a set of variates generated without leap-frogging may differ slightly. These differences should only affect the least significant digit.</div><h4 class="standard"><a class="sec" name="mtskip" id="mtskip"/>2.7.6&#160;&#160;Skip-ahead and Leap-frog for the Mersenne Twister: An Example</h4>
<div class="paramtext">Skipping ahead with the Mersenne Twister generator is based on the definition of a <m:math><m:mi>k</m:mi><m:mo>&#215;</m:mo><m:mi>k</m:mi></m:math>&#160;(where <m:math><m:mi>k</m:mi><m:mo>=</m:mo><m:mn>19937</m:mn></m:math>) transition matrix, <m:math><m:mi>A</m:mi></m:math>, over the finite field <m:math><m:msub><m:mi>&#120125;</m:mi><m:mn>2</m:mn></m:msub></m:math>&#160;(with elements 0 and 1). Multiplying <m:math><m:mi>A</m:mi></m:math>&#160;by the current state <m:math><m:msub><m:mi>x</m:mi><m:mi>n</m:mi></m:msub></m:math>, represented as a vector of bits, produces the next state vector <m:math><m:msub><m:mi>x</m:mi><m:mrow><m:mi>n</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mrow></m:msub></m:math>:

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
 <m:msub>
  <m:mi>x</m:mi>
  <m:mrow>
   <m:mi>n</m:mi>
   <m:mo>+</m:mo>
   <m:mn>1</m:mn>
  </m:mrow>
 </m:msub>
 <m:mo>=</m:mo> 
 <m:mi>A</m:mi>
 <m:mo>&#8290;</m:mo>
 <m:msub>
  <m:mi>x</m:mi>
  <m:mi>n</m:mi>
 </m:msub>
 <m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div></div><div class="paramtext">Thus, skipping ahead <m:math><m:mi>v</m:mi></m:math>&#160;places in a sequence is equivalent to multiplying by <m:math><m:msup><m:mi>A</m:mi><m:mi>v</m:mi></m:msup></m:math>:

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
 <m:msub>
  <m:mi>x</m:mi>
  <m:mrow>
   <m:mi>n</m:mi>
   <m:mo>+</m:mo>
   <m:mi>v</m:mi>
  </m:mrow>
 </m:msub>
 <m:mo>=</m:mo>
 <m:msup>
  <m:mi>A</m:mi>
  <m:mi>v</m:mi>
 </m:msup>
 <m:msub>
  <m:mi>x</m:mi>
  <m:mi>n</m:mi>
 </m:msub>
 <m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div></div><div class="paramtext">Since calculating <m:math><m:msup><m:mi>A</m:mi><m:mi>v</m:mi></m:msup></m:math>&#160;by a standard square and multiply algorithm is <m:math><m:mrow><m:mi mathvariant="italic">O</m:mi><m:mfenced separators=""><m:msup><m:mi>k</m:mi><m:mn>3</m:mn></m:msup> <m:mrow><m:mi>log</m:mi><m:mo>&#8289;</m:mo><m:mi>v</m:mi></m:mrow></m:mfenced></m:mrow></m:math>&#160;and requires over 47MB of memory (see <a class="ref" href="#ref873">Haramoto <span class="italic">et al.</span> (2008)</a>), an indirect calculation is performed which relies on a property of the characteristic polynomial <m:math><m:mi>p</m:mi><m:mfenced separators=""><m:mi>z</m:mi></m:mfenced></m:math>&#160;of <m:math><m:mi>A</m:mi></m:math>, namely that <m:math><m:mi>p</m:mi><m:mfenced separators=""><m:mi>A</m:mi></m:mfenced><m:mo>=</m:mo><m:mn>0</m:mn></m:math>. We then define 

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
 <m:mi>g</m:mi><m:mfenced separators=""><m:mi>z</m:mi></m:mfenced>
 <m:mo>=</m:mo>
 <m:msup>
  <m:mi>z</m:mi>
  <m:mi>v</m:mi>
 </m:msup>
 <m:mi mathvariant="normal">&#160;mod&#160;</m:mi>
 <m:mi>p</m:mi><m:mfenced separators=""><m:mi>z</m:mi></m:mfenced>
 <m:mo>=</m:mo>
 <m:msub>
  <m:mi>a</m:mi>
  <m:mrow>
   <m:mi>k</m:mi>
   <m:mo>-</m:mo>
   <m:mn>1</m:mn>
  </m:mrow>
 </m:msub>
 <m:mo>&#8290;</m:mo>
 <m:msup>
  <m:mi>z</m:mi>
  <m:mrow>
   <m:mi>k</m:mi>
   <m:mo>-</m:mo>
   <m:mn>1</m:mn>
  </m:mrow>
 </m:msup>
 <m:mo>+</m:mo>
 <m:mo>&#8230;</m:mo>
 <m:mo>+</m:mo>
 <m:msub>
  <m:mi>a</m:mi>
  <m:mn>1</m:mn>
 </m:msub>
 <m:mo>&#8290;</m:mo>
 <m:mi>z</m:mi>
 <m:mo>+</m:mo>
 <m:msub>
  <m:mi>a</m:mi>
  <m:mn>0</m:mn>
 </m:msub>
 <m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

and observe that

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
 <m:mi>g</m:mi><m:mfenced separators=""><m:mi>z</m:mi></m:mfenced>
 <m:mo>=</m:mo>
 <m:msup>
  <m:mi>z</m:mi>
  <m:mi>v</m:mi>
 </m:msup>
 <m:mo>+</m:mo>
 <m:mi>q</m:mi><m:mfenced separators=""><m:mi>z</m:mi></m:mfenced>
 <m:mo>&#8290;</m:mo>
 <m:mi>p</m:mi>
 <m:mfenced separators="">
  <m:mi>z</m:mi>
 </m:mfenced>
</m:math></td><td class="formula2"/></tr></table></div>

for a polynomial <m:math><m:mi>q</m:mi><m:mfenced separators=""><m:mi>z</m:mi></m:mfenced></m:math>. Since <m:math><m:mi>p</m:mi><m:mfenced separators=""><m:mi>A</m:mi></m:mfenced><m:mo>=</m:mo><m:mn>0</m:mn></m:math>, we have that <m:math>
 <m:mi>g</m:mi>
 <m:mfenced separators="">
  <m:mi>A</m:mi>
 </m:mfenced>
 <m:mo>=</m:mo>
 <m:msup>
  <m:mi>A</m:mi>
  <m:mi>v</m:mi>
 </m:msup>
</m:math>&#160;and 

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
 <m:msup>
  <m:mi>A</m:mi>
  <m:mi>v</m:mi>
 </m:msup>
 <m:mo>&#8290;</m:mo>
 <m:msub>
  <m:mi>x</m:mi>
  <m:mi>n</m:mi>
 </m:msub>
 <m:mo>=</m:mo>
 <m:mfenced separators="">
  <m:msub>
   <m:mi>a</m:mi>
   <m:mrow>
    <m:mi>k</m:mi>
    <m:mo>-</m:mo>
    <m:mn>1</m:mn>
   </m:mrow>
  </m:msub>
  <m:mo>&#8290;</m:mo>
  <m:msup>
   <m:mi>A</m:mi>
   <m:mrow>
    <m:mi>k</m:mi>
    <m:mo>-</m:mo>
    <m:mn>1</m:mn>
   </m:mrow>
  </m:msup>
  <m:mo>+</m:mo>
  <m:mo>&#8230;</m:mo>
  <m:mo>+</m:mo>
  <m:msub>
   <m:mi>a</m:mi>
   <m:mn>1</m:mn>
  </m:msub>
  <m:mi>A</m:mi>
  <m:mo>+</m:mo>
  <m:msub>
   <m:mi>a</m:mi>
   <m:mn>0</m:mn>
  </m:msub>
  <m:mi>I</m:mi>
 </m:mfenced>
 <m:mo>&#8290;</m:mo>
 <m:msub>
  <m:mi>x</m:mi>
  <m:mi>n</m:mi>
 </m:msub>
 <m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div></div><div class="paramtext">This polynomial evaluation can be performed using Horner's method:

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
 <m:msup>
  <m:mi>A</m:mi>
  <m:mi>v</m:mi>
 </m:msup>
 <m:mo>&#8290;</m:mo>
 <m:msub>
  <m:mi>x</m:mi>
  <m:mi>n</m:mi>
 </m:msub>
 <m:mo>=</m:mo>
 <m:mi>A</m:mi>
 <m:mo>&#8290;</m:mo>
 <m:mfenced separators="">
  <m:mo>&#8230;</m:mo>
  <m:mi>A</m:mi>
  <m:mo>&#8290;</m:mo>
  <m:mfenced separators="">
   <m:mi>A</m:mi>
   <m:mo>&#8290;</m:mo>
   <m:mfenced separators="">
    <m:mi>A</m:mi>
    <m:mo>&#8290;</m:mo>
    <m:msub>
     <m:mi>a</m:mi>
     <m:mrow>
      <m:mi>k</m:mi>
      <m:mo>-</m:mo>
      <m:mn>1</m:mn>
     </m:mrow>
    </m:msub>
    <m:mo>&#8290;</m:mo>
    <m:msub>
     <m:mi>x</m:mi>
     <m:mi>n</m:mi>
    </m:msub>
    <m:mo>+</m:mo>
    <m:msub>
     <m:mi>a</m:mi>
     <m:mrow>
      <m:mi>k</m:mi>
      <m:mo>-</m:mo>
      <m:mn>2</m:mn>
     </m:mrow>
    </m:msub>
    <m:mo>&#8290;</m:mo>
    <m:msub>
     <m:mi>x</m:mi>
     <m:mi>n</m:mi>
    </m:msub>
   </m:mfenced>
   <m:mo>+</m:mo>
   <m:msub>
    <m:mi>a</m:mi>
    <m:mrow>
     <m:mi>k</m:mi>
     <m:mo>-</m:mo>
     <m:mn>3</m:mn>
    </m:mrow>
   </m:msub>
   <m:mo>&#8290;</m:mo>
   <m:msub>
    <m:mi>x</m:mi>
    <m:mi>n</m:mi>
   </m:msub>
  </m:mfenced>
  <m:mo>+</m:mo>
  <m:mo>&#8230;</m:mo>
  <m:mo>+</m:mo>
  <m:msub>
   <m:mi>a</m:mi>
   <m:mn>1</m:mn>
  </m:msub>
  <m:mo>&#8290;</m:mo>
  <m:msub>
   <m:mi>x</m:mi>
   <m:mi>n</m:mi>
  </m:msub>
 </m:mfenced>
 <m:mo>+</m:mo>
 <m:msub>
  <m:mi>a</m:mi>
  <m:mn>0</m:mn>
 </m:msub>
 <m:mo>&#8290;</m:mo>
 <m:msub>
  <m:mi>x</m:mi>
  <m:mi>n</m:mi>
 </m:msub>
 <m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

which reduces the problem to advancing the generator <m:math><m:mi>k</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:math>&#160;places from state <m:math><m:msub><m:mi>x</m:mi><m:mi>n</m:mi></m:msub></m:math>&#160;and adding (where addition is as defined over <m:math><m:msub><m:mi>&#120125;</m:mi><m:mn>2</m:mn></m:msub></m:math>) the intermediate states for which <m:math><m:msub><m:mi>a</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;is non-zero.</div><div class="paramtext">There are therefore two stages to skipping the Mersenne Twister ahead <m:math><m:mi>v</m:mi></m:math>&#160;places:
<table class="standard-100"><tr>
<td style="width:2.1em;" valign="baseline">(i)</td>
<td valign="top">Calculate the coefficients of the polynomial 
<m:math>
 <m:mi>g</m:mi>
 <m:mfenced separators="">
  <m:mi>z</m:mi>
 </m:mfenced>
 <m:mo>=</m:mo>
 <m:msup>
  <m:mi>z</m:mi>
  <m:mi>v</m:mi>
 </m:msup>
 <m:mi mathvariant="normal">&#160;mod&#160;</m:mi>
 <m:mi>p</m:mi>
 <m:mfenced separators="">
  <m:mi>z</m:mi> 
 </m:mfenced>
</m:math>;</td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(ii)</td>
<td valign="top">advance the sequence <m:math><m:mi>k</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:math>&#160;places from the starting state and add the intermediate states that correspond to non-zero coefficients in the polynomial calculated in the first step.</td>
</tr></table>
</div><div class="paramtext">The resulting state is that for position <m:math><m:mi>v</m:mi></m:math>&#160;in the sequence.</div><div class="paramtext">The cost of calculating the polynomial is <m:math>
 <m:mrow><m:mi mathvariant="italic">O</m:mi><m:mfenced separators="">
   <m:msup>
    <m:mi>k</m:mi>
    <m:mn>2</m:mn>
   </m:msup>
   <m:mrow><m:mi>log</m:mi><m:mo>&#8289;</m:mo><m:mi>v</m:mi></m:mrow>
  </m:mfenced></m:mrow>
</m:math>&#160;and the cost of applying it to state is constant. Skip ahead functionality is typically used in order to generate <m:math><m:mi>n</m:mi></m:math>&#160;independent pseudorandom number streams (e.g., for separate threads of computation). There are two options for generating the <m:math><m:mi>n</m:mi></m:math>&#160;states:
<table class="standard-100"><tr>
<td style="width:2.1em;" valign="baseline"><a name="item1b" id="item1b"/>(i)</td>
<td valign="top"> On the master thread calculate the polynomial for a skip ahead distance of <m:math><m:mi>v</m:mi></m:math>&#160;and apply this polynomial to state <m:math><m:mi>n</m:mi></m:math>&#160;times, after each iteration <m:math><m:mi>j</m:mi></m:math>&#160;saving the current state for later usage by thread <m:math><m:mi>j</m:mi></m:math>.</td>
</tr><tr>
<td style="width:2.1em;" valign="baseline"><a name="item2b" id="item2b"/>(ii)</td>
<td valign="top"> Have each thread <m:math><m:mi>j</m:mi></m:math>&#160;independently and in parallel with other threads calculate the polynomial for a distance of <m:math><m:mfenced separators=""><m:mi>j</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mfenced><m:mo>&#8290;</m:mo><m:mi>v</m:mi></m:math>&#160;and apply to the original state.</td>
</tr></table>
</div><div class="paramtext">Since 
<m:math>
 <m:mrow>
  <m:mstyle displaystyle="true"><m:munder>
   <m:mi mathvariant="normal">lim</m:mi>
   <m:mrow>
    <m:mi>v</m:mi>
    <m:mo>&#8594;</m:mo>
    <m:mo>&#8734;</m:mo>
   </m:mrow>
  </m:munder></m:mstyle><m:mspace width="0.25em"/>
  <m:mrow><m:mi>log</m:mi><m:mo>&#8289;</m:mo><m:mi>v</m:mi></m:mrow>
 </m:mrow>
 <m:mo>=</m:mo>
 <m:mrow><m:mi>log</m:mi><m:mo>&#8289;</m:mo><m:mrow>
   <m:mi>n</m:mi>
   <m:mo>&#8290;</m:mo>
   <m:mi>v</m:mi>
  </m:mrow></m:mrow>
</m:math>, then for large <m:math><m:mi>v</m:mi></m:math>&#160;the cost of generating the polynomial for a skip ahead distance of <m:math><m:mi>n</m:mi><m:mo>&#8290;</m:mo><m:mi>v</m:mi></m:math>&#160;(i.e., the calculation performed by thread <m:math><m:mi>n</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:math>&#160;in option <a class="item" href="#item2b">(ii)</a> above) is approximately the same as generating that for a distance of <m:math><m:mi>v</m:mi></m:math>&#160;(i.e., the calculation performed by thread <m:math><m:mn>0</m:mn></m:math>). However, only one application to state need be made per thread, and if <m:math><m:mi>n</m:mi></m:math>&#160;is sufficiently large the cost of applying the polynomial to state becomes the dominant cost in option <a class="item" href="#item1b">(i)</a>, in which case it is desirable to  use option <a class="item" href="#item2b">(ii)</a>. Tests have shown that as a guideline it becomes worthwhile to switch from option <a class="item" href="#item1b">(i)</a> to option <a class="item" href="#item2b">(ii)</a> for approximately <m:math><m:mi>n</m:mi><m:mo>&gt;</m:mo><m:mn>30</m:mn></m:math>.</div><div class="paramtext">Leap frog calculations with the Mersenne Twister are performed by computing the sequence fully up to the required size and discarding the redundant numbers for a given stream.</div><h2 class="standard"><a class="sec" name="available" id="available"/>3&#160;&#160;Recommendations on Choice and Use of Available Routines</h2><h3 class="standard"><a class="sec" name="pseudorandomnumbers" id="pseudorandomnumbers"/>3.1&#160;&#160;Pseudorandom Numbers</h3>
<div class="paramtext">Prior to generating any pseudorandom variates the base generator being used must be initialized. Once initialized, a distributional generator can be called to obtain the variates required. No interfaces have been supplied for direct access to the base generators. If a sequence of random variates from a uniform distribution on the open interval <m:math><m:mfenced separators=""><m:mn>0</m:mn><m:mo>,</m:mo><m:mn>1</m:mn></m:mfenced></m:math>, is required, then the uniform distribution routine (<a class="rout" href="../G05/g05saf.xml">G05SAF</a>) should be called.</div><h4 class="standard"><a class="sec" name="initialization" id="initialization"/>3.1.1&#160;&#160;Initialization</h4>
<div class="paramtext">Prior to generating any variates the base generator must be initialized. Two utility routines are provided for this, <a class="rout" href="../G05/g05kff.xml">G05KFF</a> and <a class="rout" href="../G05/g05kgf.xml">G05KGF</a>, both of which allow any of the base generators to be chosen.</div><div class="paramtext"><a class="rout" href="../G05/g05kff.xml">G05KFF</a> selects and initializes a base generator to a repeatable (when executed serially) state: two calls of <a class="rout" href="../G05/g05kff.xml">G05KFF</a> with the same argument-values will result in the same subsequent sequences of random numbers (when both generated serially).</div><div class="paramtext"><a class="rout" href="../G05/g05kgf.xml">G05KGF</a> selects and initializes a base generator to a non-repeatable state in such a way that different calls of <a class="rout" href="../G05/g05kgf.xml">G05KGF</a>, either in the same run or different runs of the program, will almost certainly result in different subsequent sequences of random numbers.</div><div class="paramtext">No utilities for saving, retrieving or copying the current state of a generator have been provided. All of the information on the current state of a generator (or stream, if multiple streams are being used) is stored in the integer array STATE and as such this array can be treated as any other integer array, allowing for easy copying, restoring, etc.</div><h4 class="standard"><a class="sec" name="repeatinit" id="repeatinit"/>3.1.2&#160;&#160;Repeated initialization</h4>
<div class="paramtext">As mentioned in <a class="sec" href="#msviadifferentinitialvalues">Section 2.7.1</a>, it is important to note that the statistical properties of pseudorandom numbers are only guaranteed within sequences and not between sequences produced by the same generator.  Repeated initialization will thus render the numbers obtained less rather than more independent.  In a simple case there should be only one call to <a class="rout" href="../G05/g05kff.xml">G05KFF</a> or <a class="rout" href="../G05/g05kgf.xml">G05KGF</a> and this call should be before any call to an actual generation routine.</div><h4 class="standard"><a class="sec" name="basegenerator" id="basegenerator"/>3.1.3&#160;&#160;Choice of Base Generator</h4>
<div class="paramtext">If a single sequence is required then it is recommended that the Mersenne Twister is used as the base generator (<m:math><m:mi mathvariant="bold">GENID</m:mi><m:mo>=</m:mo><m:mn>3</m:mn></m:math>). This generator is fast, has an extremely long period and has been shown to perform well on various test suites, see <a class="ref" href="#ref785">Matsumoto and Nishimura (1998)</a>, <a class="ref" href="#ref786">L'Ecuyer and Simard (2002)</a> and <a class="ref" href="#ref787">Wichmann and Hill (2006)</a> for example.</div><div class="paramtext">When choosing a base generator, the period of the chosen generator should be borne in mind. A good rule of thumb is never to use more numbers than the square root of the period in any one experiment as the statistical properties are impaired. For closely related reasons, breaking numbers down into their bit patterns and using individual bits may also cause trouble.</div><h4 class="standard"><a class="sec" name="generatingmultiplestreams" id="generatingmultiplestreams"/>3.1.4&#160;&#160;Choice of Method for Generating Multiple Streams</h4>
<div class="paramtext">If the Wichmann&#8211;Hill II base generator is being used, and a period of <m:math><m:msup><m:mn>2</m:mn><m:mn>90</m:mn></m:msup></m:math>&#160;is sufficient, then the method described in <a class="sec" href="#msviadifferentinitialvalues">Section 2.7.1</a> can be used. If a different generator is used, or a longer period length is required then generating multiple streams by altering the initial values should be avoided.</div><div class="paramtext">Using a different generator works well if less than 277 streams are required. </div><div class="paramtext">Of the remaining two methods, both skip-ahead and leap-frogging use the sequence from a single generator, both guarantee that the different sequences will not overlap and both can be scaled to an arbitrary number of streams. Leap-frogging requires no <span class="italic">a-priori</span> knowledge about the number of variates being generated, whereas skip-ahead requires you to know (approximately) the maximum number of variates required from each stream. Skip-ahead requires no <span class="italic">a-priori</span> information on the number of streams required. In contrast leap-frogging requires you to know the maximum number of streams required, prior to generating the first value. Of these two, if possible, skip-ahead should be used in preference to leap-frogging. Both methods required additional computation compared with generating a single sequence, but for skip-ahead this computation occurs only at initialization. For leap-frogging additional computation is required both at initialization and during the generation of the variates. In addition, as mentioned in <a class="sec" href="#leapfrogging">Section 2.7.4</a>, using leap-frogging can, in some instances, change the statistical properties of the sequences being generated.</div><h4 class="standard"><a class="sec" name="available13" id="available13"/>3.1.5&#160;&#160;Copulas</h4>
<div class="paramtext">After calling <a class="rout" href="../G05/g05rcf.xml">G05RCF</a> or <a class="rout" href="../G05/g05rdf.xml">G05RDF</a> the G01F routines in <a class="chap" href="../G01/g01conts.xml">Chapter G01</a> can be used to convert the uniform marginal distributors into a different form as required.</div><h3 class="standard"><a class="sec" name="quasirandomnumbers" id="quasirandomnumbers"/>3.2&#160;&#160;Quasi-random Numbers</h3>
<div class="paramtext">Prior to generating any quasi-random variates the generator being used must be initialized via <a class="rout" href="../G05/g05ylf.xml">G05YLF</a> or <a class="rout" href="../G05/g05ynf.xml">G05YNF</a>. Of these, <a class="rout" href="../G05/g05ylf.xml">G05YLF</a> can be used to initialize a standard Sobol, Faure or Niederreiter sequence and <a class="rout" href="../G05/g05ynf.xml">G05YNF</a> can be used to initialize a scrambled Sobol or Niederreiter sequence.</div><div class="paramtext">Due to the random nature of the scrambling, prior to calling the initialization routine <a class="rout" href="../G05/g05ynf.xml">G05YNF</a> one of the pseudorandom initialization routines, <a class="rout" href="../G05/g05kff.xml">G05KFF</a> or <a class="rout" href="../G05/g05kgf.xml">G05KGF</a>, must be called.</div><div class="paramtext">Once a quasi-random generator has been initialized, using either <a class="rout" href="../G05/g05ylf.xml">G05YLF</a> or <a class="rout" href="../G05/g05ynf.xml">G05YNF</a>, one of three generation routines can be called to generate uniformly distributed sequences (<a class="rout" href="../G05/g05ymf.xml">G05YMF</a>), Normally distributed sequences (<a class="rout" href="../G05/g05yjf.xml">G05YJF</a>) or sequences with a log-normal distribution (<a class="rout" href="../G05/g05ykf.xml">G05YKF</a>). For example, for a repeatable sequence of scrambled quasi-random variates from the Normal distribution, <a class="rout" href="../G05/g05kff.xml">G05KFF</a> must be called first (to initialize a pseudorandom generator), followed by <a class="rout" href="../G05/g05ynf.xml">G05YNF</a> (to initialize a scrambled quasi-random generator) and then <a class="rout" href="../G05/g05yjf.xml">G05YJF</a> can be called to generate the sequence from the required distribution.</div><div class="paramtext">Sequences from other distributions can be obtained by calling the &#8216;deviate&#8217; routines supplied in <a class="chap" href="../G01/g01conts.xml">Chapter G01</a> on the results from <a class="rout" href="../G05/g05ymf.xml">G05YMF</a>. However, care should be taken when doing this as some of these &#8216;deviate&#8217; routines are only accurate up to a limited number of significant figures which may effect the statistical properties of the resulting sequence of variates.</div><h3 class="standard"><a class="sec" name="available3" id="available3"/>3.3&#160;&#160;Programming Advice</h3>
<div class="paramtext">Take care when programming calls to those routines in this chapter which are functions.  The reason is that different calls with the same parameters are intended to give different results.</div><div class="paramtext">For example, if you wish to assign to 
<span class="mono">Z</span>
the difference between two successive random numbers generated by <a class="rout" href="../G05/g05kaf.xml">G05KAF</a>, beware of writing
<pre class="verbatim">
Z = G05KAF(IGEN,ISEED) - G05KAF(IGEN,ISEED)
</pre>

It is quite legitimate for a Fortran compiler to compile zero, one or two calls to <a class="rout" href="../G05/g05kaf.xml">G05KAF</a>; if two calls, they may be in either order (if zero or one calls are compiled, 
<span class="mono">Z</span>
would be set to zero).  A safe method to program this would be
<pre class="verbatim">
X = G05KAF(IGEN,ISEED)
Y = G05KAF(IGEN,ISEED)
Z = X-Y
</pre></div><h2 class="standard"><a class="sec" name="index" id="index"/>4&#160;&#160;Functionality Index</h2>
<div>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>Generating&#160;samples,&#160;matrices&#160;and&#160;tables,</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;random&#160;correlation&#160;matrix</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05pyf.xml">G05PYF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;random&#160;orthogonal&#160;matrix</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05pxf.xml">G05PXF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;random&#160;permutation&#160;of&#160;an&#160;integer&#160;vector</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05ncf.xml">G05NCF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;random&#160;sample&#160;from&#160;an&#160;integer&#160;vector</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;unequal&#160;weights,&#160;without&#160;replacement</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05nef.xml">G05NEF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;unweighted,&#160;without&#160;replacement</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05ndf.xml">G05NDF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;random&#160;table</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05pzf.xml">G05PZF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>Generation&#160;of&#160;time&#160;series,</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;asymmetric&#160;GARCH&#160;Type&#160;II</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05pef.xml">G05PEF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;asymmetric&#160;GJR&#160;GARCH</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05pff.xml">G05PFF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;EGARCH</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05pgf.xml">G05PGF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;exponential&#160;smoothing</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05pmf.xml">G05PMF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;type&#160;I&#160;AGARCH</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05pdf.xml">G05PDF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;univariate&#160;ARMA</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05phf.xml">G05PHF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;vector&#160;ARMA</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05pjf.xml">G05PJF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>Pseudorandom&#160;numbers,</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;array&#160;of&#160;variates&#160;from&#160;multivariate&#160;distributions,</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Dirichlet&#160;distribution</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05sef.xml">G05SEF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;multinomial&#160;distribution</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05tgf.xml">G05TGF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Normal&#160;distribution</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05ryf.xml">G05RYF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Student's&#160;<span><i>t</i></span>&#160;distribution</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05rzf.xml">G05RZF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;copulas</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Clayton/Cook&#8211;Johnson&#160;copula&#160;(bivariate)</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05ref.xml">G05REF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Clayton/Cook&#8211;Johnson&#160;copula&#160;(multivariate)</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05rhf.xml">G05RHF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Frank&#160;copula&#160;(bivariate)</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05rff.xml">G05RFF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Frank&#160;copula&#160;(multivariate)</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05rjf.xml">G05RJF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Gaussian&#160;copula</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05rdf.xml">G05RDF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Gumbel&#8211;Hougaard&#160;copula</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05rkf.xml">G05RKF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Plackett&#160;copula</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05rgf.xml">G05RGF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Student's&#160;<span><i>t</i></span>&#160;copula</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05rcf.xml">G05RCF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;initialize&#160;generator,</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;multiple&#160;streams,</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;leap-frog</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05khf.xml">G05KHF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;skip-ahead</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05kjf.xml">G05KJF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;skip-ahead&#160;(power&#160;of&#160;2)</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05kkf.xml">G05KKF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;nonrepeatable&#160;sequence</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05kgf.xml">G05KGF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;repeatable&#160;sequence</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05kff.xml">G05KFF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;vector&#160;of&#160;variates&#160;from&#160;discrete&#160;univariate&#160;distributions,</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;binomial&#160;distribution</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05taf.xml">G05TAF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;geometric&#160;distribution</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05tcf.xml">G05TCF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;hypergeometric&#160;distribution</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05tef.xml">G05TEF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;logarithmic&#160;distribution</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05tff.xml">G05TFF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;logical&#160;value&#160;.TRUE.&#160;or&#160;.FALSE.</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05tbf.xml">G05TBF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;negative&#160;binomial&#160;distribution</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05thf.xml">G05THF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Poisson&#160;distribution</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05tjf.xml">G05TJF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;uniform&#160;distribution</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05tlf.xml">G05TLF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;user-supplied&#160;distribution</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05tdf.xml">G05TDF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;variate&#160;array&#160;from&#160;discrete&#160;distributions&#160;with&#160;array&#160;of&#160;parameters,</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Poisson&#160;distribution&#160;with&#160;varying&#160;mean</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05tkf.xml">G05TKF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;vectors&#160;of&#160;variates&#160;from&#160;continuous&#160;univariate&#160;distributions,</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;beta&#160;distribution</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05sbf.xml">G05SBF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Cauchy&#160;distribution</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05scf.xml">G05SCF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;exponential&#160;mix&#160;distribution</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05sgf.xml">G05SGF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span><i>F</i></span>-distribution</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05shf.xml">G05SHF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;gamma&#160;distribution</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05sjf.xml">G05SJF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;logistic&#160;distribution</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05slf.xml">G05SLF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;log-normal&#160;distribution</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05smf.xml">G05SMF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;negative&#160;exponential&#160;distribution</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05sff.xml">G05SFF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Normal&#160;distribution</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05skf.xml">G05SKF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;real&#160;number&#160;from&#160;the&#160;continuous&#160;uniform&#160;distribution</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05saf.xml">G05SAF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Student's&#160;<span><i>t</i></span>-distribution</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05snf.xml">G05SNF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;triangular&#160;distribution</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05spf.xml">G05SPF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;uniform&#160;distribution</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05sqf.xml">G05SQF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;von&#160;Mises&#160;distribution</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05srf.xml">G05SRF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Weibull&#160;distribution</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05ssf.xml">G05SSF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span><span><span><i>&#967;</i></span><sup><span>2</span></sup></span></span>&#160;square distribution</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05sdf.xml">G05SDF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>Quasi-random&#160;numbers,</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;array&#160;of&#160;variates&#160;from&#160;univariate&#160;distributions,</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;log-normal&#160;distribution</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05ykf.xml">G05YKF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Normal&#160;distribution</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05yjf.xml">G05YJF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;uniform&#160;distribution</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05ymf.xml">G05YMF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;initialize&#160;generator,</nobr></td><td>&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr/></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;scrambled&#160;Sobol&#160;or&#160;Niederreiter</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05ynf.xml">G05YNF</a></nobr></td></tr></table>
<table style="width:95%"><tr><td style="width:1pt; white-space: no-wrap;"><nobr>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Sobol,&#160;Niederreiter&#160;or&#160;Faure</nobr></td><td style="border-bottom: 0.1em dotted black;">&#160;</td><td style="width: 1pt; white-space: no-wrap;"><nobr><a class="rout" href="../G05/g05ylf.xml">G05YLF</a></nobr></td></tr></table></div><h2 class="standard"><a class="sec" name="auxindex" id="auxindex"/>5&#160;&#160;Auxiliary Routines Associated with Library Routine Parameters</h2>
<div class="paramtext">None.</div><h2 class="standard"><a class="sec" name="withdrawn" id="withdrawn"/>6&#160;&#160;Routines Withdrawn or Scheduled for Withdrawal</h2>
<div class="left-tablediv"><table class="wdrn"><tbody>
<tr><td class="libdoc" valign="top"><b>Withdrawn<br/>Routine</b></td><td class="libdoc" valign="top" align="center"><b>Mark of<br/>Withdrawal</b></td><td class="libdoc" valign="top"><br/><b>Replacement Routine(s)</b></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05CAF">G05CAF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05saf.xml">G05SAF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05CBF">G05CBF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05kff.xml">G05KFF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05CCF">G05CCF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05kgf.xml">G05KGF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05CFF">G05CFF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../F06/f06dff.xml">F06DFF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05CGF">G05CGF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../F06/f06dff.xml">F06DFF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05DAF">G05DAF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05sqf.xml">G05SQF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05DBF">G05DBF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05sff.xml">G05SFF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05DCF">G05DCF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05slf.xml">G05SLF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05DDF">G05DDF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05skf.xml">G05SKF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05DEF">G05DEF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05smf.xml">G05SMF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05DFF">G05DFF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05scf.xml">G05SCF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05DGF">G05DGF</a></td><td class="libdoc" valign="top" align="center">16</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05sjf.xml">G05SJF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05DHF">G05DHF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05sdf.xml">G05SDF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05DJF">G05DJF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05snf.xml">G05SNF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05DKF">G05DKF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05shf.xml">G05SHF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05DLF">G05DLF</a></td><td class="libdoc" valign="top" align="center">16</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05sbf.xml">G05SBF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05DMF">G05DMF</a></td><td class="libdoc" valign="top" align="center">16</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05sbf.xml">G05SBF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05DPF">G05DPF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05ssf.xml">G05SSF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05DRF">G05DRF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05tkf.xml">G05TKF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05DYF">G05DYF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05tlf.xml">G05TLF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05DZF">G05DZF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05tbf.xml">G05TBF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05EAF">G05EAF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05rzf.xml">G05RZF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05EBF">G05EBF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05tlf.xml">G05TLF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05ECF">G05ECF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05tjf.xml">G05TJF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05EDF">G05EDF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05taf.xml">G05TAF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05EEF">G05EEF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05thf.xml">G05THF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05EFF">G05EFF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05tef.xml">G05TEF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05EGF">G05EGF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05phf.xml">G05PHF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05EHF">G05EHF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05ncf.xml">G05NCF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05EJF">G05EJF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05ndf.xml">G05NDF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05EWF">G05EWF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05phf.xml">G05PHF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05EXF">G05EXF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05tdf.xml">G05TDF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05EYF">G05EYF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05tdf.xml">G05TDF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05EZF">G05EZF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05rzf.xml">G05RZF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05FAF">G05FAF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05sqf.xml">G05SQF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05FBF">G05FBF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05sff.xml">G05SFF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05FDF">G05FDF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05skf.xml">G05SKF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05FEF">G05FEF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05sbf.xml">G05SBF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05FFF">G05FFF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05sjf.xml">G05SJF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05FSF">G05FSF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05srf.xml">G05SRF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05GAF">G05GAF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05pxf.xml">G05PXF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05GBF">G05GBF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05pyf.xml">G05PYF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05HDF">G05HDF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05pjf.xml">G05PJF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05HKF">G05HKF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05pdf.xml">G05PDF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05HLF">G05HLF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05pef.xml">G05PEF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05HMF">G05HMF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05pff.xml">G05PFF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05HNF">G05HNF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05pgf.xml">G05PGF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05KAF">G05KAF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05saf.xml">G05SAF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05KBF">G05KBF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05kff.xml">G05KFF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05KCF">G05KCF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05kgf.xml">G05KGF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05KEF">G05KEF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05tbf.xml">G05TBF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05LAF">G05LAF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05skf.xml">G05SKF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05LBF">G05LBF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05snf.xml">G05SNF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05LCF">G05LCF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05sdf.xml">G05SDF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05LDF">G05LDF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05shf.xml">G05SHF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05LEF">G05LEF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05sbf.xml">G05SBF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05LFF">G05LFF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05sjf.xml">G05SJF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05LGF">G05LGF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05sqf.xml">G05SQF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05LHF">G05LHF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05spf.xml">G05SPF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05LJF">G05LJF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05sff.xml">G05SFF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05LKF">G05LKF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05smf.xml">G05SMF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05LLF">G05LLF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05sjf.xml">G05SJF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05LMF">G05LMF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05ssf.xml">G05SSF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05LNF">G05LNF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05slf.xml">G05SLF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05LPF">G05LPF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05srf.xml">G05SRF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05LQF">G05LQF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05sgf.xml">G05SGF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05LXF">G05LXF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05ryf.xml">G05RYF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05LYF">G05LYF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05rzf.xml">G05RZF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05LZF">G05LZF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05rzf.xml">G05RZF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05MAF">G05MAF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05tlf.xml">G05TLF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05MBF">G05MBF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05tcf.xml">G05TCF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05MCF">G05MCF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05thf.xml">G05THF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05MDF">G05MDF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05tff.xml">G05TFF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05MEF">G05MEF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05tkf.xml">G05TKF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05MJF">G05MJF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05taf.xml">G05TAF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05MKF">G05MKF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05tjf.xml">G05TJF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05MLF">G05MLF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05tef.xml">G05TEF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05MRF">G05MRF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05tgf.xml">G05TGF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05MZF">G05MZF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05tdf.xml">G05TDF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05NAF">G05NAF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05ncf.xml">G05NCF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05NBF">G05NBF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05ndf.xml">G05NDF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05PAF">G05PAF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05phf.xml">G05PHF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05PCF">G05PCF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05pjf.xml">G05PJF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05QAF">G05QAF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05pxf.xml">G05PXF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05QBF">G05QBF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05pyf.xml">G05PYF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05QDF">G05QDF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05pzf.xml">G05PZF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05RAF">G05RAF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05rdf.xml">G05RDF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05RBF">G05RBF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05rcf.xml">G05RCF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05YAF">G05YAF</a></td><td class="libdoc" valign="top" align="center">23</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05ylf.xml">G05YLF</a> and <a class="rout" href="../G05/g05ymf.xml">G05YMF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05YBF">G05YBF</a></td><td class="libdoc" valign="top" align="center">23</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05ylf.xml">G05YLF</a> and either <a class="rout" href="../G05/g05yjf.xml">G05YJF</a> or <a class="rout" href="../G05/g05ykf.xml">G05YKF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05YCF">G05YCF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05ylf.xml">G05YLF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05YDF">G05YDF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05ymf.xml">G05YMF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05YEF">G05YEF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05ylf.xml">G05YLF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05YFF">G05YFF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05ymf.xml">G05YMF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05YGF">G05YGF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05ylf.xml">G05YLF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05YHF">G05YHF</a></td><td class="libdoc" valign="top" align="center">24</td><td class="libdoc" valign="top"><a class="rout" href="../G05/g05ymf.xml">G05YMF</a></td></tr>
<tr><td class="libdoc" valign="top"><a class="wdrn" href="../GENINT/replace.xml#G05ZAF">G05ZAF</a></td><td class="libdoc" valign="top" align="center">22</td><td class="libdoc" valign="top">No replacement routine required</td></tr></tbody></table></div><h2 class="standard"><a class="sec" name="references" id="references"/>7&#160;&#160;References</h2><div class="paramtext"><a name="ref784" id="ref784"/>Banks J (1998)  <i>Handbook on Simulation</i> Wiley </div>
<div class="paramtext"><a name="ref737" id="ref737"/>Boye E (Unpublished manuscript)  Copulas for finance: a reading guide and some applications Financial Econometrics Research Centre, City University Business School, London </div>
<div class="paramtext"><a name="ref706" id="ref706"/>Bratley P and Fox B L (1988)  Algorithm 659: implementing Sobol's quasirandom sequence generator <i>ACM Trans. Math. Software</i> <b>14 (1)</b> 88&#8211;100 </div>
<div class="paramtext"><a name="ref822" id="ref822"/>Faure H and Tezuka S (2000)  Another random scrambling of digital (t,s)-sequences <i>Monte Carlo and Quasi-Monte Carlo Methods</i> Springer-Verlag, Berlin, Germany (eds K T Fang, F J Hickernell and H Niederreiter) </div>
<div class="paramtext"><a name="ref705" id="ref705"/>Fox B L (1986)  Algorithm 647: implementation and relative efficiency of quasirandom sequence generators <i>ACM Trans. Math. Software</i> <b>12 (4)</b> 362&#8211;376 </div>
<div class="paramtext"><a name="ref873" id="ref873"/>Haramoto H, Matsumoto M, Nishimura T,  Panneton F and L'Ecuyer P (2008)  Efficient jump ahead for F2-linear random number generators <i>INFORMS J. on Computing</i> <b>20 (3)</b> 385&#8211;390 </div>
<div class="paramtext"><a name="ref821" id="ref821"/>Hong H S and Hickernell F J (2003)  Algorithm 823: implementing scrambled digital sequences <i>ACM Trans. Math. Software</i> <b>29:2</b> 95&#8211;109 </div>
<div class="paramtext"><a name="ref818" id="ref818"/>Joe S and Kuo F Y (2008)  Constructing Sobol sequences with better two-dimensional projections <i>SIAM J. Sci. Comput.</i> <b>30</b> 2635&#8211;2654 </div>
<div class="paramtext"><a name="ref150" id="ref150"/>Knuth D E (1981)  <i>The Art of Computer Programming (Volume 2)</i> (2nd Edition) Addison&#8211;Wesley </div>
<div class="paramtext"><a name="ref786" id="ref786"/>L'Ecuyer P and Simard R (2002)  <i>TestU01: a software library in ANSI C for empirical testing of random number generators</i> Departement d'Informatique et de Recherche Operationnelle, Universite de Montreal <a class="url" href="http://www.iro.umontreal.ca/~lecuyer">http://www.iro.umontreal.ca/~lecuyer</a></div>
<div class="paramtext"><a name="ref547" id="ref547"/>Maclaren N M (1989)  The generation of multiple independent sequences of pseudorandom numbers <i>Appl. Statist.</i> <b>38</b> 351&#8211;359 </div>
<div class="paramtext"><a name="ref785" id="ref785"/>Matsumoto M and Nishimura T (1998)  Mersenne twister: a 623-dimensionally equidistributed uniform pseudorandom number generator <i>ACM Transactions on Modelling and Computer Simulations</i> </div>
<div class="paramtext"><a name="ref242" id="ref242"/>Morgan B J T (1984)  <i>Elements of Simulation</i> Chapman and Hall </div>
<div class="paramtext"><a name="ref736" id="ref736"/>Nelsen R B (1998)  <i>An Introduction to Copulas. Lecture Notes in Statistics 139</i> Springer </div>
<div class="paramtext"><a name="ref820" id="ref820"/>Owen A B (1995)  Randomly permuted (t,m,s)-nets and (t,s)-sequences <i>Monte Carlo and Quasi-Monte Carlo Methods in Scientific Computing, Lecture Notes in Statistics</i> <b>106</b> Springer-Verlag, New York, NY 299&#8211;317 (eds H Niederreiter and P J-S Shiue) </div>
<div class="paramtext"><a name="ref243" id="ref243"/>Ripley B D (1987)  <i>Stochastic Simulation</i> Wiley </div>
<div class="paramtext"><a name="ref735" id="ref735"/>Sklar A (1973)  Random variables: joint distribution functions and copulas <i>Kybernetika</i> <b>9</b> 499&#8211;460 </div>
<div class="paramtext"><a name="ref787" id="ref787"/>Wichmann B A and Hill I D (2006)  Generating good pseudo-random numbers <i>Computational Statistics and Data Analysis</i> <b>51</b> 1614&#8211;1622 </div>
<div class="paramtext"><a name="ref788" id="ref788"/>Wikramaratna R S (1989)  ACORN - a new method for generating sequences of uniformly distributed pseudo-random numbers <i>Journal of Computational Physics</i> <b>83</b> 16&#8211;31 </div>
<div class="paramtext"><a name="ref789" id="ref789"/>Wikramaratna R S (1992)  Theoretical background for the ACORN random number generator <i>Report AEA-APS-0244</i> AEA Technology, Winfrith, Dorest, UK </div>
<div class="paramtext"><a name="ref790" id="ref790"/>Wikramaratna R S (2007)  The additive congruential random number generator  a special case of a multiple recursive generator <i>Journal of Computational and Applied Mathematics</i> </div><hr/><div><a class="chap" href="g05conts.xml">G05 Chapter Contents</a></div><div><a class="chapint" href="../../pdf/G05/g05intro.pdf">G05 Chapter Introduction (PDF version)</a></div>
<div><a class="htmltoc" href="../FRONTMATTER/manconts.xml">NAG Library Manual</a></div>
<div><hr/><a class="genint" href="../FRONTMATTER/copyright.xml">&#169; The Numerical Algorithms Group Ltd, Oxford, UK. 2011</a></div></body></html>