PlanetMath (more info)
 Math for the people, by the people.
Encyclopedia | Requests | Forums | Docs | Wiki | Random | RSS  
Login
create new user
name:
pass:
forget your password?
Main Menu
Owner confidence rating: Very high Entry average rating: No information on entry rating
[parent] symmetric difference on a finite number of sets (Derivation)

Recall that the symmetric difference operation on sets is commutative and associative. Therefore, one can speak of the symmetric difference of a finite collection of sets. More precisely, let $ A_1,A_2,\ldots, A_n$ be sets, not necessarily pairwise distinct. The set

$\displaystyle A:=\displaystyle{\substack{ {n} \\ \displaystyle{\Delta} \\ {i=1} } A_i},$
the symmetric difference of the sets $ A_i$, is well-defined.

Let $ A,A_1,\ldots,A_n$ be defined as above. There is a curious property on $ A$:

Proposition 1   $ x\in A$ iff $ x$ belongs to an odd number of the sets $ A_i$.
Before proving this fact, let us make some quick observations. If there are two sets $ A_1,A_2$, then $ A=A_1\Delta A_2 = (A_1\cap A_2')\cup (A_1'\cap A_2)$ (here we are assuming that $ A_1$ and $ A_2$ are subsets of some universe $ U$, so the the complement makes sense). So $ x\in A$ iff $ x\in A_1\cap A_2'$ or $ x\in A_1'\cap A_2$ iff $ x\in A_1$ or $ x\in A_2$, which conforms with the statement of the proposition above. If $ n=3$, then $ A$ has conjunctive normal form
$\displaystyle A_1\Delta A_2\Delta A_3 = (A_1\cap A_2\cap A_3)\cup (A_1\cap A_2'\cap A_3')\cup (A_1'\cap A_2\cap A_3')\cup (A_1'\cap A_2'\cap A_3),$
(for a proof of this, see here). Then $ x\in A$ iff $ x$ belongs any one of the four intersections in the CNF above. In each of the four cases, $ x$ belongs to an odd number of sets. For example, if $ x\in A_1\cap A_2'\cap A_3'$, then $ x\in A_1$.

From the two examples above, it seems that the approach to proving the proposition is to express the symmetric difference in CNF, and this is indeed the case.

To facilitate with the proof, let us introduce some notations. Start with sets $ A_1,\ldots, A_n$, which are assumed to be subsets of some set $ U$. Let $ I$ and $ C$ be the identity and complementation operations taking $ A\subseteq U$ to $ A$ and $ A'$ respectively. Let $ \mathbf{n}$ be the set $ \lbrace 1,\ldots, n\rbrace$. Let $ F_n$ be the set of all functions from $ \mathbf{n}$ into $ \lbrace I,C\rbrace$. For every $ f\in F_n$, we write $ f_i$ for $ f(i)$. Finally, we partition $ F_n$ into two sets $ E_n$ and $ O_n$, where $ E_n$ ($ O_n$) consists of all functions $ f$ such that $ \vert f^{-1}(I)\vert$ is even (odd), respectively.

The proposition can now be restated as a single equation:

$\displaystyle \displaystyle{\substack{ {n} \\ \displaystyle{\Delta} \\ {i=1} } A_i} = \bigcup_{f\in O_n} \bigcap_{i=1}^n f_i(A_i)$
Proof. We prove this equation by induction on $ n$, for $ n\ge 2$. The case when $ n=2$ is already discussed above. Now,
$\displaystyle \displaystyle{\substack{ {n+1} \\ \displaystyle{\Delta} \\ {i=1} ... ...{ {n} \\ \displaystyle{\Delta} \\ {i=1} } A_i}\right) \Delta A_{n+1} = X\cup Y,$
where
$\displaystyle X = \left(\displaystyle{\substack{ {n} \\ \displaystyle{\Delta} \\ {i=1} } A_i}\right)\cap A'_{n+1}$   and$\displaystyle \qquad Y= A_{n+1} \cap \left( \displaystyle{\substack{ {n} \\ \displaystyle{\Delta} \\ {i=1} } A_i}\right)'.$
By the induction hypothesis,
$\displaystyle \displaystyle{\substack{ {n} \\ \displaystyle{\Delta} \\ {i=1} } A_i} = \bigcup_{f\in O_n} \bigcap_{i=1}^n f_i(A_i),$
so that
$\displaystyle X = \bigg( \bigcup_{f\in O_n} \bigcap_{i=1}^n f_i(A_i) \bigg) \cap A'_{n+1} = \bigcup_{f\in O_n} \bigcap_{i=1}^{n+1} \hat{f}_i(A_i), $
where $ \hat{f}:\mathbf{(n+1)}\to \lbrace I,C\rbrace$ is given by $ \hat{f}_i=f_i$ if $ i\in \mathbf{n}$, and $ \hat{f}_{n+1}=C$.

