I'm terrible at math. Anyone who knows me will corroborate this claim with stories sure to embarrass any teacher I've ever had in the subject (Sorry, Mr. Flandera). The irony of my writing the Media Math column is not lost on me, but truthfully these columns aren't really about math. They're about media math. Dumb math. I mean it's not as if I'm busting out any of my AP Calculus (a class, in hindsight, I had no business taking) to break down why the country collectively decided to give Scott Pilgrim the middle finger.
So when I saw this past week's episode of Futurama, I was shocked. There was actual math. Math I couldn't even begin to understand. It was a complicated theorem. Gibberish. The kind of thing Will Hunting wrote on a board while everyone in the audience conceded that he must be a genius. The plot of the episode centers around one of Dr. Farnsworth's inventions, a brain switcher. It does exactly what it says it does, only with a hiccup. It can only be used once on any set of people (i.e. If Chelsea and I switched brains using the machine, we couldn't switch back, but we could switch with other people). So the problem quickly becomes, how do you get everyone's brain back in the correct place. Enter episode scribe, Ken Keeler.
Ken Keeler's your average television comedy writer. White. Male. Nerdy. Owner of a PhD in applied mathematics from Harvard. Oh wait... So Keeler went to work and proved a brand new theorem that would illustrate that with enough switching all the characters would eventually end up back where they belong. Most shows would have the professor invent something new that fixed the problem. Clearly Futurama is not most shows. The text of the theorem (as well as a video explanation) follows. Comment below if you understand any of it (I certainly don't).
"First let π be some k-cycle on [n] = {1 ... n} WLOG [without loss of generality] write:
π = 1 2 ... k k+1 ... n
2 3 ... 1 k+1 ... n
Let <a,b> represent the transposition that switches the contents of a and b. By hypothesis π is generated by DISTINCT switches on [n]. Introduce two "new bodies" {x,y} and write
π* = 1 2 ... k k+1 ... n x y
2 3 ... 1 k+1 ... n x y
For any i=1 ... k let σ be the (l-to-r) series of switches
σ = (<x,1> <x,2> ... <x,i>) (<y,i+1> <y,i+2> ... <y,k>) (<x,i+1>) (<y,1>)
Note each switch exchanges an element of [n] with one of {x,y} so they are all distinct from the switches within [n] that generated π and also from <x,y>. By routine verification
π* σ = 1 2 ... n x y
1 2 ... n y x
i. e. σ reverts the k-cycle and leaves x and y switched (without performing <x,y>).
NOW let π be an ARBITRARY permutation on [n]. It consists of disjoint (nontrivial) cycles and each can be inverted as above in sequence after which x and y can be switched if necessary via <x,y>, as was desired."(Theorem text via theinfosphere.org)















