# Combinations - 2 sets of identical books

In how many ways can 15 identical computer science books and 10 identical psychology books be distributed among five students?

So I'm trying to figure this out: I know how to calculate 15 identical cs books: C(15+6-1, 6-1) and also 10 identical psych books: C(10+6-1, 6-1), but I do not know how to consider the combinations with both books.

By the way, I've asked a few questions on here in the past hour; I just wanted to say that these aren't homework problems, but I'm doing these problems to study for a midterm tomorrow. I guess there isn't any way to prove that....but just wanted to put it out there.

-
It's probably best to ask fewer questions and read more answers. And think about the answers. And try to apply them to the questions. –  Gerry Myerson Jul 11 '12 at 5:33

You can consider it two distributions in succession: first you distribute the $15$ computer science books, and then you distribute the $10$ psychology books. Thus, the final answer is the product of the number of ways of making each of these distributions. However, your calculations for those numbers are a bit off. The number of ways of distributing $n$ identical objects to $k$ distinguishable bins is $$\binom{n+k-1}{k-1}=\binom{n+k-1}n\;.$$

Thus, the computer science books can be distributed in $$\binom{15+5-1}{5-1}=\binom{19}4$$ ways, and the psychology books in $$\binom{10+5-1}{5-1}=\binom{14}4$$ ways, and the final answer is $$\binom{19}4\binom{14}4\;.$$

-
Completely understand. Thank you! Yes, I put 6 instead of 5 –  pauliwago Jul 11 '12 at 5:48

For your distribution problem, multiply. This is because for every way of distributing the CS books, there are $\dots$ ways to distribute the Psych books. (I am assuming that we are allowed to give no CS books, or no Psych books, or both to some student(s).

the number of ways to distribute the $15$ CS books is $\binom{15+5-1}{5-1}$. Presumably your version was produced because you thought there were $6$ students. The expression for the Psych books is obtained in a similar way.

-
Thank you, yes I don't know why I thought there were 6 students... –  pauliwago Jul 11 '12 at 5:49

It's by induction. Let $F(m,n)$ be the number of ways of distributing $m$ identical books to $n$ students.

$F(m,1)$ is clearly just $1$ which is $C(m,0)=C(m+1-1,1-1)$

Now, $F(m,n+1)$ is described as follows:

There are $m+1$ possibilities as to how many copies you give the first student i.e., $0,1...m$

Now, if you give, say $k$ copies, then there are $F(m-k,n)$ ways to distribute to the remaining $k$ students.

So one arrives easily at $F(m,n+1)=F(0,n)+F(1,n)+...+F(m,n)$

We have seen that $F(m,1)=C(m+1-1,1-1)$

Assume $F(m,n)=C(m+n-1,n-1)$

Then $F(m,n+1)=C(n-1,n-1)+C(n,n-1)+...+C(m+n-1,n-1)$

$F(m,n+1)=C(n,n)+C(n,n-1)+C(n+1,n-1)+...+C(m+n-1,n-1)$ (replace $C(n-1,n-1)$ by $C(n,n)$ since both are 1)

$F(m,n+1)=C(n+1,n)+C(n+1,n-1)+...+C(m+n-1,n-1)$

The above is by the well known formula $C(n,r)+C(n,r-1)=C(n+1,r)$. Applying repeatedly we get the penultimate step to be

$F(m,n+1)=C(m+n-1,n)+C(m+n-1,n-1)$

and the ultimate step: $F(m,n+1)=C(m+n,n)=C(m+(n+1)-1,(n+1)-1)$

And by induction we're done.

Plug in the values $6,10,15$ at appropriate places to get your answer :-)

-