1
$\begingroup$

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

$\endgroup$
1
$\begingroup$

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

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

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

$\endgroup$
-3
$\begingroup$

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}$.

$\endgroup$
1
  • $\begingroup$ 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. $\endgroup$
    – Emily
    Jan 17 '15 at 0:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.