When I raised the possibility of regrets, David X. Cohen expressed reservations about this move away from research and towards television: “This dredges up painful self-doubts that we writers are racked with, especially we writers who bailed out on our science and mathematics careers. For me, the ultimate use of an education is to discover something new. In my mind, the most noble way to leave your mark on the world is to expand man’s understanding of the world. Was I going to achieve that? Quite possibly not, so it may be the case that I made a wise decision.”

  Although he has neither invented a radical new computing technology nor cracked the mystery of whether P = NP or P ≠ NP, Cohen still feels that he might have made an indirect contribution to research: “I really would have preferred to live my whole life as a researcher, but I do think that The Simpsons and Futurama make mathematics and science fun, and perhaps that could influence a new generation of people; so, somebody else down the line might achieve what I didn’t achieve. I can certainly console myself and sleep at night with thoughts like that.”

  As for Ken Keeler, he looks back at his time spent as a mathematician as part of his progression toward becoming a comedy writer: “Everything that happens to us has some effect on us, and I do suppose that the time I spent in grad school made me a better writer. I certainly don’t regret it. For example, I chose Bender’s serial number to be 1,729, a historically significant number in mathematics, and I think that reference alone completely justifies my doctorate.

  “I don’t know if my thesis advisor sees it that way though.”

  APPENDIX 1

  The Sabermetrics Approach in Soccer

  Billy Beane began to think about a sabermetric approach for soccer soon after the Oakland A’s owners showed an interest in buying a Major League Soccer team. Since then, Beane has been linked with English soccer teams including Liverpool, Arsenal, and Tottenham Hotspur.

  However, prior to Beane’s involvement, others were already taking a mathematical look at soccer. In particular, there has been rigorous research into the impact of players being red-carded. This is a question that would interest Lisa Simpson, who was shown a red card by her own father while playing soccer in “Marge Gamer” (2007).

  Three Dutch professors, G. Ridder, J. S. Cramer, and P. Hopstaken, authored a paper titled “Down to Ten: Estimating the Effect of a Red Card in Soccer,” which was published in the Journal of the American Statistical Association in 1994. In the paper, the authors “propose a model for the effect of the red card that allows for initial differences in the strengths of the teams and for variation in the scoring intensity during the match. More specifically, we propose a time-inhomogeneous Poisson model with a match-specific effect for the score of either side. We estimate the differential effect of the red card by a conditional maximum likelihood (CML) estimator that is independent of the match-specific effects.”

  The authors argued that a defender who commits a deliberate foul on a goal-bound attacker outside the penalty box will make a positive contribution to his team by not conceding a goal, but he will also make a negative contribution as he will be sent off and unable to play in the rest of the game. If the incident takes place in the last minute of a game, then the positive contribution outweighs the negative, as the player is sent off just as the game is about to end. On the other hand, if the incident takes place in the first minute, then the negative contribution outweighs the positive contribution, because the team is down to ten men for nearly the entire game. The overall impacts in extreme situations are common sense, but what about when an opportunity to prevent a goal with a deliberate foul presents itself in the middle of the game? Is it worth it?

  Professor Ridder and his colleagues used a mathematical approach to determine the crossover time, which is the point in the game when being sent off begins to be worthwhile if it means not conceding a goal.

  If we assume that the teams are well matched, and if the attacker is almost certain to score, then it is worth committing the foul any time after the sixteenth minute of a ninety-minute game. If there is a 60 percent chance of scoring, then a defender should wait until the forty-eighth minute before demolishing the attacker. And, if there is only a 30 percent chance of scoring, then the defender should wait until the seventy-first minute before doing the dirty deed. It is not exactly the most honorable way to apply mathematics to sport, but it is a useful result.

  APPENDIX 2

  Making Sense of Euler’s Equation

  eiπ + 1 = 0

  Euler’s equation is remarkable because it unifies five of the fundamental ingredients of mathematics, namely 0, 1, p, π, e, and i. This brief explanation attempts to shed light on what it means to raise e to an imaginary power, thereby helping to show why the equation holds true. It assumes a working knowledge of some moderately advanced topics, such as trigonometric functions, radians, and imaginary numbers.

  Let us start with the Taylor series, which allows us to represent any function as an infinite sum of terms. If you want to know more about how a Taylor series is constructed, then you will need to do some homework, but for our purposes the function ex can be represented as follows:

  Here x can represent any value, so we can substitute x with ix, where i2 = –1. Hence, we get the following series:

  Next, we group terms according to whether or not they contain i:

  Taking an apparently irrelevant detour, it is also possible to find a pair of Taylor series to represent the sine and cosine functions, which leads to the following results:

  Hence, we can write eix in terms of sin x and cos x:

  eix = cos x + i sin x

  Euler’s identity involves the term eiπ, and we are now ready to calculate this by substituting x for π:

  eiπ = cos π + i sin π

  In this context, π is an angular measurement in radians, such that 360° = 2π radians. Hence, cos π = –1 and sin π = 0. This means that

  eiπ = –1

  Therefore,

  eiπ + 1 = 0

  According to Professor Keith Devlin, a British mathematician at Stanford University and author of the blog Devlin’s Angle: “Like a Shakespearean sonnet that captures the very essence of love, or a painting that brings out the beauty of the human form that is far more than just skin deep, Euler’s equation reaches down into the very depths of existence.”

  APPENDIX 3

  Dr. Keeler’s Recipe for the Sum of Squares

  In an interview with Dr. Sarah Greenwald of Appalachian State University, Ken Keeler recounted the following episode concerning his father, Martin Keeler, who had an intuitive approach to mathematics:

  The main influence was my father, who was a doctor . . . He only got through first-year calculus, but I remember I once asked him what the sum of the first n squares was and he was able to derive the formula in a few minutes: n3/3 + n 2/2 + n/6.

  What still surprises me is that he didn’t do it by a geometrical argument (like the way you usually derive the sum of the first n integers) or an inductive argument. He assumed the formula was a cubic polynomial with unknown coefficients, then found the coefficients by solving the system of four linear equations generated by computing the first four sums of squares. (And he solved them by hand, without determinants.) When I asked him how he knew the formula would be a cubic polynomial, he said: “What else would it be?”

  APPENDIX 4

  Fractals and Fractional Dimensions

  We normally think of fractals as patterns that consist of self-similar patterns at every scale. In other words, the overall pattern associated with an object persists as we zoom in and out. As the father of fractals Benoit Mandelbrot pointed out, these self-similar patterns are found in nature: “A cauliflower shows how an object can be made of many parts, each of which is like a whole, but smaller. Many plants are like that. A cloud is made of billows upon billows upon billows that look like clouds. As you come closer to a cloud you don’t get something smooth but irregularities at a smaller scale.”

  Fractals are als
