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

The URL-shortening service, bit.ly, is heavily used on Twitter to help members stay within the 140-character limit for each tweet (post). According to a brief story by Ben Parr in Mashable, bit.ly took over first place in this market from TinyURL last August. If you are wondering how this could possibly be a “market” or why anyone would care, see the longer piece by Michael Arrington in TechCrunch from almost exactly a year ago.

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.

In the bit.ly example, N = 62 and R = 6, so 62^6 = 56,800,235,584, which is the answer to the “how big” question a few paragraphs up.

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….

This entry was posted in Technology and tagged , , , , , . Bookmark the permalink.

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

  1. Highly descriptive blog, I loved that bit.
    Will there be a part 2?

  2. 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 ..

    Anyhow, amazing site!

  3. WOW just what I was searching for. Came here by searching for
    skin layer

  4. 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

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>