Distributing books to students, combinatorial problem I'm stuck on how to start this problem
In how many ways can 22 distinct books be given to 5 students, so that 2 students have 5 books each and another 3 have 4 books each?
Any help would be appreciated
 A: First, choose five books, then choose five books, then choose four books, then choose four books. This is
$$\binom{22}{5}\times \binom{17}{5}\times\binom{12}{4}\times\binom{8}{4}$$
Now, we can divide 22 books into $5,5,4,4,4.$
Second, we need to arrange these numbers to distribute books to five students, say $A,B,C,D,E$. This is
$$\frac{5!}{2!\times 3!}.$$
Hence, the answer is
$$\binom{22}{5}\times \binom{17}{5}\times\binom{12}{4}\times\binom{8}{4}\times \frac{5!}{2!\times 3!}.$$
A: Answer:
${22\choose5}{17\choose5}{12\choose4}{8\choose4}{4\choose4}*(5!/(3!*2!))$
Rationale: Keep choosing no of books from the total for each of these 5 students and these 5 students can get these bulk of books in (5!/(2!*3!)) ways.  It is as simple as that
A: You can split the problem into two parts. First choose the lucky two students who will get $5$ books each (in $\binom52=10$ ways). Then (calling the lucky students in alphabetic order $a,b$, and the unlucky ones similarly $c,d,e$), assign the books to the students by choosing a word of $22$ letters over $\{a,b,c,d,e\}$ which contains $5$ copies each of $a$ and $b$, and $4$ copies each of $c,d,e$ (each letter attributes one book to a student). The number of such words is the coefficient of $a^5b^5c^4d^4e^4$ in $(a+b+c+d+e)^{22}$, namely the multinomial coefficient
$$ \binom{22}{5,5,4,4,4}=5646383542800.$$
The final answer is then
$$\binom52\times\binom{22}{5,5,4,4,4}=56463835428000.$$
In the more general situation when there are more than two classes of "fortune" among the students, say if the distribution frequencies were $6,6,5,3,2$, you would need a product of two multinomial coefficients: $\binom5{2,1,1,1}$ for the first problem and $\binom{22}{6,6,5,3,2}$ for the second problem.
