From: David B. <Dav...@mo...> - 2005-04-11 11:15:46
|
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 -- David Bateman Dav...@mo... 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 |