Author Topic: Random Number Generators: Really Random?  (Read 4528 times)

0 Members and 1 Guest are viewing this topic.

Offline arthwollipot

  • Reef Tank Owner
  • *********
  • Posts: 9167
  • Observer of Phenomena
Re: Random Number Generators: Really Random?
« Reply #15 on: June 24, 2018, 11:26:50 PM »
One rule-of-thumb definition that I've heard is that a sequence is random if it cannot be described by any algorithm shorter than the sequence itself.

Not that that helps with your question much but I thought it was interesting.
Self-described nerd. Pronouns: He/Him.

Tarvek: There's more to being an evil despot than getting cake whenever you want it.
Agatha: If that's what you think, then you're DOING IT WRONG!

Offline werecow

  • Cryptobovinologist
  • Stopped Going Outside
  • *******
  • Posts: 5035
  • mooh
Re: Random Number Generators: Really Random?
« Reply #16 on: July 09, 2018, 07:10:54 PM »
One rule-of-thumb definition that I've heard is that a sequence is random if it cannot be described by any algorithm shorter than the sequence itself.

Not that that helps with your question much but I thought it was interesting.

Yup, that one comes from information theory... Specifically Kolmogorov complexity.

As for the OT, I think true randomness would require something fundamentally unpredictable. Some quantum thing, no doubt. But you can get close enough for basically any practical purpose with more conventional methods.
« Last Edit: July 09, 2018, 07:15:37 PM by werecow »
Mooohn!

Offline stands2reason

  • Empiricist, Positivist, Militant Agnostic
  • Poster of Extraordinary Magnitude
  • **********
  • Posts: 10746
Re: Random Number Generators: Really Random?
« Reply #17 on: May 29, 2019, 07:31:50 PM »
As noted, RNGs are pseudorandom. The default is that it is typically seeded with epoch time by default.

On POSIX (Linux and others), there is a virtual file /dev/random that will return environmental noise from device drives (e.g. microphone, radios, input devices). It only produces a certain, small amount of noise, but can be used to seed an RNG, if you want to use something other than the time when the program started.

One rule-of-thumb definition that I've heard is that a sequence is random if it cannot be described by any algorithm shorter than the sequence itself.

Not that that helps with your question much but I thought it was interesting.

Most data streams have redundancy, and can be compressed. An actually random or sufficiently pseudorandom source should generate data that appears to be complete noise to a compression algorithm, devoid of pattern. There will be some pattern by chance, but for most blocks of data, the compression algorithm will output a frame with a header indicating that it couldn't actually save space by compression, and then the raw data itself. If you run any compression algorithm on a sufficiently large stream of random binary data (not some representation that doesn't use all byte values in the binary representation), the compression ratio should generally be just over 100%.

Online John Albert

  • Too Much Spare Time
  • ********
  • Posts: 6859
Re: Random Number Generators: Really Random?
« Reply #18 on: May 31, 2019, 06:34:23 PM »
On POSIX (Linux and others), there is a virtual file /dev/random that will return environmental noise from device drives (e.g. microphone, radios, input devices). It only produces a certain, small amount of noise, but can be used to seed an RNG, if you want to use something other than the time when the program started.

Some processors also utilize minute fluctuations in the core temperatures for this purpose. 

Offline daniel1948

  • Happy Man in a Boat
  • Reef Tank Owner
  • *********
  • Posts: 9125
  • I'd rather be paddling
Re: Random Number Generators: Really Random?
« Reply #19 on: May 31, 2019, 07:31:38 PM »
Pseudo-random number generators are not truly random, but they are plenty good enough for most applications. I used to use the time when the user hit a key to seed the PRNG for card and dice games.
Daniel
----------------
"Anyone who has ever looked into the glazed eyes of a soldier dying on the battlefield will think long and hard before starting a war."
-- Otto von Bismarck

 

personate-rain
personate-rain