This past April, Math

Similar documents
Here s a question for you: What happens if we try to go the other way? For instance:

DIFFERENTIATE SOMETHING AT THE VERY BEGINNING THE COURSE I'LL ADD YOU QUESTIONS USING THEM. BUT PARTICULAR QUESTIONS AS YOU'LL SEE

MITOCW max_min_second_der_512kb-mp4

MITOCW big_picture_integrals_512kb-mp4

Yearbook Critique Assignment

The Lazy Man Explains the Irrational. E. L. Lady

But that s not completely fair to Josh. He cares about Luna, too. I think about Luna, her branches reaching up to the sky like huge arms in prayer,

MITOCW ocw f08-lec19_300k

PROFESSOR: Well, last time we talked about compound data, and there were two main points to that business.

Kaytee s Contest. Problem of the Week Teacher Packet. Answer Check

Jacob listens to his inner wisdom

Math and Music Developed by Megan Martinez and Alex Barnett in conjunction with Ilene Kanoff

Tony, Frank, John Movie Lesson 2 Text

SPEED DRILL WARM-UP ACTIVITY

Introduction to Probability Exercises

Startle Response. Joyce Ma and Debbie Kim. September 2005

Name: Date: Two-Voice Poems

The Case of the Escaping Elephants

I. Fill the gaps with the correct words from the box. Write your answers on the answer sheet. D. gallows. E. ghosts. F. journey

Regular Guy, by Sarah Weeks 1. This script is adapted from Regular Guy, by Sarah Weeks.


live in me from think by onetimeblind

Note: Please use the actual date you accessed this material in your citation.

Unit 10 - The Prince and the Dragon

Also highly recommended: Graphing Resources ( homepage.htm), particularly their Revising your Visuals section.

Interview with Amin Weber

Dominque Silva: I'm Dominique Silva, I am a senior here at Chico State, as well as a tutor in the SLC, I tutor math up to trig, I've been here, this

Kaytee s Contest Problem

Like A Rolling Stone

The Kidz Klub 2. The Curse of the Step Dragon

Effective Practice Briefings: Robert Sylwester 02 Page 1 of 10

Linkage 3.6. User s Guide

MITOCW mit-6-00-f08-lec17_300k

Activation. Eitan Loewenstein. M

_The_Power_of_Exponentials,_Big and Small_

Jesus said that to prove his divinity. You re not Jesus. It s not funny to even joke about.

Transcript: Reasoning about Exponent Patterns: Growing, Growing, Growing

Section I. Quotations

-1- Tessellator. Geometry Playground Formative Evaluation Nina Hido formative, mathematics, geometry, spatial reasoning, Geometry Playground

Luigi Scognamiglio: My name is Luigi Scognamiglio, and I am calling. you on behalf of Tonino Corona s granddaughter, from the United

We came to the bottom of the canyon of Alum Rock Park. There was

The Talent Store. by Rene Gutteridge. Cash register and table Cash Three colorful sacks of different sizes Three boxes of different sizes

Trudy Pashe Narrator. Deborah Locke Interviewer. Dakota Tipi First Nation Portage la Prairie, Manitoba, Canada January 19, 2012

Chapter 1 McFadden s Bar

LESSON 35. Objectives

Lab experience 1: Introduction to LabView

Test 8: Listening, Part 1 (page 152)

Punctuating Personality 1.15

Parent Handbook! Third Grade: Benchmark 3!

Ebony and her little gang of friends!

CHAPTER 3. The Grenade

DRAMA SCRIPTS - 3 x 5 minute plays Target audience: 7-11 year olds

Actor (3 to 4 students)

180 By Mike Shelton Copyright 2008

MITOCW MIT7_01SCF11_track01_300k.mp4

*High Frequency Words also found in Texas Treasures Updated 8/19/11

THE MONTY HALL PROBLEM

Miro Kozel. Logo Evaluation

Chapter 1. Rafe Is a Big, Fat Liar

