One, doh!, three: Homer Simpson is a math genius. Really!

Believe it or not, Homer can teach us a lot about advanced math. He does work in a nuclear power plant...

Topics: The Simpsons, math, Homer Simpson, Education, Books, Writers and Writing, STEM, Television, Pop Culture, TV, Editor's Picks, ,

One, doh!, three: Homer Simpson is a math genius. Really!

The first “Treehouse of Horror” episode appeared in the second season of “The Simpsons,” and since then they have become an annual Halloween tradition. These special episodes usually consist of three short stories that are allowed to break the conventions of life in Springfield, with storylines that can include anything from aliens to zombies.

David S. Cohen, one of the writers most dedicated to getting mathematics into “The Simpsons,” wrote the final part of “Treehouse of Horror VI” (1995), a segment titled “Homer 3.” This is, without doubt, the most intense and elegant integration of mathematics into “The Simpsons” since the series began a quarter of a century ago.

The storyline begins quite innocently with Patty and Selma, Homer’s sisters-in-law, paying a surprise visit to the Simpsons. Keen to avoid them, Homer hides behind a bookcase, where he encounters a mysterious portal that seems to lead into another universe. As the dulcet tones of Patty and Selma get louder, Homer hears that they want everyone to help clean and organize their collection of seashells. In desperation, he dives through the portal, leaving behind his two-dimensional Springfield environment and entering an incredible three-dimensional world. Homer is utterly perplexed by his new extra dimensionality and notices something shocking: “What’s going on here? I’m so bulgy. My stomach sticks way out in front.”

Instead of being drawn in the classic flat-animation style of “The Simpsons,” scenes set in this higher dimension have a sophisticated three-dimensional appearance. In fact, these scenes were generated using cutting-edge computer animation techniques, and the cost of generating them, even though they lasted less than five minutes, was far beyond the budget of an entire normal episode. Fortunately, a company named Pacific Data Images (PDI) volunteered its services, because it realized that “The Simpsons” would provide a global platform for showcasing its technology. Indeed, PDI signed a deal with DreamWorks later that year which led directly to the production of “Antz” and “Shrek,” thereby kick-starting a revolution in film animation.

When Homer approaches a signpost indicating the x, y, and z axes in his new three-dimensional universe, he alludes to the fact that he is standing within the most sophisticated animated scene ever to have appeared on television: “Man, this place looks expensive. I feel like I’m wasting a fortune just standing here. Well, better make the most of it.”Homer makes another pertinent comment when he first encounters his new environment: “That’s weird. It’s like something out of that twilighty show about that zone.” This is a nod to the fact that “Homer 3” is a tribute to a 1962 episode of “The Twilight Zone” titled“Little Girl Lost.”

In “Little Girl Lost,” the parents of a young girl named Tina become distraught when they enter her bedroom and cannot find her. Even more terrifying, they can still hear her voice echoing around them. Tina is invisible yet still audible. She is no longer in the room, but she seems just a breath away. Desperate for help, the parents call upon a family friend named Bill, who is a physicist. Having pinned down the location of a portal by chalking some coordinates on the bedroom wall, Bill declares that Tina has slipped into the fourth dimension. The parents struggle to understand the concept of a fourth dimension, because they (like all humans) have trained their brains to cope with our familiar three-dimensional world.

Although Homer leaps from two to three dimensions, not from three to four dimensions, exactly the same sequence of events takes place in “Homer 3.” Marge cannot fathom what has happened to Homer, because she can hear him but not see him, and she also receives advice from a scientist, Professor John Nerdelbaum Frink, Jr.

Despite his comically eccentric personality, it is important to not underestimate Professor’s Frink’s genius. Indeed, his scientific credentials are made clear in “Frinkenstein,” a story from “Treehouse of Horror XIV” (2003), when he receives a Nobel Prize from none other than Dudley R. Herschbach, who won his own Nobel Prize in 1986 and who voices his own character.*

