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.
1 Answers
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.
- 4,167
-
yes. I understood this formula. my problem with the formula I put in my question. I couldn't understand what is it used for, – Hajer Jul 30 '17 at 00:50
-
Well, this answer gives you an example of what it is used for. Do you want another example? – gary Jul 30 '17 at 00:52
-
I need an example using the formula I put in the main question above which deals with real valued functions – Hajer Jul 30 '17 at 01:08
-

{1,2,3} {3,2,1} these two share 2 as a fixed point at the second entry.
– Jul 30 '17 at 00:37