280,000 is a shockingly small number when you consider there are over 56 billion possible codes. In the birthday problem, it only takes 23 people to push the odds of two people sharing the same birthday over 50%.
Saturday, April 11, 2009
Birthday Problem With Short Url Generation
Let's introduce a little math to our fun. EZ Clip uses a code of length 6 for each url it generates. Since we employ a 62-character alphabet (upper and lower case letters plus 10 digits), we have a possible space of 62^6 =56,800,235,584 codes. Applying math from the birthday problem, we determine that once we hit about 280,000 links, there will be a greater than 50% probability that a generated code will be a duplicate.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment