Is it possible to generate random numbers using physical sensors?

前端 未结 4 989
孤街浪徒
孤街浪徒 2020-12-25 09:17

I\'ve heard about people using light sensors, geiger counters, and other physical sensors to generate random numbers, but I\'m skeptical. Is there really a way to generate

4条回答
  •  佛祖请我去吃肉
    2020-12-25 09:27

    Depends on the range, sampling frequency and sensitivity of the sensor. You can consider the sensor measurements as a bitstrings or as floats, doesn't really matter. The point is, the most significant bits / the leading decimals are not very random, they might even hardly change. Likewise, the least significant bits are unreliable sources of randomness, since they might show a step effect due to limited sensor sensitivity, and depending on the sensor they might be strongly correlated in time (e.g., temperature or voltage will have a tendency to change gradually). The middle bits/figures however might very well be a source of true random values.

    Suppose you have a sensor that outputs values in the range 0 to 200 , with a precision of 0.01. Let's say it's a pressure meter, maybe a decibel meter. You'd need to test this extensively and look at the distribution of values for your specific sensor and environment, but I think that the figures at the 10^0 and 10^-1 positions might very well be distributed uniformly and without discernible order.

    Best suited are sensors that can make very precise measurements but have to deal with a high level of noise anyway. This might pose a problem since most sensors aren't designed to provide an unnecessary/unreliable level of precision. Also, measurements that are roughly the same always and everywhere (except for the noise) are to be preferred of course. Cosmic background radiation is a good example of this.

提交回复
热议问题