DS4 Set THEORY
DS4 Set THEORY
Set Theory
Chapter 4 Khuong†,
Man Nguyen♦
Set Theory-
Notations and
Discrete Structures for Computing on January 13, 2024 Basic Concepts
Set Theory -
Operations on Sets
Set Theory
Contents
Tran Tuan Anh†,
Nguyen An
Khuong†,
Man Nguyen♦
Contents
Set Theory-
1 Set Theory- Notations and Basic Concepts Notations and
Basic Concepts
Set Theory -
Operations on Sets
4.2
Set Theory
Contents
Set Theory
Course outcomes
Tran Tuan Anh†,
Nguyen An
Khuong†,
Course learning outcomes Man Nguyen♦
4.3
Set Theory
Set Theory- Notations and Basic Concepts
discrete structures are built. Sets are used to group Tran Tuan Anh†,
Nguyen An
objects, which often have the same properties. Khuong†,
Man Nguyen♦
Example Contents
• Set of all the students who are currently taking Discrete Set Theory-
Notations and
Mathematics 1 course. Basic Concepts
Set Theory -
• Set of all the subjects that K2011 students have to take Operations on Sets
Definition
A set is an unordered collection of objects.
The objects in a set are called the elements (phần tử ) of the
set. A set is said to contain (chứa) its elements.
4.4
Set Theory
Set Theory- Notations and Basic Concepts
Set Theory
Notations
Tran Tuan Anh†,
Nguyen An
Khuong†,
Man Nguyen♦
Definition
• a ∈ A: a is an element of the set A Contents
4.5
Set Theory
Set Theory- Notations and Basic Concepts
Set Theory
Equal Sets
Tran Tuan Anh†,
Nguyen An
Khuong†,
Man Nguyen♦
Definition Contents
Two sets are equal iff they have the same elements. Set Theory-
Notations and
Basic Concepts
• (A = B) ↔ ∀x(x ∈ A ↔ x ∈ B) Set Theory -
Operations on Sets
Example
• {1, 3, 5} = {3, 5, 1}
• {1, 3, 5} = {1, 3, 3, 3, 5, 5, 5, 5}
4.6
Set Theory
Set Theory- Notations and Basic Concepts
Set Theory
Venn Diagram
Tran Tuan Anh†,
Nguyen An
Khuong†,
• John Venn in 1881 Man Nguyen♦
Set Theory -
• Circles and other Operations on Sets
4.7
Set Theory
Set Theory- Notations and Basic Concepts
Set Theory
Special Sets
Tran Tuan Anh†,
Nguyen An
Khuong†,
Man Nguyen♦
• What is {∅}?
• Answer: singleton
4.8
Set Theory
Set Theory- Notations and Basic Concepts
Set Theory
Subset
Tran Tuan Anh†,
Nguyen An
Definition Khuong†,
Man Nguyen♦
The set A is called a subset (tập con) of B iff every element
of A is also an element of B, denoted by A ⊆ B. Contents
So A ⊆ B ⇐⇒ ∀x (x ∈ A → x ∈ B) Set Theory-
Notations and
Basic Concepts
• Obviously
For every set S, then
(i) ∅ ⊆ S, and
(ii) S ⊆ S.
4.9
Set Theory
Set Theory- Notations and Basic Concepts
Set Theory
Cardinality- Definition
Tran Tuan Anh†,
If S has exactly n distinct elements where n is non-negative Nguyen An
Khuong†,
integers, S is finite set (tập hữu hạn), and n is cardinality Man Nguyen♦
(bản số ) of S, denoted by |S|.
Contents
Example
Set Theory-
Notations and
• A is the set of odd positive integers less than 10. Basic Concepts
Definition
A set that is infinite if it is not finite.
Example
Set Theory
Power Set
Tran Tuan Anh†,
Nguyen An
Khuong†,
Definition Man Nguyen♦
Given a set S, the power set (tập lũy thừa) of S is the set of
all subsets of the set S, denoted by P (S). Contents
Set Theory-
Notations and
Example Basic Concepts
Set Theory -
What is the power set of {0, 1, 2}? P ({0, 1, 2}) = Operations on Sets
{∅, {0}, {1}, {2}, {0, 1}, {0, 2}, {1, 2}, {0, 1, 2}}
Example
4.11
Set Theory
Set Theory- Notations and Basic Concepts
Set Theory
Power Set
Tran Tuan Anh†,
Nguyen An
Khuong†,
Man Nguyen♦
Contents
Set Theory-
Theorem Notations and
Basic Concepts
If a set has n elements, then its power set has 2n elements. Set Theory -
Operations on Sets
4.12
Set Theory
Set Theory- Notations and Basic Concepts
Set Theory
Ordered n-tuples
Tran Tuan Anh†,
Nguyen An
Definition Khuong†,
Man Nguyen♦
The ordered n-tuple (dãy sắp thứ tự) (a1 , a2 , . . . , an ) is the
ordered collection that has a1 as its first element, a2 as its Contents
Example
2-tuples, or ordered pairs (cặp), (a, b) and (c, d) are equal
iff
a = c and b = d
4.13
Set Theory
Set Theory- Notations and Basic Concepts
Set Theory
Cartesian Product
• René Descartes (1596–1650) Tran Tuan Anh†,
Nguyen An
Khuong†,
Man Nguyen♦
Definition
Let A and B be sets. The Cartesian product (tích Đề-các) Contents
of A and B, denoted by A × B, is the set of ordered pairs Set Theory-
(a, b), where a ∈ A and b ∈ B. Hence, Notations and
Basic Concepts
Set Theory -
A × B = {(a, b) | a ∈ A ∧ b ∈ B} Operations on Sets
Example
Cartesian product of A = {1, 2} and B = {a, b, c}. Then
A × B = {(1, a), (1, b), (1, c), (2, a), (2, b), (2, c)}
Show that A × B ̸= B × A
4.14
Set Theory
Set Theory- Notations and Basic Concepts
Set Theory
Cartesian Product
Tran Tuan Anh†,
Nguyen An
Definition Khuong†,
Man Nguyen♦
Contents
Set Theory -
Operations on Sets
Example
A = {0, 1}, B = {1, 2}, C = {0, 1, 2}. What is A × B × C?
A × B × C = {(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), (1, 2, 2)}
4.15
Set Theory
Set Theory - Operations on Sets
Set Theory
Union
Tran Tuan Anh†,
Nguyen An
Definition Khuong†,
Man Nguyen♦
The union (hợp) of A and B
Contents
A ∪ B = {x | x ∈ A ∨ x ∈ B}
Set Theory-
Notations and
Basic Concepts
A B
• Example:
• {1,2,3} ∪ {2,4} = {1,2,3,4}
• {1,2,3} ∪ ∅ = {1,2,3}
4.16
Set Theory
Set Theory - Operations on Sets
Set Theory
Intersection
Tran Tuan Anh†,
Nguyen An
Definition Khuong†,
Man Nguyen♦
The intersection (giao) of A and B
Contents
A ∩ B = {x | x ∈ A ∧ x ∈ B}
Set Theory-
Notations and
Basic Concepts
A B
Example:
• {1,2,3} ∩ {2,4} = {2}
• {1,2,3} ∩ N = {1,2,3}
4.17
Set Theory
Set Theory - Operations on Sets
Set Theory
Union/Intersection
Tran Tuan Anh†,
Nguyen An
Khuong†,
Man Nguyen♦
Contents
Set Theory-
n
[ Notations and
Basic Concepts
Ai = A1 ∪ A2 ∪ ... ∪ An = {x | x ∈ A1 ∨ x ∈ A2 ∨ ... ∨ x ∈ An }
Set Theory -
i=1 Operations on Sets
n
\
Ai = A1 ∩ A2 ∩ ... ∩ An = {x | x ∈ A1 ∧ x ∈ A2 ∧ ... ∧ x ∈ An }
i=1
4.18
Set Theory
Set Theory - Operations on Sets
Set Theory
Difference
Tran Tuan Anh†,
Nguyen An
Definition Khuong†,
Man Nguyen♦
The difference (hiệu) of A and B
Contents
A − B = {x | x ∈ A ∧ x ∈
/ B}
Set Theory-
Notations and
Basic Concepts
A B
Example:
• {1,2,3} - {2,4} = {1,3}
• {1,2,3} - N = ∅
4.19
Set Theory
Set Theory - Operations on Sets
Set Theory
Complement
Tran Tuan Anh†,
Definition Nguyen An
Khuong†,
Man Nguyen♦
The complement (phần bù) of A
Contents
A = {x | x ∈A}
/
Set Theory-
Notations and
Basic Concepts
Set Theory -
Example: Operations on Sets
4.20
Set Theory
Set Theory - Operations on Sets
Set Theory
Set Identities
Tran Tuan Anh†,
Nguyen An
Khuong†,
Man Nguyen♦
4.21
Set Theory
Set Theory - Operations on Sets
Set Theory
Set Identities
Tran Tuan Anh†,
Nguyen An
Khuong†,
Man Nguyen♦
A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C) Distributive laws
A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C) Luật phân phối
A∪B = A∩B De Morgan’s laws
A∩B = A∪B Luật De Morgan
4.22
Set Theory
Set Theory - Operations on Sets
Set Theory
Method of Proofs of Set Equations
Tran Tuan Anh†,
Nguyen An
Khuong†,
Man Nguyen♦
Contents
To prove A = B, we could use Set Theory-
Notations and
• Venn diagrams Basic Concepts
4.23
Set Theory
Set Theory - Operations on Sets
Set Theory
Example (1)
Tran Tuan Anh†,
Nguyen An
Khuong†,
Man Nguyen♦
Contents
Set Theory-
Notations and
Basic Concepts
Set Theory -
Operations on Sets
Example
Verify the distributive rule P ∪ (Q ∩ R) = (P ∪ Q) ∩ (P ∪ R)
4.24
Set Theory
Set Theory - Operations on Sets
Set Theory
Example (2)
Tran Tuan Anh†,
Nguyen An
Khuong†,
Man Nguyen♦
Example
Prove: A ∩ B = A ∪ B Contents
Set Theory-
(1) Show that A ∩ B ⊆ A ∪ B Notations and
Basic Concepts
Suppose that x ∈ A ∩ B Set Theory -
Operations on Sets
By the definition of complement, x ∈
/ A∩B
So, x ∈
/ A or x ∈/B
Hence, x ∈ Ā or x ∈ B̄
We conclude, x ∈ A ∪ B
Or, A ∩ B ⊆ A ∪ B
(2) Show that A ∪ B ⊆ A ∩ B
4.25
Set Theory
Set Theory - Operations on Sets
Set Theory
Example (3)
Tran Tuan Anh†,
Nguyen An
Khuong†,
Man Nguyen♦
Prove: A ∩ B = A ∪ B Contents
Set Theory-
A B A∩B A∩B Ā ∪ B̄ Notations and
Basic Concepts
1 1 1 0 0 Set Theory -
Operations on Sets
1 0 0 1 1
0 1 0 1 1
0 0 0 1 1
4.26
Set Theory
Set Theory - Operations on Sets
Set Theory
Example (4)
Tran Tuan Anh†,
Nguyen An
Khuong†,
Man Nguyen♦
Prove: A ∩ B = A ∪ B
Contents
4.27