The Map of the Internet

Some additional information on the map in today’s comic:

The labeled websites (“Google”, “Flickr”, “Slashdot”, etc) are just based on the location of the particular server I got when I pinged the site from my home machine on the day I was working on the map. Each site there has many servers and mirrors, and the IP of each may change from day to day. But their location is actually based on both the first and second quad — although the map is drawn in the style of a geographic map, with wobbly borders, it’s laid atop a regular grid which can be extended fractally downward. When I was putting down the location of a server for a particular website, I worked out where within the grid it should fall. This isn’t really for the purpose of telling you anything useful about that website, but rather to suggest that IPs can be placed as unique points on this map. Everything here was done by hand across a couple large sheets of paper, and it’s not trying to be completely accurate in all the details (although I did my best). It’s more of a survey than a practical road map.

The fractal behind the comic is a mapping of the integers to a plane (it could be extended, I assume, to the real numbers). I came up with it in 1999 when I was trying to figure out a way to graphically show the contents of long blocks of computer memory, which is basically linear. I wanted a mapping that would show strings of consecutive addresses as contiguous, compact blobs, and that would work on all scales. I played with and coded a couple mappings, but this was the only one I found that really fit that qualification.

Edit: The fractal is the Hilbert Curve, discovered in 1887. I had done some poking around but had never seen it before. Thank you, folks here and on IRC. It cannot be extended to the reals, but rather to the binary fractions (a subset of the rationals). This lets you get arbitrarially close to any number you want (and cover all the IEEE floating points).

I never come up with an algorithm to do the mapping — that is, a function that would take an integer and return the pair of coordinates. Years later, several months ago, I remembered the mapping and showed it to my cousin, who looked at it for a while and worked out a Scheme algorithm to do the mapping both ways.

Edit: I will be posting a version of the algorithm ASAP.

However, I also posed the problem as a puzzle to the forums: (Problem) (Solution)

I posted a sample of the mapping mangled into an integer-to-integer function and asked people to come up with the next set of numbers. The mangling was in part to make it less obvious what they were playing with and in part to encourage a different way of thinking about the problem. I informally offered two xkcd t-shirts as prizes for whoever provided the first correct answer and the most elegant algorithm. BaldAdonis very quickly took apart the problem (very impressively) and will — once I’m finished with this batch of shipping — get at least one t-shirt (depending on whether someone else finds an algorithm to do the mapping more elegantly). The other shirt is still up in the air. I’ll leave it open for the next week or two, and if you want to send me a piece of elegant and easily-executed code that does this mapping — taking in a number and returning the coordinates (bonus points for the reverse operation) — you’ll have a shot at winning a free xkcd t-shirt of your choice. (Note: for the next few days I’ll be working on t-shirt orders and then I have a wedding to go to, so I may not be able to check over your code until next this week.)

Suggestions for future work: When I was constructing the map, I also did some ping surveys of the various /8 networks to see how densely populated with active hosts each one was. The density data didn’t make it into the simpler final map, but that’s just one of many data sets one could slap up on a map like this to visualize the ‘net in an interesting way.

South America, Verizon Math

South America should be able to reach xkcd again. I’m sorry to those of you there who haven’t been able to reach the site over the last week. There was a semi-complicated problem with some dead routers at ThePlanet’s datacenter. It should be fixed now. The problem with posting about it is that it doesn’t reach the people who are actually being affected 🙂

The whole Verizon thing continues to be incredibly entertaining. It’s great when someone is dealing with some minor-in-the-grand-scheme-of-things-but-incredibly-frustrating situation — and the entire blagosphere just decides to drop in commiserate, and back him up. Fun times to be had by all! Here’s my contribution:

Dividing by Zero

I’ve gotten a few emails about a math professor who claims to have solved the problem of dividing by zero.

With the caveat that I am not a professional mathematician, I’m pretty sure this is silly. For one, any time that you have a major, front-page scientific or mathematical result reported by a mainstream news organization that does not contain some version of the phrase “this discovery, which was published in [name of major peer-reviewed journal],” you are probably looking at a news organization that is not doing their job. Until I see a group of mathematicians look over his results and say that they are consistent and significant extensions of the current body of mathematics, I’m really not buying it.

The other reason I’m not buying it is that I don’t see how you can “solve” that problem. The article says that the whole idea is that this can make divide-by-zero crashes go away. This doesn’t really make sense. When I worked with LabVIEW, one thing I noticed was that the result of dividing by zero was propagated through the system as “NaN” — Not a Number. This didn’t make anything work better. It just pointed out that I had made a mistake somewhere. If you have set up an equation where you are trying to divide by zero, you have done something WRONG. You can make the system fail gracefully or not, but that’s a matter of crash handling. Just spitting out the result “Nullity” doesn’t fix things. Sure, you could then make the next part of the program handle “Nullity” as a special case. But that’s not mathematical, that’s algorithmic.

