### EmBeeZed's blog

By EmBeeZed, history, 4 weeks ago, ,

The inclusion-exclusion principle can be expressed as follows:

To compute the size of a union of multiple sets, it is necessary to sum the sizes of these sets separately, and then subtract the sizes of all pairwise intersections of the sets, then add back the size of the intersections of triples of the sets, subtract the size of quadruples of the sets, and so on, up to the intersection of all sets. The above definition can be expressed mathematically as follows:

It is intuitive for $n\leq 3$. But I have some problem with it. I cannot understand why it is like that?! (previously thanks!)

• +8

 » 4 weeks ago, # | ← Rev. 3 →   +8 I think you should be able to find an answer in most math textbooks on Combinatorics. Try Googling too. I have a feeling that this question has been answered before countless times as inclusion-exclusion tends to appear in undergraduate courses on counting, probability, etc.If all-else fails, try asking on Math Stackexchange. I am pretty sure the math geeks there are more than happy to help you out.
•  » » 4 weeks ago, # ^ |   0 i’ve been trying for long enough:)
 » 4 weeks ago, # |   0 https://codeforces.com/blog/entry/64625 does a pretty good job of explaining
•  » » 4 weeks ago, # ^ |   0 there is no rigorous proof
•  » » » 4 weeks ago, # ^ |   +8 Rigorous proof: use induction. Proof complete!
•  » » » » 4 weeks ago, # ^ |   0 i tried but didn’t get it, btw thank you:)
•  » » » » » 4 weeks ago, # ^ | ← Rev. 2 →   0 Google "inclusion-exclusion principle induction" first answer is a question about exactly that in stackexchange.