o recognizable because they exhibit fractional dimensions. To get a sense of what it means to have fractional dimensionality, we will examine a particular fractal object, namely the Sierpinski triangle, which is constructed according to the following recipe.

  First, take a normal triangle and cut out a central triangle, which results in the first of the four triangle shapes shown here in the first diagram. This shape has three subtriangles, and each one of these then has a central triangle removed, which results in the second of the four triangle shapes. Central triangles are removed again, resulting in the third skeletal triangle shape. If this process is repeated an infinite number of times, the ultimate result is the fourth triangle shape, which is a Sierpinski triangle.

  One way to think about dimensionality is to consider how objects change in area when their lengths change. For example, doubling the lengths of the sides on a normal two-dimensional triangle leads to a quadrupling of its area. Indeed, doubling the lengths of any normal two-dimensional shape leads to a quadrupling of its area. However, if we double the lengths of the Sierpinski triangle above to create the larger Sierpinski triangle below, it does not lead to a quadrupling of its area.

  Increasing its lengths by a factor of 2 causes the Sierpinski triangle area to increase by a factor of only 3 (not 4), because the larger triangle can be built from only three versions of the original small grey triangle. This surprisingly low growth rate in area is a clue that the Sierpinski triangle is not quite two-dimensional. Without going into the mathematical detail, the Sierpinski triangle has 1.585 dimensions (or log 3/log 2 dimensions, to be exact).

  A dimensionality of 1.585 sounds like nonsense, but it makes sense in relation to the construction process that creates a Sierpinski triangle. The process starts with a solid two-dimensional triangle with lots of obvious area, but removing central triangles over and over again—an infinite number of times—means that the final Sierpinski triangle has something in common with a network of one-dimensional fibers, or even a collection of zero-dimensional points.

  APPENDIX 5

  Keeler’s Theorem

  “Sweet” Clyde Dixon’s proof of Keeler’s theorem (also known as the Futurama theorem) appears on the fluorescent green chalkboard in “The Prisoner of Benda,” as shown here. Here is a transcription of that proof:

  First, let π be some k-cycle on [n] = {1, ..., n}: WLOG write:

  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:

  For any i = 1, . . . , k, let σ be the (L-to-R) series of switches

  Note that 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,

  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.

  Acknowledgments

  I could not have written this book without the support of the many writers on The Simpsons and Futurama who gave up their time to be interviewed, and who often went above and beyond the call of duty to help me. Particular thanks go to J. Stewart Burns, Al Jean, Ken Keeler, Tim Long, Mike Reiss, Matt Selman, Patric Verrone, Josh Weinstein, and Jeff Westbrook. Above all, David X. Cohen has been incredibly friendly, patient, and generous with his time ever since I first e-mailed him back in 2005. I should also add that Ken, Mike, Al, and David all provided personal pictures for the book, as did Mike Bannan. Thanks also to Fox and Matt Groening for giving me permission to use images from The Simpsons and Futurama.

  Thanks to Roni Brunn, who sent me information about Math Club, and to Amy Jo Perry, who helped arrange interviews and made me feel very welcome during my trip to Los Angeles. I am also grateful to Professor Sarah Greenwald and Professor Andrew Nestler for sparing time to be interviewed. I would encourage readers to visit their websites to find out even more about the mathematics of The Simpsons and Futurama.

  This is my first book as a dad, so thanks go to my son, three-year-old Hari Singh, who has spent much of the last year bashing on my keyboard and dribbling on my manuscript when I was not looking. He has been the best possible distraction.

  When I have been locked away in my office, Mrs. Singh (aka Anita Anand) has done a great job of keeping Hari entertained with cake-making, picture-painting, butterfly-hatching, dragon-slaying, and hide-and-seek. When she has been locked in her office writing her book, we have either let Hari run free in the streets or relied on various people to keep an eye on him. Thanks to Granny Singh, Grandad Singh, Granny Anand, Natalie, Isaac, and Mahalia.

  As ever, Patrick Walsh, Jake Smith-Bosanquet, and their colleagues at Conville & Walsh Literary Agency have been a constant source of support and advice. It has been great to work with a new British editor, Natalie Hunt, and it has been doubly brilliant to work once again with George Gibson, who had faith in me as a new writer when he published my first book, about Fermat’s last theorem.

  In my research I have drawn on various web resources created and run by dedicated fans of The Simpsons and Futurama. Details of these websites appear in the online resources section. Thanks also go to Dawn Dzedzy and Mike Webb for baseball advice, Adam Rutherford and James Grime for various suggestions, Alex Seeley for other suggestions, John Woodruff for even more suggestions, and Laura Stooke for transcribing my interviews. I would also like to thank Suzanne Pera, who has organized all my paperwork and admin for the past ten years and more, and who retires this year. She has been a complete superstar and has stopped my life from falling apart. I am not sure how I will cope in 2014.

  Finally, I had planned to write this book back in 2005, but I was distracted by bogus claims made by many alternative therapists, ranging from homeopaths to chiropractors. So, instead of writing about The Simpsons and Futurama, I co-authored a book called Trick or Treatment? Alternative Medicine on Trial with Professor Edzard Ernst.

  Then, after writing an article for the Guardian about chiropractic, I was sued for libel by the British Chiropractic Association. This, alongside the libel cases of Dr. Peter Wilmshurst, Dr. Ben Goldacre, and many others, helped trigger the Libel Reform Campaign in Britain. Fighting my case took two miserable years, but during this time I realized that I have some very loyal friends and I made lots of new friends, too.

  The very first libel reform rally was organized by David Allen Green, with my solicitor Robert Dougans standing by my side. Three hundred bloggers, skeptics, and scientists were crammed into the Penderel’s Oak pub in Holborn, London, where they heard speeches by Tracey Brown, Nick Cohen, Brian Cox, Chris French, Dave Gorman, and Evan Harris. There were also messages of support from Richard Wiseman, Tim Minchin, Dara Ó Briain, Phil Plait, Sile Lane, and many others. Many of these people would go on to lobby politicians and speak at other libel reform rallies.

  That was just the start. I received support from the James Randi Educational Foundation in the United States, Cosmos magazine in Australia, Skeptics in the Pub groups around the world, the Hay Festival of Literature and the Arts, QEDcon, Sense About Science, the Science Media Centre, Index on Censorship, English PEN, and many other groups and individuals. I suddenly became part of a much bigger family, who all supported science, rationalism, and free speech. This family included Dr. Robin Ince, who hosted a fund-raising gig and who was always willing to help whenever required. He is a slightly grumpy national treasure.

  On February 10, 2010, at a time when the Libel Reform Campaign desperately needed more support, I promised that my next book would mention those who went out of their way that month to persuade others to sign a libel-reform petition. In the end, over sixty thousand people signed the petition, which made politicians aware tha
