K distinct books in n identical shelves

combinatoricspermutations

How many ways to distribute 6 numbered books into 4 identical shelves?

I solved for 3 books into 2 shelves by taking two cases

a) Selecting all 3 books and keeping it on one self. ( 3C3- 1 way )

b) Selecting 2 books at a time from 3 books and keeping it on one self. ( 3C2 – 3 ways )

Total 4 ways

But for 6 books and 4 shelves there will be much more cases and hence solving by adding each case individually would be difficult. Can you suggest some other way to think about this problem.

Best Answer

I suggest reading the book A Walk Through Combinatorics written by Bona, indeed your question is an example of Set Partitions in $\S5.2$ of the book.

And the answer is $$S(6,1)+S(6,2)+S(6,3)+S(6,4)$$ The final result can be found by using the recurrence relation of $S(n,k)$: $$S(n,k)=S(n-1,k-1)+k\cdot S(n-1,k).$$

Related Question