Just like the physicist in The Twilight Zone, Frink draws a chalk outline around the portal, watched by Ned Flanders, Chief Wiggum, Reverend Lovejoy, and Dr. Hibbert, who have all come to offer support. Frink then begins to explain the mystery: “Well, it should be obvious to even the most dimwitted individual, who holds an advanced degree in hyperbolic topology, that Homer Simpson has stumbled into . . . the third dimension.”

Frink’s statement suggests that the characters in “The Simpsons” are trapped in a two-dimensional world, and therefore they struggle to imagine the third dimension. The animated reality of Springfield is slightly more complicated than this, because we regularly see Homer and his family crossing behind and in front of each other, which ought to be impossible in a strictly two-dimensional universe. Nevertheless, for the purposes of this “Treehouse of Horror” segment, let us assume that Frink is correct in implying the existence of only two dimensions in “The Simpsons,” and let us see how he explains the concept of higher dimensions as he draws a diagram on the blackboard:

Professor Frink: Here is an ordinary square.

Chief Wiggum: Whoa, whoa! Slow down, egghead!

Professor Frink: But suppose we extend the square beyond the two dimensions of our universe along the hypothetical z-axis . . . There.

Everyone: [gasps]

Professor Frink: This forms a three-dimensional object known as a cube, or a Frinkahedron in honor of its discoverer.

Frink’s explanation illustrates the relationship between two and three dimensions. In fact, his approach can be used to explain the relationship between all dimensions. If we start with zero dimensions, we have a zero-dimensional point. This point can be pulled in, say, the x direction to trace a path that forms a one-dimensional line. Next, the one-dimensional line can be pulled in the perpendicular y direction to form a two-dimensional square. This is where Professor Frink’s explanation picks up, because the two-dimensional square can be pulled in the z direction, which is perpendicular to its face, to form a three-dimensional cube (or Frinkahedron).

Finally, it is mathematically, if not physically, possible to go one step further by dragging the cube into another perpendicular direction (labeled the w dimension) to form a four-dimensional cube. Cubes in four (or more) dimensions are known as hypercubes.

The diagram of a four-dimensional hypercube is a mere sketch, the equivalent of a stick figure drawing being used to capture the essence of Michelangelo’s statue of David. Nevertheless, the stick-figure hypercube suggests an emerging pattern that helps explain the geometry of shapes in four and even higher dimensions. Let us consider the number of endpoints or corners (known as vertices) that each object possesses as we move from dimension to dimension. The number of vertices follows a simple pattern: 1, 2, 4, 8, 16, .. .. In other words, if d is the number of dimensions, then the number of vertices equals 2d. Hence, a ten-dimensional hypercube would have 210 or 1,024 vertices.

Despite Professor Frink’s deep understanding of higher dimensions, the bad news is that he is unable to save Homer, who is left to wander across his new universe. This leads to a bizarre series of events that ends with a visit to an erotic cake store. During this adventure, Homer encounters several fragments of mathematics which materialize in the three-dimensional landscape.

For example, soon after Homer travels through the portal, an apparently random series of numbers and letters floats in the far distance: 46 72 69 6E 6B 20 72 75 6C 65 73 21. The letters, in fact, are actually hexadecimal (or base 16) digits. Hexadecimal numbers are expressed using the usual digits 0 to 9, plus six others, namely A = 10, B = 11, C = 12, D = 13, E = 14, and F = 15. Together, each pair of hexadecimal digits represents a character in ASCII (American Standard Code for Information Interchange), which is a protocol for converting letters and punctuation into numbers, largely for the benefit of computers. According to the ASCII protocol, 46 represents “F,” 72 represents “r,” and so on. Translated, the entire sequence reads as a bold proclamation in praise of geeks: “Frink rules!”

A few moments later, a second mathematical tidbit appears in the three-dimensional landscape, courtesy of writer David S. Cohen:

1,78212 + 1,84112 = 1,92212

