Number of $32$-character alphanumeric strings with certain conditions I'm seeking a solution of one of the most complicated Math problem of my life.
Here it is :
First we need to figure out how many strings of set [a-zA-Z0-9] (Which is 26 Small Letters, 26 Capital Letters, and 0 to 9 digits] Are possible to construct of length 32 characters.
Then we need to subtract these 3 out of our result.


*

*Possible 32 character strings which has only small letters. [a-z]

*Possible 32 character strings which has only big letters. [A-Z]

*Possible 32 character strings which has only digits. [0-9]


Let me know if any questions.
 A: Let $U,L,D$ be the sizes of the sets of strings containing only uppercase letters (26 usable characters), lowercase letters (26) or digits (10) respectively. Then the number of admissible strings is
$$62^{32}-U-L-D=62^{32}-2\cdot26^{32}-10^{32}$$
$$=2.272\dots×10^{57}$$
A: First, there are the following possibilities for strings:


*

*32-character strings containing only small letters

*32-character strings containing only capital letters

*32-character strings containing only digits

*32-character strings containing only small letters and capital letters

*32-character strings containing only small letters and digits

*32-character strings containing only capital letters and digits

*32-character strings containing small letters, capital letters and digits


So, by removing the first 3 categories, what you'll end up with is the total number of 32-character strings which combine 2 or more of the categories. Make sure that's the answer you want.
26 small letters + 26 capital letters + 10 digits = 62 characters total. For the first character in a string, you obviously have 62 possibilities. Since the next character can be the same or different, you have 62 possibilities there as well, or $62^{2}$ possibilities for 2 characters. Adding a 3rd character gives $62^{3}$ possibilities. For 32 characters, then, there's $62^{32}$ possibilities.
There are 26 possible small letters, so by the same logic, you'll get $26^{32}$ possibilities for 32 character strings containing all small letters.
The same logic and math applies to capital letter-only strings, so there's another $26^{32}$ possibilities.
For 10 different digits, 0 through 9, this works out to $10^{32}$ possibilities.
The equation you want, therefore, is:
$$62^{32}-26^{32}-26^{32}-10^{32}$$
You can get the final total on, say, Wolfram|Alpha.
Again, what you're getting is the number of possible 32-character strings containing combinations of 2 or more of the "small letter", "capital letter" and "digit" categories. It's not only important to get the total, but to understand the meaning of the result, as well.
