A banks web site requires that passwords consist of letters
A bank\'s web site requires that passwords consist of letters (upper or lower case) and digits, with at least one capital letter, at least one lower-case letter, at least one digit, and (ok, my bank is weird) no symbol may be repeated. How many 8 letter passwords are there? [Hint: Permutations with Inclusion/Exclusion and Theorem 1.5.3!]
Solution
Total possible passwords : 62^8 [ 26 Lower case letters + 26 Upper case Letters + 10 Digits ]
= Each Position can be filled with 62
Total possible passwords w/ out uppercase letters: 36^8
Total possible passwords w/ out lowercase letters: 36^8
Total possible passwords w/ out digits : 52^8
To compensate, we must add some back in. Note that:
Total possible passwords without uppercase AND without digits: 26^8
Total possible passwords without lowercase AND without digits: 26^8
Total possible passwords without uppercase AND without lowercase: 10^8
Hence, our total should actually be:
62^8-[36^8+36^8+52^8]+[26^8+26^8+10^8]=159655911367680
The original set is 62^8 and the complement of the restriction placed on that set, one of each character, is all the possibilities where types of characters are not there. Which are what I typed above this paragraph. However, I feel like I am missing something. Otherwise I would say that the answer is: 62^8[36^8+36^8+52^8].
is actually too small; you oversubtracted. This is because certain passwords were double counted. For example, consider the illegal password: ABCDEFGH. Certainly, this is a possible password (it belongs to the set of size 628). However, it contains no lowercase letters (it belongs to one of the sets of size 368), so it is subtracted. However, notice that it contains no digits (it belongs to the set of size 528), so it is subtracted a second time. This is bad! This illegal password is being counted a total of 12=1 times!
