So, thanks to the visit of Greenwald and Nestler, “Marge and Homer Turn a Couple Play” featured guest appearances by a Mersenne prime, a perfect number, and a narcissistic number. For years, The Simpsons had influenced the way that the professors had given their classes, and now the situation had been reversed, with the professors influencing The Simpsons.

  But why had the writers chosen these particular types of number for the Jumbo-Vision screen? After all, there are hundreds of types of interesting number, and any of them could have played a cameo role. There are, for example, vampire numbers: These numbers have digits that can be divided and rearranged into two new numbers, known as fangs, which in turn can be multiplied together to re-create the original number. 136,948 is a vampire number, because 136,948 = 146 × 938. An even better example is 16,758,243,290,880, which is particularly batty and vampiric, because its fangs can be formed in four different ways:

  16,758,243,290,880

  =

  1,982,736 × 8,452,080

  =

  2,123,856 × 7,890,480

  =

  2,751,840 × 6,089,832

  =

  2,817,360 × 5,948,208

  Alternatively, if the writers wanted an incredibly special number, they could have chosen a sublime number. There are only two sublime numbers, because they have to satisfy two severe constraints that both relate to perfection. First, the total number of divisors must be a perfect number and, second, the divisors must add up to a perfect number. The first sublime number is 12, because its divisors are 1, 2, 3, 4, 6, and 12. The number of divisors is 6 and they add up to 28, and both 6 and 28 are perfect numbers. The only other sublime number is 6,­086,­555,­670,­238,­378,­989,­670,­371,­734,­243,­169,­622,­657,­830,­773,­351,­885,­970,­528,­324,­860,­512,­791,­691,­264.

  According to the writers, the Mersenne, perfect, and narcissistic numbers were chosen to appear in “Marge and Homer Turn a Couple Play” merely because they all offered quantities that were close to a realistic crowd size. Also, they were the first types of number that came to mind. They were introduced as a last-minute change to the script, so there was not much time to put a great deal of thought into the numbers chosen.

  However, in hindsight, I would argue that the writers picked just the right numbers, because the digits are still visible on the Jumbo-Vision screen when Tabitha Vixx appears, and each number seems to offer an apt description of Ms. Vixx. As one of the most glamorous characters to have appeared on The Simpsons, Tabitha considers herself to be perfect and in her prime, and not surprisingly, she is also a narcissist. Indeed, at the start of the episode, she is skimpily dressed and dancing provocatively in front of her husband’s adoring baseball fans, so including a pretty wild narcissistic number on the stadium screen would have been even more appropriate.

  Although Greenwald and Nestler might seem exceptional, they are not the only professors who discuss The Simpsons in their mathematics lectures. Joel Sokol at the Georgia Institute of Technology gives a lecture titled “Making Decisions Against an Opponent: An Application of Mathematical Optimization,” which includes slides describing games of rock-paper-scissors played by characters in The Simpsons. The lecture focuses on game theory, an area of mathematics concerned with modeling how participants behave in situations of conflict and cooperation. Game theory can offer insights into everything from dominoes to warfare, from animal altruism to trade union negotiations. Similarly, Dirk Mateer, an economist at Pennsylvania State University with a strong interest in mathematics, also makes use of The Simpsons and scenes involving rock-paper-scissors when he teaches game theory to his students.

  Rock-paper-scissors (RPS) seems like a trivial game, so you might be surprised that it is of any mathematical interest. However, in the hands of a game theorist, RPS becomes a complex battle between two competitors trying to outwit each other. Indeed, RPS has many hidden layers of mathematical subtlety.

  Before revealing these mathematical layers, let me begin with a brief review of the rules. The game is played between two players, and the rules are simple. Both players count “1 . . . 2 . . . 3 . . . Go!” and then offer up their hand in one of three ways: rock (clenched fist), paper (open, flat hand), or scissors (forefinger and middle finger form a V). The winner is decided according to the “circular hierarchy” that rock blunts scissors (rock wins), scissors cut paper (scissors win), and paper covers rock (paper wins). If the weapons are the same, then that round is a tie.

  Over the centuries, different cultures have developed their own variations of RPS, ranging from the Indonesians, who play elephant-human-earwig, to sci-fi fans, who play UFO-microbe-cow. The latter version involves a UFO dissecting a cow, a cow eating microbes, and microbes contaminating a UFO.

  Although each culture has its own weapons, the rules of the game remain essentially the same. Within these rules, it is possible to use the logic of mathematical game theory to identify which playing strategies are superior. This was demonstrated in “The Front” (1993), when Bart and Lisa play RPS to decide whose name should go first on their co-authored script for The Itchy and Scratchy Show. Looking at the RPS game from Lisa’s point of view, her best strategy depends on a range of factors. For example, does Lisa know if her opponent is a rookie or a pro, what does Lisa’s opponent know about her, and is the goal to win or to avoid losing?

  If Lisa was playing a world champion, then she might adopt a strategy of making a random throw, because not even a world champion would be able to predict whether she was going to throw rock, paper, or scissors. This would give Lisa an equal chance of winning, losing, or drawing. However, Lisa is playing her brother, who is not a world champion. Hence, she adopts a different strategy based on her own experience, which is that Bart is a particularly big fan of throwing rock. So, she decides to throw paper to beat his potential rock. Sure enough, her plan works and she wins. Bart’s bad habit is consistent with research carried out by the World RPS Society, which suggests that rock is the most popular throw in general and is a particular favorite with boys.

  This sort of game theoretic approach was important when the Japanese-based electronics corporation Maspro Denkoh was auctioning its art collection in 2005. In order to decide whether the multimillion-dollar contract should go to Sotheby’s or Christie’s, Maspro Denkoh ordered an RPS battle between the two auction houses. Nicholas Maclean, international director of Christie’s Impressionist and Modern Art Department, took the matter so seriously that he asked his twin eleven-year-old daughters for advice. Their experience backed up the World RPS Society survey, inasmuch as the twins also felt that rock was the most common throw. Moreover, they pointed out that sophisticated players would be aware of this and would therefore throw paper. Maclean’s hunch was that Sotheby’s would adopt this sophisticated strategy, so he advised his bosses at Christie’s to adopt a super-sophisticated strategy by throwing scissors. Sotheby’s did indeed throw paper and Christie’s won.

  Another layer of mathematics emerges when we turbocharge the game of RPS by adding more options. First, it is important to stress that any new version of RPS must have an odd number of options (N). This is the only way of balancing the game, such that each option wins against and loses to an equal number (N − 1) ⁄ 2 of other options. Hence, there is no four-option version of RPS, but there is a five-option version called rock-paper-scissors-lizard-Spock (RPSLSp). Invented by computer programmer Sam Kass, this version became famous after it was featured in “The Lizard-Spock Expansion” (2008), an episode of the nerd-friendly sitcom The Big Bang Theory. Here are the circular hierarchy and hand gestures for rock-paper-scissors-lizard-Spock.

  As the number of options increases, the chance of a tie decreases as ⅟N. Therefore, the chance of a tie is ⅓ in RPS and ⅕ in RPSLSp. If one wants to minimize the risk of a tie, then the biggest and best available version of RPS is RPS-101. Created by the animator David Lovelace, it has 101 defined hand gestures and 5,050 outcomes that result in a clear win. For example, quicksand swallows
