The episode is based on a body swap scenario in which no pair of bodies can swap minds more than once. The proof demonstrates that after any sequence of mind switches, each mind can be returned to its original body by using two additional individuals who have not yet swapped minds with anyone.
Futurama
For all things Futurama
Rule 1: Don't be a jerkwad!
Rule 2: Alternate video links to be linked in a comment, below the original video.
Related Communities
I very nearly made a post about this earlier!
Futurama was blessed with writers with advanced degrees, and I think their approach to making science and mathematics based jokes was about perfect. In the situations where they're doing something that breaks a law of reality, they have some fun little explanation of how that's possible ("Scientists increased the speed of light..").
I think this is one of the raisins that I appreciate the show on a level all its own.
What is this, maths for ants?
There's lots of legit physics and maths in the show. I believe some of the writers are maths professors and shit.
That's really cool.
I know there are other instances of this scenario occurring in books and TV. I recall the episode of Stargate SG-1 ("Holiday", S2:E17) where they body swap after visiting a planet and meeting Ma'chello, but had to figure out that they could not swap back directly with a previously switched pair.
whatcha got there….numbers?