Jump to content

Database Random

Featured Replies

Let's suppose that we have a six sided dice game and we are generating a random number. Generally random number generation is tied to the system clock. However what if we had the randomly generated number query a randomly sorted database with six values? At any point in time the state of the database will be unknown. It could just be an octal number stored in memory the user can't access all we would do is add and overflow whenever random is used.

Edited by fiveworlds

all we would do is add and overflow whenever random is used.

 

 

That sounds like a very crude version of a pseudo random number generator.

 

 

Generally random number generation is tied to the system clock.

 

This is not true. Sometimes people are recommended to seed the RNG using he clock, but this doesn't improve randomness at all.

"At any point in time the state of the database will be unknown."

 

So is randomness inherent in the thing? Or is randomness just a description of our ignorance?

 

If you flip a coin and it lands on the ground, but you haven't looked at it yet, what are the odds it's heads? 50-50, right? Because probability does not tell us about the coin. It tells us about our state of ignorance.

Edited by wtf

Archived

This topic is now archived and is closed to further replies.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.