Proof with characteristic function

1.2k Views Asked by At

If f : X → N,g : X → N

xA(x)= {1.  if x E A;
       {0   if x E X\A

Write the functions χAχB, χA +χB − χA∩B,χA + χB − 2χA∩B in the form χC.

Ive managed to get χAχB. But I don't understand how to do the other two χA +χB − χA∩B,χA + χB − 2χA∩B

Im assuming there is 4 cases for χA +χB − χA∩B and you could try write it in the form χC with the help of 1s and 0s

1

There are 1 best solutions below

1
On BEST ANSWER

Ok so as you noted in the comments, we have $\chi_{A\cup B} = \chi_A+\chi_B -\chi_{A\cap B}$ (I'll deal with the second formula afterwards)

You can prove this with a simple case analysis : Let $x\in X$. If $x\in A\cup B$, then either $x\in A$, and $x\in B$, in which case $\chi_A(x) = 1, \chi_B(x)=1$ and $\chi_{A\cap B}(x)=1$, and so we have an equality, either $x\in A, x\notin B$, in which case $\chi_A(x)=1, \chi_B(x) =0, \chi_{A\cap B}(x) = 0$, and so the equality still holds. It's the same when $x\in B, x\notin A$, and since $x\in A\cup B$, we have examined all the cases here. If $x\notin A\cup B$, then $x\notin A,x\notin B$, and so $\chi_A(x)=\chi_B(x)=\chi_{A\cap B}(x)=0$, and so again, the equality holds.

Since the equality holds for any value of $x$, the equality between functions was proved.

What happened i that $\chi_A+\chi_B$ counts how many times $x$ appears in either $A$ or $B$, and so if $x$ belongs to both, you have counted it twice instead of just once. So you need to remove one from the counter if and only if it belongs to both, and this explains the $-\chi_{A\cap B}$ term in the equality.

If we do the same analysis for the second formula (rather than prove it by case analysis, especially since we don't know what it will be a priori), we find this : $\chi_A+\chi_B$ counts how many times $x$ is in the union : if it belongs to only one of them, it's worth 1, if it belongs to the 2 it's 2 etc. So if we remove $\chi_{A\cap B}$ we're simply counting whether or not it appears in the union, as previously shown. Removing $\chi_{A\cap B}$ a second time removes those $x$'s which belong to the two of them : we are counting the $x$'s that belong to the union, but not to both.

The new set thus formed is called the *symmetric difference * of $A$ and $B$, often denoted $A\Delta B$. It can be defined as $(A\cup B)\setminus (A\cap B)$, so it's the elements that belong to precisely one of $A,B$. What this analysis shows (or suggests) is $\chi_A +\chi_B - 2\chi_{A\cap B} = \chi_{A\Delta B}$.

If this analysis doesn't convince you, you can prove this formula again with a case analysis, just like the beginning of this answer.