Explanation of inclusion and exclusion principle formula

519 Views Asked by At

I have a problem understanding this specific formula of inclusion and exclusion. I need to know why it is needed. and an example that uses it.

enter image description here

1

There are 1 best solutions below

4
On

Let's apply it for a small case, which I think illustrates the formula well and shows how it generalizes to larger number of sets. We have students taking 3 courses: Math $M$, Physics $P$ and Chemistry $C$, some are taking more than one class. We want to know the total number of students, given by $|M \cup P \cup C|$. According to I/E this total is given by:

$$|M \cup P \cup C|=|M|+|P|+|C| -|M\cap P|-|M \cap C|-|P \cap C|+ |M \cap P \cap C|$$.

Why? We first count students taking either of the three courses $M,P,C$.

But in using above formular, we have overcounted: when we count those taking, e.g., Math, we are also counting those that are taking Math and Physics and Math and Chemistry; similar for those taking Physics or Chemistry. So we subtract those taking two classes. But in doing so, we are also subtracting those students taking all three classes. So we add back in those students taking all three classes. The idea of the proof is that each student/object is counted exactly once.