Image: Unsplash

Futurama and Keeler’s Theorem

Sure, The Simpsons is the king of all animated sitcoms, but Futurama holds a special place in many a viewer’s heart. As a science-fiction comedy, the show plays with some really advanced science and maths, and it manifests in a number of ways. These can be background gags (in ‘The Honking’, Bender is nonplussed when the number 0101100101 appears on his wall in blood. When he sees it reflected in the mirror, though, he is terrified, as 1010011010 is the binary representation of 666) or key plot elements (in ‘2-D Blacktop’, the crew are trapped in a two-dimensional world and pass through fractal dimensions). One of its most interesting mathematical elements, though, is something the show itself created.

In ‘The Prisoner of Bender’ (a pun on The Prisoner of Zenda, a Victorian novel about a man taking on a new identity), body-swapping shenanigans are the order of the day. Professor Farnsworth uses his mind-switcher invention to swap minds with Amy – he can experience youth again while Amy is able to gorge herself with food. Bender then swaps with Amy’s body, so he can use it commit crimes and the Professor (in Bender’s body) can join the robot circus. The mind-switching continues, with Fry, Zoidberg, Leela, Hermes, Wash Bucket and Emperor Nikolai (the leader of Robo-Hungary) all winding up in different bodies.

As a science-fiction comedy, the show plays with some really advanced science and maths, and it manifests in a number of ways

Towards the end of the episode, everybody wants to return to their own bodies, but the mind-switcher has a little glitch – it cannot perform a second swap between the same pair of bodies. So, somebody had to find a way to resolve the situation, and that fell to Ken Keeler, the episode’s lead writer and a PhD in applied mathematics. Rather than attack the specific problem in ‘The Prisoner of Bender’, Keeler tried to address the more general problem – how many fresh people would need to be introduced to a group of any size to be able to move everybody back into their own body?

As it turns out, introducing just two fresh people to a group of any magnitude would be enough to resolve the chaos, as long as they are deployed in the correct manner. This relatively simple conclusion was fairly tricky to come to – Keeler produced a proof, known as the Futurama theorem or Keeler’s theorem, which has the honour of being the first mathematical theorem created solely for the benefit of a sitcom.

Somebody had to find a way to resolve the situation, and that fell to Ken Keeler, the episode’s lead writer and a PhD in applied mathematics

You can see proof of the theorem at Cut the Knot, if you’re sufficiently mathematically minded – if not, I’ll try to explain it in plain English. It’s essentially a clever unmuddling strategy, which begins with putting the switched minds into certain sets that contain all of the minds and bodies necessary to complete the set. In ‘The Prisoner of Bender’, Fry and Zoidberg swap with each other and no-one else, so they make up one set – the other characters make up the other. Resolving each set in turn helps resolve the problem.

In the episode, ‘Sweet’ Clyde Dixon and Ethan ‘Bubblegum’ Tate (two basketball players from the Globetrotter Homeworld) figure out the proof and put it into action, using themselves as temporary vessels for minds seeking the right body. Imagine it like a conga line – every mind faces someone’s back, and that back is the body their mind should land in. The mind at the front swaps into Bubblegum Tate’s body (for example), and then everybody in the set swaps with Sweet Clyde’s body in turn. At the end of the line, the last switch puts Tate’s mind into Clyde’s body. With that, the set is fixed – the two follow the same process to fix all the remaining sets and then swap with each other (if necessary).

Imagine it like a conga line – every mind faces someone’s back, and that back is the body their mind should land in

The proof is visible in the episode – Keeler modestly describes his proof as a fairly standard piece of maths, and has claimed it was only included in the show to popularise maths among young people. Keeler’s theorem is, however, an incredible example of the way maths can be used to tackle problems that may not seem to immediately require it, adding a further level of genius to the smartest show on TV.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.