This is yet another false solution to Fermat’s last theorem, just like the one created by Cohen for “The Wizard of Evergreen Terrace,”which was discussed in chapter 3. The numbers have been carefully chosen so that the two sides of the equation are almost equal. If we match the sum of the first two squares to the sum of the third square, then the results are accurate for the first nine digits, as shown in bold:

1,025,397,835,622,633,634,807,550,462,948,226,174,976 (1,78212)

+ 1,515,812,422,991,955,541,481,119,495,194,202,351,681 (1,84112)

= 2,541,210,258,614,589,176,288,669,958,142,428,526,657

2,541,210,259,314,801,410,819,278,649,643,651,567,616 (1,92212)

This means that the discrepancy in the equation is just 0.00000003 percent, but that is more than enough to make it a false solution. Indeed, there is a quick way to spot that 1,78212 + 1,84112 = 1,92212 is a false solution, without having to do any lengthy calculations. The trick is to notice that we have an even number (1,782) raised to the twelfth power added to an odd number (1,841) raised to the twelfth power supposedly equaling an even number (1,922) raised to the twelfth power. The oddness and evenness are important because an odd number raised to any power will always give an odd result, whereas an even number raised to any power will always give an even result. Since an odd number added to an even number always gives an odd result, the left side of the equation is doomed to be odd, whereas the right side of the equation must be even. Therefore, it should be obvious that this is a false solution:

even12 + odd12 ­ even12

Blink and you will miss five other nods to nerdiness that flash past Homer in his three-dimensional universe. The first is a rather ordinary looking teapot. Why is this nerdy? When pioneering graphics researcher Martin Newell at the University of Utah wanted to render a computer-generated object in 1975, he chose this household item; it was relatively simple, yet also offered challenges, such as a handle and curves. Ever since, the so-called Utah teapot has become an industry standard for demonstrating computer-graphic software. This particular style of teapot has also made cameo appearances in a tea party scene in “Toy Story,” in Boo’s bedroom in “Monsters, Inc.,” and in several other films.

The second nod is a flyby by the numbers 7, 3, and 4, a coded reference to Pacific Data Images, who produced the computer graphics.

These digits on a telephone dialing pad are associated with the letters P, D, and I.

Third, we glimpse a cosmological equation (ñm0 > 3H0 2/  8pG) that describes the density of Homer’s universe. Provided by one of Cohen’s oldest friends, the astronomer David Schiminovich, the equation implies a high density, which means that the resulting gravitational attraction will ultimately force Homer’s universe to collapse. Indeed, this is exactly what happens toward the end of the segment.

Just before Homer’s universe disappears, Cohen dangles a particularly intriguing mathematical morsel for the discerning viewer. In the scene shown on page 152, a slightly unusual arrangement of Euler’s equation is visible over Homer’s left shoulder. This equation also appears in “MoneyBART.”

Finally, in the same image, the relationship P = NP can be seen over Homer’s right shoulder. Although the majority of viewers would not have noticed these three letters, let alone given them a second thought, P = NP represents a statement about one of the most important unsolved problems in theoretical computer science.

P = NP is a statement concerning two types of mathematical problems. P stands for polynomial and NP for nondeterministic polynomial. In crude terms, P-type problems are easy to solve, while NP-type problems are difficult to solve, but easy to check.

For example, multiplication is easy and so is classified as a P-type problem. Even as the numbers being multiplied get bigger, the time required to calculate the result grows in a relatively modest fashion.

By contrast, factoring is an NP-type problem. Factoring a number simply means identifying its divisors, which is trivial for small numbers, but rapidly becomes impractical for large numbers. For example, if asked to factor 21, you would immediately respond 21 = 3 × 7. However, factoring 428,783 is much harder. Indeed, you might need an hour or so with your calculator to discover that 428,783 = 521 × 823. Crucially, though, if someone handed you the numbers 521 and 823 on a slip of paper, you could check within a few seconds that these are the correct divisors. Factoring is thus a classic NP-type problem: hard to solve for large numbers, yet easy to check.

Or . . . is it possible that factoring is not as difficult as we currently think?

