Apple | Google | Spotify | Amazon | Player.FM | TuneIn
Castbox | Stitcher | Podcast Republic | RSS | Patreon
Randomness is all around us. Many of you probably think that this podcast is pretty random given that you have no clue what each day’s episode is going to be about.
However, true randomness is a very different thing than something being seemingly random. While randomness is actually all around us, harnessing it for our purposes, especially in computing, can be rather difficult.
Learn more about randomness and why some things that seem random are not, on this episode of Everything Everywhere Daily.
This episode is sponsored by The Restoration Depot.
I’ve told you before about the Restoration Depot and how they provide a one-stop-shop for virtual wellness services that support the social, emotional, physical, and intellectual well-being of individuals.
If you visit their website you can sign up for courses on a wide variety of wellness subjects that include such things as Yoga, Tai Chi, and Mindful Meditation.
All of their classes are done live online, with actual instructors you can interact with. This isn’t just pre-recorded videos, but an actual person who will interact with you in real-time and help you get to where you want to be.
Check out all the options at “The Restoration Depot Dot Com”, AND try your first class for only $5 by selecting “First Class Special” at checkout.
Once again, that is, The Restoration Depot dot com.
Randomness is a pretty odd thing. Even though it is all around us, many of the things we think are random are in fact not, and many of the things which are random, we don’t think of as being random.
So, what is randomness exactly?
It is a tough definition to pin down, but two of the big elements of randomness are that something cannot be predicted and that it has no order or pattern.
This subject can actually get quite deep and it is difficult to get into weeds about mathematics on a podcast, and I know this because I’ve tried, so I’m going to limit the discussion to two practical areas: games of chance and computers.
One of the biggest areas where randomness is important is in games of chance.
The whole point of a game of chance is that you can’t know what the outcome will be and that the outcome of the game is fundamentally random.
However, for hundreds of years, gamblers have tried to find an angle or a way to cheat the system by either influencing the outcome such that it is non-random, or by trying to determine a pattern or system in the game.
The oldest example of this would be with loaded dice. Dice have a long history dating back over 5,000 years. Very early people had bones that they would roll to play games of chance with each other.
We have evidence of loaded dice going back at least 3,000 years, and even though we haven’t found any evidence yet, I’d personally be willing to bet that loaded dice go back much further.
The idea behind loaded dice is simple. If you imbalance the die such that it weighs more on one side than another, then the heavy side has a higher probability of landing down. The outcome is no longer random.
Gamblers have spent countless hours trying to figure out patterns to try and beat the casino.
One game that seems like it would be really random is roulette. You spin a wheel, you toss a ball around a wheel, it bounced around, and then it lands on a number. That seems pretty random.
However, this is where we get into the idea of determinism.
What if you could calculate everything happening on a roulette table? If you knew the weight of the ball, the velocity of the ball, the friction of the wheel, and everything else which was happening, then could you predict the outcome?
Roulette seems like the least likely casino game you could cheat at. In fact, Albert Einstein is claimed to have said, “No one can possibly win at roulette unless he steals money from the table while the croupier isn’t looking.”
Einstein didn’t live in a world with computers, because a team managed to figure out how to cheat at roulette. In 2004, a team managed to win £1.2million at a casino in London at the roulette wheel in two visits. They did it by creating a roulette computer.
They used a laser attached to a computer which is worn. When the ball is spinning around the wheel, it will make a probabilistic determination of where the ball will land. The fact that you can place bets while the ball is still spinning is what allows this to work.
The team in 2004 was actually able to keep their winnings after they were caught because it was found they weren’t influencing the game. They were merely predicting the outcome of the game, which wasn’t the same as playing with loaded dice, or palming cards.
So, yes, roulette isn’t actually totally random. It is certainly difficult to predict, but not impossible. Believe it or not, it has been estimated that in 50% of casinos around the world, it is legal to use a roulette computer.
Las Vegas is not one of those jurisdictions, unfortunately.
One interesting part of something being truly random is that all results are equally possible. This results in certain cognitive biases when we try to decipher if something is random.
If you were asked to, in your head, come up with 20 hypothetical coin flips, most people seldom put more than three heads or tails in a row. That is because a long streak of the same thing doesn’t seem like it’s very random, yet there is no reason why it isn’t.
Perhaps the best illustration of this was in the South African National Lottery on December 2, 2020.
South Africa runs a powerball game where 5 numbers are selected from random balls, and then a powerball is chosen. The winning numbers on this day were: 5, 6, 7, 8, 9 and the powerball was 10.
Six consecutive numbers. Needless to say, this doesn’t seem very random.
The South African government immediately announced that there would be an inquiry into the matter to see if someone cheated. There were 20 winners who shared the prize.
However, why would someone cheat by picking those numbers, which seem so suspicious, and that so many people would probably pick?
A mathematician did the math after this happened and estimated that with all the lotteries being run around the world, and with weekly or twice weekly drawings, the odds were about 16% that one lottery would select six consecutive numbers in any given year. That means we would expect to see this sort of result somewhere in the world about every 7 years.
Six consecutive numbers are just as random as any other six numbers, even though it doesn’t seem like it to us.
Computers have a special relationship with random numbers. Random numbers are used for many things, but most important for cryptography and security.
The problem is, that computers cannot generate a truly random number. It is impossible. Computers are deterministic. They run programs and follow algorithms, neither of which are good for creating randomness.
What they can do is create what is known as a pseudorandom number, which is something I know a little bit about because I studied these in a seminar I took in the math department my senior year in college.
Pseudorandom numbers can behave like random numbers, and for many purposes are as good as random numbers, but they are not truly random because eventually, the sequence will repeat, and because if you know the initial conditions, you determine the outcome.
A pseudorandom number is actually easy to calculate. You start with an initial number called a seed, and that sets off a series of numbers that seem to jump around randomly. Small changes in the initial seed value can result in massively different numbers which are generated.
For something like a slot machine, many companies have no problem with pseudorandom numbers because for the time a human will sit at a machine, there is no way they could figure out any sort of pattern. Also, they could just keep changing the seeds based on things like time, and the results will be good enough.
For things like cryptography, however, that isn’t really good enough. If you can guess the seed, oftentimes based on a computer’s clock, and you know how the pseudorandom number is generated, then you can figure out the number and break the code.
This actually happened when a man named Eddie Tipton figured out the pseudorandom number generator used in the multi-state lottery in the United States and won the lottery six times in 10 years! Eddie by the way was the information security director for the lottery. He didn’t hack the result, he just knew the inputs of the pseudorandom number generator and how it was generated, and hence knew what the results would be.
These concerns have led to the creation of random number services where you can get access to truly random numbers.
The key to getting truly random numbers is to take something from the physical world.
The simplest way to do this is from radio static. If you remember old TV sets, if you turned the television to a channel that didn’t exist, you’d see a screen full of static. Much of that static was coming from cosmic microwave background signals which literally were produced during the big bang.
These background radio signals are totally random. There is no way you can predict what they will be. The first computer random number servers were just hooked up to a radio which collected static, and got their numbers that way.
There are random number devices you can buy on Amazon right now which basically do the same thing.
There are other ways to develop these truly random numbers.
The company Cloudflare which runs a good portion of the world’s domain name servers, and here I’ll reference my episode on how the internet works, has several random number generators around the world.
In their San Francisco office they have a wall of lava lamps with a camera pointed at it. The image from the camera is digitized creating a random number. In their Singapore office, they have a Geiger counter measuring background radiation, and in London, they have six double pendulums which are constantly moving erratically, with images taken of them.
Other institutions which have true random number generators include a university in Chile that uses seismic data and the website Random.org which uses the above-mentioned radio static.
Random numbers derived from quantum effects are considered the gold standard for random numbers because they can’t even be predicted in theory.
Many of these institutions have come together to create an organization known as the League of Entropy. They combine their random numbers to create new random numbers which have inputs from all the sources around the world.
The joint random numbers are not more random than the individual numbers created by each source, but it does have a higher degree of trust. Even if someone could tamper with one of the sources, it would be almost impossible to tamper with all of them, especially considering how they all use very different methods to select their random numbers.
Unless you happen to be involved with cryptography or gaming, you probably haven’t given a lot of thought to random numbers, and there is a good chance you probably won’t in the future.
But, at least now you know that part of the security of the internet is based on the randomness created by a wall of lava lamps.