Chapter 5 - Sets
Chapter 5 - Sets
Example 2 : The set O of odd positive integers less than 10 can be expressed by
O = {1, 3, 5, 7, 9}.
Example 2 : The set of positive integers less than 100 can be denoted by
{1, 2, 3, . . . , 99}.
Another way to describe a set is to use set builder notation. We characterize all
those elements in the set by stating the property or properties they must have to
be members. For instance, the set O of all odd positive integers less than 10 can be
written as :
O = {x | x is an odd positive integer less than 10}
Examples :
• O = {x ∈ Z+ | x is odd and x < 10}.
• Q = {x ∈ R | x = pq for some integers p and q}.
Usual Sets :
• N = {0, 1, 2, 3, . . .}, the set of natural numbers.
1
Definition 3. The set A is a subset of B if and only if every element of A is also 1. What is the power set of the set {0, 1, 2} ?
an element of B. We use the notation A ⊆ B to indicate that A is a subset of the The power set P ({0, 1, 2}) is the set of all subsets of {0, 1, 2}. Hence,
set B. P ({0, 1, 2}) = {φ, {0}, {1}, {2}, {0, 1}, {0, 2}, {1, 2}, {0, 1, 2}}. Note that the
empty set and the set itself are members of this set of subsets.
We see that A ⊆ B if and only if the quantification ∀x ( x ∈ A → x ∈ B) is True.
2. What is the power set of the empty set ? What is the power set of the set {φ} ?
Remark. P (φ) = {φ}.
The set {φ} has exactly two subsets, namely, φ and the set {φ} itself. Therefore,
• To show that A ⊆ B , show that if x ∈ A then x also belongs to B.
P ({φ}) = {φ, {φ}}.
• To show that A * B, find a single x ∈ A such that x ∈
/ B.
3. If a set has n elements, then its power set has 2n elements.
The order of elements in a collection is often important. Because sets are unordered,
a different structure is needed to represent ordered collections. This is provided by
ordered n−tuples.
Definition 7. The ordered n−tuple (a1 , a2 , . . . , an ) is the ordered collection that has
a1 as its first element, a2 as its second element, . . . , and an as its nth element.
We say that two ordered n−tuples are equal if and only if each corresponding pair of
their elements is equal. In other words, (a1 , a2 , . . . , an ) = (b1 , b2 , . . . , bn ) if and only
if ai = bi ,for i = 1, 2, . . . , n. In particular, ordered 2−tuples are called ordered pairs.
The ordered pairs (a, b) and (c, d) are equal if and only if a = c and b = d. Note that
Theorem 1. For every set S : (a, b) and (b, a) are not equal unless a = b.
1. φ ⊆ S. Definition 8. Let A and B be sets. The Cartesian product of A and B, denoted
2. S ⊆ S. by A × B, is the set of all ordered pairs (a, b), where a ∈ A and b ∈ B. Hence,
A × B = {(a, b) | a ∈ A ∧ b ∈ B}.
Remark : To show that two sets A and B are equal, show that A ⊆ B and B ⊆ A.
Example :
Definition 4. Let S be a set. If there are exactly n distinct elements in S where n A = {1, 2} and B = {a, b, c}
is a nonnegative integer, we say that S is a finite set and that n is the cardinality of The Cartesian product A × B is : A × B = {(1, a), (1, b), (1, c), (2, a), (2, b), (2, c)}.
S. The cardinality of S is denoted by |S|. The Cartesian product B × A is : B × A = {(a, 1), (a, 2), (b, 1), (b, 2), (c, 1), (c, 2)}.
Examples : This is not equal to A × B.
1. Let A be the set of odd positive integers less than 10. Then |A| = 5. Definition 9. The Cartesian product of the sets A1 , A2 , . . . , An , denoted by A1 ×
2. Let S be the set of letters in the English alphabet. Then |S| = 26. A2 × . . . , ×An , is the set of ordered n−tuples (a1 , a2, . . . , an ), where ai belongs to
Ai f ori = 1, 2, . . . , n. In other words, A1 × A2 × . . . × An = {(a1 , a2 , . . . , an ) | ai ∈
3. |φ| = 0. Ai for i = 1, 2, . . . , n}.
Definition 5. A set is said to be infinite if it is not finite. Example : Let A = {0, 1}, B = {1, 2}, and C = {0, 1, 2}.
Remark : The set of positive integers is infinite. The Cartesian product A × B × C consists of all ordered triples
(a, b, c), where a ∈ A, b ∈ B, and c ∈ C. Hence : A × B × C =
Definition 6. Given a set S, the power set of S is the set of all subsets of the set {(0, 1, 0), (0, 1, 1), (0, 1, 2), (0, 2, 0), (0, 2, 1), (0, 2, 2), (1, 1, 0), (1, 1, 1), (1, 1, 2), (1, 2, 0), (1, 2, 1),
S. The power set of S is denoted by P (S).
Definition 10. Given a predicate P , and a domain D, we define the truth set of P
Examples : to be the set of elements x ∈ D for which P (x) is true.
The truth set of P (x) is denoted by {x ∈ D | P (x)}.
2
Exercises : What are the truth sets of the predicates P (x), Q(x), and R(x), where
the domain is the set of integers and P (x) is |x| = 1, Q(x) is x2 = 2 and R(x) is
|x| = x.
2 Set Operations
Two, or more, sets can be combined in many different ways.
. The union of the sets {1, 3, 5} and {1, 2, 3} is the set {1, 2, 3, 5} ; that is, {1, 3, 5} ∪ Definition 14. Two sets are called disjoint if their intersection is the empty set.
.
The difference of {1, 3, 5} and {1, 2, 3} is the set {5} ; that is, {1, 3, 5}−{1, 2, 3} = {5}.
{1, 2, 3} = {1, 2, 3, 5}. This is different from the difference of {1, 2, 3} and {1, 3, 5}, which is the set {2}.
Definition 12. Let A and B be sets. The intersection of the sets A and B, denoted
by A ∩ B, is the set containing those elements in both A and B.
An element x belongs to the intersection of the sets A and B if and only if x belongs
to A and x belongs to B. This tells us that :
A ∪ B = {x | x ∈ A ∧ x ∈ B}
.
The intersection of the sets {1, 3, 5} and {1, 2, 3} is the set {1, 3} ; that is, {1, 3, 5} ∩
3
Definition 16. Let U be the universal set. The complement of the set A, denoted by 3 Set Identities
Ā, is the complement of A with respect to U . Therefore, the complement of the set A
is U − A.
Exercises :
1. Prove that A ∩ B = A ∪ B.
2. Prove that A ∪ (B ∩ C) = (C ∪ B) ∩ A.
Let A = {a, e, i, o, u} (where the universal set is the set of letters of the English 3. Prove that (A − B) ∪ (B − A) = (A ∪ B) − (A ∩ B)
alphabet). Ā = {b, c, d, f, g, h, j, k, l, m, n, p, q, r, s, t, v, w, x, y, z}. 4. Prove that A ∩ [(B ∪ Ā) − B] = φ
Let A be the set of positive integers greater than 10 (with universal set the set of all
positive integers). Then Ā = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}.
4
4 Exercises Exercises 4 : MemberShip Proofs
1. if A ⊆ B and B ⊆ C then A ⊆ C
Exercises 1 :
2. if A ⊆ B then A − B = ∅
Let U = {x ∈ Z + | − 5 ≤ x ≤ 5}, A = {1, 2} , B = {1, 2, 5} , C = {1, 3, 5} and
3. if A − B = ∅ , then A ⊆ B
D = {x ∈ U |x2 − 36 = 0}.
Answer the following : 4. If A ⊆ B , then B = A ∪ B
1. (A ∩ B) − D 5. Show (A − B) ∪ (B − A) = (A ∪ B) − (A ∩ B) using membership proof.
2. (A ∩ C) ∪ B 6. show that (C − D) ∪ (C ∩ D) ⊆ C .
3. (B ∪ C) − A ∪ D 7. Prove by contradiction, for any sets A and B , if A ⊆ A − B, then A ∩ B = ∅
4. (B − C) − A 8. For any set A, B, C if A ⊆ B and B ⊆ C , then (C − B) ∪ A ⊆ C.
5. P (B − A) ∪ A 9. Prove that if A ∪ C ⊆ B, then A ∩ C ⊆ B
6. P (D − (B − C)
10. Prove that For any set A, B, C if A ⊆ B and B ⊆ C , then B ∪ A ⊆ C .
7. P (A) ∩ P (B − C)
8. |P (A − B) ∪ P (D − A)| Exercises 5 :
9. P ((A ∪ D) ∪ ∅).
Examples – Counter Examples
10. |P (P (P (A − D)))| .
11. |P (P (C − A) ∪ (C ∪ D)| 1. For any set A, B, C : ff A ⊆ B and C ⊆ B, then | A | ∪ | C |≤| B |
2. For any set A, C : A ∩ C = ∅ −→ C − A = ∅.
Exercises 2 : Venn Diagram 3. For any sets A and B, if A ⊆ B and |C − A| = 1 , then |C − B| > 1.
Answer the following : 4. There are two sets A and B, |A ∩ B| = 0 and P (A − B) = {∅}
1. Shade (A ∩ B) − C. 5. Given any set A, B. if A − B = ∅, then B − A = ∅.
2. shade ((A ∩ B) − C) . 6. For any sets A and B, if A ⊆ B , then |A ∪ B| = |B| + |A| .
3. Shade A − (C − B) . 7. Given any set A, C : A ∩ C = ∅ −→ C − A = ∅..
4. Given A ⊆ B and C − B = ∅ , shade A ∩ C = ∅. 8. For any sets A and B, if A ⊆ B and |C − A| = 1 , then |C − B| > 1 .
5. Shade the area for : (A ∩ B) ∪ (A ∩ C) . 9. there are two sets A and B, |A ∩ B| = 0 and P (A − B) = {∅} .
6. Shade A − B ∩ B − C, 10. Given any set A, B : A ∪ B = B −→ B − A = ∅.
7. given A ⊆ B and B ∩ C = ∅, Shade (A ∩ B) ∪ ((B ∪ C)). 11. For any sets A, B and C, if A ⊆ C and |A ∩ B| = 0 , then C ∩ B = ∅ .
8. Given : A ⊆ B and |C − B| > 0 and A ∩ C = ∅ shade (B − A) ∪ C. 12. there are two sets A and B, |P (A − B)| = 2 and P (B − A) = {∅} .