A program for generating random computer passwords gives one lowercase letter, one upper-case letter, two digits ($0$ through $9$), and three letters that may be upper-case or lower-case. How many possible passwords can this program produce?
It is a question from the Introduction to Combinatorics, Second Edition by Walter D. Wallis, John C. George.
My Solution to it is - $26 \cdot 26 \cdot 52 \cdot 52 \cdot 52 \cdot 10 \cdot 10 \cdot 6 \cdot 6$ where factor of $6$ is for selecting position for digits between letters.
Is this answer right (I am confused between whether $6 \cdot 7$ should come or $6 \cdot 6$ is correct) ?
There are 7 characters in the password, and two are digits. In how many ways can we select which 2 out of the 7 characters which are to be digits? (Hint: $6\cdot 6$ is not correct, $6\cdot 7$ is better but also not correct. Do you know Combinations? )
Once you account for the placement of the digits, and their values (the $10\cdot 10$ in your answer, which is correct) you have to deal with the letters. The problem is that you cannot designate a single location that is to be the letter that is forced to be upper case, because there are those three letters that are free to be either upper or lower case. Similarly with the letter that is forced to be lower case. In the completed password, there is no way to uniquely determine which character was the one forced to be upper case (unlike numerical digits). Choosing any specific one to be upper case would lead to double counting.
So let's ignore upper/lower case at first. That would leave $26 \cdot 26 \cdot 26 \cdot 26 \cdot 26$ choices for the letter values.
How many possibilities are there of choosing the case of all the letters if there were no restrictions on your choice? Now what restrictions does this password algorithm put on whether the letters can be upper or lower case?