Over that same year, I went from follower of a few people to occasional poster. I certainly noticed the bit.ly and TinyURL re-directs, but didn’t give them much thought. I do remember thinking, however, that the sum total of URLs that could be generated with a string of six characters, chosen from the 26 lower- and 26 upper-case letters plus the 10 digits, must be a pretty big number, but that was it.

Most of these shortened URLs look like this — http://bit.ly/9hfrXY — with a seemingly-random 6-character string at the end generated by some hash function or other algorithmic recipe. But early last month, in a tweet by “zen habits” (Leo Babauta), this URL caught my eye: http://bit.ly/byTT2t. It was the first one I could recall with duplicates of any of the six characters. The two upper-case “T”s meant that any of the potential 62 (=26+26+10, see above) characters could be repeated. And, if repeated once, why not more than once, which allowed not only “byTT2t,” but “byTTTt” and “bTyT2T” and on and on. This would mean, in turn, a far bigger universe of unique URLs for bit.ly to assign. But just how big?…

The answer is one of the simplest counting expressions for combinations: the number of ways you can choose R objects (allowing the possibility of repetition) from a total population of N objects is N^R (N raised to the power R).

It is easy to see this empirically. Try it with the population (1,2), that is, the first two digits of the whole numbers, so N=2. And take R=2. Then the only possible arrangements where the order of choice matters are these: (1,1), (1,2), (2,1), and (2,2). And indeed N^R = 2^2 = 4. If the population is the first three digits, (1,2,3), N=3. If you keep R=2, you can check very quickly that there are only nine possible arrangements, and indeed N^R = 3^2 = 9. QED, or close enough.

For a global perspective, according to the U.S. Census Bureau World POPClock Projection, that is roughly eight URLs for each person on the planet. Not many, if they were all active Twitter and bit.ly users. But just at a guess, most of those six-plus billion have never been online at all, let alone on Twitter. Surely, then, 56 billion re-directs should last the rest of us for a very long time, right? Hold that comforting thought for Part II….

4 Responses to “Soooo big!” Counting on bit.ly, Part I

Greetings from Ohio! I’m bored to death at work so I decided to browse your website
on my iphone during lunch break. I enjoy the info you provide here and can’t wait to take
a look when I get home. I’m amazed at how fast your blog loaded on my
mobile .. I’m not even using WIFI, just 3G ..

I think what you publіshed made a bunch of sense. Вut, what about this?
what if yoou were to create a killer headline?
I am noot ssyіng yοur infοrmation is not gߋod, ɦowever what iif you added something that mkes people desire more?
I men