Thursday, May 26, 2011

All roads lead to science

We learn some Wikipedia trivia from the Alt-text of a recent xkcd:
If you take any article, click on the first link in the article text not in parentheses or italics, and then repeat, you will eventually end up at "Philosophy".
Try it! It seems to work pretty well.

Actually though, the natural thing to look for is not a particular article you "end up" at, but rather the loops you get stuck in -- "ergodic sets" -- when you follow this transition rule. A more complete statement would be that you'll eventually end up in the loop,
{philosophy, existence, senses, physiological, science, knowledge, facts, information, sequence, mathematics, quantity, property, modern philosophy, philosophy}
Once we're in this loop, all of the entries are obviously on equal footing; you don't "end up" at a particular one, you just go around and around. But an interesting question you could ask is where entry into the loop is likely to occur. And in my admittedly limited sampling, I found that most of the time we come to Science first (thereafter being trapped in an endless loop that, yes, happens to contain Philosophy). Starting from attemptedly-random entries like "lint roller," "bottled water," "james joyce", "schadenfreude," "Rubik's cube," "dancing," "magic eye," "47," my count was:

philosophy: 1
existence: 1
science: 8
mathematics: 1

If science is indeed the typical entry point, then note that if we were to shake things up a little at wikipedia so that this particular loop changed, the new loop would still contain science, but may or may not contain philosophy.

By the way, unsurprisingly this is not the only loop. Starting with "running," I discovered a 2-element loop between "trait" and "phenotypic character." There are surely many others.


This finding actually reminded me of one of my favorite card tricks, which I like because it makes a really nice and simple mathematical point. Of course it would be best if you saw it, but it's not so hard to explain:
  • I put a deck of cards down face up on the table. Meanwhile you think of a secret number between 1 and 10 -- for exposition let's say you pick 4.
  • One by one, I discard cards from the top of the deck. When we get to the 4th card -- and let's call it your special card -- you look at the number. For exposition, let's say your special card happens to be a 7. Then 7 secretly becomes your new number. Note that I don't know your special card.
  • I keep flipping cards, and 7 cards later, you have a new special card and number yet again. Note that I still don't know your special card.
  • This process continues -- me flipping cards at a constant rate, you secretly updating your special card and counting up to the next one -- until I decide to stop.
But I don't just stop on any card. I stop on your current special card. Which I'm not supposed to know.

Usually people are rather mystified by this, although maybe you can figure out how this trick is done (in fact I encourage you to try before continuing!), especially given what we've been talking about. In the interest of full disclosure, the trick doesn't work every time, but it does work most of the time, and the probability of it working goes to 1 as we make the deck of cards bigger.


Well then, here's how I do it. When you pick your secret number, I pick a secret number of my own. And while you're busy keeping track of your special cards, I'm keeping track of my special cards too. In fact I'm playing the same game as you. And while we have different starting points, and while our sequences of special cards are probably going to be wildly different at first, the simple and retrospectively obvious fact is that if at any point we should land on the same special card, our sequences will be the same for the rest of the deck. Our sequences only have to overlap at some point in order to end up in the same place. By the end of the deck, I have a pretty good chance of knowing your special card, because it is my special card too.

Oh and what if -- instead of ending at the 52nd card -- we restored the deck to its original state and continued the count, indefinitely? And what if each card had the name of another card written in the corner, which became our new special card (instead of counting up to the next one)? The same basic reasoning will still apply, and in fact this is qualitatively like the case of the Wikipedia links. But here the links are still random. Add even a modest amount of actual logic governing which cards link to other cards, and it's not at all surprising that we would usually end up in the same place. Add even more structure and the convergence will happen fast, even for a deck as large as Wikipedia.

Added (5/28/2011): I feel compelled to caution you against taking the analogy between the card trick and the Wikipedia links too seriously, which in retrospect I think I oversold. I would need to do more experiments and theorizing on both cards and Wikipedia, but it appears that the expected number of loops is quite sensitive to the particular transition rule chosen. If, for instance, you repeatedly click the second link on Wikipedia, you will likely find yourself quickly trapped in one of many insignificant loops.


  1. Nice card trick! And nice update to xkcd. I'm left puzzling about the nature of the convergence. Science is how we assemble knowledge, and Wikipedia is a big repository of that the connection? And then there are the parts about connecting experience to knowledge, or turning experience into knowledge. Is that why physiological, quantity, philosophy, etc. are in the loop?

  2. Robert,

    I would say that we objectively classify things in the language of science, and since the first link X of the article about Y tends to be of the form "Y is a member of the objective class X"...we go up and up to the broadest domain of our classification system, Science. From there, we become trapped in more of a meta-discussion on the very nature of knowledge, which happens to include things like philosophy, information, facts, property.