Author Archives: hong yi li

Randomness

What method would you use when you are asked to provide a random number? A random number generator and a coin flip are two very common ways used to determine outcome for many different situations. Some believe they are just as random as the other, and the randomness of each result is roughly the same. Studies have shown they might not be as random as some may believe them to be.

There are two fundamental types of number generators:  Pseudo-Random Number Generators (PRNGs) and True Number Generators (TRNGs). PRNGs are the most common type of generators find within our computers which uses different mathematic algorithms to output an outcome. On the other hand, TRNGs use unpredictable physical pheromones such as atmospheric noise which is radio noise caused by natural atmospheric processes to generate numbers. Bitmaps are pixels, each with a number representing its colour depth. If we generate two bitmaps using the outputs for each of the number generators as its pixels’ colour depth, we would get the following images. A clear visual pattern can be seen on the bitmap produced using PRNGs.

randbitmap-rdo

Bitmap generated by RANDOM.org. Image from https://www.random.org/analysis/#visual, published under non-commercial use license.

randbitmap-wamp

PHP rand() on Microsoft Windows. Image from https://www.random.org/analysis/#visual , published under non-commercial use license.

In comparison, coin-flipping is not actually a random event. If every initial condition in a coin toss is known, such as the exact force acted on the coin, the exact location of the force acted on the coin, the mass of the coin and the distance it travels before landing, the result of the flip can be calculated before it happens. Researchers have built a coin flipping robot that can make a coin land heads up one hundred percent of the time, proving that a coin toss is not a random event at all.

coin-flipping-robot

coin-flipping machine, Image from http://epubs.siam.org.ezproxy.library.ubc.ca/doi/pdf/10.1137/S0036144504446436, published under the personal and noncommercial use license.

Some may argue that humans are not robots and the outcome of a toss by a human should be random. Are they random with a 50% chance of getting tails? It turns out that our natural flips are not random either. Researchers have used a coin flipping robot and high-speed cameras to determine the factors that decide which side a coin will land on. They concluded that in a natural flip, the chance of a coin coming up on the side it started on is about 51%. Further studies have been done on December 2009 in Canada showing that the result of hand coin toss could be manipulated up to a 68% on any untrained participant.

Different methods used in generating numbers will lead to outcomes with different degree of randomness. Therefore, keep that in mind when facing situations where a “random” event is needed  and pick the best method to your advantage.

-Hongyi Li