0% found this document useful (0 votes)
81 views5 pages

Chapter 5 - Sets

This document defines and provides examples of fundamental concepts in set theory, including: - Sets are collections of distinct objects called elements or members. - Two sets are equal if they contain the same elements. - A subset is a set where all elements are also elements of another set. - The power set of a set S is the set of all subsets of S, including the empty set and the set itself. The size of the power set is 2n where n is the number of elements in S.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
81 views5 pages

Chapter 5 - Sets

This document defines and provides examples of fundamental concepts in set theory, including: - Sets are collections of distinct objects called elements or members. - Two sets are equal if they contain the same elements. - A subset is a set where all elements are also elements of another set. - The power set of a set S is the set of all subsets of S, including the empty set and the set itself. The size of the power set is 2n where n is the number of elements in S.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

• Z = {. . . , −2, −1, 0, 1, 2, . . .}, the set of integers.

Discrete Structures I • Z+ = {1, 2, . . .}, the set of positive integers.


Sets • Q = { pq | p ∈ Z, q ∈ Z, and q 6= 0}, the set of rational numbers.
Departement of Computer Science – IT College – University of Bahrain Definition 2. Two sets are equal if and only if they have the same elements. There-
Dr. Amine Mahjoub, – 2019/2020 – Semester 2 fore, if A and B are sets, then A and B are equal if and only if ∀x (x ∈ A ↔ x ∈ B).
We write A = B if A and B are equal sets.
1 Introduction Example :
The sets {1, 3, 5} and {3, 5, 1} are equal, because they have the same elements. Note
In this section, we study the fundamental discrete structure on which all other that the order in which the elements of a set are listed does not matter. Note also that
discrete structures are built, namely, the set. Sets are used to group objects together. it does not matter if an element of a set is listed more than once, so {1, 3, 3, 3, 5, 5, 5, 5}
Often, but not always, the objects in a set have similar properties. For instance, all is the same as the set {1, 3, 5} because they have the same elements.
the students who are currently enrolled in your school make up a set. Likewise, all Remark :
the students currently taking a course in discrete mathematics at any school make up There is a special set that has no elements. This set is called the empty set, or null
a set. In addition, those students enrolled in your school who are taking a course in set, and is denoted by φ. The empty set can also be denoted by { } (that is, we
discrete mathematics form a set that can be obtained by taking the elements common represent the empty set with a pair of braces that encloses all the elements in this
to the first two collections. The language of sets is a means to study such collections set). Often, a set of elements with certain properties turns out to be the null set. For
in an organized fashion. We now provide a definition of a set. This definition is an instance, the set of all positive integers that are greater than their squares is the null
intuitive definition, which is not part of a formal theory of sets. set.
Venn Diagrams : Sets can be represented graphically using Venn diagrams. InVenn
Definition 1. A set is an unordered collection of objects, called elements or members
diagrams the universal set U , which contains all the objects under consideration, is
of the set. A set is said to contain its elements. We write a ∈ A to denote that a is
represented by a rectangle. (Note that the universal set varies depending on which
an element of the set A. The notation a ∈ / A denotes that a is not an element of the
objects are of interest.) Inside this rectangle, circles or other geometrical figures are
set A.
used to represent sets. Sometimes points are used to represent the particular elements
Example 1 : The set V of all vowels in the English alphabet can be written as of the set.Venn diagrams are often used to indicate the relationships between sets.
V = {a, e, i, o, u}. Example :

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.

{1, 2, 3} = {1, 3}.


Definition 11. Let A and B be sets. The union of the sets A and B, denoted by Definition 13. Two sets are called disjoint if their intersection is the empty set.
A ∪ B, is the set that contains those elements that are either in A or in B, or in both.
Let A = {1, 3, 5, 7, 9} and B = {2, 4, 6, 8, 10}. Because A ∩ B = φ, A and B are
disjoint.
Remark : |A ∪ B| = |A| + |B| − |A ∩ B|.
A ∪ B = {x | x ∈ A ∨ x ∈ B}

. 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.

Definition 15. Let A and B be sets. The difference of A and B, denoted by A − B,


is the set containing those elements that are in A but not in B. The difference of A
and B is also called the complement of B with respect to A.

An element x belongs to the difference of A and B if and only if x ∈ A and x ∈ B.


This tells us that :
A − B = {x | x ∈ A ∧ x ∈/ B}

.
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.

An element belongs to Ā if and only if x ∈


/ A. This tells us that Ā = {x ∈ U | x ∈
/ 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) = {∅} .

Exercises 3 : Identities Proofs


1. Show (A − B) ∪ (B − A) = (A ∪ B) − (A ∩ B)
2. Show that (A ∩ [(B ∪ A) − B)] = ∅
3. Show that (A − B) ∪ (A − C) = A − (B ∩ C).
4. Show that A ∪ B ∪ (A ∩ B ∩ C) = A ∪ B ∪ C
5. For any sets A, B, and C. Show that (A ∪ B ∪ C) ∪ (A − (B ∪ C)) = B ∪ C.
6. Show using set identities that (A − B) − (B − A) = (A − B).
7. Show using set identities that (A − C) ∪ (C − B) = ∅. Discrete Structure I – Sets Generated by LATEX

You might also like