I have the following question before me:
A PIN consists of 4 characters which can only be digits or letters. PIN is case sensitive and uppercase and lowercase versions of same letter cannot appear in the PIN. No repetition of digits or letters is allowed. I have attempted this question but unsure whether I have done it correctly or not.
I proceeded in the below manner:
Case:1
When all the characters are digits then number of such PINs is $10×9×8×7=5040$.
Case:2
When one character is letter while remaining three are digits
One letter can be chosen out of $52$ letters( uppercase and lowercase both) in $52$ ways and we place this letter in one of the four positions in $4$ ways.
Now there are three places remaining to be occupied by 3 digits which can happen in $10 P_3=10×9×8=720$ ways.
Thus total number of such PINs is $52×4×720=149760$.
Case :3
When there are two letters and two numbers
2 numbers can be chosen out of 10 in $10C_2=45$ ways and 2 places for these two numbers can be chosen in $4C_2=6$ ways. In these two places, the two numbers can be arranged between themselves in $2$ ways. Now we come to letters. First letter can be chosen in $52$ ways and second letter will have to chosen from $50$ letters.
Thus total number of such PINs is:
$45×6×2×52×50=1404000$.
Case:4
When there are 3 letters and one number
One digit can be chosen from 10 in $10$ ways and placed in one of the four positions in $4$ ways.
We are left with three places to be occupied by 3 letters.
First letter can be chosen in $52$ ways, 2nd in $50$ ways and 3rd in $48$ ways.
Thus total number of such PINs is :
$4×10×52×50×48=4992000$
Case:5
When there are letters only
Number of such PINs is:
$52×50×48×46=5740800$.
Thus total number of PINs is $12291600$.
Any help would be greatly appreciated.
Best Answer
Your work is correct but you can simplify by applying Principle of Inclusion Exclusion. As there are $62$ characters in total,
Total number of PINs without repetition: $~ ~\displaystyle {62 \choose 4} \cdot 4!$
Number of PINs with at least one pair of same uppercase and lowercase letters: $~ \displaystyle 26 \cdot {60 \choose 2} \cdot 4!$
But the above double-counts PINs where we have two pairs of same uppercase and lowercase letters.
Number of PINs with two pairs of same uppercase and lowercase letters: $~ \displaystyle {26 \choose 2} \cdot 4!$
So the answer is,
$ \displaystyle {62 \choose 4} \cdot 4! - 26 \cdot {60 \choose 2} \cdot 4! + {26 \choose 2} \cdot 4! = 12291600$