Hacker News new | ask | show | jobs
by Houshalter 3229 days ago
I once tried to develop my own fast random number generate using nothing but bitwise operations. On the theory they were the fastest/simplest. I had a program generate thousands of random combinations of bitwise functions. And then used statistical tests to see which ones produced the most "random" seeming behavior.

It worked as far as I can tell. But I don't trust the statistical tests. Who is to say there isn't a very obvious pattern in the numbers that I didn't test for or notice? How do you prove a random number generator is good?

3 comments

> How do you prove a random number generator is good?

You can't; that's the nature of randomness. You can prove they're bad, though.

A theoretical approach based on computability theory is https://en.m.wikipedia.org/wiki/Algorithmically_random_seque....
> How do you prove a random number generator is good?

Compress its output.