by Simon Singh
Dedicated to
Anita and Hari
η + ψ = ε
Contents
CHAPTER 0 The Truth About The Simpsons
CHAPTER 1 Bart the Genius
CHAPTER 2 Are you π-Curious?
CHAPTER 3 Homer’s Last Theorem
CHAPTER 4 The Puzzle of Mathematical Humor
EXAMINATION I
CHAPTER 5 Six Degrees of Separation
CHAPTER 6 Lisa Simpson, Queen of Stats and Bats
CHAPTER 7 Galgebra and Galgorithms
EXAMINATION II
CHAPTER 8 A Prime-Time Show
CHAPTER 9 To Infinity and Beyond
CHAPTER 10 The Scarecrow Theorem
EXAMINATION III
CHAPTER 11 Freeze-Frame Mathematics
CHAPTER 12 Another Slice of π
CHAPTER 13 Homer3
EXAMINATION IV
CHAPTER 14 The Birth of Futurama
CHAPTER 15 1,729 and a Romantic Incident
CHAPTER 16 A One-Sided Story
CHAPTER 17 The Futurama Theorem
EXAMINATION V
EπLOGUE
APPENDIX 1 The Sabermetrics Approach in Soccer
APPENDIX 2 Making Sense of Euler’s Equation
APPENDIX 3 Dr. Keeler’s Recipe for the Sum of Squares
APPENDIX 4 Fractals and Fractional Dimensions
APPENDIX 5 Keeler’s Theorem
ACKNOWLEDGMENTS
ONLINE RESOURCES
PICTURE CREDITS
BY THE SAME AUTHOR
CHAPTER 0
The Truth About The Simpsons
The Simpsons is arguably the most successful television show in history. Inevitably, its global appeal and enduring popularity have prompted academics (who tend to overanalyze everything) to identify the subtext of the series and to ask some profound questions. What are the hidden meanings of Homer’s utterances about doughnuts and Duff beer? Do the spats between Bart and Lisa symbolize something beyond mere sibling bickering? Are the writers of The Simpsons using the residents of Springfield to explore political or social controversies?
One group of intellectuals authored a text arguing that The Simpsons essentially provides viewers with a weekly philosophy lecture. The Simpsons and Philosophy claims to identify clear links between various episodes and the issues raised by history’s great thinkers, including Aristotle, Sartre, and Kant. Chapters include “Marge’s Moral Motivation,” “The Moral World of the Simpson Family: A Kantian Perspective,” and “Thus Spake Bart: On Nietzsche and the Virtues of Being Bad.”
Alternatively, The Psychology of The Simpsons argues that Springfield’s most famous family can help us grasp a deeper understanding of the human mind. This collection of essays uses examples from the series to explore issues such as addiction, lobotomies, and evolutionary psychology.
By contrast, Mark I. Pinsky’s The Gospel According to The Simpsons ignores philosophy and psychology, and focuses on the spiritual significance of The Simpsons. This is surprising, because many characters appear to be unsympathetic toward the tenets of religion. Regular viewers will be aware that Homer consistently resists pressure to attend church each Sunday, as demonstrated in “Homer the Heretic” (1992): “What’s the big deal about going to some building every Sunday? I mean, isn’t God everywhere? . . . And what if we’ve picked the wrong religion? Every week we’re just making God madder and madder?” Nevertheless, Pinsky argues that the adventures of the Simpsons frequently illustrate the importance of many of the most cherished Christian values. Many vicars and priests agree, and several have based sermons on the moral dilemmas that face the Simpson family.
Even President George H. W. Bush claimed to have exposed the real message behind The Simpsons. He believed that the series was designed to display the worst possible social values. This motivated the most memorable sound bite from his speech at the 1992 Republican National Convention, which was a major part of his reelection campaign: “We are going to keep on trying to strengthen the American family to make American families a lot more like the Waltons and a lot less like the Simpsons.”
The writers of The Simpsons responded a few days later. The next episode to air was a rerun of “Stark Raving Dad” (1991), except the opening had been edited to include an additional scene showing the family watching President Bush as he delivers his speech about the Waltons and the Simpsons. Homer is too stunned to speak, but Bart takes on the president: “Hey, we’re just like the Waltons. We’re praying for an end to the Depression, too.”
However, all these philosophers, psychologists, theologians, and politicians have missed the primary subtext of the world’s favorite TV series. The truth is that many of the writers of The Simpsons are deeply in love with numbers, and their ultimate desire is to drip-feed morsels of mathematics into the subconscious minds of viewers. In other words, for more than two decades we have been tricked into watching an animated introduction to everything from calculus to geometry, from π to game theory, and from infinitesimals to infinity.
“Homer3,” the third segment in the three-part episode “Treehouse of Horror VI” (1995) demonstrates the level of mathematics that appears in The Simpsons. In one sequence alone, there is a tribute to history’s most elegant equation, a joke that only works if you know about Fermat’s last theorem, and a reference to a $1 million mathematics problem. All of this is embedded within a narrative that explores the complexities of higher-dimensional geometry.
“Homer3” was written by David S. Cohen, who has an undergraduate degree in physics and a master’s degree in computer science. These are very impressive qualifications, particularly for someone working in the television industry, but many of Cohen’s colleagues on the writing team of The Simpsons have equally remarkable backgrounds in mathematical subjects. In fact, some have PhDs and have even held senior research positions in academia and industry. We will meet Cohen and his colleagues during the course of the book. In the meantime, here is a list of degrees for five of the nerdiest writers:
J. STEWART BURNS
BS Mathematics, Harvard University
MS Mathematics, UC Berkeley
DAVID S. COHEN
BS Physics, Harvard University
MS Computer Science, UC Berkeley
AL JEAN
BS Mathematics, Harvard University
KEN KEELER
BS Applied Mathematics, Harvard University
PhD Applied Mathematics, Harvard University
JEFF WESTBROOK
BS Physics, Harvard University
PhD Computer Science, Princeton University
In 1999, some of these writers helped create a sister series titled Futurama, which is set one thousand years in the future. Not surprisingly, this science fiction scenario allowed them to explore mathematical themes in even greater depth, so the latter chapters of this book are dedicated to the mathematics of Futurama. This includes the first piece of genuinely innovative and bespoke mathematics to have been created solely for the purposes of a comedy storyline.
Before reaching those heady heights, I will endeavour to prove that nerds and geeks1 paved the way for Futurama to become the ultimate TV vehicle for pop culture mathematics, with mentions of theorems, conjectures, and equations peppered throughout the episodes. However, I will not document every exhibit in the Simpsonian Museum of Mathematics, as this would mean including far more than one hundred separate examples. Instead, I will focus on a handful of ideas in each chapter, ranging from some of the greatest breakthroughs in history to some of today’s thorniest unsolved problems. In each case, you will see how the writers have used the characters to explore the universe of numbers.
Homer will introduce us to the Scarecrow theorem while wearing Henry Kissinger’s glasses, Lisa will show us how an analysis of statistics can help steer baseball teams to victory, Professor Frink will explain the mind-bending implications of his Frinkahedron, and the rest of Springfield’s residents will cover everything from Mersenne primes to the googolplex.
Welcome to The Simpsons and Their Mathematical Secrets.
Be there or be a regular quadrilateral.
CHAPTER 1
Bart the Genius
In 1985, the cult cartoonist Matt Groening was invited to a meeting with James L. Brooks, a legendary director, producer, and screenwriter who had been responsible for classic television shows such as The Mary Tyler Moore Show, Lou Grant, and Taxi. Just a couple of years earlier, Brooks had also won three Academy Awards as producer, director, and writer of Terms of Endearment.
Brooks wanted to talk to Groening about contributing to The Tracey Ullman Show, which would go on to become one of the first big hits on the newly formed Fox network. The show consisted of a series of comedy sketches starring the British entertainer Tracey Ullman, and the producers wanted some animated shorts to act as bridges between these sketches. Their first choice for these so-called bumpers was an animated version of Groening’s Life in Hell, a comic strip featuring a depressed rabbit named Binky.
While sitting in reception, waiting to meet Brooks, Groening considered the offer he was about to receive. It would be his big break, but Groening’s gut instinct was to decline the offer, because Life in Hell had launched his career and carried him through some tough times. Selling Binky to Fox seemed like a betrayal of the cartoon rabbit. On the other hand, how could he turn down such a huge opportunity? At that moment, outside Brooks’s office, Groening realized that the only way to resolve his dilemma would be to create some characters to offer in place of Binky. According to the mythology, he invented the entire concept of The Simpsons in a matter of minutes.
Brooks liked the idea, so Groening created dozens of animated shorts starring the members of the Simpson family. These were sprinkled through three seasons of The Tracey Ullman Show, with each animation lasting just one or two minutes. Those brief appearances might have marked the beginning and the end of The Simpsons, except that the production team began to notice something strange.
Ullman often relied on extraordinary makeup and prosthetics to create her characters. This was problematic, because her performances were filmed in front of a live audience. To keep the audience entertained while Ullman prepared, someone suggested patching together and playing out some of the animations featuring the Simpsons. These animations had already been broadcast, so it was merely an opportunistic recycling of old material. To everyone’s surprise, the audiences seemed to enjoy the extended animation sequences as much as the live sketches.
Groening and Brooks began to wonder if the antics of Homer, Marge, and their offspring could possibly sustain a full-length animation, and soon they teamed up with writer Sam Simon to work on a Christmas special. Their hunch was right. “Simpsons Roasting on an Open Fire” was broadcast on December 17, 1989, and was a massive success, both in terms of audience figures and with the critics.
This special was followed one month later by “Bart the Genius.” This was the first genuine episode of The Simpsons, inasmuch as it premiered the famous trademark opening sequence and included the debut of Bart’s notorious catchphrase “Eat my shorts.” Most noteworthy of all, “Bart the Genius” contains a serious dose of mathematics. In many ways, this episode set the tone for what was to follow over the next two decades, namely a relentless series of numerical references and nods to geometry that would earn The Simpsons a special place in the hearts of mathematicians.
In hindsight, the mathematical undercurrent in The Simpsons was obvious from the start. In the first scene of “Bart the Genius,” viewers catch a glimpse of the most famous mathematical equation in the history of science.
The episode begins with a scene in which Maggie is building a tower out of her alphabet blocks. After placing a sixth block on top, she stares at the stack of letters. The doomed-to-be-eternally-one-year-old scratches her head, sucks her pacifier, and admires her creation: EMCSQU. Unable to represent an equals sign and lacking any numbered blocks, this was the closest that Maggie could get to representing Einstein’s famous scientific equation E = mc2.
Some would argue that mathematics harnessed for the glory of science is somehow second-class mathematics, but for these purists there are other treats in store as the plot of “Bart the Genius” unfolds.
While Maggie is building E = mc2 with her toy blocks, we also see Homer, Marge, and Lisa playing Scrabble with Bart. He triumphantly places the letters KWYJIBO on the board. This word, kwyjibo, is not found in any dictionary, so Homer challenges Bart, who gets revenge by defining kwyjibo as “a big, dumb, balding North American ape, with no chin . . .”
During this somewhat bad-tempered Scrabble game, Lisa reminds Bart that tomorrow he has an aptitude test at school. So, after the kwyjibo fiasco, the story shifts to Springfield Elementary School and Bart’s test. The first question that faces him is a classic (and, frankly, rather tedious) mathematics problem. It concerns two trains leaving Sante Fe and Phoenix, each one traveling at different speeds and with different numbers of passengers, who seem to get on and off in odd and confusing groups. Bart is baffled and decides to cheat by stealing the answer sheet belonging to Martin Prince, the class dweeb.
Bart’s plan not only works, it works so well that he is whisked into Principal Skinner’s office for a meeting with Dr. Pryor, the school psychologist. Thanks to his skulduggery, Bart has a score that indicates an IQ of 216, and Dr. Pryor wonders if he has found a child prodigy. His suspicions are confirmed when he asks Bart if he finds lessons boring and frustrating. Bart gives the expected answer, but for all the wrong reasons.
Dr. Pryor persuades Homer and Marge to enroll Bart at the Enriched Learning Center for Gifted Children, which inevitably turns into a nightmarish experience. During the first lunch break, Bart’s classmates show off their intellects by offering him all manner of deals couched in mathematical and scientific terms. One student makes the following offer: “Tell you what, Bart, I’ll trade you the weight of a bowling ball on the eighth moon of Jupiter from my lunch for the weight of a feather on the second moon of Neptune from your lunch.”
Before Bart can decipher the implications of Neptunian moons and Jovian bowling balls, another student makes a fresh and equally confusing offer: “I’ll trade you one thousand picoliters of my milk for four gills of yours.” It is yet another pointless puzzle, merely designed to belittle the newbie.
The next day, Bart’s mood deteriorates even further when he realizes that the first lesson is mathematics. The teacher gives her students a problem, and it is at this point that we encounter the first example of an overt mathematical joke in The Simpsons. While at the board, the teacher writes up an equation and says: “So y equals r cubed over three, and if you determine the rate of change in this curve correctly, I think you will be pleasantly surprised.”
There is a short pause before all the students—except one—work out the answer and begin to laugh. The teacher tries to help Bart amid the guffaws of his classmates by writing a couple of hints on the board. Eventually, she writes down the solution to the problem. Bart is still perplexed, so the teacher turns to him and says: “Don’t you get it, Bart? Derivative dy equals three r squared dr over three, or r squared dr, or r dr r.”
The teacher’s explanation is displayed in the sketch opposite. However, even with this visual aid, I suspect that you may be as bewildered as Bart, in which case it might help to focus on the final line on the board. This line (r dr r) is not only the answer to the problem, but also the supposed punch line. This prompts two questions; why is r dr r funny and why is it the answer to the mathematics problem?
The class laughs because r dr r sounds like har-de-har-har, an expression that has been used to indicate
sarcastic laughter in reaction to a bad joke. The har-de-har-har phrase was popularized by Jackie Gleason, who played Ralph Kramden in the classic 1950s TV sitcom The Honeymooners. Then, in the 1960s, the phrase became even more popular when the Hanna-Barbera animation studio created a cartoon character named Hardy Har Har. This pessimistic hyena with a porkpie hat starred alongside Lippy the Lion in dozens of animations.
When the teacher poses a calculus problem in “Bart the Genius,” she unhelpfully uses an unconventional layout and inconsistent notation, and she also makes an error. Nevertheless, she still obtains the correct answer. This sketch reproduces the content of the teacher’s board, except that here the calculus problem is laid out more clearly. The important equations are the six lines below the circle.
So, the punch line involves a pun based on r dr r, but why is this the answer to the mathematics question? The teacher has posed a problem that relates to a notoriously nasty area of mathematics known as calculus. This is a topic that strikes terror into the hearts of many teenagers and triggers nightmarish flashbacks in some older people. As the teacher explains when she sets out the problem, the goal of calculus is to “determine the rate of change” of one quantity, in this case y, with respect to another quantity, r.
If you have some recollection of the rules of calculus,2 then you will be able to follow the logic of the joke fairly easily and arrive at the correct answer of r dr r. If you are one of those who is terrified of calculus or who suffers flashbacks, don’t worry, for now is not the time to embark on a long-winded lecture on the nitty-gritty of calculus. Instead, the more pressing issue is why were the writers of The Simpsons putting complicated mathematics in their sitcom?
The core team behind the first season of The Simpsons consisted of eight of Los Angeles’s smartest comedy writers. They were keen to create scripts that included references to sophisticated concepts from all areas of human knowledge, and calculus was particularly high on the agenda because two of the writers were devotees of mathematics. These two nerds were responsible for the r dr r joke in particular and deserve credit more generally for making The Simpsons a vehicle for mathematical tomfoolery.