+ b ] and um we kept going like I think I got

ACT 1 SCENE 3 JACKSON VALERIE JACKSON JACKSON VALERIE JACKSON JACKSON

Pink Elephants Running Amuck

SURVEYS FOR REFLECTIVE PRACTICE

Fault: A Full-length Lie Based on a Real Earthquake that Never Happened in Gosnell, Arkansas on December 3, 1990.

Name Period Date. Grade 7, Unit 1 Pre-assessment. Read this selection from Fast Sam, Cool Clyde, and Stuff by Walter Dean Myers

IN TOUCH Canute Brailler and Amit Patel's camera-carrying guide dog

Lab P-6: Synthesis of Sinusoidal Signals A Music Illusion. A k cos.! k t C k / (1)

Confrontation between Jackie and Daniel s ex-girlfriend

Extras. Use the newspaper for reading activities. Reading. Joe Walker Elementary School Mr. Tommy J. Bedillion, Principal

MITOCW watch?v=vifkgfl1cn8

Easy as by Michael Tempel

CHAPTER 3 PROFESSIONAL SELLING IT S NOT JUST A LOT OF JAZZ LIST MORE SELL MORE

A Conversation with Lauren Brennan, Blogger and Recipe Developer Behind Lauren s Latest

CA09FR008 Lake Buena Vista, Florida July 5, Walt Disney World Mechanical Supervisor Interview July 9, 2009

That s Gratitude For Ya by Don Bosley

Modern Family Turmoil: Dad Edition

Bite Size Brownies. Designed by: Jonathan Thompson George Mason University, COMPLETE Math

Hello Middle School Students! Your middle school English Language Arts team is excited to share the 2018 Summer Reading Requirement with you.

When Methods Meet: Visual Methods and Comics

Ten Teases. Learn How to Build Attraction Using Teasing

NEW ENGLAND: JIGSAW PUZZLE, WORCESTER, MASSACHUSETTS.

Import and quantification of a micro titer plate image

Little Jackie receives her Call to Adventure

SCANNER TUNING TUTORIAL Author: Adam Burns

WR227 Summary Notes Day 15 and 16 Illustrations

Getting Stuck in the Negatives (and How to Get Unstuck) by Alison Ledgerwood (Transcript)

JAUME PLENSA with Laila Pedro

Ideas. Student-Friendly Scoring Guide

A CROOKED CLOSET DOOR

Scene 1: The Street.

WORLD TRADE CENTER TASK FORCE INTERVIEW EMT-P ANDRE CHERRINGTON. Interview Date: October 10, 2001

B-I-N-G OH! TEN MINUTE PLAY. By Jonathan Markella. Copyright MMXIV by Jonathan Markella All Rights Reserved Heuer Publishing LLC, Cedar Rapids, Iowa

ENGLISH THE AMERICAN WAY

0510 ENGLISH AS A SECOND LANGUAGE

Kindergarten-2. September 14-15, Naaman Is Healed. 2 Kings 5 Adventure Bible for Early Readers pg God Heals Our Hearts

IF MONTY HALL FALLS OR CRAWLS

I Can t Wait. James E. Bogoniewski, Jr.

PHYS 320 Poetry Spring 2009

Alternative: purchase a laptop 3) The design of the case does not allow for maximum airflow. Alternative: purchase a cooling pad

About the Author. Support. Transcript

Transcription:

