


Here, we are counting the number of ways in which k balls can be distributed into n boxes under various conditions.
The conditions which are generally asked are
1. The balls are either distinct or identical.
2. The boxes are either distinct or identical.
3. No box can contain more than one ball or any box may contain more than one ball.
4. No box can be empty or any box can be empty.
This is an area which many students choose to ignore. However these concepts will help us in solving many advanced problems in permutations and combinations.
We can use the principles of permutations and combinations to deal with problems of distributing balls into boxes. The concept of identical boxes are more complicated and generally studied in detail in combinatorics.
The table below explains the number of ways in which k balls can be distributed into n boxes under various conditions. All the below mentioned cases are derived under the assumption that the order in which the balls are placed into the boxes is not important. (i.e., if a box has many balls, the order of the balls inside the box is not important).
Distribution of | How many balls boxes can contain | ||||
k Balls | into n Boxes | No Restrictions | ≤ 1 (At most one) | ≥ 1 (At least one) | = 1 (Exactly one) |
Distinct | Distinct | nk (formula 1) | nPk (formula 2) | S(k,n) × n! (formula 3) (more info) | nPn = n! if k = n 0 if k ≠ n (formula 4) |
Identical | Distinct | (k+n-1)C(n-1) (formula 5) | nCk (formula 6) | (k-1)C(n-1) (formula 7) | 1 if k = n 0 if k ≠ n (formula 8) |
Distinct | Identical | $\sum\limits_{i=1}^{n}\text{S(k,i)}$ (formula 9) (more info) | 1 if k ≤ n 0 if k > n (formula 10) | S(k,n) (formula 11) (more info) | 1 if k = n 0 if k ≠ n (formula 12) |
Identical | Identical | $\sum\limits_{i=1}^{n}\text{P(k, i)}$ (formula 13) (more info) | 1 if k ≤ n 0 if k > n (formula 14) | P(k, n) (formula 15) (more info) | 1 if k = n 0 if k ≠ n (formula 16) |
Distribution of k distinct balls into n distinct boxes | |||
No Restrictions | Each box can contain at most one ball (≤ 1) | Each box must contain at least one ball (≥ 1) | Each box must contain exactly one ball (=1) |
nk (formula 1) | nPk (formula 2) | S(k,n) × n! (formula 3) (more info) | nPn if k=n 0 if k≠n (formula 4) (Note: nPn=n!) |
Distribution of k identical balls into n distinct boxes | |||
No Restrictions | Each box can contain at most one ball (≤ 1) | Each box must contain at least one ball (≥ 1) | Each box must contain exactly one ball (=1) |
(k+n-1)C(n-1) (formula 5) | nCk (formula 6) | (k-1)C(n-1) (formula 7) | 1 if k = n 0 if k ≠ n (formula 8) |
Distribution of k distinct balls into n identical boxes | |||
No Restrictions | Each box can contain at most one ball (≤ 1) | Each box must contain at least one ball (≥ 1) | Each box must contain exactly one ball (=1) |
$\sum\limits_{i=1}^{n}\text{S(k,i)}$ (formula 9) (more info) | 1 if k ≤ n 0 if k > n (formula 10) | S(k,n) (formula 11) (more info) | 1 if k = n 0 if k ≠ n (formula 12) |
Distribution of k identical balls into n identical boxes | |||
No Restrictions | Each box can contain at most one ball (≤ 1) | Each box must contain at least one ball (≥ 1) | Each box must contain exactly one ball (=1) |
$\sum\limits_{i=1}^{n}\text{P(k, i)}$ (formula 13) (more info) | 1 if k ≤ n 0 if k > n (formula 14) | P(k, n) (formula 15) (more info) | 1 if k = n 0 if k ≠ n (formula 16) |