Jump to content


Photo
- - - - -

Database Random


  • Please log in to reply
4 replies to this topic

#1 fiveworlds

fiveworlds

    Primate

  • Senior Members
  • 1,618 posts
  • LocationSomewhere on the internet

Posted 19 March 2017 - 02:34 AM

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, 19 March 2017 - 03:00 AM.

  • 0

#2 Endy0816

Endy0816

    Primate

  • Senior Members
  • 2,047 posts
  • LocationOrlando

Posted 19 March 2017 - 04:05 AM

How do you make the database's order itself random?


  • 0

#3 Strange

Strange

    SuperNerd

  • Senior Members
  • 12,859 posts
  • Location珈琲店

Posted 19 March 2017 - 06:54 AM

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.


  • 1

#4 Klaynos

Klaynos

    Insert Witty Comment

  • Moderators
  • 8,380 posts

Posted 19 March 2017 - 11:00 AM

Surely the thing to do is use hardware random?
  • 1
Klaynos - share and enjoy.

#5 wtf

wtf

    Atom

  • Senior Members
  • 221 posts

Posted 20 March 2017 - 06:50 PM

"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, 20 March 2017 - 06:50 PM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users