The fundamental question for mathematicians and computer scientists is whether factoring is genuinely hard to accomplish, or whether we are missing a trick that would make it simple. The same applies to a host of other supposedly NP-type problems—are they all genuinely hard, or are they merely hard because we are not smart enough to figure out the way to solve them easily?

This question is of more than mere academic interest, because some important technologies rely on NP-type problems being intractable.

For example, there are widely used encryption algorithms that depend on the assumption that it is hard to factor big numbers. However, if factoring is not inherently difficult, and someone discovers the trick that makes factoring simple, then it would undermine these encryption systems. In turn, this would jeopardize the security of everything from personal online purchases to high-level international political and military communications.

The problem is often summarized as “P = NP or P ≠­ NP?”, which asks the question: Will apparently difficult problems (NP) one day be shown to be just as easy as simple problems (P), or not?

Finding the solution to the mystery of P = NP or P ­≠ NP? is on the mathematicians’ most wanted list, and there is even a prize on its head. The Clay Mathematics Institute, established in Cambridge, Massachusetts, by the philanthropist Landon Clay, listed this puzzle as one of its seven Millennium Prize Problems in 2000, offering a $1 million reward for a definitive answer to the question P = NP or P ­≠ NP?

David S. Cohen, who explored P-type and NP-type problems while studying for his master’s degree in computer science at the University of California, Berkeley, has a hunch that NP-type problems are indeed much easier than we currently think, which is why P = NP appears behind Homer in his 3-D universe.

However, Cohen holds a minority view. When William Gasarch, a computer scientist at the University of Maryland, polled one hundred researchers in 2002, only 9 percent thought that P = NP, while 61 percent favored P ≠ NP. He repeated the poll in 2010, and this time 81 percent favored P ­≠ NP.

Of course, truth in mathematics is not decided by a popularity contest, but if the majority turn out to be right, then Cohen’s positioning of P = NP in the landscape of “Homer 3” will look somewhat incongruous. This, however, should not prove to be an issue in the short term, as half of the mathematicians polled did not think that the problem would be resolved during this century.

Finally, there is one more mathematical reference in “Homer 3” that deserves a mention. More accurately, the reference does not actually appear in the “Homer 3” segment, but rather in the credit sequence for the whole “Treehouse of Horror VI” episode. By tradition, the credits in the Halloween episodes of “The Simpsons” have always been quirky. For example, Matt Groening is credited variously as Bat Groening, Rat Groening, Matt “Mr. Spooky” Groening, and Morbid Matt Groening.

This tradition was inspired by a comic book titled “Tales from the Crypt,” which regularly contained mutant credits for its writers and artists. Its publisher, EC Comics, became notorious after the Senate Subcommittee on Juvenile Delinquency ran comic book hearings in 1954 that concluded that “Tales from the Crypt” and its other titles were partly responsible for corrupting the nation’s youth. This resulted in the removal of zombies, werewolves, and their ilk from all comics, and in turn these constraints forced the discontinuation of “Tales from the Crypt” in 1955. Nevertheless, “Tales from the Crypt” still has many fans, most of whom were not even born when it went to an early grave. Al Jean is one these fans, and it was his suggestion to pay homage to the comic by mimicking the idea of mutant credits in “Treehouse of Horror” episodes.

All of which explains why the credits for “Treehouse of Horror VI” include Brad “the Impaler” Bird, Lycanthropic Lee Harting, and Wotsa Matta U. Groening. And, if you look very carefully, you will spot a charming reference to the Pythagorean theorem and the writer of “Homer 3”:

DAVID 2 + S.2 = COHEN 2


* The awarding of the Nobel Prize is witnessed by Frink’s resurrected father, who is voiced by the legendary comic actor Jerry Lewis. This resulted in a voice circle. Lewis based his voice for Frink Sr. on Hank Azaria’s voice for Frink Jr., which in turn was based on Lewis’s lead character in “The Nutty Professor.”

