Derangements & Inclusion-Exclusion: JEE Main Math
Advanced counting methods — derangements and the inclusion-exclusion principle — appear in JEE Main Permutations and Combinations every two to three sessions. These topics are skipped by most students because they are not in the standard NCERT syllabus, yet they generate questions that cannot be solved without knowing the technique. This guide covers both methods completely at the exam level.
Test your understanding now
Take a free 10-minute JEE mock test — no sign-up needed.
Start Mock Test →Derangements: Permutations with No Fixed Points
A derangement of n objects is a permutation in which none of the objects appears in its original position. The number of derangements of n objects: D_n = n! × Σₖ₌₀ⁿ (−1)^k / k! = n! × (1 − 1/1! + 1/2! − 1/3! + … + (−1)^n/n!). Numerical values: D₁ = 0, D₂ = 1, D₃ = 2, D₄ = 9, D₅ = 44. Recurrence relation: D_n = (n−1)(D_{n-1} + D_{n-2}) for n ≥ 2 with D₁ = 0, D₂ = 1. Alternative recurrence: D_n = n × D_{n-1} + (−1)^n. The probability of a random permutation being a derangement → 1/e ≈ 0.368 as n → ∞.
JEE application: "In how many ways can 4 letters be placed in 4 addressed envelopes so that no letter goes into the correct envelope?" Answer: D₄ = 9. "In how many ways can 4 keys be placed on a keyring with 4 locks so that no key opens its own lock?" same structure = 9. The "hat problem" or "letter-envelope" is the most common derangement question. Take a free combinatorics mock. See our permutations and combinations guide.
Inclusion-Exclusion Principle
For two sets: |A ∪ B| = |A| + |B| − |A ∩ B|. For three sets: |A ∪ B ∪ C| = |A| + |B| + |C| − |A∩B| − |A∩C| − |B∩C| + |A∩B∩C|. General form: |A₁ ∪ A₂ ∪ … ∪ Aₙ| = Σ|Aᵢ| − Σ|Aᵢ ∩ Aⱼ| + Σ|Aᵢ ∩ Aⱼ ∩ Aₖ| − … + (−1)^(n+1)|A₁ ∩ A₂ ∩ … ∩ Aₙ|. The complementary form: |none of A₁, …, Aₙ| = |Total| − |A₁ ∪ … ∪ Aₙ|.
JEE question types: "In how many ways can a 3-digit number be formed using digits 1-9 such that at least one digit is repeated?" = Total − (all distinct) = 9×8×7 (wait, this is over 3 places from 9 digits, with repetition allowed) − 9×8×7 (no repetition) = 9³ − 9×8×7 = 729 − 504 = 225. "Number of integers from 1 to 100 divisible by neither 3, 5, nor 7" = 100 − (D3 + D5 + D7) + (D15 + D21 + D35) − D105 where D_k = ⌊100/k⌋.
Get free JEE prep resources daily
Join 50,000+ students. Free daily tips, mock tests, and insights.
Sign Up Free →Derangements in Probability
P(derangement of n objects) = D_n/n! → 1/e as n → ∞. For small n: P(D₂) = 1/2, P(D₃) = 2/6 = 1/3, P(D₄) = 9/24 = 3/8. The complementary probability is the "secretary problem" — the probability that at least one item is in the correct position = 1 − D_n/n! → 1 − 1/e ≈ 0.632. JEE uses derangement probability directly: "If 4 cards labeled 1,2,3,4 are shuffled and placed, find the probability that exactly one card is in its correct position." Method: choose which card is in its correct position (C(4,1) = 4 ways), derange the remaining 3 (D₃ = 2 ways). P = C(4,1) × D₃ / 4! = 4×2/24 = 8/24 = 1/3.
Applications in JEE Main Multi-correct Questions
Inclusion-exclusion for divisibility: count of numbers from 1 to N divisible by at least one of a, b, c (where a, b, c are coprime) = ⌊N/a⌋ + ⌊N/b⌋ + ⌊N/c⌋ − ⌊N/ab⌋ − ⌊N/ac⌋ − ⌊N/bc⌋ + ⌊N/abc⌋. Surjective functions (onto maps): number of surjective functions from m elements to n elements = n! × S(m,n) where S(m,n) is a Stirling number, or via inclusion-exclusion: Σₖ₌₀ⁿ (−1)^k C(n,k) (n−k)^m. For bijections: n! (the whole point of derangements is bijections with no fixed points). For the full probability chapter, see our probability counting guide and our permutations guide.
Unlock Full JEE Preparation
2,000+ Bloom-level questions, full mock tests, rank predictor and analytics. Just ₹149/month.
Upgrade for ₹149/month →इस विषय को 10 मिनट में प्रैक्टिस करें
Bloom-स्तर के प्रश्न जो आपने अभी पढ़े हैं उनसे मैप किए गए।
मुफ्त शुरू करें →