Now, it’s true that this is sounds similar to the way the mathematical community responded to the idea of the square root of minus one being treated as a number, which was only really accepted in the 19th century, or the way negative numbers were dealt with before that. But I don’t think dividing by zero is really the same thing. Until someone can do more than just use a word like “Nullity” to mean “Undefined” (I remember trying that in 10th grade), this isn’t a useful concept, and it’s not going to stop programs from crashing when the programmer writes a function with an equation that’s supposed to spit out a real number and doesn’t. We’ve been using symbols to refer to the result of dividing by zero for years now. They don’t mean anything mathematically and they don’t solve any problem.

Wondermark Auction for Child's Play

David Malki: He’s the author of Wondermark, in which he painstakingly scans and cleans up illustrations from his collection of 19th-century rare books, and then smears poop jokes all over them in Photoshop. He and his Sharpie collection are also the reason they have guards standing around around so many of the paintings in the Louvre. He is also the seach-and-rescue pilot who picked you up that one time when you were playing with your GPS outside Las Vegas (this line will make sense in a few weeks when you read one of the upcoming xkcd comics. TEMPORALLY UNCONVENTIONAL COMEDIC REFERENCE!). He also edited that trailer you saw a while back when you went to watch Garfield: A Tail of Two Kitties for some reason.

The reason I bring this dude up is that he’s auctioning off three unique framed Wondermark poster prints via eBay auctions, the first of which is now in progress. One hundred percent of the proceeds will go to Child’s Play, a charity started by webcomickers Gabe and Tycho of Penny Arcade to buy games for hospitalized kids to play with as they lie in their beds for weeks on end.

So, here’s a chance to put genuine art on your wall without letting go of your inherent cynicism regarding anything heartfelt! And at the same time, you can rationalize your bid by knowing that if you win, your money goes to do something good and help show that gamers and bloggers are maybe good for something beyond standing in long lines outside Best Buy at 3:00 AM. Go bid.

Kramnik, t-shirts, Christmas

So, how ’bout that Kramnik blunder? The world champion, famous for careful, flawless play, lost a game Monday in the latest batch of Man vs. Machine matches. He got checkmated in one move with a blunder that, to someone on that level, is similar to forgetting which way bishops move. I wanna see them put Judit Polgar against Deep Fritz so we can have a Woman vs. Machine match for once.

Speaking of womens’ chess, here’s a gallery I stumbled on recently. Alexandra Kosteniuk is the #3 woman in the world and promotes chess as a model. I follow womens’ chess in part because it’s a nice break from the nerdy-guy stereotype and in part because the more I watch it the more I notice gender barriers and subtle biases and the like. There’s a lot that can be said about gender, and it’s not a subject I want to jump into without a lot of free time and maybe a stiff drink, but that’ll have to wait for another day. Kudos to Judit, as always, for refusing to play in womens-only events (for a while, her sister Susan was the womens’ world champion, and their third sister sister Sofia is no slouch either). They’re like the Williams sisters of chess.

I’m really more of an armchair chess player myself. I mean, an armchair without a chess board. I don’t really have the patience and the competitive tension gets to me. But I find the people who play it really interesting and I’ve been having fun learning more about them over the years.

There’s a new t-shirt in the store. It’s based on Comic #55 and will start shipping by next Wednesday. The deadline for Christmas orders is Wednesday, December 13th, but supplies are limited and we may run out of stock in a particular size so order now and so forth!

eBay Explosions

I have no idea what happened with the explosion(s) last night at eBay, and hope everyone is okay and that it all turns out all right.

That said, when I heard about it just now and searched for news, the top two results suggested something alarming:

Raptor shirts!

A new “No Raptors” shirt has gone up in the store (which is now almost completely restocked in the other shirts)! I’ve stocked up on a bunch of these ahead of time so they’re up for sale right away with no preorder period! Before putting them up, I got some friends together to take pictures in them. The results were awesome:

I made a collage of the pictures, featuring me and a bunch of friends who are mostly from CNU. They were a lot of fun to take. TRIVIA: Next to the girls in the anatomy lab pictures there were two grad students dissecting a small dog. They were a little confused as to why we were in their lab being so triumphant about science, especially since the building was supposed to be locked, but in the end they decided that we weren’t a threat! Which was good because they had a bunch of really sharp knives.

I hope you guys enjoy the shirts! So far I’ve had more friends buy their own, after seeing the samples, than any other shirt, so I think they’re gonna do well!

Also, all the previously backordered shirts are going out today and tomorrow, so you should get those soon.