The Mathematics Behind xkcd A Conversation with Randall Munroe Laura Taalman This past April, Math Horizons sat down with Randall Munroe, the author of the popular webcomic xkcd, to talk about some of his most mathematical comics. We met at Christopher Newport University, Randall s alma mater, where he was about to give an invited talk to a packed auditorium of fans. (You can see his Christopher Newport address online at www.youtube.com/watch?v=3xctkvyvy0c.) Tic-Tac-Toe Math Horizons: Let s start with one of your most complex comics, the map of tic-tac-toe moves. Randall Munroe: I remember that I have a callus in my hand from making it. I think I drew maybe a fifth or a sixth of the actual chart by hand, and then put that in the computer and mirrored and flipped it, and pieced together the rest of it. It took me something like 12 hours to draw out the fifth of it that I did. There was no way I was doing the rest of it by hand! MH: How come you didn t start with X in the middle? RM: Because it doesn t matter. With every opening move for X it s going to be a draw if you move optimally from that point onward. Part of what started this off is that I had tried doing these maps when I was in English class in 11th grade, sitting there and working out a tree for most of tic-tac-toe, and I had sort of taken it as an article of faith that the best move for X is in the center. The reason I went for the upper-left opening move in this comic was that with this one, there are some winning moves that aren t the ones that everyone knows. MH: So you wanted to go with a less common opening move? RM: Yes. I was looking for moves where you can force a win, and you can do it in a way that isn t obvious. The thing that was interesting for me here was the moves that take into account psychology and the places that Randall Munroe I really enjoy solving these kinds of things, and it s a bonus if I realize that I can put boxes around it and make it a comic. people are least likely to see that a win is forced. MH: What gave you the idea to present the information in this way? People have made these trees before, and some of them are quite complicated, but you managed to fit it all in one page. RM: The full tree of possible moves would be a lot bigger than this. I did the calculations, and when I realized that for the full tree I would need a piece of paper that was bigger than the dining room table, I thought, I m not drawing that! I was trying to figure out if there was a way to present the information so that at every stage you are making a choice on a grid of nine possibilities. It seemed like there should be some way to present the data where making the choice is just zooming in on the grid or something, and I wound up doing what you see in the comic. It s a way to organize that makes it so you can quickly shade in, for example, all the wins for X, and you ll be able to see whether there are a lot of them or only a few. At the very least, it looks pretty. MH: It s so effcient, like Edward Tufte s Visual Explanations book. RM: Yes, Tufte s real focus is always to convey the information with as little ink as possible. I like that the tic-tac-toe comic didn t have a lot of extraneous stuff. I did put in some boxes, and that helped with visually organizing the boards a little, but the presence of a box, even, tells you something: It tells you if that s an end-board state. The consequence of using boxes only for the end states is that, not counting the big boxes around each panel, www.maa.org/mathhorizons : : Math Horizons : : September 2012 5

you never have a box inside another box. This means that you don t have the problem of nested boxes for each state that would quickly eat up all of your space with margins. Self-Description MH: Another one of your comics that fascinates math people is the self-referential one where each panel describes the amount or location of black ink in itself and other panels. Various people have analyzed this comic by writing code to iterate and get your comic as the fixed point. (Readers can see one example using Mathematica, by Jon McLoone, at blog.wolfram.com/2010/09/07/selfdescription/.) Is that how you found it, or did you find it another way? RM: I found it another way. I didn t actually write any code for this. I started off thinking about the pie chart in the first panel. I was trying to figure out what other charts there might be that don t disintegrate to nothing. That was the problem; there are certain charts or plots whose fixed points are zero. Like a situation where one chart was referring to another, and the other to the first, and you end up with an equilibrium state where both graphs are empty. And you don t need a computer program to figure that out. You just sort of think, OK, well, if this graph is right for the one I ve drawn now, and I make it a little smaller, how does the other one change? And so just thinking about it, I realized that the three ideas in the panels would work; they d all have a reasonable amount of black ink in each one, which would make the middle chart work, and so on. MH: How did you determine how much black ink to put in each of the charts? RM: I figured out how to measure each of the quantities shown in Self-Description, Randall Munroe, http://xkcd.com/688/ The contents of any one panel are dependent on the contents of every panel including itself. The graph of panel dependencies is complete and bidirectional, and each node has a loop. 6 September 2012 : : Math Horizons : : www.maa.org/mathhorizons On this page and the facing page: The only winning move is to play, perfectly, waiting for your opponent to make a mistake. the charts. I drew up the outlines in Photoshop, added the captions, drew in eyeballed estimates, and then used some utilities to count the number of pixels. Photoshop will tell you how many pixels are in this area, if you select in a certain way, and I ve been pixel painting in Photoshop forever. I just wrote down the numbers, used a calculator, and calculated for the first two panels: What should the height of the bar graphs and the angle of the pie chart be? The third panel I generated by just taking the image and cloning and shrinking it. I had a big sheet of paper to keep track of the math, and I was just doing it all by hand.

