How many permutations are there in the word "arrangement" that have exactly two of the following consecutive letters in them: aa,ee,rr,nn? For example: "aarrngement"
-
1Hint: Use Inclusion/Exclusion. The two kinds that are together can be chosen in $\binom{4}{2}$ ways. For each way, count the words. But this overcounts the words that have three kinds together. Continue. – André Nicolas Mar 18 '16 at 16:23
-
3The toffee problem is really quite different, that idea is a minor component here. – André Nicolas Mar 18 '16 at 16:35
-
2This is a much more complex problem compared to the toffee problem. – true blue anil Mar 19 '16 at 05:44
-
1This problem is not a duplicate of the toffee problem since the toffee problem does not require an inclusion-exclusion argument. – N. F. Taussig Mar 19 '16 at 10:36
1 Answers
Inclusion-exclusion can be applied, but it is a bit tricky. not exactly run-of-the-mill.
ways with at least $2$ together - ways with at least $3$ together + ways with all $4$ together
= $\binom42\binom22\frac{9!}{2!2!} - \binom43\binom32\frac{8!}{2!} + \binom44\binom427! = 332,640$
Try to work out the logic for the extra coefficients..
Added, a way without inclusion-exclusion:
Let us take $AA, EE$ together as $\mathcal A, \mathcal E$, respectively.
Let us then separate the $RR$ by inserting in gaps $\uparrow \mathcal{ \large A}\uparrow \mathcal{\large E}\uparrow N\uparrow N\uparrow G\uparrow M\uparrow T\uparrow$ and permute the rest. This can be done in $\binom82\times\frac{7!}{2!}$ ways.
Now, from such arrangements, subtract those with $NN$ together,
$\uparrow \mathcal{ \large A}\uparrow \mathcal{\large E}\uparrow\mathcal{\large N}\uparrow G\uparrow M\uparrow T\uparrow$ in $\binom72\times 6!$ ways
$\binom82 \times \frac{7!}{2!} - \binom72 \times 6! = 55440$
And since there are $\binom42 = 6$ ways of choosing the initial "together pair", final answer is $6\times 55440 = 332,640$, as before.

- 41,295
-
You provided two nice solutions to a tricky problem. However, there is a typographical error you should fix. The $21$ in your calculation of the $55440$ arrangements in which AA and EE are the only double letters should be $2!$. – N. F. Taussig Mar 19 '16 at 10:55
-