English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Ie like Shuffling your Music, or Generating random numbers.. :/

2007-03-20 14:06:47 · 4 answers · asked by Anonymous in Computers & Internet Other - Computers

4 answers

That isn't random. It is a mathematical formula and software. It is doing exactly as it is told.

2007-03-20 14:11:43 · answer #1 · answered by orlandobillybob 6 · 0 0

As far as shuffling music, I can't answer that. But in order for a computer to generate random numbers, it's most likely going to be a formula based on the system clock. When I did programming in Visual Basic that was how it worked since Time is always changing. There for if you had a super simple formula such as x+15 where X is the seconds in the clock. And you pressed the button 5 times. You would have 5 random numbers!

2007-03-20 21:13:00 · answer #2 · answered by Anonymous · 0 0

Random number generators, which are used for both of your examples, are based off of the system clock. Once it gets the system time, it is usually multiplied by some static value to give you the number you end up with.

There isnt any true way to get a random number from a computer. However, when an application is appearing to randomize numbers, it is based off of a changing system clock, and possibly even a changing multiplier.

2007-03-20 21:11:36 · answer #3 · answered by dmc177 4 · 0 0

Entropy. For example, the character special files /dev/random and /dev/urandom (present since Linux 1.3.30) provide an interface to the kernel's random number generator. File /dev/random has major device number 1 and minor device number 8. File /dev/urandom has major device number 1 and minor device number 9.

The random number generator gathers environmental noise from device drivers and other sources into an entropy pool. The generator also keeps an estimate of the number of bits of noise in the entropy pool. From this entropy pool random numbers are created.

When read, the /dev/random device will only return random bytes within the estimated number of bits of noise in the entropy pool. /dev/random should be suitable for uses that need very high quality randomness such as one-time pad or key generation. When the entropy pool is empty, reads from /dev/random will block until additional environmental noise is gathered.

A read from the /dev/urandom device will not block waiting for more entropy. As a result, if there is not sufficient entropy in the entropy pool, the returned values are theoretically vulnerable to a cryptographic attack on the algorithms used by the driver. Knowledge of how to do this is not available in the current non-classified literature, but it is theoretically possible that such an attack may exist.

2007-03-20 21:09:59 · answer #4 · answered by Linux OS 7 · 1 0

fedest.com, questions and answers