Permutations and Combinations – Detailed Notes with Examples
1. Basic Concepts
1.1 Factorial $n!$
For a positive integer $n$, factorial of $n$ is defined as: $$ n! = n \times (n-1) \times (n-2) \times \dots \times 2 \times 1 $$ and by definition $0! = 1$.
Examples:
- $1! = 1$
- $2! = 2 \times 1 = 2$
- $3! = 3 \times 2 \times 1 = 6$
- $5! = 5 \times 4 \times 3 \times 2 \times 1 = 120$
1.2 Rule of Counting
If a task can be done in $m$ ways and another independent task can be done in $n$ ways, then both tasks together can be done in $m \times n$ ways (Multiplication Rule).
If a task can be done in $m$ ways or $n$ ways (mutually exclusive), then total ways = $m + n$ (Addition Rule).
2. Permutations (Order Matters)
2.1 Definition
A permutation is an arrangement of objects in a specific order. If order changes, permutation changes.
2.2 Permutation Formula: $_nP_r$
Number of permutations of $n$ distinct objects taken $r$ at a time: $$ {}^nP_r = \frac{n!}{(n-r)!} \quad \text{for } 0 \le r \le n $$
Example 1: How many 2-digit numbers can be formed from the digits $1,2,3$ if repetition is not allowed?
Here $n = 3$ (digits $1,2,3$), $r = 2$ (2-digit numbers).
Number of ways $= {}^3P_2 = \dfrac{3!}{(3-2)!} = \dfrac{3!}{1!} = 6$.
Example 2: Number of ways to arrange letters of the word CAT.
There are $3$ distinct letters.
Arrangements $= 3! = 6$.
2.3 Permutations with Repetition Allowed
If $n$ distinct objects are available and we have to form arrangements of length $r$ where repetition is allowed, then: $$ \text{Number of permutations} = n^r $$
Example 3: How many 3-digit numbers can be formed using digits $1,2,3$ if repetition is allowed?
Each place (hundreds, tens, units) has 3 choices.
Total numbers $= 3^3 = 27$.
2.4 Permutations with Repeated (Identical) Objects
If there are $n$ objects in total, out of which:
- $n_1$ are identical of one type,
- $n_2$ are identical of second type,
- … and so on up to $n_k$ identical of $k$-th type,
then number of distinct permutations is: $$ \frac{n!}{n_1! \, n_2! \dots n_k!} $$
Example 4: Number of distinct permutations of the word BALL.
Letters: B, A, L, L → total $n = 4$ letters, L is repeated $2$ times.
Number of arrangements $= \dfrac{4!}{2!} = \dfrac{24}{2} = 12$.
2.5 Circular Permutations
When objects are arranged in a circle, rotations of the same arrangement are considered identical.
- Number of circular permutations of $n$ distinct objects: $(n-1)!$
- If clockwise and anti-clockwise arrangements are considered same, then number of ways = $\dfrac{(n-1)!}{2}$
Example 5: In how many ways can 5 friends sit around a round table?
Number of circular permutations $= (5 - 1)! = 4! = 24$.
3. Combinations (Order Does Not Matter)
3.1 Definition
A combination is a selection of objects where order does NOT matter. e.g., selecting students for a team.
3.2 Combination Formula: $_nC_r$
Number of combinations of $n$ distinct objects taken $r$ at a time: $$ {}^nC_r = \frac{n!}{r!(n-r)!} \quad \text{for } 0 \le r \le n $$
Example 6: Out of 5 students A, B, C, D, E, how many ways can we select 2 students?
Here $n = 5$, $r = 2$.
Number of selections $= {}^5C_2 = \dfrac{5!}{2! \cdot 3!} = \dfrac{120}{2 \cdot 6} = 10$.
3.3 Relation between Permutation and Combination
For all $n$ and $r$ (with $0 \le r \le n$), $$ {}^nP_r = {}^nC_r \times r! $$
Also, some important identities:
- ${}^nC_r = {}^nC_{n-r}$
- ${}^nC_0 = {}^nC_n = 1$
- ${}^nC_1 = n$
Example 7: For $n = 5$, $r = 3$ verify ${}^5P_3 = {}^5C_3 \times 3!$.
${}^5P_3 = \dfrac{5!}{(5-3)!} = \dfrac{5!}{2!} = \dfrac{120}{2} = 60$
${}^5C_3 = \dfrac{5!}{3! \cdot 2!} = \dfrac{120}{6 \cdot 2} = 10$
RHS $= {}^5C_3 \times 3! = 10 \times 6 = 60$ (LHS = RHS).
3.4 Combinations in Terms of Pascal’s Triangle
Binomial coefficients ${}^nC_r$ follow: $$ {}^nC_r = {}^{n-1}C_{r-1} + {}^{n-1}C_r $$ which is the basis of Pascal’s Triangle.
4. Typical Types of Questions
4.1 Selection and Arrangement
Many questions have two parts:
- Selecting some objects (use combination ${}^nC_r$).
- Arranging the selected objects (use permutation $r!$ or ${}^rP_r$).
Example 8: From 6 students, in how many ways can we select 3 and arrange them in a row?
Step 1: Select 3 students from 6 → ${}^6C_3 = \dfrac{6!}{3! \cdot 3!} = 20$
Step 2: Arrange these 3 students in a row → $3! = 6$ ways.
Total ways $= {}^6C_3 \times 3! = 20 \times 6 = 120$.
4.2 Word Problems – Arrangements of Letters
Example 9: In how many ways can the letters of the word BANANA be rearranged?
Letters in BANANA: B, A, N, A, N, A
Total letters $n = 6$
A is repeated 3 times, N is repeated 2 times, B occurs once.
Number of distinct arrangements:
$$
\frac{6!}{3! \, 2!} = \frac{720}{6 \times 2} = \frac{720}{12} = 60
$$
4.3 Restrictions in Arrangements
Sometimes arrangements are asked with conditions like:
- Vowels always together
- Two particular persons always together / never together
- A particular digit is at a fixed place, etc.
Example 10: In how many ways can the letters of the word HOME be arranged if the vowels are always together?
Vowels: O, E (treat them as one block [OE]).
Now we have: H, M, [OE] → 3 objects to arrange → $3! = 6$ ways.
Inside the block [OE], vowels O and E can be arranged in $2! = 2$ ways.
Total ways $= 3! \times 2! = 6 \times 2 = 12$.
5. Permutations & Combinations in Probability (Basic Idea)
In many probability questions, we first count total number of possible outcomes and then number of favourable outcomes using permutations and combinations.
Example 11: From a deck of 52 cards, how many ways can 5 cards be chosen?
Total ways to choose 5 cards from 52: $$ {}^{52}C_5 = \frac{52!}{5! \cdot 47!} $$ (This value is large, so usually we keep it in ${}^nC_r$ form).
6. Quick Summary Table
| Concept | Formula | When to Use |
|---|---|---|
| Permutation of $n$ distinct objects taken $r$ at a time | ${}^nP_r = \dfrac{n!}{(n-r)!}$ | Order matters, repetition not allowed |
| Permutation with repetition allowed | $n^r$ | Order matters, repetition allowed |
| Permutation of $n$ objects with repetitions | $\dfrac{n!}{n_1! n_2! \dots n_k!}$ | Some objects are identical |
| Circular permutations (distinct objects) | $(n-1)!$ | Arrangements in a circle |
| Combination of $n$ objects taken $r$ at a time | ${}^nC_r = \dfrac{n!}{r!(n-r)!}$ | Selection only, order does not matter |
| Relation between permutation & combination | ${}^nP_r = {}^nC_r \times r!$ | Convert selection to arrangement |
These notes cover the main formulas, concepts, and basic examples of Permutations and Combinations. You can directly use this content for your study material or online notes page.
Exponent of a Prime Number in $n!$
To find how many times a prime number p divides $n!$, we use the Legendre’s Formula (also called De Polignac’s formula):
Formula
The exponent of prime $p$ in $n!$ is: $$ \text{Exponent of } p = \left\lfloor \frac{n}{p} \right\rfloor + \left\lfloor \frac{n}{p^2} \right\rfloor + \left\lfloor \frac{n}{p^3} \right\rfloor + \left\lfloor \frac{n}{p^4} \right\rfloor + \cdots $$ Continue until $p^k > n$.
Why the Formula Works?
- $\left\lfloor \frac{n}{p} \right\rfloor$ counts how many multiples of $p$ are in $n!$
- $\left\lfloor \frac{n}{p^2} \right\rfloor$ counts how many multiples of $p^2$ are in $n!$
- $\left\lfloor \frac{n}{p^3} \right\rfloor$ counts how many multiples of $p^3$ and so on
Example 1: Exponent of 2 in $10!$
$$ \left\lfloor \frac{10}{2} \right\rfloor = 5 \\ \left\lfloor \frac{10}{4} \right\rfloor = 2 \\ \left\lfloor \frac{10}{8} \right\rfloor = 1 \\ \left\lfloor \frac{10}{16} \right\rfloor = 0 $$
Total exponent = $5 + 2 + 1 = 8$
So, exponent of 2 in $10!$ = 8.
Example 2: Exponent of 5 in $100!$
$$ \left\lfloor \frac{100}{5} \right\rfloor = 20 \\ \left\lfloor \frac{100}{25} \right\rfloor = 4 \\ \left\lfloor \frac{100}{125} \right\rfloor = 0 $$
Total exponent = $20 + 4 = 24$
So exponent of 5 in $100!$ = 24.
Example 3: Exponent of 3 in $50!$
$$ \left\lfloor \frac{50}{3} \right\rfloor = 16 \\ \left\lfloor \frac{50}{9} \right\rfloor = 5 \\ \left\lfloor \frac{50}{27} \right\rfloor = 1 \\ \left\lfloor \frac{50}{81} \right\rfloor = 0 $$
Exponent = $16 + 5 + 1 = 22$
Special Case: Trailing Zeros in $n!$
Trailing zeros depend on the exponent of 10, and $10 = 2 \times 5$. Since 2 appears more often, zeros depend on exponent of 5.
So number of trailing zeros in $n!$ is: $$ \left\lfloor \frac{n}{5} \right\rfloor + \left\lfloor \frac{n}{25} \right\rfloor + \left\lfloor \frac{n}{125} \right\rfloor + \dots $$
Summary Table
| Prime | Exponent Formula in $n!$ | Use |
|---|---|---|
| $p$ | $\sum \left\lfloor \frac{n}{p^k} \right\rfloor$ | Prime’s power in $n!$ |
| $5$ | $\left\lfloor \frac{n}{5} \right\rfloor + \left\lfloor \frac{n}{25} \right\rfloor + \dots$ | Trailing zeros |
This formula is very important for competitive exams like NIMCET, CUET, SSC, Bank PO, etc.
Grouping (Formation of Groups) – Detailed Notes with Examples
Grouping means dividing a set of items into smaller groups of required size. In P&C, grouping problems usually involve:
- Creating groups (teams, committees, batches)
- Grouping objects of different types
- Grouping followed by arrangement
1. Basic Grouping Concept
If there are n distinct items and we want to make a group of size r, the number of ways is simply a combination: $$ {}^nC_r = \frac{n!}{r!(n-r)!} $$
Example 1:
In how many ways can we form a committee of 3 from 8 people?
$$ {}^8C_3 = 56 $$
2. Forming Multiple Groups
Case 1: All groups are of different sizes
If group sizes are different, then order does NOT matter inside the group but the groups themselves are distinct.
Formula:
For dividing $n$ people into groups of sizes $a, b, c$: $$ \frac{n!}{a!\, b!\, c!} $$
Example 2:
Divide 8 students into groups of 3, 3, and 2.
$$ \frac{8!}{3! \, 3! \, 2!} $$
3. Forming Equal Groups (Groups are Identical)
If all groups have the same size and the groups are considered identical, we must also divide by the number of groups factorial.
Formula:
If $n$ people are to be divided into $k$ identical groups each of size $r$: $$ \frac{n!}{(r!)^k \, k!} $$
Example 3:
12 players are to be divided into 3 identical teams of 4 players each.
$$ \frac{12!}{(4!)^3 \cdot 3!} $$
4. Grouping Followed by Arrangement
If after grouping we also need to arrange the groups (committee positions etc.), then multiply by number of arrangements.
Example 4:
From 10 people, select 3 for President, 3 for Secretary, 4 for Volunteers.
Step 1: Form groups → $$ \frac{10!}{3!\,3!\,4!} $$
Step 2: Assign positions → the 3 groups are distinct → multiply by 3! $$ \text{Total} = \frac{10!}{3!\,3!\,4!} \times 3! $$
5. Grouping with Restrictions
Restrictions may include:
- Certain people must be together
- Certain people must NOT be together
- At least one from a category
- Divide boys/girls in each group
Example 5 (People must be together):
From 7 people, make a group of 3 in which A and B must be together.
A and B treated as one block → choose 1 more from remaining 5. $$ {}^5C_1 = 5 $$
6. Grouping by "Stars and Bars" (Advanced)
If we want to divide an integer $N$ into $k$ groups (non-negative): $$ {}^{N+k-1}C_{k-1} $$
Example 6:
Number of ways to divide 10 identical chocolates among 4 kids:
$$ {}^{10+4-1}C_{4-1} = {}^{13}C_3 $$
7. Summary Table
| Situation | Formula |
|---|---|
| Single group of size r from n | ${}^nC_r$ |
| Groups of different sizes (a, b, c) | $\frac{n!}{a!b!c!}$ |
| k identical groups of equal size r | $\frac{n!}{(r!)^k k!}$ |
| Grouping + arrangement of groups | $\frac{n!}{a!b!c!} \times (\text{arrangements})$ |
| Stars and Bars (identical items) | ${}^{N+k-1}C_{k-1}$ |
Grouping is one of the most important topics in Permutations & Combinations and appears frequently in NIMCET & CUET exams.
Number of Non-Negative & Positive Integral Solutions
Problems of finding the number of solutions to equations of the form $x_1 + x_2 + x_3 + \dots + x_k = N$ are solved using the Stars and Bars method.
1. Non-Negative Integral Solutions
If variables are allowed to be zero or positive ($x_i \ge 0$), then the number of solutions of:
$$ x_1 + x_2 + x_3 + \dots + x_k = N $$
Formula:
$$ \text{Number of solutions} = {}^{N+k-1}C_{k-1} $$
Reason: We place $(k - 1)$ bars among $(N)$ stars.
Example 1:
Number of non-negative solutions of $x + y + z = 7$?
Here $N = 7$, $k = 3$ $$ {}^{7+3-1}C_{3-1} = {}^{9}C_2 = 36 $$
2. Positive Integral Solutions
If variables must be strictly positive ($x_i \ge 1$), we convert to non-negative form:
Let $$ x_i = y_i + 1 $$ where $y_i \ge 0$.
Then: $$ (y_1+1) + (y_2+1) + \dots + (y_k+1) = N $$ $$ y_1 + y_2 + \dots + y_k = N - k $$
Formula:
$$ \text{Number of solutions} = {}^{N-1}C_{k-1} $$ (Valid only if $N \ge k$)
Example 2:
Number of positive solutions of $x + y + z = 10$?
$N = 10$, $k = 3$ $$ \text{Solutions} = {}^{10-1}C_{3-1} = {}^{9}C_2 = 36 $$
3. Mixed Conditions
Some variables non-negative, some positive.
Example 3: Solve: $x + y + z = 12$ where $x \ge 0$, $y \ge 1$, $z \ge 3$.
Convert to non-negative: $$ y = y' + 1,\quad z = z' + 3 $$ $$ x + (y' + 1) + (z' + 3) = 12 $$ $$ x + y' + z' = 8 $$
Now use non-negative formula: $$ {}^{8+3-1}C_{3-1} = {}^{10}C_2 = 45 $$
4. Bounded Conditions
Condition like $0 \le x \le 5$ requires casework or substitution.
Example 4:
Number of non-negative solutions of $x + y + z = 8$ with $x \le 3$.
Method: Break into cases.
- If $x = 0$: $y + z = 8$ → ${}^9C_1 = 9$
- If $x = 1$: $y + z = 7$ → ${}^8C_1 = 8$
- If $x = 2$: $y + z = 6$ → ${}^7C_1 = 7$
- If $x = 3$: $y + z = 5$ → ${}^6C_1 = 6$
Total = $9 + 8 + 7 + 6 = 30$
5. Summary Table
| Type of Solution | Equation | Formula |
|---|---|---|
| Non-negative | $x_1 + x_2 + ... + x_k = N$ | ${}^{N+k-1}C_{k-1}$ |
| Positive | $x_1 + x_2 + ... + x_k = N$ | ${}^{N-1}C_{k-1}$ |
| Mixed (some positive) | Convert to non-negative | Apply ${}^{N'+k-1}C_{k-1}$ |
| Bounded | $0 \le x \le A$ | Casework / substitution |
These formulas are extremely important for P&C, Algebra, Number Theory questions in NIMCET & CUET.
Distribution of Balls in Boxes – 4 Standard Cases (with Worked Examples)
We study 4 classic cases:
- Different balls, different boxes (DB–DB)
- Identical balls, different boxes (IB–DB)
- Different balls, identical boxes (DB–IB)
- Identical balls, identical boxes (IB–IB)
1. Different Balls & Different Boxes (DB–DB)
Example 1
Problem: 3 distinct balls $A,B,C$ into 2 distinct boxes $X,Y$, no restriction. How many ways?
Solution: Each ball has 2 choices (X or Y). So total ways $= 2^3 = 8$.
Example 2
Problem: 3 distinct balls $A,B,C$ into 3 distinct boxes $X,Y,Z$, no box empty.
Solution: Each of the $3$ distinct balls must go to a different one of the $3$ distinct boxes, and no box can be empty.
So we’re basically matching balls ${A,B,C}$ to boxes ${X,Y,Z}$ one-to-one.
Number of such arrangements $=$ number of permutations of $3$ objects:
3!=3×2×1=6.
So, there are $6$ ways
Example 3
Problem: 4 distinct balls into 2 distinct boxes, each box must get at least 1 ball.
Solution: Total ways (no restriction) $= 2^4 = 16$. Cases with some box empty: if box X empty, all 4 in Y (1 way); if box Y empty, all 4 in X (1 way). So invalid $= 2$ ways.
Valid ways $= 16 - 2 = 14$.
Example 4
Problem: 4 distinct balls and 4 distinct boxes, each box gets exactly one ball.
Solution: This is just permutations of 4 balls into 4 boxes: $4! = 24$.
Example 5
Problem: 5 distinct balls, 3 distinct boxes, each box can hold any number of balls. How many distributions?
Solution: Each ball has 3 choices (which box). Total ways $= 3^5 = 243$.
2. Identical Balls & Different Boxes (IB–DB)
Use stars and bars for equations like $x_1 + x_2 + \dots + x_k = N$.
Example 1
Problem: 4 identical balls into 3 distinct boxes, no restriction.
Solution: Let $x_1,x_2,x_3$ be number of balls in each box.
$x_1 + x_2 + x_3 = 4$, $x_i \ge 0$. Number of non-negative solutions $= {}^{4+3-1}C_{3-1} = {}^6C_2 = 15$.
Example 2
Problem: 5 identical balls into 3 distinct boxes, each box must get at least 1 ball.
Solution: Let $x_i \ge 1$ be balls per box, $x_1 + x_2 + x_3 = 5$.
Convert: $x_i = y_i + 1$, $y_i \ge 0$.
$y_1 + y_2 + y_3 = 5 - 3 = 2$. Number of solutions $= {}^{2+3-1}C_{3-1} = {}^4C_2 = 6$.
Example 3
Problem: 6 identical balls into 4 distinct boxes, first box must contain at least 2 balls.
Solution: Let box1 contain $x_1 \ge 2$, others $x_2,x_3,x_4 \ge 0$.
$x_1 + x_2 + x_3 + x_4 = 6$.
Put $x_1 = y_1 + 2$, $y_1 \ge 0$:
$y_1 + x_2 + x_3 + x_4 = 4$ with all $\ge 0$. Solutions $= {}^{4+4-1}C_{4-1} = {}^7C_3 = 35$.
Example 4
Problem: 7 identical balls into 3 distinct boxes, each box contains at most 4 balls.
Solution: Let $x_1+x_2+x_3=7$, $0 \le x_i \le 4$.
Total non-negative solutions (no upper bound) $= {}^{7+3-1}C_{3-1} = {}^9C_2 = 36$.
Subtract cases where some $x_i \ge 5$. By symmetry, count for $x_1 \ge 5$ and multiply by 3.
Let $x_1 = 5 + y_1$, $y_1 \ge 0$:
$y_1 + x_2 + x_3 = 2$ → ${}^{2+3-1}C_{3-1} = {}^4C_2 = 6$.
For $x_1 \ge 5$ we get 6 solutions; same for $x_2$ and $x_3$ → $3 \times 6 = 18$.
No overlap possible because sum is only 7 (can’t have two variables ≥5). So valid solutions $= 36 - 18 = 18$.
Example 5
Problem: 8 identical balls into 4 distinct boxes, at least one box empty.
Solution: Total non-negative solutions of $x_1+x_2+x_3+x_4=8$:
${}^{8+4-1}C_{4-1} = {}^{11}C_3 = 165$.
Solutions with no box empty (all $x_i \ge 1$): Put $x_i = y_i + 1$ → $y_1 + y_2 + y_3 + y_4 = 4$:
${}^{4+4-1}C_{4-1} = {}^7C_3 = 35$.
At least one box empty $= 165 - 35 = 130$.
3. Different Balls & Identical Boxes (DB–IB)
Boxes are not labeled. Only the grouping (which balls together) matters. We count partitions of the set of balls, taking care of equal-size groups.
Example 1
Problem: 3 distinct balls $\{A,B,C\}$ into 2 identical boxes, boxes can be empty.
Solution: “Two identical boxes” but allowing empties is same as deciding which balls go together, because empty box doesn’t add a new pattern. So we are just partitioning the set into at most 2 groups.
- All 3 together in one box: $\{A,B,C\}$.
- Split as 2+1: $\{A,B\}\{C\}$, $\{A,C\}\{B\}$, $\{B,C\}\{A\}$.
Total ways $= 4$.
Example 2
Problem: 3 distinct balls into 3 identical boxes, no box empty.
Solution: If all 3 boxes are non-empty with identical boxes, each box must get exactly 1 ball.
But boxes are identical, so any “who goes to which box” looks the same: each ball in its own box. So only 1 way.
Example 3
Problem: 4 distinct balls $\{A,B,C,D\}$ into 2 identical boxes, no box empty.
Solution: We split 4 balls into 2 unlabeled groups, both non-empty.
Possible size patterns: 1+3 or 2+2.
- 1+3 split: choose the 1-ball group in $^4C_1 = 4$ ways. The other 3 go together. Since boxes are identical, 1+3 and 3+1 are same, so these 4 are all distinct partitions.
- 2+2 split: choose 2 balls for first group: $^4C_2 = 6$, but each partition is counted twice (group1/group2 swapped), so distinct partitions $= 6/2 = 3$.
Total ways $= 4 + 3 = 7$.
Example 4
Problem: 4 distinct balls into 3 identical boxes, any box may be empty.
Solution: We only care about how balls are grouped.
Possible group size patterns (allow ≤3 groups):
- 4 (all in one box): 1 way: $\{A,B,C,D\}$.
- 3+1: choose 1 alone: $^4C_1 = 4$ partitions.
- 2+2: as in Example 3 → $3$ partitions.
- 2+1+1: choose pair first: $^4C_2 = 6$, the remaining two singles are identical boxes, but singles are just individual balls, so no division by 2. So $6$ partitions.
- 1+1+1+1 would need 4 boxes, but we only have 3 boxes, so not allowed.
Total ways $= 1 + 4 + 3 + 6 = 14$.
Example 5
Problem: 5 distinct balls into 2 identical boxes, empty box allowed.
Solution: We partition 5 balls into ≤2 unlabeled groups.
Patterns: all 5 together (5), or 4+1, or 3+2.
- 5: $\{A,B,C,D,E\}$ → 1 way.
- 4+1: choose the single ball: $^5C_1 = 5$ ways.
- 3+2: choose the 3-ball group: $^5C_3 = 10$, but 3+2 and 2+3 are same (boxes identical), so distinct partitions $= 10/2 = 5$.
Total ways $= 1 + 5 + 5 = 11$.
4. Identical Balls & Identical Boxes (IB–IB)
Now only the pattern “how many balls in each box” matters, boxes are not labeled, balls are not labeled. This is essentially integer partition with at most $k$ parts.
Example 1
Problem: 4 identical balls into 2 identical boxes, boxes may be empty.
Solution: We need unordered pairs $(a,b)$ with $a+b=4$, $a,b \ge 0$, and $(a,b)$ ≡ $(b,a)$.
Possible $(a,b)$: (4,0), (3,1), (2,2). So there are 3 distinct ways.
Example 2
Problem: 5 identical balls into at most 3 identical boxes, boxes may be empty.
Solution: We want partitions of 5 into ≤3 parts:
- 5
- 4 + 1
- 3 + 2
- 3 + 1 + 1
- 2 + 2 + 1
That is 5 ways.
Example 3
Problem: 6 identical balls into 3 identical boxes, no box empty.
Solution: Partitions of 6 into exactly 3 positive parts (order not important):
- 4 + 1 + 1
- 3 + 2 + 1
- 2 + 2 + 2
So there are 3 ways.
Example 4
Problem: 7 identical balls into at most 3 identical boxes, boxes may be empty.
Solution: Partitions of 7 into ≤3 parts:
- 7
- 6 + 1
- 5 + 2
- 5 + 1 + 1
- 4 + 3
- 4 + 2 + 1
- 3 + 3 + 1
- 3 + 2 + 2
Total ways $= 8$.
Example 5
Problem: 8 identical balls into exactly 3 identical boxes, boxes non-empty.
Solution: Partitions of 8 into exactly 3 positive parts:
- 6 + 1 + 1
- 5 + 2 + 1
- 4 + 3 + 1
- 4 + 2 + 2
- 3 + 3 + 2
So there are 5 ways.
These 20 examples cover all four standard models of balls-and-boxes questions and are ideal for building concept + question bank for NIMCET / CUET / SSC etc.