vendredi 23 octobre 2015

Generating Random numbers within some range, which can produce same series everytime [on hold]

I'd like to generate some random numbers say between 100 and 10000 that can repeat after sometime(i.e., values can be repeated but should not repeat series after some point [10,20,21,1,22,...,10,20,21,1,22,...] --> Invalid Series), like graphs plot points.I went through article Fisher-Yates which can generate sequential random data which in my case I don't need. What I need is to generate same set of data each time. I came across one function which can generate these random numbers but will repeat some part of series every time. Below is the function:

0^2 mod 11 = 0,
1^2 mod 11 = 1,
2^2 mod 11 = 4,
3^2 mod 11 = 9,
4^2 mod 11 = 5,
5^2 mod 11 = 3,
6^2 mod 11 = 5,... and so on.

Which is pretty much generating same series again and again after some point of time, I would have to work on very large set of numbers.

So how should I generate Random numbers within some range, which can produce same series every time.(without repeating the set of series pretty much every time). Is it possible?




Aucun commentaire:

Enregistrer un commentaire