My friend Sarah and I just got back from wandering around SPX, the Small Press Expo, which is an independent comics convention. It’s focused on real paper comics, but I stopped by because there were a few webcomics represented there. We met Jeph Jacques of Questionable Content, David Malki of Wondermark, and Colleen of Fluff in Brooklyn. Jeph, Jeph’s gal Cristi, David, Colleen, Colleen’s pal Marianne, Sarah, and I all went out for dinner at a very nice Thai restaurant and had a lot of fun. David filled my car with a story about telling the difference between Garfield the cat and Garfield the 20th president (“the beard, not the whiskers”).

The expo was really cool. I hadn’t been to a convention before, and it seems this one is a good one to start out at. It was very grown-up, very nice and artsy and people tended not to have costumes or anything. Just a lot of hipsters hanging around with tables covered in absolutely breathtaking art. I picked up a copy of Two-Fisted Science, which I’d seen on BoingBoing, and blabbed at the author for a while.

I’m at Sarah’s place, about to crash, and I just turned my head to the right and there were a pair of EYES, set in the face of a strange cat sitting on the back of the couch, literally an inch, an inch and a half from my face, staring at me intently. I propose all animals with quiet feet and eyes above a certain level of creepiness be fitted with bells immediately.



A note on today’s comic: Judging from my inbox, a lot of people have a different perspective on the GRY puzzle than me. First of all, I believe it’s a fairly old riddle. But more importantly, I think that originally the “English Language” bit wasn’t even a part of this riddle. It was just a head-breaker because there was no answer. But then someone who thought they were oh-so-clever came up with the idea that somewhere in the puzzle it could be read as asking what the third word in the actual phrase “the English Language” was. That’s a pretty lame interpretation. There have been lots of rewritings of the puzzle to try to make it work a little better, but they’ve never removed the lameness. Some of them more friendly to that stupid interpretation than others. I’d been hearing the angry/hungry puzzle for years (and talked about the interesting fact that there was no answer) before I ever heard someone try the “language” thing. Snopes has a good article on this puzzle.

I always hated those ‘lateral thinking’ puzzles — the ones where they said “oh HO, I never told you that the doctor’s mother was a midget and this was all happening a space station! Don’t you feel dumb now?‘ Because once I figured out that language was really, really flexible and imprecise, it seemed that the key to communication was just figuring out what they probably meant. And figuring out what they could possibly mean if you use all the wrong definitions and stuff is interesting, but I don’t think it teaches all that much more than bad communication. These should be kept very separate from actual logic puzzles, which are really neat. There’s a thriving section for them on the forums, and a lot of people found my site looking for the answer to the Blue Eyes puzzle (which is great because it doesn’t use trick language anywhere — indeed, I’ve rewritten it over and over to make it as unambiguous and clear as I can — and yet the answer is incredibly elusive).

Many news things, some overdue

The forums weren’t really a great place to post news, so davean helped me set up a blag here. I’ve got a bunch of news/info on a bunch of topics, and will answer questions in the comments, so here we go:


My about page mentions that I work for NASA — I’m technically a contractor working repeated contracts for them. However, they recently ran out of money to rehire me for another contract, so I’m done there for now. This isn’t really bad, because it came right as the t-shirt orders were becoming so strong that I really needed the time off to handle them. Combine that with answering the huge amount of email I get through the site, drawing the actual comics, and assorted other things, and I really don’t have the time to work a full-time job at the same time that I do this comic/store. So, for the moment I’m now a full-time webcomic artist/t-shirt designer. I don’t know how to thank you enough for all the support.


I shipped out the domestic preorders last week, and the international orders were held up by the post office and didn’t get through until this week. This was a bit later than I planned, and I’m sorry. For the week of the main shipping I was literally working every waking hour, 16 hours a day, on getting the t-shirts out, along with a lot of help from friends. For those who ordered shirts, if there was any kind of a mistake in your order, let me know and I’ll send you the right shirt(s) immediately.

T-shirts have been taking over the apartment, and the supplier is still working very hard to try to meet the demand. As mentioned on the t-shirt page, a few orders might be delayed right now as I try to catch up and keep stocked, and I appreciate your patience. Sizes marked with “backorder” will be shipping probably around the 20th.

The Date Project:

A lot of you have been asking what happened with the project I did a while ago to come up with a neat date. I know I have been quiet about that, but it’s mainly because the girl in the project had been relatively out-of-touch, and I couldn’t easily talk about what was up since I hadn’t talked to her and wanted to give her some privacy. She basically started to feel uncertain about the whole thing, and I didn’t want to push her, so I called it off. The winning suggestions are here, and I will be hanging on to the full list for a while and maybe doing something interesting with it.


xkcd comics have been featured in a lot of neat places, and I will try to mention them here as that continues. The one I have in front of me is the Toike Oike, the University of Toronto’s long-running high-quality humor newspaper.

Nobel Prize:

Two of the guys who did the COBE experiment — the one shown on the back of my t-shirt — won the Nobel Prize for their work. I’ve sent them both free t-shirts. Maybe they’ll wear them to the prize ceremony.