Why is it hard for a program to generate random numbers?

后端 未结 26 3513
自闭症患者
自闭症患者 2020-12-15 05:38

My kids asked me this question and I couldn\'t really give a concise, understandable explanation.

So I\'m hoping someone on SO can.

26条回答
  •  温柔的废话
    2020-12-15 06:29

    Algorithms to generate random numbers are inevitably deterministic. They take a small random seed, and use it to obtain a long string of pseudo-random digits.

    It's very difficult to do this without introducing subtle patterns into the data. A string of digits can look perfectly random but have repeated patterns which make the distribution innappropriate for applications where randomness is required.

提交回复
热议问题