[Math] In how many ways can a selection be done of $5$ letters

combinationscombinatoricspermutations

In how many ways can a selection be done of $5$ letters out of $5 A's, 4B's, 3C's, 2D's $ and $1 E$.

$ a) 60 \\
b) 75 \\
\color{green}{c) 71} \\
d.) \text{none of these} $

Number of ways of selecting $5$ different letters = $\dbinom{5}{5} = 1$ way

Number of ways to select $2$ similar and $3$ different letter = $\dbinom{4}{1}\times \dbinom{4}{3}=16$.

Number of ways of selecting $2$ similar + $2$ more similar letter and $1$ different letter = $\dbinom{4}{2}\times \dbinom{3}{1}=18$.

Number of ways to select $3$ similar and $2$ different letter = $\dbinom{4}{2}\times \dbinom{3}{1}=18$.

Number of ways to select $3$ similar and another $2$ other similar = $\dbinom{3}{1}\times \dbinom{3}{1}=9$

Number of ways to select $4$ similar and $1$ different letter = $\dbinom{2}{1}\times \dbinom{4}{1}=8$

Ways of selecting

$5$ similar letters = $1$

Total ways = $1+16+18+18+9+8+1= 71$

Well I have the solution But I am not able to fully understand it.

Or if their could be an $\color{red}{\text{alternate way}}$ than it would be great.

I have studied maths up to $12$th grade.

Best Answer

If Order is Unimportant

The number of ways to choose $5$ letters (if their order is unimportant) is the coefficient of $x^5$ in $$ \begin{align} &\small\overbrace{(1+x)\vphantom{x^2}}^{1\text{ E}} \overbrace{\left(1+x+x^2\right)}^{2\text{ D's}} \overbrace{\left(1+x+x^2+x^3\right)}^{3\text{ C's}} \overbrace{\left(1+x+x^2+x^3+x^4\right)}^{4\text{ B's}} \overbrace{\left(1+x+x^2+x^3+x^4+x^5\right)}^{5\text{ A's}}\\ &=\frac{1-x^2}{1-x}\frac{1-x^3}{1-x}\frac{1-x^4}{1-x}\frac{1-x^5}{1-x}\frac{1-x^6}{1-x}\\ &=\frac{1-x^2-x^3-x^4+O\left(x^7\right)}{(1-x)^5}\\[3pt] &=\small\left[1-x^2-x^3-x^4+O\!\left(x^7\right)\right]\!\left[1+5x+15x^2+35x^3+70x^4+126x^5+210x^6+O\!\left(x^7\right)\right]\\[9pt] &=1+5x+14x^2+29x^3+49x^4+71x^5+90x^6+O\!\left(x^7\right)\tag{1} \end{align} $$ where we used the Binomial Theorem for $(1-x)^{-5}$ above.

The coefficient of $x^5$ in $(1)$ is $71$.


If Order is Important

If the order of the letters is important, we can compute the exponential generating function with $$ \begin{align} &\small\overbrace{(1+x)\vphantom{\frac{x^2}{2!}}}^{1\text{ E}} \overbrace{\left(1{+}x{+}\frac{x^2}{2!}\right)}^{2\text{ D's}} \overbrace{\!\left(1{+}x{+}\frac{x^2}{2!}{+}\frac{x^3}{3!}\right)}^{3\text{ C's}} \overbrace{\!\left(1{+}x{+}\frac{x^2}{2!}{+}\frac{x^3}{3}{+}\frac{x^4}{4!}\right)}^{4\text{ B's}} \overbrace{\!\left(1{+}x{+}\frac{x^2}{2!}{+}\frac{x^3}{3!}{+}\frac{x^4}{4!}{+}\frac{x^5}{5!}\right)}^{5\text{ A's}}\\[3pt] &=\small1+5x+24\frac{x^2}{2!}+111\frac{x^3}{3!}+494\frac{x^4}{4!}+2111\frac{x^5}{5!}+8634\frac{x^6}{6!}+O\left(x^7\right)\tag{2} \end{align} $$

The coefficient of $\frac{x^5}{5!}$ in $(2)$ is $2111$.

Related Question