# How many possibilities in tinyurl

Looking at tinyurl, there is anywhere from 1 digit to 7 digits of I believe 36 choices (lowercase letters a to z and digits 0 to 9)

How do I calculate mathmatically the number of permutations of the string with 1 to 7 digits and 36 characters?

thanks, Dean

$$36^1+36^2+36^3+36^4+36^5+36^6+36^7=80,603,140,212$$

• ah, duh.....we nearly had that and it made perfect sense when we saw it. Nov 18 '13 at 20:30
• Or possibly even $$\frac{36^8-1}{35}-1$$ ;) Jan 17 '15 at 0:55

The number of permutations (without replacement) of size $k$ on an alphabet of size $n$ is $n^k$. If you just need an approximate answer, the term $36^7$ is by far the largest, but if you want an exact answer, you can sum from $k=1$ to $k=7$.

I was just wondering the same thing.. Look up factorials - "The factorial $n!$ gives the number of ways in which $n$ objects can be permuted."

Given $26$ characters and $10$ numerals, $36!= 3.72\times 10^{41}$, a fair sized number! Tinyurl can repeat characters, which reduces the overall combinations.

I don't know if tinyurl does capital letters as well, but if they do then they aren't ever going to run out - $66!= 5.4\times 10^{92}$.

• This answer, unfortunately, is incorrect. TinyURL isn't permuting 36 objects. They are making a string of length up to seven, each character of which is one of 36 choices. Those things are different. Jan 17 '15 at 0:58