I think the question is not "what stacks of 4, 5, 7 can be made",
but rather,
"Having decided on stacks of 4, 5, and 7,
in how many ways can the books be distributed among them ?"
Since the stacks all have different numbers, we can do them in any order.
Start with the 4 and choose 4 books for it: 16 c 4 = 1820
Now we have 12 books left to divide between the stack of 7 and the stack of 5.
Number of combinations for either is the same:
12c7 = 12c5 = 12! / (7! 5!) in either case = 792
Now we have either 5 or 7 books left (it doesn't matter which),
but no more choices to make, so we put them all in the last stack = 1 way.
Final answer = 1820 * 792 * 1 = 1496880
Note that we can arrive at the same answer in 3 different ways,
depending on which stack is chosen first.
16c4 * 12c5 =
16c5 * 11c7 =
16c7 * 9c4
They all turn out to be equal to
16 ! / (7! 5! 4!)
just with the various factors taken in different orders.
but rather,
"Having decided on stacks of 4, 5, and 7,
in how many ways can the books be distributed among them ?"
Since the stacks all have different numbers, we can do them in any order.
Start with the 4 and choose 4 books for it: 16 c 4 = 1820
Now we have 12 books left to divide between the stack of 7 and the stack of 5.
Number of combinations for either is the same:
12c7 = 12c5 = 12! / (7! 5!) in either case = 792
Now we have either 5 or 7 books left (it doesn't matter which),
but no more choices to make, so we put them all in the last stack = 1 way.
Final answer = 1820 * 792 * 1 = 1496880
Note that we can arrive at the same answer in 3 different ways,
depending on which stack is chosen first.
16c4 * 12c5 =
16c5 * 11c7 =
16c7 * 9c4
They all turn out to be equal to
16 ! / (7! 5! 4!)
just with the various factors taken in different orders.
-
4 stacks of 4
or 3 stacks of 4,5,7
or 3 stacks of 4,5,7