Ways to arrange 24 different books in 4 bookshelves

106 Views Asked by At

How many ways can Beth arrange 24 different books in four bookshelves such that there's at least one book in each bookshelf.

(For any of these arrangaments, consider that in each bookshelf the books must be put one next to each other, and the first book on the left).

First of all, sorry if doesn't make sense, I tried my best translating it. This is from Grimaldi's discrete mathematics book, so if anyone has this book feel free to edit my post.

I thought this was a really simple combinatorics problem, so what I did was, if there are 4 bookshelves and 24 books, then I could write this as:

$x_1+x_2+x_3+x_4=24$ with $x_i \geq 1$ $\forall i$

So that's equivalent to $x_1'+x_2'+x_3'+x_4'=20$, so that would be ${23\choose 20}$.

But the solutions says it's $24!{23\choose 20}$, where does the $24!$ come from? I mean, by doing that, aren't you counting the cases where, for example, there's an empty bookshelf?