Random algorithm

Mark Smith lists at futilism.com
Tue Nov 11 21:02:47 EST 2008


Jaques, I wonder if it would be practical to do what some of the  
crypto-quality RNGs do, and use the microphone input of the users  
computer as a source of random bits.

Hmm..

Best,

Mark

On 11 Nov 2008, at 22:57, Jacques Hausser wrote:

> Hi Mark (and Mark),
>
> For small series, sure, it is random enough. But I'm afraid that  
> the period is actually rather short for what I suppose is a linear  
> congruential generator (for instance Excel algorithm was famous for  
> its period of 32000 numbers only), not speaking of the pattern due  
> to serial correlations you can detect if you spread your numbers in  
> a multidimentional space. In contrast, Mersenne twister has  
> theoretically a period of 4.3 E 106001-1, and does not show  
> patterning in spaces of more than 600 dimensions. But even this  
> algorithm is not fit for encryption... that's not my problem,  
> luckily !
> ... and for the other Mark (Schonneville) to spare a mail ;o) : Its  
> a very good idea, but not practicable in my case. I want the  
> application to be an independant one, that the students can use not  
> only in the formal exercise sessions, but also for their personnal  
> work.
>
> Thank you for your remarks and suggestions anyway
>
> Jacques
>
>
> Le 11 nov. 2008 à 23:02, Mark Smith a écrit :
>
>> Jacques, as you probably know, there are many measures of  
>> randomness...
>>
>> Taking the 'r' correlation as a measure of it, I've done this test:
>>
>> generate two series of 1000 numbers between 1 and 10000 each,  
>> using the random() function. Take the correlation between the two  
>> series, and append it to a list.
>> repeat 1000 times
>> from that list of 1000 correlations, take the mean and standard  
>> deviation.
>>
>> I got: mean correlation = -0.000681, standard deviation= 0.032986
>> on my macBookPro.
>>
>> So is that random enough?
>>
>> Best,
>>
>> Mark
>>
>> On 11 Nov 2008, at 21:16, Jacques Hausser wrote:
>>
>>> Hi,
>>>
>>> Does somebody know which algorithm is hidden behind the random  
>>> function ? Native random number generators have usually a poor  
>>> reputation, and I need trustable random numbers. I have  
>>> translated the Mersenne twister algorithm which works OK, but  
>>> slowly (47 milliseconds for 1000 numbers against five for the  
>>> random function). If the native function is a good one, I'll keep  
>>> it...
>>>
>>> Thanks for any hint
>>>
>>> Jacques
>>> ******************************************
>>> Prof. Jacques Hausser
>>> Department of Ecology and Evolution
>>> Biophore / Sorge
>>> University of Lausanne
>>> CH 1015 Lausanne
>>> please use my private address:
>>> 6 route de Burtigny
>>> CH-1269 Bassins
>>> tel/fax: 	++ 41 22 366 19 40
>>> mobile:	++ 41 79 757 05 24
>>> E-Mail:	jacques.hausser at unil.ch
>>> *******************************************
>>>
>>> _______________________________________________
>>> use-revolution mailing list
>>> use-revolution at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your  
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your  
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>
> ******************************************
> Prof. Jacques Hausser
> Department of Ecology and Evolution
> Biophore / Sorge
> University of Lausanne
> CH 1015 Lausanne
> please use my private address:
> 6 route de Burtigny
> CH-1269 Bassins
> tel/fax: 	++ 41 22 366 19 40
> mobile:	++ 41 79 757 05 24
> E-Mail:	jacques.hausser at unil.ch
> *******************************************
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list