Start listing the choices:
AAAAA, AAAAB, AAAAC.....
What does that tell you?
All 5 letters from same alphabet - 1 way (A)
4 being same letter+1 different: 2∗4C1=8 ways
3 same ,1 different, 1 another different: 3∗4C2=18 ways
2 same, and rest all different : 4∗4C3=16 ways
All five different: 1 way
3 of one type and 2 of 1 type : 3∗3C1=9 ways
1 of one type, 2 of 2nd type, 2 of 3rd type : From A,B,C,D -> I can select anyone out of four : Then out of three any one -> 4c2 . Suppose A ,b is selected then it is like this : AA BB
Now i am left with C,D,E --> 3c1 . SO , 4c2 * 3c1 .
Edit: I think this is the problemn : 4c2 should be used instead of 4c1 *3c1 as the latter expression is over counting . I just did that with that one eg. ( intuition)
I understood it .
Explanation of 4c1 * 3c1 : A or B or C or D * (B or C or D) OR (A or C or D) OR (A or B or D) or (A or B or C) . SO it leads to double .
DD BB E
BB DD E .