# all possible permutations of “aabcd” [closed]

Is it the correct solution to the problem: in how many ways can we permute the string "aabcd" such that every permutation is only 5 characters long and only the set of ${a,b,c,d}$ characters can be used (each character has to be used). So "aabdc", "abbcd" are valid permutations. My solution is the following: $$4*\binom{5}{2}*3!$$ because we can place the duplicate character in the string in $\binom{5}{2}$ ways and then we just need to permute the remaining 3 characters. Lastly, there're 4 possible duplicate characters.

## closed as unclear what you're asking by Yves Daoust, Namaste, Frits Veerman, BruceET, Alex MathersSep 20 '16 at 21:25

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• I'm not sure to understand. Is the string you want to permute "aabcd"? If so, the duplicate character is a, and there are no other possible duplicate character. Otherwise, you're good. – Mariuslp Sep 20 '16 at 14:46
• The letters of the string "aabcd". In other words you have two a's to work with, and only one of each of b, c, d, e – Namaste Sep 20 '16 at 14:46
• There is a contradiction in your problem statement. Either you count the permutations of $aabcd$ ($60$ of them), either you count the combinations of $5$ characters drawn from $abcd$ with repetitions allowed. Please disambiguate. – Yves Daoust Sep 20 '16 at 14:55
• Is $aaaaa$ valid ? This is $5$ characters long, with characters from $abcd$ only. – Yves Daoust Sep 20 '16 at 14:58
• no, I edited the question to clarify – Yos Sep 20 '16 at 15:00

The number of ways to arrange 5 elements, two of which are identical is $\frac{5!}{2!}$. For example there are $60$ arrangements of $aabcd$. Then there are 4 different characters that can be the repeated character. So I believe the answer is $4*\frac{5!}{2!}=240$, which is the same answer you got using your method.

• you're right, it's simpler to solve it the way you described. Thank you! – Yos Sep 20 '16 at 14:55

There are $120$ distinct permutations of $abcde$. You can replace $e$ by any of $a',b',c',d'$, giving $480$ substitutes. Then drop the quote, resulting in every configuration represented twice. There are $240$ unique ones.

Alternatively, you can scramble $aabcd$ in $5!$ ways, but each is repeated twice, hence $60$ distinct permutations. Same with $abbcd,abccd$ and $abcdd$.

In response to the title question (as originally posted):

$$\text{ All possible permutations of "aabcd"}$$

This is an example in which multinomials will work.

$$\binom{5}{2,1,1,1} = \frac {5!}{2!1!1!1!}=\frac {5!}{2!} =\frac{120}2 = 60$$

You have a total of five letters to work with, in which the there are 2 of one letter, and only 1 of the remaining three letters available.

This strategy works well, for example, determining the number of different string existing, for example, when permuting the letters of **MISSISSIPPI"

EDIT AFTER OP's edit: There is a contradiction in the OP's problem statement. I answered the question in the title, when in fact the OP is not counting permutations.

If allowed to duplicate any one of a, b, c, d, to construct a string of five letters, with each of a, b, c, d must appear, then, since there are four distinct letters that could be duplicated, we simply multiply our previous answer by $4$ to get $$60\times 4 = 240$$ possible 5-letter strings, given these additional constraints.

• I think you are mistaking the question which is actually asking for the number of permutations of the string. "aabcd". That gives you two a's to work with, and only single letters B,C,D. – Namaste Sep 20 '16 at 15:01
• @turkeyhundt Thanks for noticing and letting me know! :-) – Namaste Sep 20 '16 at 16:23