0

Is there any reason except being able to reproduce the same sequence of numbers, for using pseudo-random number generators while there is easy access to truly random numbers such as the number of milliseconds of the clock, the fluctuation in electricity, and etc...?

I heard that producing truly random sequence of numbers often takes more time and requires extra hardware, but the things I mentioned above shouldn't be like that.

So what are the other reasons that pseudo random numbers are so popular?

Amirreza A.
  • 113
  • 2
  • `number of milliseconds of the clock` how do you measure the clock time without another clock? `fluctuation in electricity` what if the device runs on battery without any AC? and you need some ADC to measure the fluctuation anyway – phuclv Oct 05 '20 at 11:34
  • 1
    Your assumption that those sources are random is false. Voltage fluctuations will often follow patterns such as the circuit frequency and even local mains frequencies and are centered around certain initial voltage. Even measuring devices can have bias towards certain values or accuracy limitations that result in bias. *True* random electrical noise is difficult to come by and at a minimum requires specific hardware to measure. A proper description of how to generate true random signals would be outside the scope of this site. – Mokubai Oct 05 '20 at 11:46
  • 1
    Ref: https://en.wikipedia.org/wiki/Random_number_generation – Hannu Oct 05 '20 at 11:48
  • 2
    I've generated 100,000 clock milliseconds. First 1560 values were `1601898975721`. Last 3693 values were `1601898975871`. There were only 151 values, each one repeating 662 times on average. – gronostaj Oct 05 '20 at 12:00
  • 1
    There's no true random in computers, as simple as that. – LeRouteur Oct 05 '20 at 12:09
  • 2
    At the present time there is no reliable method of generating a true random number on a computer without special hardware. And it hasn't been for lack of trying. A variety of methods, including variations of those mentioned, have been proposed. Some have appeared promising at first but on further examination all fall short of requirements. – LMiller7 Oct 05 '20 at 13:58

0 Answers0