4

Prove that the number of combinations of $n$ objects out of $3n$ objects in which $n$ are of one kind, $n$ of the other kind and rest $n$ are distinct is $(n+2)2^{n-1}$

My generatingfunctionological approach was as follows: I take three gen. funcs. for each of the three types of objects and multiply them, which gives: $$(1+x^2+\ldots+x^n)^3 \Rightarrow ( \frac {1-x^{n+1}} {1-x})^3 \Rightarrow (1-x^{3n+3}-3x^{n+1}+3x^{2n+2}) {{r+3-1} \choose r}x^r$$

Now, removing $x's$ with powers greater than $n$, I get a solution as the coefficient of $x^n$: $${n+2} \choose 2$$ But this is certainly incorrect. Please help me in rectifying my error.

Robert Z
  • 147,345
Sen47
  • 925

1 Answers1

4

I would modify your generatingfunctionological approach in this way: we have to evaluate the following sum $$\begin{align}[x^n](1+x+\dots+x^n)^2\cdot (1+x)^n&=\sum_{k=0}^{n}(n+1-k)\binom{n}{k}\\ &=(n+1)2^n-n\sum_{k=1}^{n}\binom{n-1}{k-1}\\ &=(n+1)2^n-n2^{n-1}=(n+2)2^{n-1} \end{align}$$ where $k$ is the number of objects that we choose out of the set of the $n$ distinct objects.

Robert Z
  • 147,345
  • Oh ok. Thanks sir! Guess I misinterpreted the question! – Sen47 Oct 03 '19 at 05:51
  • @Sen47 I am happy that you appreciate my answer. – Robert Z Oct 03 '19 at 05:58
  • Sir, any good place to study generating functions(without calculus)? – Sen47 Oct 03 '19 at 06:15
  • @Sen47 It's hard to deal with g.f. without calculus at all. Probably you already know https://www.math.upenn.edu/~wilf/gfologyLinked2.pdf Another one is https://www.csie.ntu.edu.tw/~r97002/temp/Concrete%20Mathematics%202e.pdf – Robert Z Oct 03 '19 at 06:26
  • @Aqua It counts the subsets of (distinct) objects from a set of cardinality $n$. – Robert Z Dec 08 '19 at 13:22
  • Eh, I did not read good. We have say $n$ of the red, $n$ blue and the rest are all of different colors, so that we have in total $n+2$ colors and not only 3 colors. – nonuser Dec 08 '19 at 13:56