Farnsworth desires to inhabit the youthful body of his employee, Amy Wong, while Amy yearns to overeat like a child, a desire fulfilled by swapping bodies with the professor.
After, they realize the machine doesn't allow them to swap back, creating a complex web of swapped consciousnesses that needs resolution. They enlist the Globetrotter’s help.
Paralleling the “Futurama” writers’ qualifications, the Harlem Globetrotters are genius mathematics experts, whom the gang brings in to help solve the mathematics of the machine.
Writer Ken Keeler, a highly qualified mathematician with a Ph.D. in Applied Math and a Masters in Electrical Engineering from Stanford, invented new mathematics for the episode.
In an episode of the “Geek’s Guide to the Galaxy” podcast, “Futurama” co-creator David X. Cohen talked about how Keeler developed real math to explain the logic of body-swapping.
Cohen stated, “Ken comes in the next morning with a stack of paper [...] ‘I've got the proof!’” He showed that two new people reset everyone to their bodies post-brain swapping.