reference :

### Theorem one

Suppose one has *n* objects (to be represented as **stars**; in the example below *n* = 7) to be placed into *k* bins (in the example *k* = 3), such that all bins contain at least one object; one distinguishes the bins (say they are numbered 1 to *k*) but one does not wish to distinguish the *n* stars (so configurations are only distinguished by the *number of stars* present in each bin; in fact a configuration is represented by a *k*-tuple of positive integers as in the statement of the theorem). Instead of starting to place stars into bins, one starts by placing the stars on a line:

★ ★ ★ ★ ★ ★ ★

Fig. 1: seven objects represented by stars

where the stars for the first bin will be taken from the left, followed by the stars for the second bin, and so forth. Thus the configuration will be determined once one knows what is the first star going to the second bin, and the first star going to the third bin, and so on. One can indicate this by placing *k* − 1 separating **bars** at some places *between* two stars; since no bin is allowed to be empty, there can be at most one bar between a given pair of stars:

★ ★ ★ ★ | | | ★ | | | ★ ★ |

Fig. 2: two bars give rise to three bins containing 4, 1, and 2 objects

Thus one views the *n* stars as fixed objects defining *n* − 1 gaps, in each of which there may or not be one bar (bin partition). One has to choose *k* − 1 of them to actually contain a bar; therefore there are {\displaystyle {\tbinom {n-1}{k-1}}} possible configurations (see combination).