4.9.2 · HinglishProbability Theory & Statistics

Inclusion-exclusion principle

1,781 words8 min readRead in English

4.9.2 · Maths › Probability Theory & Statistics


YEH principle exist kyun karta hai?

Naive addition mein KYA galat hota hai: ek element jo sets mein hai, woh baar add hota hai jabki hum chahte hain ki woh sirf baar add ho. Humein ek aisa correction chahiye jo har ke liye net de.


Do-set case ko scratch se derive karna

YEH kyon shuru karte hain: har general case isi se banta hai.

Union ko teen disjoint pieces mein partition karo:

  • sirf (not ): size
  • sirf (not ): size
  • dono aur : size

Phir disjoint addition se: Lekin aur . Toh: Yeh step kyun? Overlap dono aur mein aata hai, isliye do baar. ki ek copy subtract karo:


Teen sets — derive karo, memorise mat karo

Pehle singles add karo, phir hum pairwise overlaps ko over-subtract kar dete hain aur triple ko wapas add karna padta hai.

Teen pairwise intersections subtract karo: Yeh step kyun? Har pairwise term exactly do sets mein rehne wale elements ka double-counting remove karti hai — theek hai. Lekin ek element jo teeno sets mein hai, woh teeno pairwise intersections mein tha, toh ushe baar add hone ke baad baar subtract kar diya gaya → net . Yeh galat hai; hum chahte hain ki woh ek baar count ho.

Toh triple intersection ek baar wapas add karo:

Figure — Inclusion-exclusion principle

General formula (aur signs alternate kyun karte hain)

Alternating signs kyun forced hain — first-principles proof. Koi bhi element lo jo exactly sets mein hai (). Hume dikhana hai ki right-hand side ise exactly ek baar count karta hai.

  • , single terms mein, pair terms mein, …, , -fold intersections mein aata hai.
  • Iska net contribution hai: Binomial theorem use karo ke saath: Yeh step kyun? Yeh ek identity hamare saare terms contain karti hai, including term . alag karo: Sign flip kyun? ke liye, , toh . Isliye , jo deta hai Har element exactly ek baar count hota hai — QED.

Probability version


Worked examples


Common mistakes


Recall Feynman: ek 12-saal ke bacche ko explain karo

Socho tumne class mein poocha "kaun football khelta hai, aur kaun cricket?" aur dono haath-counts add kar liye. Kuch bacchon ne haath do baar uthaya kyunki woh dono khelte hain! Toh tum unhe over-count kar loge. Fix karne ke liye, tum dono-wale players ko ek baar count karo aur subtract karo, taaki har koi sirf ek baar count ho. Teen sports ke saath thoda aur tricky hai: jab tum overlapping pairs subtract karte ho toh "teeno khelne wale" bacche accidentally poori tarah erase ho jaate hain, toh tumhe unhe wapas add karna padta hai. Yeh add–subtract–add dance hi inclusion–exclusion hai.


Active recall

Two-set inclusion–exclusion formula
Do-set case mein intersection subtract kyun karte hain
Dono sets mein rehne wale elements mein do baar count hote hain; subtract karne se ek extra count remove ho jaata hai.
Three-set inclusion–exclusion formula
General I–E mein sign pattern
Odd-size intersections ko milta hai, even-size ko : sets wale term ka sign hota hai.
Exactly sets mein rehne wale element ka net count
Exactly , kyunki .
Do events ke liye probability form
I–E se derangement formula
integers mein 3 ya 5 se divisible kitne hain
Triple intersection wapas kyun add karte hain
Teeno-mein-rehne-wala element 3 baar add (singles) aur 3 baar subtract (pairs) hota hai, net 0 hota hai; ek baar add karne se correct count 1 restore hota hai.

Connections

  • Set Theory & Venn Diagrams — woh union/intersection structure jo is principle ka aadhar hai
  • Counting Principles & Combinatorics — general proof mein use hota hai
  • Probability Axioms — additivity axiom disjoint special case hai
  • Derangements & Permutations — ek classic application
  • Binomial Theorem — woh identity provide karta hai jo alternating signs prove karta hai
  • Bonferroni Inequalities — I–E ko truncate karne se upper/lower bounds milte hain

Concept Map

naive sum over-counts

core fix

simplest case

derived from

overlap counted twice

extends to

triple subtracted 3 times

generalises to

uses

proved by

nets to

Counting problem: size of union

Over-counting overlaps

Add parts then remove overlaps

Two sets formula

Disjoint partition a b c

Subtract intersection once

Three sets formula

Add triple back once

General formula

Alternating signs

Binomial identity per element

Each element counted once