Now, for any $ x\in U$, $ x$ is either in an even number of $ A_i$'s, or an odd number of $ A_i$'s. This means that

$\displaystyle x\in \bigcup_{f\in E_n} \bigcap_{i=1}^n f_i(A_i)$   or$\displaystyle \qquad x\in \bigcup_{f\in O_n} \bigcap_{i=1}^n f_i(A_i)$
and never both. This shows that $ U$ can be partitioned into the two sets above. In other words,
$\displaystyle \left( \bigcup_{f\in O_n} \bigcap_{i=1}^n f_i(A_i) \right)' = \bigcup_{f\in E_n} \bigcap_{i=1}^n f_i(A_i).$
As a result,
$\displaystyle Y = A_{n+1} \cap \left( \bigcup_{f\in E_n} \bigcap_{i=1}^n f_i(A_i) \right)= \bigcup_{f\in E_n} \bigcap_{i=1}^{n+1} \overline{f}_i(A_i), $
where $ \overline{f}:\mathbf{(n+1)}\to \lbrace I,C\rbrace$ is given by $ \overline{f}_i=f_i$ if $ i\in \mathbf{n}$, and $ \hat{f}_{n+1}=I$.

Every function $ g\in O_{n+1}$ can be obtained from a function in $ f\in F_n$ so that $ g_i=f_i$ for $ i\in \mathbf{n}$. If $ f\in O_n$, then $ g_{n+1}=C$, and if $ f\in E_n$, then $ g_{n+1}=I$. This means that $ O_{n+1}$ can be partitioned into two sets $ O$ and $ E$, where $ O$ (or $ E$) contains all functions whose restriction to $ \mathbf{n}$ are in $ O_n$ (or $ E_n$).

Therefore,

$\displaystyle \bigcup_{g\in O_{n+1}} \bigcap_{i=1}^{n+1} g_i(A_i)$ $\displaystyle =$ $\displaystyle \bigg(\bigcup_{g\in O} \bigcap_{i=1}^{n+1} g_i(A_i)\bigg) \cup \bigg( \bigcup_{g\in E} \bigcap_{i=1}^{n+1} g_i(A_i)\bigg)$  
  $\displaystyle =$ $\displaystyle \bigg(\bigcup_{f\in O_n} \bigcap_{i=1}^{n+1} \hat{f}_i(A_i)\bigg) \cup \bigg( \bigcup_{f\in E_n} \bigcap_{i=1}^{n+1} \overline{f}_i(A_i)\bigg)$  
  $\displaystyle =$ $\displaystyle X\cup Y = \displaystyle{\substack{ {n+1} \\ \displaystyle{\Delta} \\ {i=1} } A_i}.$  

$ \qedsymbol$



"symmetric difference on a finite number of sets" is owned by CWoo.
(view preamble)

View style:


This object's parent.
Log in to rate this entry.
(view current ratings)

Cross-references: restriction, contains, even number, induction hypothesis, induction, equation, odd, even, partition, functions, identity, intersections, conjunctive normal form, proposition, complement, universe, subsets, observations, odd number, iff, property, well-defined, collection, finite, associative, commutative, operation, symmetric difference

This is version 5 of symmetric difference on a finite number of sets, born on 2008-05-01, modified 2008-05-02.
Object id is 10562, canonical name is DerivationOfSymmetricDifference2.
Accessed 160 times total.

Classification:
AMS MSC03E20 (Mathematical logic and foundations :: Set theory :: Other classical set theory )

Pending Errata and Addenda
None.
Discussion
Style: Expand: Order:
forum policy
SymDiff = + by Jon Awbrey on 2008-05-02 15:10:37
Just a comment, as I spent some time on this once, but it may ease things at some point to observe that the symmetric difference is just the natural field or ring operation usually signified by "+", and so it inherits all of the usual properties of that. JA
[ reply | up ]

Interact
post | correct | update request | add example | add (any)