A Futurama Math Conversation with Dr. Jeff Westbrook

On August 25, 2005, I was thrilled to have the opportunity to speak with Jeff Westbrook, who has a bachelor's degree in physics and the history of science from Harvard University and a PhD in computer science from Princeton University. He was an associate professor at Yale University and also worked at AT&T Labs before writing for Futurama and he has been writing for The Simpsons since 2004. An edited transcript of our conversation follows:

From Theoretical Computer Science to Hollywood Comedy Writing
Mathematical Moments in Futurama (The Farnsworth Parabox, Alien Codes, P=NP, a Circuit Diagram, and Fry's DNA)
Mathematical Moments in The Simpsons (Galgebra, Upcoming Women in Math and Evolution Episodes)
Concluding Remarks: Advice, Job Similarities, Future References, and NUMB3RS

From Theoretical Computer Science to Hollywood Comedy Writing

Sarah: You were at AT&T Labs and a professor at Yale after graduating from Princeton, so can you talk about how you decided to transition to Hollywood?

Jeff: When I was at Harvard as an undergraduate, I wrote for the Harvard Lampoon, as did everybody on your list, I think. But when I entered my senior year, it seemed like I had to have a real career instead of this nonsensical writing stuff. I went off to grad school and pursued that career. My dad was a mathematician so it seemed like it was in the family but I kept in touch with people over the years and did a few things on the side. Ken Keeler and I once wrote a Deep Space Nine script we sent in that was entirely a joke script in which two stand up comedians come to Deep Space Nine with their insult comedy act and insult every alien in the audience and therefore start a global war on Bajor. Anyhow, my wife was a postdoc at Yale and she was finishing that up and she wanted to come to the west coast to get a job - she's a biologist, And I had always been thinking that I wouldn't mind trying writing, and this seemed like a good opportunity to go out west and by pure luck at that time Futurama was starting up as well. I knew Ken Keeler very well, and I sort of knew a lot of the other Lampoon people vaguely, and so Ken said, "If you are interested, give it a try." And I thought that this was a chance maybe to bypass the peer review process and get some of my results right out there on the screen where you could see them, so I wrote a spec script and got hired on that basis.

Sarah: Have you ever thought about going back?

Jeff: I thought about it nonstop for the first six months of Futurama actually. It was such a weird environment and the hours were very long and hard, and although it was fun, I kept thinking, "What in the name of god do I think I'm doing playing at this game?" I'd taken a year leave of absence from AT&T Labs to do it and when the Futurama season ended, everyone thought the show was going to get canceled. So I went back to AT&T Labs: "Well guys I had fun, but I'm back and I'm so happy to be back here, it's so great. I don't have to make a hard decision - I've had my fun." Then David Cohen said, "No, sorry, we were picked up and I want you to come back, and you're under contract." So then I really had to decide and I decided that it really was too much fun to say no to. So I went back and did it.

Sarah: And you got to put some math and science references in.

Jeff: Yeah it was great - we had lots of little stuff in there.

Sarah: You've already talked about your father being an influence on your decision to study theoretical computer science. What about support from family and society? Did you feel that during your computer science career and have you also felt that as you transitioned to Hollywood?

Jeff: What do you mean?

Sarah: Were people supportive?

Jeff: Oh, of my decisions to pursue things? My mother certainly supported my decision to go to grad school wholeheartedly and she thinks it's an absolute crime that I'm involved in television.

Sarah: But you're making people laugh, right?

Jeff: She takes a different view of things. I think that if I wrote a novel she might respect it more. And my father has never really offered an opinion. He's a typical mathematician of the old school and also English, so he's very reserved and polite, much too polite to ever say "son, you're being an idiot." Actually, I think he's cool with me going into TV. He himself brought your website and papers to my attention - he was the first guy to say, "Are you aware of these people out there?" I think he'd seen your paper or something in whatever journal it was in.

Sarah: There have been a number of different ones [related publications].

Jeff: So he was the guy who actually said, "do you know about this?" "No - this is great, this is fabulous."

Sarah: Cool!

Jeff: Most people think my career is great. My boss at AT&T labs, when I left, said, "Well, I understand why you're doing it. I hope you fail because I would like you to come back here and work."

Sarah: Oh, that's nice!

Jeff: That was the nice part, and then he said, "and also because I'm very jealous of a man who can change his career." He was actually a very nice guy. Almost the first thing they said was, "So are we going to see some episodes about AT&T Labs?" I would do that, actually - I think research labs are interesting places. Someday...

Sarah: What kind of work did you do there, or can you not talk about it?

Jeff: No it was totally public. I was in the network research lab portion. It had more non-theoretical components than what I did before. We continued to do theoretical work and publish in the theoretical press, but we also had a mandate to take that work and apply it to real-life network problems in general, and also for AT&T in particular. I really had a great time there. It was a fabulous place with really wonderful people and it was a lot of fun if you have been doing a bunch of theoretical stuff for a long time to actually test that out against the real world and see what happens. So that was a great place.

Sarah: How did you get from Yale to there?

Jeff: That was again a situation of people that I knew from various places as a scientist.

Sarah: Were you there at the same time as Ken?

Jeff: No, Ken long predated me, actually. He only worked there very briefly before being sucked into TV. It is a little funny in retrospect. At the time, he and I had actually been working together on science. We had written this paper together. And then he was like, "Well, I've got this job offer from Letterman." And I actually gave him this long impassioned lecture about how wrong it was for a man of his skills and training and how society needed mathematicians doing hard work, and how could he abandon that and go off to TV. And he said, "Well, I just think I've got to try it." And then eight years later or whatever, it was like, "Do you want to come over to Futurama?" "Yes! I will be there. I am there - count me in!"

Mathematical Moments in Futurama

Sarah: So what was it like working on Futurama in that environment from the math and science perspective? People talked about the fact that there were long discussions about some of the science and mathematics from the writers before you put things in episodes.

Jeff: Yeah, I was thinking about an example while driving over here. There's an episode called The Farnsworth Parabox [4ACV15] in Futurama where the basic premise is that the Professor invents a cardboard box that is essentially a gateway to an alternate universe and on the other side, the alternate universe Professor has also invented the same box. So if you climb into the box you come out through the other side and then a further twist is in fact that their machines produced a bunch of these boxes, all somewhat different alternate universes with variations [universe XVII]. The peril is that if you accidentally destroy the box, it destroys the universe that it connects to - the precise metaphysics were never worked out entirely, I don't think. But we had to end the show with a setup where everybody was back in the universe they should be in and all the boxes were in a place where they could not be destroyed, and I know we spent an entire night on it. There was one zero base universe where there was only passing through it. The deal was also that you could actually take one box into another box, outside its own universe. That was a useful trick. We came up with an algorithm, essentially a breadth-first way of putting boxes into boxes and cycling way back, at the end of which you toss the final superbox into the standard universe and then everything was done. We proved the correctness. It was a linear time algorithm.

Sarah: Do you still have those notes somewhere?

Jeff: I don't know if we do. So we did this in the number two room - we had two rooms at Futurama. We went back and pitched it to the number one room - the non-scientists in particular stared at us as though we were completely insane and had come from another planet through the parabox ourselves to tell them this story.

Sarah: I really like that episode.

Jeff: So in the end, we used a much simpler and cheaper solution, where you can magically
pull a box through a box. That was very disappointing because we were all extremely proud of our result. It was close to publishable, I would say, in something like information processing. We would do that kind of stuff occasionally. That was probably the most insane thing. Of course my first assignment upon walking in the door there - I was completely terrified and I had no idea what to expect, really. I know I had to sit there and suddenly start making jokes for money, whereas before it was just for fun. I didn't even really get a chance to sit down before Ken said, "ok here's your first assignment - we need a new code system for the alien language."

Sarah: I was going to ask you about the alien codes. So, did you do alien code one? [Example: Season 4 DVD "Easter Egg" Nerdlinger message, decoded message]

Jeff: No, alien code one was just simply a substitution code. The animators just came up with 26 symbols for the alphabet [Example: Spanish Fry [4ACV17] message, decoding the message].

Sarah: So they did that? They figured out which ones...

Jeff: I'm not really sure. They just said this is A, this is B,... So that was put in the show along with a few clues to help viewers figure it out. And I know David and other people said they thought it would take a little bit of time, but apparently it was within half and hour of the clues appearing that people on the internet - well it took a little bit of time to work it all out, but they had it in no time. So the first thing they said to me was that we have a second alien alphabet and we can't just use substitution because it is too simple, so give us something somewhat harder than that.

Sarah: And you did a mod 26 code?

Jeff: Yeah it was the standard thing, that the ith code letter is the sum mod 26 of the first i input letters. But then it was also turned into a symbol.

Sarah: Right. And on gotfuturama.com it seems like there is one symbol that is still missing that they could never find in any of the episodes. Did you have a complete code for symbol to number?

Jeff: Yes there is a complete mapping, and the animation staff was given the program. They were given a disk with the program on it, but in the end we never trusted them to do it so I would always do it and then hand them the stuff to do. I have to admit that I don't think we carefully checked to make sure that all the symbols would be there. We kind of had the attitude that the show would go on forever and sooner or later we are going to get every possible symbol.

Sarah: Maybe if a DVD is greenlit, you can put the missing symbol in there somewhere.

Jeff: We could do that. That might be fun. That code proved a lot harder for the people on the internet and they debated that for a long time - it took them about a year or so, I think, to really find it. But in the end, I think there was somebody who had taken some cryptography at some point and immediately got it. They had some great theories though. We did a Rosetta stone in one episode where we put symbols [The Day The Earth Stood Stupid [3ACV07]]... I don't know if you know all this stuff already.

Sarah: Yes, but keep going, because it would be good for the website.

Jeff: It was on the homeworld of the Nibbler species.

Sarah: And alien language two is there...

Jeff: Yeah. Alien language one is just an evil scary alien race because I think it said things like human meat [tasty human burgers from the show's opening credits], or some of the things like that we used to say. It was implied that the Nibblonians were involved in alien language two. The Rosetta stone contained the same word in alien language two and alien language one. And the two words were "yummy tummy". There were a few other things too. There was a cryptographers chat room [A Bicyclops Built for 2 [2ACV09], decoding the symbols].

Sarah: There have been some rumors on the internet about an alien language three and that maybe some clues in some different places, like Leela's bracelet [Leela's Homeworld 4ACV02] had symbols that were either just symbols or maybe part of alien language three. So people are trying to find clues to alien language three in different places. Does that exist in the present Futurama world? Was there talk of an alien language three?

Jeff: Not to my knowledge - no - there was never any discussion on alien language three, so I believe I can put that to rest. However, I can't promise that the animators didn't have a third language and didn't slip something in. Leela's bracelet does have a bunch of symbols on it. I know in one episode we made a joke about what it meant but I no longer remember what it was. I don't think there was ever any alien language three. I wish I could say no. In fact I will just say no - there was no alien language three. It will probably save everyone a lot of agony. To the conspiracy theorists out there: "Go ahead, continue to disbelieve, because I know you won't believe me."

Sarah: Are there comments you have on David's interview? For example, the P and NP joke - I assume that was yours [Put your Head on my Shoulder [2ACV07]]?

Jeff: Yes, that was mine. I remember that clearly because it was one of the very earliest things that I contributed to the show. It was weak. It was not a strong joke.

Sarah: What do you mean by weak?

Jeff: That is was just a background joke.

Sarah: Well many of the math jokes are background jokes, right?

Jeff: Sure. The mandate was just that we need some funny stuff to put in the background of the storage closet. I originally proposed cans labeled as P and NP that contained some kind of paste or fuel that you could use to power your calculator to solve the appropriate problem, or even more confusingly, some kind of paste that you would simply smear on things to solve the problem.

Sarah: That's great.

Jeff: We just had some kind of idea that in the future things are very different for tackling computationally difficult problems. I actually don't know what is in the script anymore. I should go look at the script to see what we told the animators to do. But now it's been stated that they look like books, and that certainly makes a lot more sense to understand what we were getting at. I believe the problem will be solved by the year 3000. That is my conjecture. I officially state it now for posterity.

Sarah: Year 3000 fans of Futurama...

Jeff: So tune in.

Sarah: There were a couple of other things I'd asked him about that he thought the animators had done - like this 360 degree slamdunk [Time Keeps on Slipping [3ACV14]]. So it seems amusing, but I can't actually read the blackboard and David thought that the animators had done that.

Jeff: Yeah... Well I tend to go with David, although it is weird since there are some real symbols in there. They've got the therefore symbol which is not something you'd think animators would have. I think we might have actually just written down a bunch of symbols at some point and handed them to the animators, and said, here, use some of these things.

Sarah: That's what David thought too.

Jeff: I think they are the ones who put it all together but that we gave them a bunch of various symbols. But this is actually real - therefore star equals squish. That is actually a legitimate equation. I don't know. I don't remember doing that. Did you ask Stu Burns about that?

Sarah: No I haven't had a chance to sit down and talk to him.

Jeff: You should ask him about that. That looks like real math to me. I'm not aware of any of the animators having any mathematical background. I wish I could answer that question definitely - sorry.

Sarah: That's ok!

Jeff: Let's say the writers did it. It looks good... This is bringing back some vague memories. Oh I remember - this is a Futurama science thing. In Futurama Bender opens his door - I have to go back and figure out exactly what the joke was, but he opens his door and points to his own circuit diagram on the inside of his door [The Honking [2ACV18]], and David wanted an actual legitimate circuit diagram on another robot, so I was sent off again to a room to come up with a circuit diagram that you could actually visually see. And I think I made a simple flip/flop - do you know what that is?

Sarah: No - actually I started off as an engineering major but it has been a long time.

Jeff: It is an electrical device with two inputs and one output. There is a clock input and a signal input. Basically the clock input clocks the input to the output and it is the basis of all calculators and mechanical systems. I carefully drew a flip/flop and gave it to the animators and it appears in the episode, but it is a working circuit.

Sarah: I was going to ask about writers who mention David as having been responsible for the push to include a lot of the math references on both shows. Is that true from your perspective? I know that you can't comment on his work on The Simpsons since that was before your time, but on Futurama was he the one creating this atmosphere, or was it that there were a bunch of you who had scientific backgrounds and you would naturally talk about these things and put them in the episodes?

Jeff: Well David certainly created an atmosphere that was receptive and positive about anything that was scientifically interesting and that was I think from day one. He was excited and open to having that kind of stuff and so everybody there who was interested in it would be at the forefront of the line - that maybe we could jam something scientifically interesting in episodes and furthermore that anything that we do, let's keep it as accurate and as true as possible. So we wouldn't just invent the name of a star that was a thousand light years away - we would go and consult an almanac and actually find the name of a star that was a thousand light years away and stick it in there. We would argue about things like what is Fry's actual genetic makeup [Roswell that Ends Well [3ACV19]]. We did have that debate at length in the room and came to no conclusion. That question is still open as far as anybody knows. So there's a research problem for anybody out there.

Sarah: David already had many people emailing him.

Jeff: I'm sure he did. Because it was a science fiction show it was easier to put scientific references in there... I think he gets a lot of credit on The Simpsons for pushing through some really funny stuff. I think early on he was one of the only people with math on The Simpsons - that made him special. You did get a somewhat skewed view of what Hollywood is like from working on Futurama. There really, on average, aren't that many PhDs. There are some lawyers but there are very few scientist-writers. I don't know what they do on NUMB3RS. They probably bring in somebody.

Sarah: As far as I can tell they don't have any mathematically trained people - they have some consultants, but that is very different than having a writer with a math background that can flow things into the plot than someone from the outside saying "ok, here's an equation." I think that is evident on that show. What about some other Futurama references that you've enjoyed or that you've been responsible for?

Jeff: I may have to take that as homework because I'm not sure that I can think of anything.

Mathematical Moments in The Simpsons

Sarah: Can I ask you some questions about The Simpsons?

Jeff: Sure!

Sarah: You mentioned that the "galgebra" joke is yours. How did that come about? [In Future-Drama [GABF12] Lisa is looking at a Yale Course Catalogue: It's so great that Yale has finally forbidden man from taking science. Now let's see... Should I major in "femistry" or "galgebra"?]

Jeff: It was for the "future" episode [Future-Drama [GABF12]] where Lisa was going to Yale and we were talking about what Yale was going to be like in the future, and the whole women in math thing was at the top of our brains at that point.

Sarah: Around the Lawrence Summers time?

Jeff: Yes, exactly... So we were thinking, "Well boys won't be in math anymore and they'll be teaching "femistry" and "galgebra" and all that kind of stuff..."

Sarah: I really like that joke. You mentioned that there might be a Lawrence Summers related episode? [Girls Just Want to Have Sums]

Jeff: There is. We already had that table read. That was a very difficult episode in some ways, because we wanted to deal with it, but we didn't want to toe any ideologically obvious line either way, so it was hard to come to a satisfying end, but we probably came to an interesting place, I hope. Lisa does a lot of math in that. There certainly were one or two pretty simple math things, because she is after all in second grade. I don't think we did anything really complicated.

Sarah: She's smart, but...

Jeff: Stu and I wanted to try and shoehorn in the Euler Konigsberg bridge tour problem. So Stu and I spent about a half an hour trying to get that into a simple joke, but didn't manage.

Sarah: Oh... Sorry to hear that.

Jeff: Oh don't give up... We will keep fighting for that somehow or other.

Sarah: Cool!

Jeff: So there is that coming up. We have an evolution episode coming up too.

Sarah: When might these appear?

Jeff: These are all season 17, so they'll be appearing probably next spring, I would guess. Stuart wrote the evolution episode. That was really a lot easier to write, to be quite honest. It was much easier to take the correct ideological position on that than the women in math stuff.

Sarah: You haven't been working for The Simpsons for all that long, but are there other math related references that you've been around for?

Jeff: I don't know that there is any more stuff since the time I've been there.

Concluding Remarks: Advice, Job Similarities, Future References, and NUMB3RS

Sarah: Do you have any words of advice to undergraduate majors?

Jeff: In mathematics?

Sarah: Or in general, but sure.

Jeff: I regret in no way the time that I put into math and science. I had a great time doing it. It was really satisfying and fun and I left math not because I didn't like it... Math - I shouldn't say that because I'm not a mathematician and I will never claim to be one. I'm nowhere near as good at it as true mathematicians. But anyway, I had a great time doing it and I regret it in no way, and I would say that if it at all interests you then go for it - have a good time! I left it because I was also excited about something else and my interests are not incompatible - creative work is creative work, to a large degree. It was quite surprising to me in some ways how similar the jobs ended up being after I'd seen everything from both sides.

Sarah: What are some of the similarities?

Jeff: The most fun I had working on computer science and math problems was sitting around with a bunch of other people working on a problem but at the same time bullshitting and joking around - that shared sense of working on something together and coming up with an interesting solution to a problem. Solving story problems is very similar in some ways. Given a problem, how can you fit all the pieces together to make it work? There are a lot of analytical parts to writing and analytical ability is as useful in that as in any field. That's the plus about mathematics. Nothing trains you better and gives you more analytical skills than mathematics. That skill is useful in the craziest places you might imagine: writing a TV show, writing a cartoon, and lawyering perhaps.

Sarah: Your next career - hopefully not...

Jeff: Yeah right.

Sarah: We have enough lawyers.

Jeff: Yeah. I was wondering - can you go back? That's a question - you tell me...

Sarah: Well I don't know if you taught at Yale.

Jeff: Yes.

Sarah: So if you enjoy teaching then you can certainly go back to teaching. Picking up the research might be difficult after you've been gone for a while, so I don't know, but people do take breaks and then come back.

Jeff: Well you never rule it out. It's great you guys came by, because it really did light a little fire under us to some degree and today we put in some slightly more interesting mathematical numbers in honor of your visit. It was Ian Maxtone Graham's idea: "Oh, we should totally do that because those people were here."

Sarah: Great! Thank you! So is the atmosphere at this point receptive to things like that going in that are math related and that people might not get?

Jeff: Yes I think that there is a definite groundswell of support to put things like that in there - more in the nature of background things than trying to make an actual up front, in your face joke about it, which is much harder to do actually.

Sarah: Well you don't want to lose a bunch of your audience.

Jeff: Well you know The Simpsons has always been a layered show, so in my opinion there are far more jokes that reference obscure 70's pop icons or TV shows of the 50s that almost all our viewers aren't going to get than there are math jokes, so I think it would be fair of us to put more in there - I don't think it would be a crime.

Sarah: If there is a Futurama movie, will you work on that?

Jeff: No comment.

Sarah: What about The Simpsons movie that is being worked on as I understand from interviews. Is that something that you are working on too?

Jeff: No. I'm not working on it. It is in progress, and I'm not involved in it.

Sarah: Any other comments you wanted to make about science related things in other shows?

Jeff: It was always fun and it was the kind of thing where you could never go wrong by doing it, because someone would appreciate it for sure, and every little bit of depth is what makes people into fans of the show. Why talk down to the viewing public? They are actually pretty smart and you don't need to treat people like idiots. So I'm on a crusade - I'm not actually on a crusade - but I do think it would be fine if it happened. I shouldn't diss NUMB3RS, but I don't like shows like NUMB3RS which seem like science but are just pseudoscience. I enjoy CSI too, but my wife is a biologist and she enjoys it too, but she just laughs and laughs, as they go through their magical manipulations. It is very hard to actually do something that is scientifically realistic in any way, and also adds some drama. I almost feel like it's worse to have pseudoscience shows than not, but that's just me gassing off. Do mathematicians like NUMB3RS, what is your sense?

Sarah: They like the idea of it but I don't know how many of them are actually watching it regularly, so it seems unclear.

Jeff: Oh, I see. One time I watched, they did do the Monty Hall problem...

Sarah: It seems like there are a number of things in there that are similar to the way I teach my liberal arts math students certain ideas, and then other connections that are really stretching things, or mispronunciations of math terms or mathematician names, or worse. Sometimes it seems that Charlie is just another representation of a mathematician on the verge of mental illness, and his social skills are getting worse over time. For me, because The Simpsons and Futurama are funny, and make my students laugh, I would much rather see something like that, than NUMB3RS. I can talk to them about the math that's behind NUMB3RS, but NUMB3RS isn't a good motivator for them to study the related math, and stereotypical representations can actually discourage students, whereas creating jokes about mathematics is not something I can do, and getting my students to laugh about mathematics is a really good way to help them conquer math anxiety and get them interested. So that's why I personally appreciate the math references in The Simpsons and Futurama.

Jeff: Well you know the message is that math is actually fun to think about. Mathematics is a very playful field and once you get the hang of it, it is like play, and so people who like to play and write cartoons for TV also like to play with math because they are both fun things to do. Hopefully the students will get the idea out of that.

Sarah: Yes, Thanks! Thank you so much for putting these references in and we look forward to more in the future!

MSRI with Jeff Westbrook and Ken Keeler (10/16/05)

Dr. Sarah J. Greenwald, Appalachian State University
Legal Notice: The Simpsons and Futurama TM and copyright Twentieth Century Fox and its related companies. This web site is for educational use only. To view these pages, you must agree to these terms. We do not benefit financially in any way from this web site. Images on these pages were taken from episodes that are copyrighted by Twentieth Century Fox. We will not distribute audio, video or image files.
Disclaimer: This web site, its operators, and any content contained on this site relating to The Simpsons or Futurama are not specifically authorized by Fox.