How the Math of Shuffling Cards Almost Brought Down an Online Poker Empire

https://www.profitableratecpm.com/f4ffsdxe?key=39b1ebce72f3758345b2155c98e6709c

If you’ve already mixed a playing card game, you’ve probably created a unique game. In other words, you are probably the only person who has ever organized the cards precisely this order. Although this statement seems incredible, it is an excellent illustration of the speed with which large numbers can slip into daily situations, with sometimes difficult consequences, such as developers of an online poker game painfully discovered in the late 1990s.

Mathematics of the cards mixture are quite easy to explain. To calculate the number of arrangements that 52 playing cards may have, you must go through all possible mixtures. So, logically, one of the 52 cards is placed on the top, and once determined, there are only 51 possibilities for the card below. The following card has only 50 possible options, etc. A bridge of 52 cards can therefore be placed in 52 × 51 × 50 × … × 2 × 1 = 52! different ways.

If you make the multiplication and turn the answer, you will get a number with 67 zeros. It is more than a quadrillion of times as many ways to organize these cards as atoms on earth.


On the support of scientific journalism

If you appreciate this article, plan to support our award -winning journalism by subscription. By buying a subscription, you help to ensure the future of striking stories about discoveries and ideas that shape our world today.


So there are clearly many different ways to organize 52 playing cards. And yet, to find out to what extent it is likely that another person in the world will randomly create the same sequence of cards by mixing, it is not enough to simply calculate 1/52! This number simply indicates to what extent it is likely to obtain a very specific mixture of cards.

There is a more subtle question to consider: what would be the probability for two or more people in the world to mix a card game in random in the same way?

The extraordinary rarity of each reshuffle

This question recalls the birthday paradox. This works according to the same principle: it is quite unlikely that a student in a class has a birthday on a given date – in a group of 30 people, the probability of this is 1 – (364/65)30≈ 7.9%. However, the probability that two students are born on the same day is more than 70%. The reason for this apparent difference is that people generally underestimate the number of possible students of students. From 30 students, 435 pairs can be formed. The probability that each pair of students was born a different day then does not seem so high.

If you want to know to what extent it is likely to mix a card game in random in the same way as any other person in the world, there are several ways to do it. One consists in first calculating the probability of the opposite event, then subtracting this result of 1. then subtract this result from 1.

If there are eight billion people worldwide, the probability that several people create the same mixture of cards can be calculated as follows:

The equation explains how to calculate the probability that more than one person (in a pool of eight billion) treats a game of 52 cards in the same way

The problem is that my calculator (or rather the Wolfram | alpha) program fails when I try to assess this formula. Therefore, I have to count on a very approximate estimate of this probability:

The equation offers an approximation to calculate the probability that more than one person (in a pool of eight billion) treats a game of 52 cards in the same way

This means that the probability that two or more people in the world creates the same card game less than 0.0000 … 08% – a number that departs from 0 to the 47th decimal.

With this illustration, I hope I have convinced everyone that he is extremely unlikely that several people in the world create randomly the same card game by mixing. But you’ve probably mixed cards several times in your life, not just once. So how does the result change if we assume that each person mixes about 100 bridges of cards during their lifetime? By replacing the eight billion in the previous estimate with 800 billion, we note that the probability in this case is less than 8 × 10−43 percent.

In other words, the chances do not change much. Even if each person in the world mixes a game of cards 100 times, it is very unlikely that the same game appeared twice.

Besides, if we consider each person who lives or has already lived on earth – by certain estimates, around 117 billion people – each has mixed a game of cards about 100 times (which is unlikely, since our species has not had playing cards for a very long time), then the probability that the same arrangement has been created several times is less than 1.7 × 10)−40 percent.

This clearly shows it: it is really extremely unlikely that two people in the whole history of humanity have ever mixed a card game in the same way – at least assuming that they mixed the cards with great care. This illustrates size 52! is and how many possibilities are there to organize 52 cards.

Read them and cry

The immensity of 52! is not only inspiring to contemplate – he also posed important practical problems for online game developers. Online poker can involve large sums of money, so it is essential that these games are as safe and fair as possible. All faults or gaps could be used by cheaters or used by the house against the players.

Digital cards must be well mixed and treated at random, like the real ones. In an ideal world, an algorithm would randomly select an arrangement from 52! Possible bridges. But no computer has enough memory to assess all these possibilities, and a perfect random number generator does not yet exist. Therefore, developers generally rely on algorithms that simulate cards mixtures.

At the end of the 1990s, the ASF software from the development platform provided several online poker suppliers, such as Planet Poker, with cards sprefling algorithms. The platform even published the algorithm on its website as proof that the game was programmed reliably. And this post drew the attention of certain Software Technologies Reliable employees, a Computer Company. “As soon as we saw the mixture algorithm, we started to suspect that there could be a problem. A small investigation has proven that this intuition was correct,” some employees wrote in a poston software development website.

The algorithm started with an orderly card game, then exchanged two cards at the same time in several stages. To do this, the program used a random number generator linked to the time of the computer system. But there are several constraints on this method. On the one hand, the exchange mechanism has been implemented in such a way that certain card arrangements have been favored and more likely to appear than others. On the other hand, the system links its generation of numbers to the number of seconds which have passed since midnight, reset once a day, which limits the random values ​​possible. Only about 86 million arrangements have been generated in this way, discovered the reliable team of software technologies.

The programmers then realized that because the system is linked to a clock to randomize its mixtures, the arrangement of the cards could be more limited by taking into account this timer. The simple synchronization of their own program with the system clock reduced the possibilities to only 200,000 potential decks that the algorithm could generate. “After this movement, the system is ours, because research in this small set of shuffles is trivial and can be done on a PC in real time,” they wrote. Recall that this was back in the 1990s, when computers were much less powerful than they are today.

Software Technologies Reliable employees reported these weaknesses to the developers of the algorithm, who immediately revised it. Today, many online poker sites use the Fisher – Yates algorithm, also called Knuth Shuffle (which is delightfully like a dance). It is easy to implement and provides satisfactory results.

Of course, these algorithms are limited by other means – random generators are simply not good enough to do what people can do with a real deck. But even the most skilful human dealer cannot provide a perfect hand each time.

Thank you to the German podcast Nerds at work Podcast to inspire me to write about this poker algorithm of the 1990s.

This article originally appeared in Spektrum der Wissenschaft and was reproduced with permission.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button