May i add a few corrections to your estimations? Not, that these will affect the practicality of the outcome in any way, but....
Quote:
all possible combinations of alphanumberica characters of length 12 such that each string will contain numbers and either small or capital letters.
From the wording it follows that we work case-sensitive so that we have a base set of 62 characters and want to find the the 12-combinations.
It also follows that we have to subtract from this the number of all-digit 12-combinations (if basing on multisets, see below) and the number of all-character 12-combinations. It has to be clarified if we still talk
combinations without duplicities (as i do assume), that is, 12-tuples of different elements of the base set, or
combinations with duplicities.
Lets us for the moment neglect the restricting task and calculate what i'd call the number of the "base set":
If we use combinations without duplicities, that is 12-tuples of different elements of the 62-element set we get
n! / ( (n-k)! k! ) or "n over k", the "binomial coefficient", combinations, which is (62! / ( 50! * 12! )) approximately 10^^85 / 10^^64 * 10^^9 ~
10^^12.
If we use combinations with duplicities (or, basically, a "set of multisets") we need to take into account that an identical element in two different places can be exchanged without changing the combination and hence we get
(n+k-1)! / ((n-1)! * k!). 73! / (61! * 12!) is approximately 10^^105 / 10^^83 * 10^^9 ~
10^^13. The notation for this number is similar to the binomial coefficient ("n over k") but with double braces, i don't know its english name.
We need to reduce the first possible result now by the number of all-character permutations (50 over 12, ~10^^11) in the first case and the second result by this plus the number of all-digit combinations ( multiset 10 over 12, ~10^^7). Both operations won't change the order of magnitude of the results so we get
~10^^12 or
~10^^13 as the respective cardinality of the result sets.
(I do not have any hope this will really help anybody but it was fun nevertheless.)
bakunin