One Futurama Plot Was So Complicated It Created A New Kind Of Math
In the "Futurama" episode "The Prisoner of Benda," Professor Farnsworth (Billy West) invents a body-swapping device that trades the consciousnesses of two users. He, being a very, very old man, would like to occupy the youthful, more active body of his employee, Amy Wong (Lauren Tom). Amy, meanwhile, longs to overeat as she once did as a child, and the Professor's bony body would allow her to indulge in her appetite. They swap bodies, but only after doing so realize that the machine doesn't allow them to swap back. A third body would allow Amy to return to her body, but then the Professor and the third party would be swapped. It was all very complicated.
Eventually, Fry (West) and Leela (Katey Sagal) are having romantic dates in the bodies of Dr. Zoidberg (West) and the Professor, and the Professor is performing in an Eastern European circus in Bender's body. Bender (John DiMaggio) stages a heist in Amy's body before giving Amy's body over to a talking wash bucket. The wash bucket hosts the consciousness of a traveling robot aristocrat, and Dr. Zoidberg is in Fry. Returning everyone back to their own bodies will become a massively complicated affair.
Indeed, the Harlem Globetrotters are called in to solve the issue; in the "Futurama" universe, the Globetrotters are genius mathematics experts. Some complex math is required.
In a 2014 episode of the Wired Magazine podcast "Geek's Guide to the Galaxy," "Futurama" co-creator David X. Cohen talked about "The Prisoner of Benda" and the real-life math that went into the story. Luckily, the "Futurama" writer's room contains multiple possessors of advanced math degrees, and one writer in particular, Ken Keeler, actually math-ed out the body-swap solution used in the script.
50 years at Harvard
Cohen has pointed out several times in the past — at convention appearances, in interviews, and on DVD commentary tracks — that the "Futurama" writer's room contains three PhDs, seven Master's degrees, and a total of 50 years of life at Harvard University. It may be a silly sci-fi show about drunken robots and dumpster-dwelling lobster monsters, but it has some of the sharpest scientific minds working on it behind the scenes. If there is a reference to math, astronomy, or theoretical physics on "Futurama," you can be sure it's genuine.
Cohen noted that Keeler was one of the show's many geniuses. Keeler has a Ph.D. in Applied Math and a Masters in Electrical Engineering from Stanford. "So," Cohen said, "highly qualified." For "The Prisoner of Benda," Cohen said, Keeler invented what he called the Futurama Theorem, which he considered to be the highlight of the show's many, many math references. Cohen noted that body-swapping is a common enough sitcom/cartoon plot, but the "cannot switch back" conceit gave it a hard sci-fi edge.
But, he said, that presented a problem:
"So we thought: okay if a lot of the characters get their brains mixed up with this machine, can they all keep trading brains around in a circle or something until they get their brains back? And we were just trying to make the plot more complicated, but we realized we had accidentally created this math problem, to think of it as a group theory or a graph theory problem. And we started talking about it thinking it would be obvious and, no, it's not that clear if they can all get their brains back or not."
It seems the writers were unable to graph out the swaps.
Keeler rode to the rescue.
The Futurama Theorem
Keeler, who is not the type to let a math problem pass idly by, did some homework that night and returned to the office with a mathematical proof. Cohen recalled:
"So end of the day of discussion came, we go home, Ken comes in the next morning with a stack of paper and he said, 'I've got the proof!' And he had proven that no matter how mixed up peoples' brains are, if you bring in two new people who have not had their brains switched, then everybody can always get their original brain back, including those two new people."
Of course, other math nerds have worked out the theorem themselves, which was featured briefly on screen. Cohen loved that math knowledge and science nerds were able to ultimately solve all the plot problems in "The Prisoner of Benda," something he knew was all too rare in TV writing. Sometimes incidental deep-cut math jokes will be included in "Futurama," but it was hardly ever the crux of the story. Cohen continued:
"[Y]ou rarely get to see science, let alone math, be the hero of a comedy episode of TV. So I really wanted to feature that in a way that, more than we usually do. As usually these things, being background jokes, fly by. So we presented the problem, it was the key element of the plot, and at the climactic moment of the episode we flashed the entire proof of the theorem on screen for about half a second so people who really wanted to see it could see that we had really proven it. So that's an example of a theorem that was published in the form of a TV cartoon."
All credit, Cohen said, goes to Ken Keeler, Ph.D.