randomness and computers How do computers achieve randomness if they really do ?
How to decide whether something is random or not?
Is there a measure of randomness?
 A: Computers achieve randomness by two means:


*

*A source of 'true' randomness: This can be a circuit that picks up background radiation or some complex quantum mechanical device.

*A pseudo-random number generator (PRNG): An algorithm that is not actually random (run it twice, you get the same output) but whose output is very difficult to distinguish from true randomness. 


For most purposes, PRNGs are used. Not just because it's easier, but also it allows you to write a program that behaves as a randomized program would, but that you can still rerun exactly if you need to. 
Deciding whether something is random or not can be done by randomness tests. These are not perfect. They look for structure in your data, and if they find it then there is a certain probability that your data is not random. If they don't find it, there is always the possiblity that there is some structure in your data that you haven't tested for.
You can theoretically define a complete test for randomness, but it would be incomputable. This field is known as Kolmogorov Complexity it runs very deep, and connects randomness to theoretical computer science, compression and learning theory. 
Measures of randomness work the same way as randomness tests. The more structure you find, the less random it is, but it is impossible to test for all possible structures. One interesting way to test for randomness is to run your data through a general purpose compressor (like zip or rar). The more it compresses, the less random it is.
