4

Given a problem as follows.

How many 4-permutations of "aaabbccdef" are there?

Attempt

Divide the problem into disjoint cases:

  • 4-permutation of $\{a,b,c,d,e,f\}$
  • permutation of $\{2*x, y, z\}$
  • permutation of $\{2*x, 2*y\}$
  • permutation of $\{3*a, x\}$

The number of permutations for

  • case 1: $P^6_4=360$
  • case 2: $C^3_1\times C^5_2\times\frac{4!}{2!}=360$
  • case 3: $C^3_2\times \frac{4!}{2!\times 2!}=18$
  • case 4: $C^5_1\times \frac{4!}{3!}=20$

Total number of permutation is $758$.

Question

Is there any simpler approach which is very useful for longer words to be made?

Display Name
  • 2,715
  • I have checked with Mathematica Permutations[StringSplit["aaabbccdef", ""], {4}] // Length and my answer is correct but it becomes complicated for longer words. – Display Name Aug 17 '20 at 01:41
  • One way is to do this is to take $4!$ times the coefficient of $x^4$ in $(1 + x + x^2/2!+x^3/3!) (1+x + x^2/2!)^2(1+x)^3$ which comes out to $379/12 \cdot 24 = 758$. You get a factor of $1 +x + \cdots + x^k/k!$ for each distinct letter, where $k$ is the number of times the letter is used. See my answer to this question. – Jair Taylor Aug 17 '20 at 05:25
  • Well, it's arguably a duplicate of that previous question, but I can post that as an answer and let others mark as duplicate if they wish. – Jair Taylor Aug 17 '20 at 05:43

1 Answers1

2

One way is to do this is to use exponential generating functions: take $4!$ times the coefficient of $x^4$ in $$\left(1 + x + x^2/2!+x^3/3!\right) \left(1+x + x^2/2!\right)^2\left(1+x\right)^3$$ which comes out to $379/12 \cdot 24 = 758$. We get this product by taking a factor of $$1 +x + \cdots + x^k/k!$$ for each distinct letter, where $k$ is the number of times the letter is used; hence $1+x + x^2/2! + x^3/3!$ for aaa, one $1 + x + x^2/2!$ for each of bb and cc, and a $1+x$ for each of $d,e,f$. See my answer to this question for the details, but I can explain more if it is unclear. Essentially this is just another way of writing that we sum the multinomial formula for each choice of multiset of size $4$.

Jair Taylor
  • 16,852