In the Futurama episode The Prisoner Of Benda (2010), the following plot line exists:

Professor Farnsworth and Amy build a machine that allows them to switch minds so that they may each pursue their lifelong dreams. However, they learn that the machine cannot be used twice on the same pairing of bodies. To try to return to their rightful bodies, they involve the rest of the crew in the mind switches, leaving each member free to pursue their own personal endeavors in a different crew member's body.

The episode was based on a Theorem proposed by series writer Ken Keeler. The Theorem attempts to solve the issue of how each crew member can be restored to their correct body given the limitation of the switching device.

It is established fact that the Futurama theorem/proof was created specifically for the franchise, for use in this episode.

(Relevant parts of the interview, emphasis my own)

"[...] a theorem based on group theory was specifically written (and proven!) by staffer/PhD mathematician Ken Keeler to explain a plot twist."

"[...] a mathematical theorem was penned for the sake of entertainment."

Despite the specific wording above, it still seems to me open to debate as to whether or not the theorem was created for the sake of the plot of that episode, or if the plot was created for the sake of the theorem.

The man himself, Ken Keeler, was not the person interviewed, it was David X. Cohen, the show’s Executive Producer and head writer. Additionally, this was not a direct quote from him, but was the (possibly cherry picked) wording of the interviewer, Alaina G. Levine.


Was the plot merely wrapped around the more-or-less already existing theorem?


Did the episode have the underlying problem, and then the theorem was created to fill that narrative hole?

Is this even publicly known?

2 Answers 2


Based on the creative process, and the focus of the theorem, it would seem most likely that the theorem was based on a planned plot. For instance, the discussion most likely ran like this:

Writer 1: "How about if the doctor switches minds with someone, but then discovers he can't switch them back?"

Writer 2: "So, like, you can only switch 2 people at once, and you can never switch that pair of people back? I like it! But what's the storyboard look like? I mean, could we ever return everyone to normal?"

Ken Keeler: "Give me a couple days, I think I can solve this."

It doesn't seem likely that Keeler, out of the blue, decided to create the Theorem about switching brains. It's more plausible that the plot line was discussed first, and Keeler decided to see if it was actually possible.


My understanding is that he came up with the theorem specifically to use for this episode. i.e. he wanted to write an episode about mind-switching, so did the math for it. Ken Keeler is credited as writer on the episode, and I don't see any references to this theorem in any publication before the episode aired.

  • 1
    Note, this was the plot of an early Stargate SG-1 episode that pre-dates the Futurama episode by about 10 years.
    – Darren
    Commented Oct 26, 2022 at 9:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .