Placing m books on n shelves

1.1k Views Asked by At

If we let m and n be integers with $m \ge n \ge 1$. how many ways are there to place m books on n shelves, if there must be at least one book on each shelf? the order matter. How do I solve this, do I derive an equation for this bae on the binomial coefficient?

1

There are 1 best solutions below

4
On BEST ANSWER

Have you heard of a counting technique going by stars and bars or identical dividers? That should kill off this problem rather quickly.

First arrange the books, we have m of them, so they can be arranged in m! ways. Now, there are (m+1) spaces in which we can insert the dividers (the shelves).

To make this clearer, imagine the books are represented as 1's and the spaces where you can insert the shelves as commas. ,1,1,1,1,1,1, . If you have 6 books, you have 7 spaces to insert the shelves.

But the shelves cannot be on the ends of the string of books, because then the possibility exists that a shelf would be empty. So there are (m-1) spaces that we are allowed to use. (Subtract the two on the ends).

Therefore, we can insert the (n-1) dividers in $\binom{m-1}{n-1}$ ways.

So $m!*\binom{m-1}{n-1}$ I believe.

Edit: I am assuming the shelves are identical and the books are not.