Excerpted from “The Simpsons and Their Mathematical Secrets” by Simon Singh. © 2013 by Simon Singh. Used with permission by Bloomsbury USA.

Featured Slide Shows

  • Share on Twitter
  • Share on Facebook
  • 1 of 11
  • Close
  • Fullscreen
  • Thumbnails

    Ten spectacular graphic novels from 2014

    Beautiful Darkness by Fabien Vehlmann & Kerascoët
    Kerascoët's lovely, delicate pen-and-watercolor art -- all intricate botanicals, big eyes and flowing hair -- gives this fairy story a deceptively pretty finish. You find out quickly, however, that these are the heartless and heedless fairies of folk legend, not the sentimental sprites beloved by the Victorians and Disney fans. A host of tiny hominid creatures must learn to survive in the forest after fleeing their former home -- a little girl who lies dead in the woods. The main character, Aurora, tries to organize the group into a community, but most of her cohort is too capricious, lazy and selfish to participate for long. There's no real moral to this story, which is refreshing in itself, beyond the perpetual lessons that life is hard and you have to be careful whom you trust. Never has ugly truth been given a prettier face.

    Ten spectacular graphic novels from 2014

    Climate Changed: A Personal Journey Through the Science by Philippe Squarzoni
    Squarzoni is a French cartoonist who makes nonfiction graphic novels about contemporary issues and politics. While finishing up a book about France under Jacques Chirac, he realized that when it came to environmental policy, he didn't know what he was talking about. "Climate Changed" is the result of his efforts to understand what has been happening to the planet, a striking combination of memoir and data that ruminates on a notoriously elusive, difficult and even imponderable subject. Panels of talking heads dispensing information (or Squarzoni discussing the issues with his partner) are juxtaposed with detailed and meticulous yet lyrical scenes from the author's childhood, the countryside where he takes a holiday and a visit to New York. He uses his own unreachable past as a way to grasp the imminent transformation of the Earth. The result is both enlightening and unexpectedly moving.

    Ten spectacular graphic novels from 2014

    Here by Richard McGuire
    A six-page version of this innovative work by a regular contributor to the New Yorker first appeared in RAW magazine 25 years ago. Each two-page spread depicts a single place, sometimes occupied by a corner of a room, over the course of 4 billion years. The oldest image is a blur of pink and purple gases; others depict hazmat-suited explorers from 300 years in the future. Inset images show the changing decor and inhabitants of the house throughout its existence: family photos, quarrels, kids in Halloween costumes, a woman reading a book, a cat walking across the floor. The cumulative effect is serene and ravishing, an intimation of the immensity of time and the wonder embodied in the humblest things.

    Ten spectacular graphic novels from 2014

    Kill My Mother by Jules Feiffer
    The legendary Pulitzer Prize-winning cartoonist delivers his debut graphic novel at 85, a deliriously over-the-top blend of classic movie noir and melodrama that roams from chiaroscuro Bay City to Hollywood to a USO gig in the Pacific theater of World War II. There's a burnt-out drunk of a private eye, but the story is soon commandeered by a multigenerational collection of ferocious women, including a mysterious chanteuse who never speaks, a radio comedy writer who makes a childhood friend the butt of a hit series and a ruthless dame intent on making her whiny coward of a husband into a star. There are disguises, musical numbers and plenty of gunfights, but the drawing is the main attraction. Nobody convey's bodies in motion more thrillingly than Feiffer, whether they're dancing, running or duking it out. The kid has promise.

    Ten spectacular graphic novels from 2014

    The Motherless Oven by Rob Davis
    This is a weird one, but in the nervy surreal way that word-playful novels like "A Clockwork Orange" or "Ulysses" are weird. The main character, a teenage schoolboy named Scarper Lee, lives in a world where it rains knives and people make their own parents, contraptions that can be anything from a tiny figurine stashable in a pocket to biomorphic boiler-like entities that seem to have escaped from Dr. Seuss' nightmares. Their homes are crammed with gadgets they call gods and instead of TV they watch a hulu-hoop-size wheel of repeating images that changes with the day of the week. They also know their own "death day," and Scarper's is coming up fast. Maybe that's why he runs off with the new girl at school, a real troublemaker, and the obscurely dysfunctional Castro, whose mother is a cageful of talking parakeets. A solid towline of teenage angst holds this manically inventive vision together, and proves that some graphic novels can rival the text-only kind at their own game.

    Ten spectacular graphic novels from 2014

    NOBROW 9: It's Oh So Quiet
    For each issue, the anthology magazine put out by this adventurous U.K.-based publisher of independent graphic design, illustration and comics gives 45 artists a four-color palette and a theme. In the ninth issue, the theme is silence, and the results are magnificent and full of surprises. The comics, each told in images only, range from atmospheric to trippy to jokey to melancholy to epic to creepy. But the two-page illustrations are even more powerful, even if it's not always easy to see how they pertain to the overall concept of silence. Well, except perhaps for the fact that so many of them left me utterly dumbstruck with visual delight.

    Ten spectacular graphic novels from 2014

    Over Easy by Mimi Pond
    When Pond was a broke art student in the 1970s, she took a job at a neighborhood breakfast spot in Oakland, a place with good food, splendid coffee and an endlessly entertaining crew of short-order cooks, waitresses, dishwashers and regular customers. This graphic memoir, influenced by the work of Pond's friend, Alison Bechdel, captures the funky ethos of the time, when hippies, punks and disco aficionados mingled in a Bay Area at the height of its eccentricity. The staff of the Imperial Cafe were forever swapping wisecracks and hopping in and out of each other's beds, which makes them more or less like every restaurant team in history. There's an intoxicating esprit de corps to a well-run everyday joint like the Imperial Cafe, and never has the delight in being part of it been more winningly portrayed.

    Ten spectacular graphic novels from 2014

    The Shadow Hero by Gene Luen Yang and Sonny Liew
    You don't have to be a superhero fan to be utterly charmed by Yang and Liew's revival of a little-known character created in the 1940s by the cartoonist Chu Hing. This version of the Green Turtle, however, is rich in characterization, comedy and luscious period detail from the Chinatown of "San Incendio" (a ringer for San Francisco). Hank, son of a mild-mannered grocer, would like to follow in his father's footsteps, but his restless mother (the book's best character and drawn with masterful nuance by Liew) has other ideas after her thrilling encounter with a superhero. Yang's story effortlessly folds pathos into humor without stooping to either slapstick or cheap "darkness." This is that rare tribute that far surpasses the thing it celebrates.

    Ten spectacular graphic novels from 2014

    Shoplifter by Michael Cho
    Corinna Park, former English major, works, unhappily, in a Toronto advertising agency. When the dissatisfaction of the past five years begins to oppress her, she lets off steam by pilfering magazines from a local convenience store. Cho's moody character study is as much about city life as it is about Corinna. He depicts her falling asleep in front of the TV in her condo, brooding on the subway, roaming the crowded streets after a budding romance goes awry. Like a great short story, this is a simple tale of a young woman figuring out how to get her life back, but if feels as if it contains so much of contemporary existence -- its comforts, its loneliness, its self-deceptions -- suspended in wintery amber.

    Ten spectacular graphic novels from 2014

    Through the Woods by Emily Carroll
    This collection of archetypal horror, fairy and ghost stories, all about young girls, comes lushly decked in Carroll's inky black, snowy white and blood-scarlet art. A young bride hears her predecessor's bones singing from under the floorboards, two friends make the mistake of pretending to summon the spirits of the dead, a family of orphaned siblings disappears one by one into the winter nights. Carroll's color-saturated images can be jagged, ornate and gruesome, but she also knows how to chill with absence, shadows and a single staring eye. Literary readers who cherish the work of Kelly Link or the late Angela Carter's collection, "The Bloody Chamber," will adore the violent beauty on these pages.

  • Recent Slide Shows


Loading Comments...