Tic-Tac-Toe, Randall Munroe, http://xkcd.com/832/ MH: Wow, you iterated it by hand? How many times did you have to iterate? RM: Yeah. I think there were about 10 or 12 iterations, which really isn t so bad if you compare it to the amount of time it would have taken me to write the code, which I would have had to learn things to do parts of it. For example, I don t know of a library for pulling in an image and doing things like that, so I d be just reading in a bitmap and then using it as an array and I never remember how to do half that stuff, you know, whereas I did know how to measure size in Photoshop, and I knew I had some paper there. I always go for the lazy solution that doesn t require a lot of new stuff. I draw the comics at something like 10 or 15 times the resolution that they are online, and after just 10 or 12 iterations, it was getting to where the image wasn t changing enough that it would make a real difference. It would just be like a slight difference in the gray at the top of one of the lines on the bar graph. It got to the point where it was like staying within a pixel and it got there pretty quickly. MH: Did this one take you more time than the tic-tac-toe comic? RM: This one took less time, I think. I started in the afternoon, and it was maybe five hours or something. I think this one went up on time. Five hours isn t a lot of time in terms of how much time a job normally takes. They take longer than they look, because I write out all the dialogue by hand, and I do it in pencil once just to make sure it is all in the right places, and then I ll do it again, and then I scan it in, and then I process it. Usually for a really simple comic that I know the script and I know what the joke is, I tend to set aside two or three hours. If I have to work out the wording, or other things, then four hours. So this one took longer than usual, but not ridiculously. Not as long as some of the other ones. MH: Do you think the solution is unique? For example, is it possible that there is a larger pie you could draw here that would be part of a different fixed point, if you iterated it? RM: No, I think this is a unique solution. Look at the limit case for all of these say, if you color the pie chart in all the way. For the second panel, the overall scale is sort of arbitrary, but even if you had a scale and the first two bars were all the way up, the third bar is constrained; once you ve set two of them, you ve constrained the third. Even in this limit case, your very first iteration will take you to something that looks a lot like the final comic, because even when you ve shaded in all of the pie chart, this is still basically a white image. MH: Do you think it s possible to find this fixed point without iterating? Maybe algebraically? RM: Yeah, I think it s totally possible. One thing that I really liked about this is that every panel depends on the state of every other panel and on itself. Which is why, when I hit on these three panels, that I stuck with those choices. I liked that there was nothing that www.maa.org/mathhorizons : : Math Horizons : : September 2012 7

