The Number Mysteries: A Mathematical Odyssey through Everyday Life
A mathematical question that goes back two hundred years to the work of Gauss is this: are there infinitely many numbers N with the property that a deck with 2N cards actually needs the full number of perfect shuffles? This question turns out to be related to the Riemann hypothesis, the million-dollar question about prime numbers that concluded chapter 1. If the primes are distributed as the Riemann hypothesis predicts they are, then there will be an infinite number of packs of cards needing the maximum number of shuffles. The Magic Circle and gamblers around the world probably aren’t holding their breath waiting for the answer, but mathematicians are curious to know how primes can be related to questions of shuffling cards. It wouldn’t be surprising if they were, because the primes are so fundamental to mathematics that they pop up in the strangest places.
Poker Tip
In the popular version of poker called Texas Hold’em, each player is dealt two cards facedown. The dealer then lays five cards faceup on the table. You choose the best five cards from the two in your hand and the five on the table to try to beat your opponents’ hands. If you get dealt two consecutive cards (say, the 7 of clubs and 8 of spades), you might start getting excited about the possibility of a straight (five consecutive cards in any suit, like 6, 7, 8, 9, 10).
A straight is a powerful hand exactly because the chances of getting one are pretty slim, so you might think that being dealt two consecutive cards is worth a big stake because you’re on your way to a straight. Now, this is when you need to remember the lottery tip. Two consecutive numbers come up very often in the lottery, and the same is true of poker. Did you know that over 15 percent of starting hands dealt in Texas Hold’em have two consecutive cards? But slightly less than a third of these will go on to complete a straight by the time the dealer has dealt the five cards on the table.
THE MATH OF THE CASINO: DOUBLE OR BUST?
You’re in the casino at the roulette wheel, and you have 20 chips. You’ve decided to try to double your money before you leave. Putting a chip on red or black will double your money if you choose correctly, so what is the best strategy—putting all your money in one go on red, or putting one chip on at a time until you’ve either lost all your money or you’ve got your 40 chips?
To analyze this problem, what you have to realize is that every time you place a bet, you are essentially paying the casino a small amount to play, once you average out over all your wins and losses. If you put your money on black 17 and it comes up, then the casino gives you your chip back along with 35 more. If there were 36 numbers on the roulette wheel, this would be a fair game, since on average, black 17 would come up 1 in 36 times. So if you had 36 chips and kept on betting on 17, then in 36 spins of the wheel, on average 35 of them would lose and one would win, leaving you with the 36 chips you started with. But on the European roulette wheel, there are actually 37 numbers you can bet on (1 to 36 together with 0, which is neither red nor black), but the house pays out as if there were only 36 numbers.
Because there are 37 numbers, every time you bet $1, the house is essentially making × $1, which is about 2.7 cents. Every now and again, the casino might have to make a big payout to one individual, but in the long run, it knows that, thanks to the laws of probability, it makes money. In fact, the house odds in the United States are even worse for the gambler because casinos use roulette wheels with 38 numbers: 1 to 36, plus 0 and 00.
We’ve seen that betting on a single number costs you, in the long run, 2.7 cents per bet. But you don’t have to bet on a single number: you can bet, for example, on the number being odd or even, or being in the range from 1 to 12. The odds are calculated in the same way, such that whatever sort of bet you make essentially costs you 2.7 cents per bet.
So what should you do to give yourself the best chance of doubling your money? First, since you pay every time you play, the best strategy is to play as few times as possible. There is an 18/37 chance, just under 50 percent, that red will come up and you’ll walk away with double your money, so though it will be a short visit to the casino, the best strategy for doubling your money is to put it all on red in one go. The likelihood of doubling your money by putting on a chip at a time comes out at
which is a 25.3 percent chance. You halve your chances of achieving your goal if you bet one chip at a time.
But where is the best place to bet in roulette? If you put your money on red and 0 comes up, some casinos will apply a rule called en prison and pay you back half your bet. This actually means that the house odds are a little less on this bet—it’s cheaper to play here than anywhere else on the roulette wheel. In the long run, it costs you (probability of losing) x bet – (probability of winning) x payout = 1.35 cents, as opposed to the 2.7 cents it costs to play anywhere else on the table:
So if the casino plays en prison, in the long run, it is half the price to bet on red/black than to make other types of bets.
Instead of getting half your bet back, there is another option that the casino can offer: you can choose to have your bet go en prison. The dealer puts an en prison chip on the bet, and if red comes up next, then you get a reprieve and the casino gives you your bet back (but without any winnings); otherwise, you lose your bet. Because there is an chance of you then getting all your money back (just under 50 percent), you are better off taking half the money when you have the chance to rather than putting your bet in prison and hoping for red to come up.
So, the odds are apparently stacked against you. But is there any mathematical way you can beat the casino? Here’s one idea, called a martingale. Start by putting one chip on red. If red comes up, you get your chip back plus another chip. If it isn’t red, then on the next round, bet two chips on red. If it comes up red, you get your chips back plus two more. You lost one chip with the first bet, so you’re now one chip up. If red fails to come up the second time, bet four chips next time. If red comes up then, you get four chips on top of your bet. But you’ve already lost one chip on the first bet and two on the second, so that leaves you . . . one chip up.
The way to play this system is to keep doubling your bet each time until red eventually comes up. Your total winnings are always one chip, because if red comes up on round N, then you win 2N chips (the amount you bet). But in the previous N – 1 rounds, you’ll have lost L = 1 + 2 + 4 + 8 + . . . + 2N – 1 chips. Here ’s a clever way to calculate how much this loss L is. L is certainly the same as 2L – L. So how much is 2L?
2L = 2 x (1 + 2 + 4 + 8 + . . . + 2N – 1) = 2 + 4 + 8 + 16 + . . . + 2N – 1 + 2N
Now take away
L = 1 + 2 + 4 + 8 + . . . + 2N – 1
This gives
L = 2L – L = (2 + 4 + 8 + 16 + . . . + 2N – 1 + 2N ) – (1 + 2 + 4 + 8 + . . . + 2N – 1) = 2N - 1
All the numbers in the first set of parentheses except for 2N also appear in the second set of parentheses, which is why they all disappear in this calculation! (We’ve met this calculation before, when we were piling grains of rice on a chessboard in our search for prime numbers in chapter 1.) So you win 2N , but you’ve lost 2N - 1. Your net gain is one chip.
It’s not a lot, but the system appears to guarantee you a win eventually—after all, at some point, red is surely going to come up . . . isn’t it? So why aren’t gamblers cashing in at the casinos with this strategy? One problem is that you would need an infinite amount of resources to guarantee a win, since there is a theoretical possibility of a run of blacks all night long. And even if you had a huge pile of chips, repeatedly doubling your bet can very quickly exhaust your supply (as with those rice grains). On top of that, most casinos have a maximum limit on bets precisely to stop players from exploiting this strategy. For example, with a maximum bet of one thousand chips, your strategy is going to fail after nine rounds because on the tenth round, you are going to want to bet 210 = 1,024—already more than the maximum bet.
Even with a maximum bet in place, the gambler’s fallacy is to believe that if there have been eight blacks in a row, the probability must be really high of see
ing red come up next. Of course, the chance of seeing eight blacks in a row is incredibly small—1 in 256, in fact. But that won’t increase the chances of getting red next: that’s still fifty-fifty. Like the tossed coin, the roulette wheel has no memory.
If you want to play roulette, then bear in mind what the mathematics of probability says: in the long term, the house always wins—although as we shall see in chapter 5, there might be a way to use some other mathematics to help you make your millions. If you don’t like poker or roulette, then the craps table might be for you. As we will now see, playing with dice has a very long history.
HOW MANY FACES DID THE FIRST DICE HAVE?
Many of the games we play depend on chance. Monopoly, backgammon, snakes and ladders, and many others rely on the throw of dice to determine how many steps you move your counter. The very first dice were thrown by the ancient Babylonians and Egyptians, who used knucklebones—the “ankle” bones of animals such as sheep—as dice.
The bones would naturally land on one of four sides, but ancient gamers soon realized that given the uneven nature of bones, some sides were favored over others, so they started to craft them to make the game fairer. As soon as they started doing this, they found themselves exploring the variety of three-dimensional shapes for which each face is equally likely to be the one the shape lands on.
Because the first dice evolved from knucklebones, it’s not too surprising that some of the first symmetrical dice to be made were in the shape of the tetrahedron, with four triangular faces. One of the earliest board games we know of uses these pyramid-shaped dice.
Called the Royal Game of Ur, several versions of the board and its tetrahedral dice were discovered in the 1920s by British archaeologist Sir Leonard Woolley while he was excavating tombs in the ancient Sumerian city of Ur, in what is today southern Iraq. The tombs date back to 2600 BC, and the boards would have been placed in the tombs to keep their occupants amused in the afterlife. The finest example is on display in the British Museum in London and consists of 20 squares that the opponents must race around, depending on the throw of the tetrahedral dice.
Figure 3.4 Tetrahedral dice from the Royal Game of Ur.
The rules of the game didn’t come to light until the early 1980s, when Irving Finkel at the British Museum stumbled across a cuneiform tablet from 177 BC in the museum’s archives, which had a picture of the game engraved on the back. The game is an early forerunner of backgammon, and each player has a certain number of pieces that he or she must move around the board. But it is the dice associated with the game that are most interesting from a mathematical point of view.
One problem with tetrahedral dice made from four triangles is that, unlike the cube-shaped dice we are all familiar with, tetrahedrons land with one of the points pointing in the air, not a face. To deal with this, two of the four corners of each die would be marked with white dots. Players would throw a number of pyramids, and their score would correspond to the number of dots uppermost. Throwing these dice is mathematically equivalent to tossing a number of coins and counting the number of heads.
The Royal Game of Ur depends heavily on the random outcome of the throw of the dice. In contrast, backgammon, its successor, provides players with more opportunity to show off their skills and strategy rather than relying solely on the luck of the dice. But the game has not died out completely: it recently came to light that Jews from Cochin in Southern India are still playing a version of the Royal Game of Ur—five thousand years after it was played in ancient Sumer.
DID DUNGEONS AND DRAGONS DISCOVER ALL THE DICE?
One of the novelties of Dungeons and Dragons, the fantasy role-playing game from the 1970s, was its intriguing array of dice. But did the inventors of the game discover all the dice possible? When we look at what shapes make good dice, we come to a question we asked in chapter 2. If all the faces of the dice are the same symmetrical shape and these faces are arranged such that all the vertices and edges look the same, then there are five such dice: the tetrahedron, the cube, the octahedron, the dodecahedron, and the icosahedron—the Platonic solids (page 61). You will find all these dice in the Dungeons and Dragons box (and on a PDF you can download from the Number Mysteries website), but many of them have a much older heritage.
For example, a 20-faced die made of glass dating back to Roman times was sold by Christie’s in 2003. Its faces are carved with strange symbols, suggesting that it might have been used in fortune telling rather than in a game. The icosahedron is at the heart of one of today’s most fashionable fortune-telling devices: the Magic 8 Ball. Floating in fluid inside the ball is an icosahedron with answers to your problems written on the faces. Ask a question, shake the ball, and the icosahedron floats to the top revealing the answer on one of its faces. These range from “Without a doubt” to “Don’t count on it.”
If you just want a fair die, you don’t have to be so strict about the arrangement of faces. For example, Dungeons and Dragons used a die made by fusing two pentagonal-based pyramids together at their bases. This die has a one-in-ten chance of landing on any of the ten triangular faces. It’s not a Platonic solid because the vertex at the tip of each pyramid is distinguishable from all the other vertices: five triangles meet there, while each of the vertices where the two bases meet is a conjunction of four triangles. But it is still a fair die: it is equally likely to land on any one of the ten faces.
Mathematicians have been investigating what other shapes make fair dice. It was proved relatively recently that if the dice still have some symmetry to them, there are another 20 to add to the five Platonic dice, together with five infinite families that make fair dice.
Figure 3.5 Symmetrical shapes that make good dice and the number of faces on each shape.
Of the extra 20, 13 are related to the shapes that make great soccer balls—the Archimedean solids of chapter 2, which have faces that are all symmetrical but need not be all the same shape. These shapes may make great soccer balls, but they aren’t quite right for dice. The classic soccer ball has 32 faces made up of 12 pentagons and 20 hexagons. Couldn’t we make a fair die by just writing the numbers 1 to 32 on the faces? The problem is that each pentagon has roughly a 1.98 percent chance of being chosen, while each hexagon has a 3.81 percent chance, so this wouldn’t be a fair die. It was only in the last decade that mathematicians produced a precise formula for the probability that the soccer-ball die would land with a pentagon uppermost. An impressive bit of geometry produced the following scary answer:
where r = ½[2 + sin2(π/5)] –1/2.
The Archimedean solids themselves are not fair dice, but they can be used to build different shapes that give a whole new selection of dice for gamers to use. The key is to realize that although the faces might vary around an Archimedean solid, the vertices are all the same, and the trick is to use an idea called duality, which changes the points into faces and vice versa. To see what shape the face should be, you need to think of a sheet of card stock being placed on each point and then look at how all these cards intersect or cut into one another. Each card needs to be angled so that it is perpendicular to the line running from the center of the shape to the vertex. For example, if you replace the vertices of a dodecahedron with faces, you get the icosahedron:
Figure 3.6
By playing this trick with the Archimedean solids, the procedure produces 13 new dice. The classic soccer ball has 60 vertices, and the die that emerges from it when we replace each vertex with a new face is made up of 60 triangles, which are not equilateral but isosceles (i.e., only two of the three sides are equal). Although this dual of the classic soccer ball is not a Platonic solid, it is still a shape in which each of the faces has a 1 in 60 chance of coming up, so it makes a fair die for gamers to play with. Its technical name is the pentakis dodecahedron:
Figure 3.7
Each Archimedean solid can be used to create a new die like this. Perhaps the most impressive is the hexakis icosahedron. Amazingly, even with 120 irregular right-angled triangul
ar faces, this shape gives another fair die.
The infinite number of families of dice comes from generalizing the idea of sticking two pyramids together where the base can have any number of edges. Although mathematicians have sorted out the range of fair dice that have symmetry, there is still a mystery about more irregular shapes that make fair dice. For example, if I take an octahedron and cut a little bit off one vertex and the opposite vertex, two new faces appear. If I throw this shape, it is unlikely to land on one of these new faces, but if I cut larger chunks off, these two faces will be more likely to appear uppermost than the eight remaining faces. There must be some intermediate point at which I can cut these two corners off such that the two new faces and the original eight faces are equally likely, creating a fair die with ten faces.
The shape doesn’t have any of the nice symmetry of the new dice we made from the Archimedean soccer balls, but it too would make a fair die. As proof that math doesn’t have all the answers, we are still looking for a way to classify all the shapes that can be concocted like this and make fair dice.
HOW CAN MATH HELP YOU WIN AT MONOPOLY?
Monopoly appears to be a pretty random game. You throw two dice and speed around the board in your car or strut along in your top hat, buying property here, building hotels there. Every now and again you might come second in a beauty contest thanks to a Community Chest card or have to cough up $20 for drunk driving. Each time you pass GO, you collect another $200. How on earth can math give you an edge in this game?