« previous section | next section » |
Definition 1.5.1
The difference of two sets A and B is a set denoted by A\B (or
sometimes by A-B), which consists of all elements of A that are not in
B. In symbolic notation
x ∈ A\B iff x ∈ A and x ∉ B
The above definition can be written as A\B = { x ∈
A : x ∉B}. An example of difference is
presented in the Figure 1.5.1. The two circles represent the sets A and
B.
Figure 1.5.1 The difference of sets A and B.
By Definition 1.5.1, A\B is a subset of A. When A and B are disjoint then A\B is identical with A.
(a) Let A = {1, 2, 3, 4, 5, 6} and B = {2i+1 ∈ N : i <5}. Hence A\B = {2, 4, 6} and B\A = {7, 9}.
(b) Let Q be the set of all rational numbers. Then R\Q is the infinite set of irrational numbers.
It follows from the Definition 1.5.1 that x ∉ A\B if and only if one of the conditions "x ∈ A" or "x ∉ B" are not fulfilled. Hence
x ∉ A\B iff x ∉ A or x ∈ B
The following lemma indicates connection between inclusuion and diference of sets. It implies in particular, the well known law : " when you substruct more, you leave less ".
Lemma 1.5.1
For arbitrary sets A, B, C, D, if A ⊆ B and C ⊆ D, then A\D ⊆ B\C.
Proof.
Suppose A ⊆ B and C ⊆ D and consider an arbitrary element x ∈ A\D. We have x ∈ A and x ∉ D. Hence
x ∈ A implies x ∈ B (by assumption A ⊆ B ) ,
x ∉ D implies x ∉ C (by assumption C ⊆ D ).
Thus x ∈ B and x ∉ C, and therefore x ∈ B\C. ♦
Amongst the most important laws are the De Mogan's laws, that relate the three basic set operations: union, intersection, and complementation.
Theorem 1.5.1
For arbitrary sets A, B, C the following two equalities (called De Morgan's Laws) hold:
Proof .
We shall present the proof of the first De Morgan law.
1. If x ∈ (A \ B) ∩ (A \ C), then x ∈ A and x ∉ B , x ∉ C. Thus x ∈ A and x ∉ (B ∪ C) and therefore x ∈ A \ (B ∪ C). Hence, we shall prove the inclusion (A \ B) ∩ (A \ C) ⊆ A \ (B ∪ C).
To prove the inverse inclusion we shall apply the laws of the algebra of sets that have been proved above.
By definition of union, B ⊆ (B ∪ C) and C ⊆ (B ∪ C). Hence by lemma 1.5.1, we have A \ (B ∪ C) ⊆ (A \ B) and A \ (B ∪ C) ⊆ (A \ C). Thus, by lemma 1.4.1, A \ (B ∪ C) ⊆ (A \ B) ∩ (A \ C).
2. Instead of proving the second De Morgan's law, we shall illustrate the left and right parts of it by Venn's diagramms (see Figure 1.5.2 ).
Figure 1.5.2 Visualization of the law A \ (B ∩ C) = (A \ B) ∪ (A \ C).
Observe that for the difference of sets, neither the commutative law nor the associative law hold.
Usually, the sets considered in applications are subsets of a biger set. It is simply because we restrict our investigation to the the fixed space, called the universe. When U is such a set and we consider the subsets of this set only, then the difference U\A is called the complement of A in the universe U. It is denoted by -A or by Ac.
The laws of De Morgan are :
- (A ∪ B) = (- A) ∩ (- B)
- (A ∩ B) = (- A) ∪ (- B)
The above equalities hold for arbitrary sets A and B, being the subsets of the universe U. They read: the complement of the union of sets is equal to the intersection of their complements, and the complement of the intersection of sets A and B is a union of their complements.
Remark. Careful Reader will observe the duality of the laws of algebra of sets: when we replace union by intersection and intersection by union in any law of the algebra of sets, then we will obain a law of algebra of sets.
Definition 1.5.2
By the symmetric difference of two sets A and B we shall mean the set A ⊕ B, which consists of all elements belonging to one of the sets A, B, but not to both, see Figure 1.5.3
x ∈ A ⊕ B iff x ∈ (A ∪ B)\(A ∩ B)
Figure 1.5. 3 Symmetric difference of A and B.
Let us notice the exclusive alternative that appears in the Definition 1.5.2:
x ∈ A ⊕ B iff either x ∈ A or x ∈ B.
So, why the operation is called symmetric difference? This is a consequece of the following characterization of ⊕ :
A ⊕ B = (A\B) ∪ (B\A)
The validity of the above equality follows directly from de Morgan's laws.
A ⊕B = (A ∪ B)\(A ∩ B) = (A ∪ B)\ A ∪ (A ∪ B)\ B = (B\A) ∪ (A\B) = (A\B) ∪ (B\A).
Let A = {2i ∈ N : i<6} and B = {3i ∈ N: i< 6}. Then A ⊕ B = {2,4,8,10,3,9,12,15}.
Question 1.5.1 What is the result of A ⊕ A ?
« previous section | next section » |