(Probably some typos. Feel free to fix: http://pastebin.ca/1922336)
(Probably some typos. Feel free to fix: http://pastebin.ca/1922336)
The math proof shows this by starting with an arbitrary permutation of minds (pi) for n people, then adds two new people x and y to show that there now exists another permutation of minds (sigma) that "undoes" the original permutation. This means there's a way for everyone to get their bodies back.
Without the addition of two people x and y there is no such guarantee.
To understand the details you'll need to know about group theory. Specifically permutations. This isn't a "deep" problem. But it is awesome that it's correct and on TV!
I wrote up an algorithm to swap the minds back, and then proved its correctness, and its running time. It might be more understandable than the group theory proof. It's in a comment thread on reddit: http://www.reddit.com/r/math/comments/d3ar3/tonights_futuram...
You don't really need much math background to understand the proof. At the top, where he writes pi = (top line of numbers, bottom line of numbers), he means the permutation that sends the first element to the second place, the second element to the third place, and so on.
If you think about it, every permutation can be split into cycles of this form (a -> b, b-> c, c->d, ..., e->a). One of these cycles, that's of length K, is called a "K-Cycle".
I think that's the only terminology you need to follow the proof.