Warren Buffett once challenged Bill Gates to an unusual game of dice. Buffett placed four dice on the table and explained the rules. They would each pick a die, roll it a bunch of times, and whoever rolled a higher number more often would win. These weren’t numbered like standard dice. The typical one through six were replaced with other numbers that varied from die to die. As a supposed courtesy, Buffett invited Gates to pick his die first. This aroused suspicion, compelling Gates to inspect the dice for himself and then insist that Buffett choose first.

Typically, choosing first in games confers an advantage, so why were these moguls dueling for second pick? The answer lies in a peculiar property of Buffett’s dice. To appreciate it, let’s inspect an example of similar dice that have the same property as those used by Buffett but that are easier to analyze.

How often will die A roll higher than die B? Because there are just three distinct numbers on each die, one third of the time, die A will roll a 9, which wins regardless of B’s roll. One third of the time, A will roll a 1, which loses regardless of B’s roll. And the remaining third of the time, A will roll a 5, which wins on two thirds of B’s rolls (the ones that turn up 3 or 4). Aggregating these observations with the rules of probability, we get that A beats B (⅓ x 1) + (⅓ x 0) + (⅓ x ⅔) = 5/9, or about 56 percent of the time. A similar calculation yields an identical win percentage for B over C. That is, B also beats C about 56 percent of the time. So if A usually beats B and B usually beats C, then surely A should usually beat C, right? Wrong! C actually beats A about 56 percent of the time as well.

We call these delinquent cubes *intransitive dice*. Many relations encountered in life exhibit the opposite, transitive property: If Alicia is older than Bruno and Bruno is older than Cassandra, then Alicia is older than Cassandra. That’s a valid deduction because the relation “is older than” obeys the transitive property. Intransitive dice surprise our intuitions because the relation “typically rolls higher than” is *not* transitive, even though it seems like it should be. Note that to roll higher than die B on average, die A doesn’t need to *always* roll higher. And critically, there is overlap between cases in which A beats B and A loses to C. This interleaving of the numbers on the faces enables the intransitivity.

With any set of intransitive dice, whoever chooses first in Buffett’s game bears a disadvantage, because the second player can always pick the die that’s likely to defeat their opponent’s choice. Many people first encounter intransitive games through rock paper scissors. Its cyclic winning structure ensures that no choice uniquely outranks any other. Buffett’s dice game is akin to tricking your opponent into announcing what they intend to throw next in rock paper scissors—a mistake that would cost them the game.

Stanford statistician Bradley Efron invented intransitive dice over 50 years ago. Each die in Efron’s set of four beats another an impressive two thirds (about 67 percent) of the time. Martin Gardner popularized Efron’s dice in his legendary “Mathematical Games” column at *Scientific American,* but mathheads have devised many clever variants since then. We now know that any number of dice (greater than two) can exhibit an intransitive cycle, meaning, for example, there exists a set of 26 dice in which die A usually beats die B, which usually beats C, which usually beats D, and so on all the way through to die Z, which, despite residing at the end of a long chain of dominating dice, pulls an upset by cycling back and usually beating A.

Intransitive dice need not contain six sides. In fact, intransitive trios of dice with *any* number of sides (greater than two) exist. Dutch puzzle maker Oskar van Deventer even invented a set of seven six-sided dice that allow for three players in Buffett’s game. In other words, if Buffett and Gates invited Dolly Parton to play dice with them, then Gates and Parton could each take their pick from the seven, and Buffett would still always have a die in the remaining five that usually beats *both* of their choices.

Just when you think you’ve wrapped your head around the peculiar behavior of intransitive dice, the brilliant construction below will roll you right back to dumbstruck awe.

One can calculate that A beats B 7/12 (about 58 percent) of the time; B beats C 7/12 of the time; and C beats A 25/36 (about 69 percent) of the time. So far, nothing we haven’t seen before. These don’t beat each other with identical probabilities, but they’re still intransitive. Often dice come in pairs. When you imagine rolling dice, you probably picture two identical dice in your hand and summing the numbers that turn up on each. What happens if we roll pairs of dice from the figure above? What is the probability that two copies of die A roll a sum that beats two copies of die B? Is it the same as before since the copies are identical, or does duplicating the dice amplify the advantage that A has over B? In a stunning twist, the effect *reverses*. The pair of A dice usually *lose* to the pair of B dice! What’s more, the whole cycle reverses: a pair of B dice usually lose to a pair of C dice and a pair of C dice usually lose to a pair of A dice. Procuring a set of these dice is a reliable way to get banned from family game night.

To get a feel for how duplicating dice could reverse their relative strength, imagine the simple case of two two-sided dice, X and Y. Both of X’s faces have a 1 on them, while Y’s faces are 0 and 3. These dice have equal strength. Y wins half of the time (when it rolls a 3) and loses half of the time (when it rolls a 0). When we duplicate the dice however, the Y pair becomes stronger than the X pair. The X pair always rolls a total of 2. The Y pair only loses if both of them turn up 0, which only happens one quarter of the time. A similar phenomenon explains the reversal in the figure above.

It’s not obvious that intransitive dice should exist at all. But is that because they’re rare? If all you know about a trio of dice is that A usually beats B, and B usually beats C, is it more likely that A usually beats C or vice versa? Clever people have carefully constructed by hand all of the dice discussed above, but could they have just chosen dice numberings at random and had a decent shot at finding an intransitive set?

British mathematician Timothy Gowers set out to answer this question. Gowers leads the Polymath Project, an innovative and relatively new paradigm for mathematical research. Instead of a few mathematicians at one or two universities chipping away at a problem—the typical research model in math —the Polymath Project takes a crowdsourcing approach. Any number of contributors can collaborate on a proof via online forum discussion. Gowers deemed the intransitive dice question ripe for a group effort and proposed it on his blog in 2017. Replacing a chalkboard with a WordPress comments section, dozens of minds swarmed the problem and cracked it.

If you randomly assign numbers to three different dice and then want to know the chances that they exhibit intransitivity, it may depend on what exactly you mean by “randomly assign numbers” to the dice. The polymath team modeled this with two natural criteria. Just as a typical six-sided die only contains digits between 1 and 6, a random *n*-sided die will only contain digits between 1 and *n* (though some may repeat, and some may not occur at all). Also, the numbers on a typical six-sided die add up to 1 + 2 + 3 + 4 + 5 + 6. To keep the dice balanced (e.g., no die should contain all ones or exclusively massive digits), the polymath team required this of *n*-sided dice: the sum of their sides should equal the sum of the numbers from 1 to *n*.

Do you want to guess whether transitive or intransitive dice are more common? Polymath Project participants proved that three random n-sided dice will be intransitive about half of the time. In other words, knowing that A usually beats B, and B usually beats C, gives you almost no information about whether A will usually beat C or vice versa. I would have guessed that transitive dice were more common than intransitive ones. I could imagine some suspicious readers, tired of having their expectations subverted, predicting that intransitive dice are more common than transitive ones. But these slippery dice insist on evading prediction. For three dice, transitive and intransitive dice are equally common.

*This is an opinion and analysis article, and the views expressed by the author or authors are not necessarily those of* Scientific American.