# Allocating 100% over n objects

I have a problem where I am trying to determine all the possible ways that exactly 100%, no more no less, can be allocated across n number of objects (assuming each allocated portion is a whole number integer).

Example, if there are 3 objects over which to allocate the 100%, (ie, in one case, object 1 has 20%, object 2 has 30%, and object 3 has 50%), what are all the possible cases where each object is allocated a value between 0 and 100 (values can be repeated and order of values matter) and the combined values total to 100% exactly.

I thought combination or permutation formula but doesn't seem to be the right application. Is there a good way to determine all the possible cases? Thanks.

## 1 Answer

You can use a method called Stars and Bars. It is to count the number of ways $n$ things can be partitioned into $k$ groups.

Assuming that each object can be assigned $0$%, the the number of ways to divide $100$% among $n$ objects is:

$$\binom{100+n-1}{n-1} = \binom{n+99}{n-1}$$