T
T
Tonako2015-08-19 17:20:08
random numbers
Tonako, 2015-08-19 17:20:08

Why can't random numbers be generated on a computer?

I mean quality rand.
The task is quite simple, is there really no solution? What causes such difficulties?
You need a solution without using third-party hardware and connections.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Saboteur, 2015-08-19
@saboteur_kiev

The task is quite difficult, since the computer is not a random thing at all. The computer is concrete, and is not capable of creating randomness, only executing specific commands.
Most random number generators try to take various values ​​- for example, the current time from a timer, various data from various devices, perform mathematical operations on this, and get a pseudo-random number.
But with great diligence, such a number can be repeated, knowing the initial conditions, so this is called pseudo-randomness.
The second problem is to take these different values ​​- you need to turn to the timer, turn to the devices, perform these mathematical operations, that is, it is not fast.
Without third-party glands, you can try it yourself ..
Some kind of nonsense, like the current time * temperature of the processor, take the first 1024 from this and read the specified sector on the first section of the device, turn it through md5, again add the new current time. A good algorithm, which for a million requests will produce an approximately even dropout of numbers over the ENTIRE range, is an extremely difficult task.
If you are satisfied with the performance - then here is an example of a more or less random number, which at different times on different machines will generate different numbers. But the problem is that if you generate random numbers from 0 to 100 with this method for several weeks, then after a few weeks, statistics will show you that some numbers will occur much more often than others.

P
Puma Thailand, 2015-08-19
@opium

if it’s just a normal distribution, then it generates a rand quite well with a reference to time, it’s clear that the algorithm is predictable, but here it’s either checkers or go.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question