Is there any general formula to calculate the number of ways to distribute identical objects into identical bins? There are 4 identical objects and 3 identical bins, and I have to find the total number of ways to distribute identical objects into identical bins such that no bins remain empty.
The total number of such distributions will be :
$1+1+2$
So, there is one way to distribute the 4 identical objects into 3 identical bins.
Now, what I was wondering that, is there a general formula to calculate the total number of distributions, because when the number of identical objects and identical bins get large, this method will become quite tedious.
 A: The short answer to your question is "no".
Never mind the objects and bins, what you are looking for is called a partition.
A partition is dividing an integer into a set of integers which add up to
the original.
You can start reading here:
https://en.wikipedia.org/wiki/Partition_function_(number_theory)
There is much written about this idea, so that will only be a starting point.
You may be looking to answer a more restricted question where the number of parts of the partition is fixed (in your example, 3 bins, and excluding any answers with a smaller number of bins, i.e. 2 + 2, 1 + 3, or simply 4).
A: if you ment in the way of combinatorical question and not for the problem called Partition, so there is, its the next formula: ${n-k+1 \choose k+1}$, when n stands for the amount of objects, k stands for the amount of bins. that's the general way.
for your cause, because you wanted to put at least one object in every bin, you need to substract the amount of bins from your $n$ and do the calc with the product as your new {n}.
