QMCQPermutations & Combinations
A person has three different bags and four different books. The number of ways in which he can put these books in the bags so that no bag is empty is:

A) $18$     B) $36$     C) $39$     D) $72$
✅ Correct Answer
B) 36
Solution
1
Total distributions (no restriction)

Each of 4 books can go into any of 3 bags independently:

$$\text{Total} = 3^4 = 81$$
2
Apply Inclusion-Exclusion to remove cases with empty bags
At least 1 specific bag empty: $\binom{3}{1}\cdot2^4=3\times16=48$

At least 2 specific bags empty: $\binom{3}{2}\cdot1^4=3\times1=3$

All 3 bags empty: $\binom{3}{3}\cdot0^4=0$
3
Apply the formula
$$\text{No bag empty} = 3^4-\binom{3}{1}\cdot2^4+\binom{3}{2}\cdot1^4-\binom{3}{3}\cdot0^4$$ $$=81-48+3-0=\boxed{36}$$
4
Verify using partition method

To distribute 4 distinct books among 3 distinct bags with no empty bag, the partition type must be $(2,1,1)$.

Choose 2 books for one bag: $\binom{4}{2}=6$ ways.
Assign this pair to one of 3 bags: $3$ ways.
Remaining 2 books go to remaining 2 bags (1 each): $2!=2$ ways.

Total $=6\times3\times2=36$ ✓
📘 Surjective Distribution Formula
To distribute $n$ distinct objects into $k$ distinct boxes with no box empty (surjection), use: $\sum_{i=0}^{k}(-1)^i\binom{k}{i}(k-i)^n$. For $n=4,k=3$: $81-48+3=36$. Alternatively, $k!\cdot S(n,k)$ where $S(n,k)$ is the Stirling number of the second kind.
💡
Important Concepts
Inclusion-Exclusion PrincipleRemove cases where at least one bag is empty: $|A_1\cup A_2\cup A_3|=\sum|A_i|-\sum|A_i\cap A_j|+|A_1\cap A_2\cap A_3|=48-3+0=45$. Answer $=81-45=36$.
Partition Type (2,1,1)For 4 books in 3 bags with no empty bag, exactly one bag gets 2 books. Ways: choose 2 books ($\binom{4}{2}=6$) × assign to a bag ($3$) × distribute remaining ($2!$) $=36$.
Stirling Number Approach$S(4,3)=6$ (Stirling number of second kind = ways to partition 4 elements into 3 non-empty unlabelled groups). Multiply by $3!=6$ to label the bags: $6\times6=36$.
Why 3^4 for total?Without restriction, each of 4 books independently chooses 1 of 3 bags: $3\times3\times3\times3=81$. This counts ALL distributions including those with empty bags.
?
FAQs
1
What does 'no bag empty' mean combinatorially?
It means the distribution is a surjective (onto) function from the set of books to the set of bags — every bag must receive at least one book.
2
Why subtract C(3,1)·2^4?
$\binom{3}{1}$ chooses which specific bag is empty; $2^4$ counts distributions of all 4 books among the remaining 2 bags. By inclusion-exclusion, this is subtracted.
3
What is the Stirling number S(4,3)?
$S(4,3)=6$ counts the ways to partition 4 elements into exactly 3 non-empty unlabelled subsets. For labelled bags, multiply by $3!=6$ to get $36$.
4
If the bags were identical, what would the answer be?
Then we only count partitions (not arrangements), so $S(4,3)=6$ ways.
5
Is this from JEE Main 2026?
Yes, this question appeared in JEE Main 2026.
🔗
Related Questions
Q
Matrix A=[α,1,2;…], B=given+adj(A), det(B)=66. Find det(adj(A)) · Ans: 441 ✓
Matrices
Q
α=3+4+8+9+… upto 40 terms. (tanβ)^(α/1020) root x²+x−2=0. sin²β+3cos²β=? · Ans: 2 ✓
Sequences
Q
P(bus)=2/5, P(scooter)=1/5, P(car)=2/5. Late probs 1/5,1/3,1/4. P(bus|late)=? · Ans: 12/37 ✓
Probability
Q
4 obs: mean=1, var=13. 6 obs: mean=2, var=1. Combined variance=? · Ans: 6.04 ✓
Statistics
Q
2⁶[(2³/3)¹²C₂+(2⁵/5)¹²C₄+…+(2¹³/13)¹²C₁₂]=3¹³−α. Find α · Ans: 48 ✓
Binomial Theorem
📤 Share with friends!