1826466 Members
2288 Online
109692 Solutions
New Discussion

How many unique IDs

 
SOLVED
Go to solution
Nur
Frequent Advisor

How many unique IDs

Hi All,

Sorry for posting in the wrong forum. I just have a question regarding Algorithm.

If i have a pool of 26 characters (UPPERCASSE alphabets) and I am generating 6 character IDs from the pool, how many unique IDs can I generate? what is the algorithm?

Best Regards,
Nur Alamgir
4 REPLIES 4
Elmar P. Kolkman
Honored Contributor
Solution

Re: How many unique IDs

Simple methematics:
26 for the first
26 for the second
etc.

Meaning you have 26*26*26*26*26*26 = 26^6 number of possible unique ID's.

So as long as you accept strange words as ID's (like 'ASSHOL' or 'FUCKER') this is the number of ID's. But I would think about a list of ID's you DON'T want... ;-)
Every problem has at least one solution. Only some solutions are harder to find.
Nur
Frequent Advisor

Re: How many unique IDs

Hi Elmar,

Thanks for the quick response. What if I want each character from the pool to be used only once...how many then?

Nur
Mark Grant
Honored Contributor

Re: How many unique IDs


I suspect you have just given the moderators headaches Elmar!

Good question, good answer plus obscenities :)
Never preceed any demonstration with anything more predictive than "watch this"
Elmar P. Kolkman
Honored Contributor

Re: How many unique IDs

If you want every character only used once, it would become:
26*25*24*23*22*21 possibilities
(26 for the first
leaving 25 for the second
leaving 24 for the third
etc.)

This is without filtering words you don't want.

As for the moderaters... Perhaps they should replace the words with a like they do on television... Didn't want to offend anyone (offend is a 6 letter word, btw, but not all letters used only once) and we'll see if they let me keep the 10 points ;-).

Every problem has at least one solution. Only some solutions are harder to find.