t the public was clamoring for a fairer free speech law. As promised, I would like to thank: Eric Agle, Therese Ahlstam, João P. Ary, Leonardo Assumpção, Matthew Bakos, Dilip G. Banhatti, David V. Barrett, James Barwell, Ritchie Beacham-Paterson, Susan Bewley, Russell Blackford, Rosie, Florian, and Hans Breuer, Matt Burke, Bob Bury, Cobey Cobb, Crispin Cooper, Simon Cotton, Rebecca Crawford, Andi Lee Davis, Malcolm Dodd, Tim Doyle, John Emsley, Tony Flinn, Teresa Gott, Sheila Greaves, Sherin Jackson, Elliot Jokl, Bronwyn Klimach, John Lambert, Daniel Lynch, Toby Macfarlaine, Duncan Macmillan, Alastair Macrae, Curtis Palasiuk, Anil Pattni, Mikko Petteri Salminen, Colette Phillips, Steve Robson, Dennis Rydgren, Mark Salter, Joan Scanlon, Adrian Shaughnessy, David Spratt, Jon Starbuck, Sarah Such, Ryan Tanna, James Thomas, Stephen Tordoff, Edward Turner, Ayesha W., Lee Warren, Martin Weaver, Mark Wilcox, Peter S. Wilson, Bill Wroath, and Roger van Zwanenberg.

  There is now a plaque in the Penderel’s Oak that reads: “After a four year campaign, involving thousands of people and hundreds of organisations, the old laws were overturned. The new Defamation Act became law on 25th April 2013.”

  Online Resources

  Professors Andrew Nestler and Sarah Greenwald have provided excellent online sources for those wishing to explore the mathematics of The Simpsons and Futurama, including material aimed at teachers.