Futurama is a witty sci-fi cartoon series. It has made me silently exclaimed “that’s pretty smart!” on several occasions.

Season 7 episode 10, titled “The Prisoner of Bender”, outdone itself where it made me pause the video and try to solve the puzzle presented in that episode as if it was an online lecture. In that episode, the professor invented a mind-swapping machine and after using it on Amy and himself, they decided that they want to swap back. However, the machine can only be used on the same pair only once. The naive attempt of introducing a third party (bender) didn’t solve the problem either. How can they revert to the original state?

It didn’t take long to exhaust all possibilities to figure out that that a group of 3 people is not solvable but a group of 4 people is. However, how does one generalize this to n people and a random starting permutation, like what happened in the episode?

After some searching online12, it turns out I’m not the only one who finds this intriguing. According to the articles I found online, Ken Keeler, the lead writer for that episode, is attributed for the futurama theorem3 which was used to resolve the predicament. As it turns out, by introducing 2 new characters to a mind-swapped party of size n, it is always possible to revert to the original state.

Right before they get down to reverting their state, the professor quipped “and they say pure maths has no real world application”.

I was quite impressed that the maths behind this episode is sound and I have a new found respect for the writers. I later learn that the team behind futurama has three PhD and seven masters, which explains the witty nature of the series.

There are several cartoon series that make me want to explore a subject further like this one has. Incidentally one of them is the Simpsons and not surprisingly, Matt Groening is part of writing both of them.


  1. https://www.cut-the-knot.org/Curriculum/Combinatorics/Futurama.shtml ↩︎

  2. Generalizing the futurama theorem https://arxiv.org/pdf/1608.04809v1.pdf ↩︎

  3. https://theinfosphere.org/Futurama_theorem ↩︎