vulture, vulture eats princess, princess subdues dragon, dragon torches robot, and so on. The chance of a tie is ⅟101, which is less than 1 percent.

  The most intriguing piece of mathematics that has emerged from studying RPS is the invention of so-called nontransitive dice. These dice immediately arouse curiosity, because each one has a different combination of numbers on its faces:

  You and I can play a game with these dice that involves us picking one die each and then pitting them against each other. The winning player is the one whose die shows the higher number. So, which is the best die?

  The grids here show what happens with the three possible die pairings: (A v. B), (B v. C), (C v. A). The first grid tells us that die A is better than die B, because die A wins in 20 of the 36 possible outcomes. In other words, die A wins on average 56 percent of the time.

  What about die B v. die C? The second grid shows that die B is better, because it wins 56 percent of the time.

  In life, we are used to transitive relationships, which means that if A is better than B, and B is better than C, then A must be better than C. However, when we roll die A against die C, we find that die C is better, because it wins 56 percent of the time, as shown in the third grid. That is why these die are labeled nontransitive—they defy the normal convention of transitivity, just like the weapons in RPS. As mentioned earlier, the rules of RPS dictate an unconventional circular hierarchy, not a simple top-down hierarchy.

  Nontransitive relationships are absurd and defy common sense, which is probably why they fascinate mathematicians, whether they are the writers of The Simpsons, university professors . . . or even the world’s most successful investor, namely Warren Buffett, who has a net worth of approximately $50 billion. Buffett’s picture in the 1947 Woodrow Wilson High School senior yearbook has the astute caption “Likes math; future stockbroker.”

  Each grid shows all the possible outcomes when two dice are rolled against each other. In the first grid, die A v. die B, you can see that the top left square is marked A and shaded light grey, because die A wins if it rolls a 3 and die B rolls a 2. However, the bottom right square is marked B and shaded dark grey, because die B wins if it rolls a 9 and die A rolls a 7. Taking all the combinations into account, die A wins 56 percent of time on average against die B.

  Buffett is known to be a fan of nontransitive phenomena and sometimes challenges people to a game of dice. Without giving any explanation, he hands his opponent three nontransitive dice and asks him or her to choose first. The opponent feels that this confers an advantage, because this appears to be an opportunity to select the “best” die. Of course, there is no best die, and Buffett deliberately chooses second to allow himself the privilege of selecting the particular die that is stronger than whichever one was chosen by his opponent. Buffett is not guaranteed to win, but the odds are heavily stacked in his favor.

  When Buffett tried this trick on Bill Gates, the founder of Microsoft was immediately suspicious. He spent a while examining the dice and then politely suggested that Buffet should choose his die first.

  CHAPTER 9

  To Infinity and Beyond

  “Dead Putting Society” (1990) tells the story of a miniature golf match, in which Bart Simpson is playing Todd Flanders, the son of neighbor Ned Flanders. It is a very high-stakes confrontation, because the father of the loser faces a terrible fate. He will have to mow the winner’s lawn in his wife’s dress.

  During a tense exchange between the two fathers, Homer and Ned invoke infinity to reinforce their positions:

  HOMER:

  This time tomorrow, you’ll be wearing high heels!

  NED:

  Nope, you will.

  HOMER:

  ’Fraid not.

  NED:

  ’Fraid so!

  HOMER:

  ’Fraid not.

  NED:

  ’Fraid so!

  HOMER:

  ’Fraid not infinity!

  NED:

  ’Fraid so infinity plus one!

  HOMER:

  D’oh!

  I asked which of the writers had suggested this piece of dialogue, but nobody was able to remember. This is not surprising, as the script was written more than two decades ago. However, there was general agreement that Homer and Ned’s petty argument would have derailed the scriptwriting process, as it would have triggered a debate over the nature of infinity. So, is infinity plus one more than infinity? Is it a meaningful statement or just gobbledygook? Can it be proved?

  In their efforts to answer these questions, the mathematicians around the scripting table would doubtless have mentioned the name of Georg Cantor, who was born in St. Petersburg, Russia, in 1845. Cantor was the first mathematician to really grapple with the meaning of infinity. However, his explanations were always deeply technical, so it was left to the eminent German mathematician David Hilbert (1862–1943) to convey Cantor’s research. He had a knack for finding analogies that made Cantor’s ideas about infinity more palatable and digestible.

  One of Hilbert’s most celebrated explanations of infinity involved an imaginary building known as Hilbert’s Hotel—a rather grand hotel with an infinite number of rooms and each door marked 1, 2, 3, and so on. One particularly busy evening, when all the rooms are occupied, a new guest turns up without a reservation. Fortunately, Dr. Hilbert, who owns the hotel, has a solution. He asks all his guests to move from their current rooms to the next one in the hotel. So the guest in room 1 moves to room 2, the guest in room 2 moves to room 3, and so on. Everyone still has a room, but room 1 is now empty and available for the new guest. This scenario suggests (and it can be proven more rigorously) that infinity plus one is equal to infinity; a paradoxical conclusion, perhaps, but one that is undeniable.

  This means that Ned Flanders is wrong when he thinks he can trump Homer’s infinity with infinity plus one. In fact, Flanders would have been wrong even if he tried to win the argument with “infinity plus infinity,” as proved by another vignette about Hilbert’s Hotel.

  The hotel is full again when an infinitely large coach arrives. The coach driver asks Dr. Hilbert if the hotel can accommodate his infinite number of passengers. Hilbert is unfazed. He asks all his current guests to move to a room number that is double their current room number, so the guest in room 1 moves to room 2, the guest in room 2 moves to room 4, and so on. The existing infinity of guests now occupy only the even-numbered rooms, and an equally infinite number of odd-numbered rooms are now vacant. In this way, the hotel is able to provide rooms for the infinite number of coach passengers.

  Once more, this appears to be paradoxical. You might even suspect that it is nonsense, perhaps nothing more than the result of ivory tower philosophizing. Nevertheless, these conclusions about infinity are more than mere sophistry. Mathematicians reach these conclusions about infinity, or any other concept, by building rigorously, step-by-step, upon solid foundations.

  This point is well made by an anecdote in which a university vice chancellor complains to the head of his physics department: “Why do physicists always need so much money for laboratories and equipment? Why can’t you be like the mathematics department? Mathematicians only need money for pencils, paper, and wastepaper baskets. Or even better, why can’t you be like the philosophy department? All they need is pencils and paper.”

  The anecdote is a dig at philosophers, who lack the rigor of mathematicians. Mathematics is a meticulous search for the truth, because each new proposal can be ruthlessly tested and then either accepted into the framework of knowledge or discarded into the wastepaper basket. Although mathematical concepts might sometimes be abstract and arcane, they must still pass a process of intense scrutiny.

  Thus, Hilbert’s Hotel has clearly demonstrated that

  infinity

  =

  infinity + 1

  infinity

  =

  infinity + infinity

  Although Hilbert’s explanation avoids technical mathematics, Cantor was forced to delve deep into
the mathematical architecture of numbers in order to reach his paradoxical conclusions about infinity, and his intellectual struggles took their toll on him. He suffered severe bouts of depression, spent extended periods in a sanatorium, and grew to believe that he was in direct communication with God. Indeed, he credited God for helping him to develop his ideas and believed that infinity was synonymous with God: “It is realized in the most complete form, in a fully independent otherworldly being, in Deo, where I call it the Absolute Infinite or simply Absolute.” Cantor’s mental state was partly the result of being criticized and mocked by more conservative mathematicians who could not come to terms with his radical conclusions about infinity. Tragically, Cantor died malnourished and impoverished in 1918.

  After Cantor’s death, Hilbert commended his colleague’s attempt to address the mathematics of infinity, stating: “The infinite! No other question has ever moved so profoundly the spirit of man; no other idea has so fruitfully stimulated his intellect; yet no other concept stands in greater need of clarification than that of the infinite.”

  He made it very clear that he sat in Cantor’s corner in the battle to comprehend infinity: “No one shall drive us from the paradise Cantor has created for us.”

  In addition to the ex-mathematicians working on The Simpsons, the writing team has also included scientists with an interest in mathematics, such as Joel H. Cohen (no relation to David S. Cohen), who studied science at the University of Alberta in Canada. Similarly, Eric Kaplan’s studies at Columbia and Berkeley included an emphasis on the philosophy of science. Meanwhile, David Mirkin, who had planned to become an electrical engineer, spent time at Philadelphia’s Drexel University and the National Aviation Facilities Experimental Center before joining The Simpsons. George Meyer had graduated with a degree in biochemistry, and then focused his attention on mathematics in a failed attempt to invent a foolproof betting system for the dog track. This was a blessing for the world of comedy, pushing Meyer away from the dog track and toward a career as one of the most respected comedy writers in Los Angeles.