Problem with permutations

The problem says:

We have strings formed by two letters, followed by two digits and then followed by three letters. In each group repetitions are not allowed, but the last group of three letters can contain up to one of those used in the first group. If the number of letters available is 12 how many different strings can be formed?

A) 23522400

B) 980100

C) 7840

Well, my solution is this:

Considering that the first letter is repeated, the letters and digits in order: (12*11)*(10*9)*(12*10*9)=12830400

Considering that the second letter is repeated, the letters and digits in order: (12*11)*(10*9)*(11*10*9)=11761200

So, by the sum of the two cases: 12830400+11761200=24591600

The result of my solution is not in the list of choices, but is close to A.

I noticed that A can be obtained with: 11761200+11761200=23522400, wich i dont understand why that would be correct, this is like saying 12830400+12830400 is ok too...

I think A is wrong, but the others are wrong too, so maybe I am doing something wrong.

• He says the alphabet is of 12 letters. – Vladhagen Oct 26 '13 at 23:31
• @GerryMyerson Yes, i have 12 letters, but is the same if it was 26, i dont understand the logic of this problem. – Wyvern666 Oct 26 '13 at 23:32
• How many digits are there? – ftfish Oct 26 '13 at 23:33
• @ftfish Ten digits. – Wyvern666 Oct 26 '13 at 23:34
• Are you sure A is not $23522400$? Typo? – ftfish Oct 26 '13 at 23:36

There are two cases, depending on whether the last group repeats one letter of the first group or not.

• If all five letters are different, there are $(12\cdot11)\cdot(10\cdot9)\cdot(10\cdot9\cdot8)=8,553,600$ possible strings: $12$ choices for the first letter, $11$ for the second letter, $10$ for the first digit, $9$ for the second digit, $10$ for the third letter (because it has to be different from the first two), $9$ for the fourth letter, and $8$ for the last letter.

• If the last group of letters has one letter in common with the first group, there are $12$ ways to choose that letter. Then we have to decide whether it’s the first or the second letter in the first group; we can make that choice in $2$ ways. We also have to decide whether it’s the first, second, or third letter of the last group, and we can make that choice in $3$ ways. Then there are $11$ choices for the other letter of the first group, $10$ for the first digit, $9$ for the second digit, $10$ for the first of the two remaining letters in the last group, and $9$ for the second of the two remaining letters in the last group. Altogether, then, we have $$12\cdot2\cdot3\cdot11\cdot10\cdot9\cdot10\cdot9=6,415,200$$ possible strings.

The final total is $8,553,600+6,415,200=14,968,800$; none of the answers in your list is correct.

• I am relieved to see that this is the same answer I got. – Gerry Myerson Oct 26 '13 at 23:46
• @Gerry: I felt the same way about yours! – Brian M. Scott Oct 26 '13 at 23:47
• The case when the last group repeat one letter, can be done in different cases and then added together?. – Wyvern666 Oct 27 '13 at 0:04
• @Wyvern666: Yes, if you do it right. For instance, you could split it into $6$ cases: $(1)$ the repeated letter is the first letter of both groups; $(2)$ it’s the first letter of the first group and the second letter of the last group; $(3)$ it’s the first letter of the first group and the last letter of the last group; $(4)$ it’s the second letter of the first group and the first letter of the last group; and so on. – Brian M. Scott Oct 27 '13 at 0:06

If there are no repeats, you get $(12)(11)(10)(9)(10)(9)(8)$. If there is a repeat, there are 2 ways to choose which letter is repeated, 10-choose-2 ways to choose the other two letters in the last group, and 6 ways to permute the last group, so $(12)(11)(10)(9)(2)(45)(6)$. The answer should be the sum of these two numbers.

• 14968800? That is what I think that adds up to. – Vladhagen Oct 26 '13 at 23:40
• @Vladhagen Actually that's why I haven't yet posted my answer.... – ftfish Oct 26 '13 at 23:41
• You meant: " there are 12 ways to choose which letter is repeated" ? – Wyvern666 Oct 26 '13 at 23:52
• Sorry, I meant, once you have chosen the two letters in the first group, there are two ways to decide which of those two letters is repeated. – Gerry Myerson Oct 27 '13 at 5:52

With repetition $(12 \cdot 11)(10 \cdot 9) \binom {2} {1} \binom {3} {1} (10 \cdot 9)= 6,415,200$

Without repetition $(12 \cdot 11)(10 \cdot 9) (10 \cdot 9 \cdot 8)= 8,553,600$

Sum = 14,968,800

• More confirmation of my answer. Good! – Gerry Myerson Oct 26 '13 at 23:47