Let's say that you have an amount of 100 euros and you want to distribute all of it between 3 persons without taking into consideration the decimal fractions of the euro.
If we started with some simple scenarios, then we could say:
If instead of 3 we had just one person and since we have to distribute all of the amount then we would have just a single case.
If we had 2 persons then, I guess, that we would have 100 different combinations, of distribution among the persons.
For let's say 3 persons, I have tried to solve it with Binomial coefficient, since we are talking only about integers, like this:
C(n,r) = C(100,3) = (100!)/(3!(100−3)!) = 161.700
But the result seems pretty high and I guess that this is probably because this formula takes into consideration that every n is different, or something like that.
However, in a problem where n is currency unit and there is also the rule of distributing all of the amount, which means that we want to exclude the combinations like
... then to be honest, I do not know how to approach this problem to create a formula, so any ideas would be much appreciated.