Topics
In standard stars and bars method, we distribute n identical objects into k distinct bins. The formula comes out to be: comb(n+k-1, k-1). A variation of this problem can be:
Minimum Constraints (At Least One in Each Bin)
What if each bin (kid) must get at least one object?
- Instead of distributing
nobjects, first give 1 to each bin- We now have
n-kobjects left to distribute freely
Modified formula:
Note
This can be generalized to atleast objects for kid . In this case, give min items to each kid ⇒ remainder is which needs to be distributed to the kids.