Quote:
Originally Posted by pilotbob
Actually, if you allow for 9 characters not just limiting it to 0-9 you have 0-9 and A-Z maybe skipping O and I to not confused them with 0 (Zero) and 1 (One). This would give you a heck of alot more than 1billion codes. So, you could even make it a bit shorter and still allow for alot of books. (Perhaps someone that is better at math than I am can figure how many that would allow. I always forget how to figure this out.)
|
Hi pilotbob,
Think of it this way...
When you have a single digit number which can be any of 0..9 there are ten possibilities right?
If you have two places for digits, and the rightmost one can be 0..9, there are ten possibilities for that digit. If the leftmost place can also be 0..9 then there are there are ten possible first digits, and for each of those there are ten possible second digits, or ten times ten (ie: one hundred) possible combinations.
ie: For the first digit 0, there are ten possibilities for the second digit (0..9).
For the first digit 1, there are ten possibilities for the second digit
....
Makes sense that from 00 to 99 there are one hundred combinations right?
The same thing applies if you allow possible "digits" other than 0..9
So if you add 24 letters in addition to the 10 existing digits, then you can have (24+10) * (24+10), or 1156 possible combinations with a two place number.
With 9 places, you can have 34^9 or just short of 61 * 10^12