A Good and SIMPLE Measure of Randomness

后端 未结 13 1552
情话喂你
情话喂你 2020-12-14 00:17

What is the best algorithm to take a long sequence of integers (say 100,000 of them) and return a measurement of how random the sequence is?

The function should retu

13条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-14 00:29

    You could try to zip-compress the sequence. The better you succeed the less random the sequence is.

    Thus, heuristic randomness = length of zip-code/length of original sequence

提交回复
热议问题