help-octave
[Top][All Lists]

## Re: [OctDev] random numbers for distributed computations

 From: David Bateman Subject: Re: [OctDev] random numbers for distributed computations Date: Mon, 11 Apr 2005 13:14:19 +0200 User-agent: Mozilla Thunderbird 0.8 (X11/20040923)

```Michael Creel wrote:

```
```On Monday 11 April 2005 11:57, Francesco Potorti` wrote:
```
```I have a question about this. If a RNG has a period of X, that means that
there are X unique values that are generated, and then the sequence
repeats.
```
```No, it means that the sequence repeats after X values are produced.  The
period length says nothing about the space of values.  However, for good
general purpose generators, the size of the space of values is much
smaller than the period.
```
```
OK, you're saying that a generator with period 5 could produce values like
1 2 2 1 2 *** 1 2 2 1 2 *** 1 2 2 1 2
so the set of unique values is smaller than the period, correct?

```
This may be, but for the moment my main question is whether the set of unique values that is generated depends upon the initial seed, or whether it's just the starting point in the sequence that depends on the initial seed. Could the unique values be 3 and 4, say, or will they always be 1 and 2?
```M.

```
```
```
The octave-forge generators are based on the Mersenne Twister, and it doesn't have a seed but rather a state of 32 values. So the unique starting points are defined from this state vector.. The period of the Mersenne Twister is 2^19937-1, so I wouldn''t worry about it repeating itself in yours or my lifetimes.
```
Regards
David

--
```
Motorola Labs - Paris +33 1 69 35 48 04 (Ph) Parc Les Algorithmes, Commune de St Aubin +33 1 69 35 77 01 (Fax) 91193 Gif-Sur-Yvette FRANCE
```
```
The information contained in this communication has been classified as: [x] General Business Information [ ] Motorola Internal Use Only [ ] Motorola Confidential Proprietary
```

-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------

```