samarthgupta wrote:
GyanOne wrote:
Choose one number from 3 numbers in 3C1 = 3 ways
Choose four letters from 5 letters in 5C4 = 5 ways
Choose one position from the middle three for the number in 3C1 = 3 ways
The other four positions can be filled by the 4 letters in 4^4 ways.
Therefore total number of codes possible = 3*5*3*(4^4) = 45*16*16 = 11,520
For the first and last positions the letters can be chosen in 5c1 ways, but if we get say the same letter twice then we need to divide by 2! to avoid duplicates since we are looking for different codes.
For the 3 positions in between, we can choose 1 digit in 4c1 ways, and the remaining 2 digits in 5c1 and 5c1 ways. These three can rearrange themselves in 3! ways and we again divide by 2! to avoid duplicates since we can have the letters to repeat themselves. I have shown this below :-
5c1 [(4c1*5c1*5c1)3!]/2! 5c1
1 2 3 4 5
Therefore total according to me would be :-
[(5c1*5c1)/2!]*[(4c1*5c1*5c1)3!]/2! = (25*25*6*4)/4 = 3750.
Can anyone correct where i am making a mistake.
You are allowed duplicates. Even if A appears in the first as well as the last position, it will give you a code different from what you get when you have different letters in the first and the last position. You need to arrange the letters here. If instead you needed to just select groups, then yes, you would have worried about the effect of duplicates.
You select a letter for the first position in 5C1 ways and a letter for the last position in 5C1 ways.
Say you put the digit in the second position. You can select a digit for the second position in 3C1 ways.
You can select the letters for the third and fourth positions in 5C1 and 5C1 ways.
Hence, you get 5*3*5*5*5 codes.
But here, we have put the digit in the second place. It could have been in the third or fourth place too. So you multiply the above given result by 3.
Hence total number of codes = 5*3*5*5*5*3 = 5625