I am building a website where an alphanumeric ID will be generated.
As of now, I have it randomly grabbing a number or letter from this data set:
ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789
So there are 36 possibilities.
If my math is right, if I make the ID 4 digits/characters long, the odds of a duplicate would be:
1/36 * 1/36 * 1/36 * 1/36 which equals 1/1,679,616.
In a nutshell, I want to eliminate (within reason) the possibility of a duplicate ID being created, but the shorter the ID the better.
If I went with 4 digits and ended up creating 15,000 IDs (like 4T6H, GF29, etc.), what are the chances that two of them will be the exact same?
If I generated ONE, it's obviously 1 in 1,679,616 (i think). But wondering how the odds are affected if I generate 15,000 of them.
Any insight/corrections on my math would be greatly appreciated.