"Then it is dark; a night where kings in golden suits ride elephants over the mountains." - John Cheever

Monday, April 30, 2007

How Things Change

Confusing numbers

I came across this Dilbert cartoon the other day, and it reminded me of an essay by Ray Kurzweil called The Law of Accelerating Returns. You may have read this already, in which he talks about The Singularity, when technology will reach the point of advancing too quickly for humans to comprehend it. If you haven't read it, do! It makes some fascinating points.

In the meantime, you may be wondering what possible link there is between The Singularity and the above Dilbert cartoon. Well, one of the main points in that essay was that humans tend to think linearly. We intuitively understand numbers if they grow steadily, whereas exponential growth (like doubling numbers) confuses us.

In this case, Scott Adams has got his sums wrong. Which just goes to show that even an economist can get things wrong sometimes! The trouble is that his numbers look right, whereas the right numbers don't, if you see what I mean. Actually, you can see what I mean: here's a version with the numbers corrected.

Now that's a big number. In fact, at least to me, it looks ridiculously big. But, it's the correct number for 25 different possibilities in every possible combination (actually, "permutation" is the correct word here).

How permutations are calculated (if you know this already, or just can't be bothered with it, just skip to the next section)

The number of different permutations isn't too difficult to work out, at least when the numbers are small enough to be manageable!

Starting with one, if we just have one item (say "A"), then the number of
permutations is one: just A.

With two (AB) the number of permutations is two: AB and BA
This is pretty easy so far...

With three (ABC) the number of
permutations is six: ABC, BAC...CBA, BCA...ACB, CAB

Ok, this is a little tricker, so let's think about what we've done. For the first two permutations I just stuck the C onto the end of the two AB permutations. Then, for each of the two letters in turn (A and B) I swapped them with C. So when C was swapped with A, ABC became CBA. So, I basically just did the two (AB) permutations three times over (including swaps). 3 x 2 = 6

What happens with the permutations for four items (this can be written as "4!", which is a lot shorter!) Well, we can just add the D to the end of all the previous ones (so that's 1 times 6 permutations) and then swap the D with each of the remaining letters (which is 3 times 6 permutations). In other words, 4! = 4 x 6 = 24

Let's summarise:
1! = 1
2! = 2 x 1 = 2
3! = 3 x 2 x 1 = 6
4! = 4 x 3 x 2 x 1 = 24

So even if you don't get my mangled attempt at an explanation above, I'm sure you can spot the pattern!

Back to Dilbert

Ok, if it's so easy how come Mr Adams got it so completely wrong? Well, as you can see, the numbers early on in this series aren't particularly big. In fact, you'd be forgiven for thinking that I was lying about 25! being so huge! It seems part of a completely different pattern. This is really where our intuitive sense breaks down.

And this is where the relevance to Kurzweil's essay comes in. These odd and dramatic changes don't really matter when it's just an abstract number sequence (Ok, I'm sure it's vitally important for many engineers, but I mean for regular folk!). What happens when we start leaving our technological 3! and 4! with their nice, understandable results and start getting towards our incomprehensible 25! though? This is what the rate of technological advance really means.

But let's have a version that has something closer to a comforting 625. Will 720 do? Here we are:

Still doesn't look right though...


Unknown said...

Multiple edits on this one because I published too quickly. On combination vs permutation: it seems clear to me that Scott Adams meant permutation rather than combination. I had "combination" throughout in an early version to avoid complication, but I now think that might be misleading, so I've fixed it.

Unknown said...

For interests sake, the number of different combinations is actually 33,554,431 (if I got my sums right!)

John said...

I put 26 into an online factorial calculator and got 4.032914611266057e+26...

(Not read the article yet) but I'm not sure on some of this singularity stuff, seems a bit OTT for me.

Tom said...

What an extraordinary post. Still can't believe that 6 has got 720 permutations. Scott Adam's mistake was obviously just to square 25, which is probably what many people would do.

Unknown said...

john: Well, yes, it would be...it's 25! * 26. You can get more precision at http://gmplib.org/#TRY if you like.

tom: I really doesn't seem right, does it?

The Singularity stuff does seem OTT, but I guess that's kind of my point with the post. When things change at that pace, the rate is simply unintuitive. 25! is OTT!

Just wondering: do you guys like these kinds of posts, or should I stick to the shorter "post with link" kind of thing? I sometimes wonder if my rants are a bit OTT themselves :)

John said...

I think you should most definitely continue with the longer posts, providing you consider Fitzrovian Tuesdays an adequate platform for your writing, of course. Bit of polishing and you could submit stuff like this to the Independent for instance.

John said...

I think you should most definitely continue with the longer posts, providing you consider Fitzrovian Tuesdays an adequate platform for your writing, of course. Bit of polishing and you could submit stuff like this to the Independent for instance.

Tom said...

Seumas, you're posts have that one quality which all writers seek - a distinctive voice. I look forward to many more such brilliant contributions in the years ahead.

Unknown said...

Thanks for the kind words guys! I'm not sure my scribblings are really up to pro standard though. Anyway, if I do come up with any more mental meanderings, I'll be sure to share.

Col said...

My response to this post can be written as:


I'd been putting off reading it, as it looked like it required time and thought. Post of the year so far - you are clearly not a man who spots a vaguely interesting-looking headline on an RSS feed and posts it without even reading it properly, like I do.

Think I'll give the Singularity article a miss, though, I doubt I'm clever enough.

Anonymous said...

Logarithmic growth is slower than linear. Exponential growth is faster. See the "Common orders of Functions" section of http://en.wikipedia.org/wiki/Big_O_notation
for an ordered list of growth from slower to faster.

Unknown said...

How did I miss that one? Fixed, thanks. I really did write that too quickly. I need to leave these things for a few days and re-read. Or get myself an editor!