1

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

B. Standage
  • 103
  • 1
  • 1
  • 14
Hajer
  • 43
  • Classic example: $A = { 1, 2, \ldots, n }$, $f(J)$ is the number of permutations of $A$ with fixed points exactly at $J$. Then $g(S)$ is the number of permutations with fixed points at least at $S$, which is equal to $(n - |S|)!$. So $f(\emptyset) = \sum_J (-1)^{|J|} (n - |J|)!$, and by collecting terms equal to $(n - i)!$, this is equal to $n! \sum_{i=0}^n (-1)^i \frac{1}{i!}$. $f(\emptyset)$ is the number of so-called derangements of ${ 1, 2, \ldots, n }$. – Daniel Schepler Jul 29 '17 at 23:40
  • The proof I know shows every element is counted precisely once in that formular. – gary Jul 29 '17 at 23:44
  • @DanielSchepler could you explain the example with more details. so what do you mean exactly by fixed points exactly at J – Hajer Jul 29 '17 at 23:53
  • might be mistaken but I think he means values at the j-th index don't change:

    {1,2,3} {3,2,1} these two share 2 as a fixed point at the second entry.

    –  Jul 30 '17 at 00:37
  • @RoddyMacPhee But J is assumed to be a set not a specific point – Hajer Jul 30 '17 at 00:52

1 Answers1

0

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.

gary
  • 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
  • Ok, let me look for one. – gary Jul 30 '17 at 01:09