Opinion – Marcelo Viana: How many times should we shuffle the cards?

by

At the beginning of the century, the billion dollar gaming industry hired Persi Diaconis of Stanford University to validate the new shuffling machine they were going to use in their casinos. Unlike gamblers, Las Vegas doesn’t like to lose money…

When starting any game, it is assumed that the order of the cards is known, either because the deck is new, and the cards are in factory order, or because it has been used before, and the participants can remember. The purpose of shuffling is to shuffle the cards in such a way as to destroy all information that may be useful to the players.

The most usual method consists in cutting the deck into two more or less equal parts, and then interspersing the cards from one and the other as randomly as possible. When the two parties are exactly alike, and their cards are interspersed in exact alternation, there is a “perfect shuffle”. Very few people in the world manage to do this: Diaconis is one of them.

Despite the name, the perfect shuffle is really bad: if we do eight perfect shuffles in a row, as if by magic the cards return exactly to the initial order! Because? (answers are welcome to [email protected])

In practice, shuffles are never perfect, because the deck is not cut in half or because the alternation of the two parts is not exact. This helps, but it still takes several shuffles to get the cards mixed up.

How many times? One of Diaconis’s most famous theorems, which he intends to engrave on his tomb, answers: exactly seven times. More shuffles don’t add up and less information remains in the deck that players can take advantage of.

In casinos, the shuffling of the cards is done by machines, and Las Vegas engineers were confident that the new model would do a good job in just one round of shuffling. But Diaconis identified several vulnerabilities in the machine.

The mathematical arguments didn’t convince the engineers: “They couldn’t care less about the notion of total variation distance,” laments Diaconis. So he and his colleagues set out on a practical demonstration: they showed that, using simple ideas, they could exploit the shortcomings of shuffling to guess about 20% of the cards in the deck, more than enough to beat the banker.

The engineers had to rethink the device but, fortunately, the mathematicians’ work also pointed out how the problems could be solved.

You May Also Like

Recommended for you

Immediate Peak