0% found this document useful (0 votes)
9 views27 pages

DS4 Set THEORY

The document provides an overview of Set Theory, including its notations, basic concepts, and operations on sets. It outlines course learning outcomes related to logic, discrete structures, and probability, along with definitions and examples of sets, subsets, power sets, and various set operations such as union, intersection, and difference. Additionally, it discusses important set identities and the Cartesian product of sets.
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)
9 views27 pages

DS4 Set THEORY

The document provides an overview of Set Theory, including its notations, basic concepts, and operations on sets. It outlines course learning outcomes related to logic, discrete structures, and probability, along with definitions and examples of sets, subsets, power sets, and various set operations such as union, intersection, and difference. Additionally, it discusses important set identities and the Cartesian product of sets.
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/ 27

Set Theory

Set Theory

Tran Tuan Anh†,


Nguyen An

Chapter 4 Khuong†,
Man Nguyen♦

Set Theory Contents

Set Theory-
Notations and
Discrete Structures for Computing on January 13, 2024 Basic Concepts

Set Theory -
Operations on Sets

Tran Tuan Anh†,


Nguyen An Khuong†,
Man Nguyen♦
Faculty of Computer Science and Engineering
† University of Technology - VNUHCM
[email protected]
♦ MUSC, Thailand
4.1
Set Theory
Contents

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

2 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♦

L.O.1 Understanding of logic and discrete structures Contents


L.O.1.2 – Define basic discrete structures: set, map, graph Set Theory-
L.O.2 Represent & model practical problems with discrete structures Notations and
Basic Concepts
L.O.2.1 – Logically describe KEY problems in Computing
Set Theory -
L.O.2.2 – Use proving methods: contrapositive, induction Operations on Sets
L.O.2.3 – Explain problem modeling using discrete structures
L.O.3 Understanding of basic probability and random variables
L.O.3.1 – Define basic probability theory
L.O.3.2 – Explain discrete random variables

L.O.4 Compute quantities of discrete structures and probabilities


L.O.4.1 – Operate (compute/ optimize) on discrete structures

4.3
Set Theory
Set Theory- Notations and Basic Concepts

• Set is a fundamental discrete structure on which all Set Theory

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

in the first semester.


• Set of natural numbers N

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

• a∈/ A: a is not an element of the set A Set Theory-


Notations and
Basic Concepts

[Set Description] Set Theory -


Operations on Sets
• The set V of all vowels in English alphabet,
V = {a, e, i, o, u}
• Set of all real numbers greater than 1???
{x | x ∈ R, x > 1}
{x | x > 1}
{x : x > 1}

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♦

• Universal set (tập vũ trụ) Contents


is represented by a Set Theory-
Notations and
rectangle. Basic Concepts

Set Theory -
• Circles and other Operations on Sets

geometrical figures are


used to represent sets.

• Points are used to


represent particular
elements in set.

4.7
Set Theory
Set Theory- Notations and Basic Concepts

Set Theory
Special Sets
Tran Tuan Anh†,
Nguyen An
Khuong†,
Man Nguyen♦

• Empty set (tập rỗng ) has no elements, Contents

denoted by ∅, or {} Set Theory-


Notations and
Basic Concepts
• A set with one element is called a singleton set.
Set Theory -
Operations on Sets

• 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

If A ̸= B, we write A ⊂ B and say A is a proper subset (tập Set Theory -


Operations on Sets
con thực sự) of B.

• 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

|A| = 5. Set Theory -


Operations on Sets
• S is the letters in Vietnamese alphabet, |S| = 29.
• Null set |∅| = 0.

Definition
A set that is infinite if it is not finite.
Example

• Set of positive integers is infinite. 4.10


Set Theory
Set Theory- Notations and Basic Concepts

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

• What is the power set of the empty set?


• What is the power set of the set {∅}

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

Prove using induction!

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

second element, . . ., and an as its nth element. Set Theory-


Notations and
Basic Concepts

Definition Set Theory -


Operations on Sets
Two ordered n-tuples (a1 , a2 , . . . , an ) = (b1 , b2 , . . . , bn ) iff
ai = bi , for i = 1, 2, . . . , n.

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

A1 ×A2 ×· · ·×An = {(a1 , a2 , . . . , an ) | ai ∈ Ai for i = 1, 2, . . . , n}Set Theory-


Notations and
Basic Concepts

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 Set Theory -


Operations on Sets

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 Set Theory -


Operations on Sets

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 Set Theory -


Operations on Sets

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

• A = {1,2,3} then A = ???


• Note that A - B = A ∩ B

4.20
Set Theory
Set Theory - Operations on Sets

Set Theory
Set Identities
Tran Tuan Anh†,
Nguyen An
Khuong†,
Man Nguyen♦

A∪∅ = A Identity laws


Contents
A∩U = A Luật đồng nhất
Set Theory-
Notations and
A∪U = U Domination laws Basic Concepts

A∩∅ = ∅ Luật nuốt Set Theory -


Operations on Sets

A∪A = A Idempotent laws


A∩A = A Luật lũy đẳng
(Ā) = A Complementation law
Luật bù

4.21
Set Theory
Set Theory - Operations on Sets

Set Theory
Set Identities
Tran Tuan Anh†,
Nguyen An
Khuong†,
Man Nguyen♦

A∪B = B∪A Commutative laws Contents

A∩B = B∩A Luật giao hoán Set Theory-


Notations and
Basic Concepts
A ∪ (B ∪ C) = (A ∪ B) ∪ C Associative laws Set Theory -
A ∩ (B ∩ C) = (A ∩ B) ∩ C Luật kết hợp Operations on Sets

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

• Prove that A ⊆ B and B ⊆ A Set Theory -


Operations on Sets

• Use membership table


• Use set builder notation and logical equivalences

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

A ∩ B = {x|x ̸∈ A ∩ B} Set Theory-


Notations and
= {x|¬(x ∈ A ∩ B)} Basic Concepts

= {x|¬(x ∈ A ∧ x ∈ B)} Set Theory -


Operations on Sets
= {x|¬(x ∈ A) ∨ ¬(x ∈ B)}
= {x|x ̸∈ A ∨ x ̸∈ B}
= {x|x ∈ A ∨ x ∈ B}
= {x|x ∈ A ∪ B}

4.27

You might also like