i have a problem with password combination , let said the min length of pass is 5 and the max is 6
required : min 1 upper, 1 lower and 1 digit
i know to got all the combination of the passoword : (62)^length - (36)^length -(36)^length - (52)^length + (26)^length + (26)^length + (10)^length ..
The problem is, their have some word are Blacklist : let say the black list word is rain : so the combination for rain is (2)^4 "4 is come from length of the string"
i can get it. but another prblem happend when also have number that can blacklist, lets said, 4 = a/A and i/I = 1. so R41n also black list,
i try so hard to find the combination with the ban digit number converting combination,
maybe someone can help me, for this kind of things..
my point is how to count all valid password with min 1 upper + 1 Low + 1 digit withouth any ban word..
i think i need to specific my case, The rule is : // 1 : i/I // 3 : e/E // 4 : a/A // 5 : s/S // 7 : t/T // 0 : o/O
so, let say the min : 3 and the max : 5 and i have 9 Array Black list word : icpc,bio,fbi,cia,yes,no,z,hi,abcdefg
we can try with abcdefg, z, and yes
Thank you..
Let's count the number of 5-character passwords containing "rain" that are valid:
Total 5-character passwords containing rain: $2\cdot 62\cdot 36$. Total with "rain" or "RAIN" (this cannot be extended to a valid 5-character password as it will be missing one of upper, lower, or digit): $2\cdot 62\cdot 2$ Total with no number (not all caps or all lower, as we counted those already): $2\cdot 52\cdot 14$ Total with either no lower or no upper (there are 3 ways to write "rain" with no lower case letters that are not all uppercase and 3 ways to write it with no uppercase that are not all lower case): $2\cdot 36\cdot 6$
Total 5-character passwords that have at least 1 upper, 1 lower, 1 digit AND "rain": $2(62\cdot 34-52\cdot 14-36\cdot 6)$ Total 5-character passwords that have at least 1 upper, 1 lower, and 1 digit (may or may not have "rain"): $62^5-52^5-2\cdot 36^5+10^5+2\cdot 26^5$
Total valid 5-character passwords: $62^5-52^5-2\cdot 36^5+10^5+2\cdot 26^5-2(62\cdot 34-52\cdot 14-36\cdot 6)$
Total 6-character passwords that include "rain": $3\cdot 62^2\cdot 36$ Total 6-character passwords that include "rain", but no digit: $3\cdot 52^2\cdot 16$ Total 6-character passwords that include "rain", but no uppercase or no lowercase letter (but do include a digit): $3\cdot 36^2\cdot 8-3\cdot 26^2\cdot 2$ Total 6-character passwords that include "rain" and at least 1 upper, 1 lower, and 1 digit: $3(62^2\cdot 36-52^2\cdot 16-36^2\cdot 8+26^2\cdot 2)$
Total 6-character valid 6-character passwords: $$62^6-52^6-2\cdot 36^6+10^6+2\cdot 26^6-3(62^2\cdot 36-52^2\cdot 16-36^2\cdot 8+26^2\cdot 2)$$
Total valid passwords: $$62^5-52^5-2\cdot 36^5+10^5+2\cdot 26^5-2(62\cdot 34-52\cdot 14-36\cdot 6)+62^6-52^6-2\cdot 36^6+10^6+2\cdot 26^6-3(62^2\cdot 36-52^2\cdot 16-36^2\cdot 8+26^2\cdot 2)$$