Serving the Quantitative Finance Community

 
User avatar
Yossarian22
Topic Author
Posts: 4
Joined: March 15th, 2007, 2:27 am

Mersenne Twister repetition of rnd num seq

February 8th, 2011, 1:16 am

Did you ever come across the problem say you generated a random number sequence with seed X and you generated Y random numbers. Now you want to know the y+1 random number but the random number generator was stopped. Can you determine the seed for the algo to generate the Yth+1 random numbers knowing only X and Y?I know I have solved this problem using sobol sequences but now I wonder if it's true for Mersenne twister?
 
User avatar
r00kie
Posts: 0
Joined: February 6th, 2010, 9:18 am

Mersenne Twister repetition of rnd num seq

February 8th, 2011, 2:08 am

Its not possible.MT has a huge period and the sub sequence occurs many times. Knowing only X and Y it is not possible to determine Y+1.
 
User avatar
kimosabe
Posts: 4
Joined: November 25th, 2003, 12:24 pm

Mersenne Twister repetition of rnd num seq

February 8th, 2011, 5:29 am

Anyone who attempts to generate random numbers by deterministic means is, of course, living in a state of sin. - John von Neumann UTSL. Every random number generator has a state. Saito and Matsumoto have a non predictable state. They created a new MT algorithm that takes advantage of SIMD processor instructions on chips supporting SSE2. Matsumoto collaborated with L'Ecuyer on a new rng that has some very nice properties. You can see what these smart guys came up with at the open source project http://xll.codeplex.com
 
User avatar
Cuchulainn
Posts: 22926
Joined: July 16th, 2004, 7:38 am

Mersenne Twister repetition of rnd num seq

February 8th, 2011, 12:59 pm

QuoteAnyone who attempts to generate random numbers by deterministic means is, of course, living in a state of sin. - John von Neumann Mortal or venial?
 
User avatar
bojan
Posts: 0
Joined: August 8th, 2008, 5:35 am

Mersenne Twister repetition of rnd num seq

February 8th, 2011, 1:23 pm

As we discussed only recently here, for standard Marsenne twister you need to know at least 624 words of output to regenerate the seed.
 
User avatar
Yossarian22
Topic Author
Posts: 4
Joined: March 15th, 2007, 2:27 am

Mersenne Twister repetition of rnd num seq

February 8th, 2011, 1:53 pm

Yes I found out how last night. Given that most of you are so sure that you already know the answer. I wonder if I should post the solution?
 
User avatar
kimosabe
Posts: 4
Joined: November 25th, 2003, 12:24 pm

Mersenne Twister repetition of rnd num seq

February 9th, 2011, 7:19 pm

QuoteOriginally posted by: CuchulainnQuoteAnyone who attempts to generate random numbers by deterministic means is, of course, living in a state of sin. - John von Neumann Mortal or venial?Trigonometric.
 
User avatar
aedallan
Posts: 0
Joined: December 30th, 2007, 9:20 pm

Mersenne Twister repetition of rnd num seq

March 8th, 2011, 9:28 am

Hi Yossarian,Please post your findings. Of most interest is how many numbers you have in your sequence Y.
 
User avatar
kimosabe
Posts: 4
Joined: November 25th, 2003, 12:24 pm

Mersenne Twister repetition of rnd num seq

March 8th, 2011, 2:26 pm

QuoteOriginally posted by: aedallanHi Yossarian,Please post your findings. Of most interest is how many numbers you have in your sequence Y.Did you UTSL? See dsfmt_global_data in dSFMT.h in the rng project. That is the state vector for the Mersenne Twister. That won't win any OO encapsulation prizes, but it will solve Heller's, er, Yossarian's problem.
 
User avatar
aedallan
Posts: 0
Joined: December 30th, 2007, 9:20 pm

Mersenne Twister repetition of rnd num seq

March 8th, 2011, 8:45 pm

QuoteOriginally posted by: kimosabeQuoteOriginally posted by: aedallanHi Yossarian,Please post your findings. Of most interest is how many numbers you have in your sequence Y.Did you UTSL? See dsfmt_global_data in dSFMT.h in the rng project. That is the state vector for the Mersenne Twister. That won't win any OO encapsulation prizes, but it will solve Heller's, er, Yossarian's problem.I'd like to hear what the guy has to say. Is that ok?
 
User avatar
kimosabe
Posts: 4
Joined: November 25th, 2003, 12:24 pm

Mersenne Twister repetition of rnd num seq

March 9th, 2011, 3:13 am

QuoteOriginally posted by: aedallanI'd like to hear what the guy has to say. Is that ok?Sure. I would too. He's gotten two answers to his question so far.