Movie Narrative Charts, Randall Munroe, http://xkcd.com/657/ In the Lord of the Rings map, up and down correspond LOOSELY to northwest and southeast, respectively. you could set and say OK, now I ve solved this part, I ll figure out the rest of it from there. Everything depends on everything. Solving it algebraically, I feel like it could be a hard problem. When people look at these comics, they always assume, oh, the guy that drew this must have done all that. But for me, I just found a cool way to get to the result that skips all that, even if it s not as general or satisfying. People tend to assume that I ve done whatever the most expert way of getting to it is, and so they assume that I know a lot more about the subject than I do. MH: Although iterating it by hand is... pretty badass. RM: There s a lot of stuff for a lot of the things that I do that look cooler than they are, because no one would have thought to do something that boring. Movies RM: For example, I did a big chart of movie narratives. That was one of my favorites, that was one that was fun to do. And I didn t use a computer at all in that. MH: Did you have to watch the movies over and over again to get that right? RM: That s kind of the embarrassing part... once or twice I fact-checked myself on the Wikipedia article for Lord of the Rings, but I ve seen those movies a lot. I pretty much just sat down and drew that by hand. It took me a couple of days, but when I show that to someone, people will sort of respond by saying, OK, I guess you could do a program; you could download a copy of the script, and then do a language parser, figure out who s talking to who, that ll tell you who s near who, and then you get the rules for how to make the lines go back and forth to each 8 September 2012 : : Math Horizons : : www.maa.org/mathhorizons other they ll come up with this idea, but no one would implement that because that is a lot of work! But it turns out that just doing it by hand is totally doable if you have a weekend free. And if your job is making pictures like this. So it s not even that I figured out something clever. It s just I have the patience to do the thing that no one would think of, or that anyone would ever bother to do. And sometimes that s key. It s just like I have that much free time. MH: That sounds like a good life. RM: Well, it s fun. And it s fun when I hit on something like this. I really enjoy solving these kinds of things, and it s a bonus if I realize that I can put boxes around it and make it a comic. NP-Complete RM: On the other hand, there are other comics that it might surprise you how much code I wrote for them. For example, there was one that in-

volved combining different restaurant menu items to get a certain total. But because I didn t know something about how Perl s libraries handle floating-point comparison, the puzzle in the comic actually has a really simple solution in addition to the one I meant, that the code missed because of this bug. Most people didn t notice, but it s always bugged me. Purity MH: One of the favorite xkcd comics among mathematicians is of course the one where you drew mathematicians on the far side on a list of sciences arranged by purity. RM: Yeah, I like this one. The question I always get about this one is: Where does computer science fit here? Because it s sort of math, but it s sort of superapplied, like physics. I feel like maybe there should be another axis branching off, and maybe that axis is, like, how much sunlight you get. And there s another distinction: There s coding, and then there is computer science. The best explanation I ve ever heard of that is that coding is writing programs, and computer science is the study of computers only in the sense that astronomy is the study of telescopes. I think that s a really concise summation, because computer science isn t the study of computers, it s the study of what you can do with a computer and what stuff you can explore with a computer. MH: Maybe math is kind of like that too. RM: Yeah, physics really is just applied math. When I started off, I did a math minor, and I almost did math. It s funny because in physics, I get annoyed when it gets too close to engineering, like when it s too real, the materials are breaking on you, and you have to figure out that messy real-world stuff. I like the theory. But if you go too far in the math, then I lose the connection to anything I can picture in my head, so I get lost in algebra. That s why I wound up sort of oscillating and then ending up around here [between the physicists and the mathematicians on the scale]. But at the same time, computer science is also somewhere in this end of the Purity, Randall Munroe, http://xkcd.com/435/ NP-Complete, Randall Munroe, http://xkcd.com/287/ chart. I feel like you re OK over here in the middle part. Well, you re OK over here on the left, too. MH: Somebody has to be over there. RM: Well, I m going to talk about this a little in the talk tonight, but my wife went through cancer treatment not too long ago, for the last year and a half. And everyone who went through med school did a lot of biology. That s what med school is. After depending on those people so much, for all this life-and-death stuff, I don t want to say anything too mean about them, because they re doing incredible stuff. MH: Maybe there could be another axis for how important your job actually is in the universe. RM: Then I feel like you might even get a curve like this [drawing a high bump over the biologists]. Although for the sociologists if you burn down society, there d be nobody to pay you to do math! MH: Good point! Thank you so much for talking with Math Horizons this afternoon. RM: Thank you. I like it when people go into detail, and try to figure all that stuff out. I like that there s the audience out there for that. That s why I do this. n http://dx.doi.org/10.4169/mathhorizons.20.1.5 www.maa.org/mathhorizons : : Math Horizons : : September 2012 9