Professional Documents
Culture Documents
Discrete Mathematics
Unit 1: Sets & Functions
1. Sets
2. Cartesian products
3. Set operations & identities
4. Mathematical induction
5. Functions
1. Sets – Definition Chapter 1.2
2⋅# =3
#! = 2
# ! = −1
1. Sets – Notation of numerical sets
Complex
Real
Rational
Integers
Natural
1. Sets – Subsets
The set 1 is a subset of B if and only if every element of 1 is an element of B:
∀+ (+ ∈ 1 ⟹ + ∈ B)
We use the notation 1 ⊆ B. Otherwise, we write 1 ⊈ B.
Two sets 1 and B are equal, denoted 1 = B, if they have exactly the same
elements. In other words, ∀+ (+ ∈ 1 ⟺ + ∈ B).
Equivalently, two sets are equal if both are subsets of the other, i.e. 1 ⊆ B and
B ⊆ 1.
If 1 ⊆ B and 1 ≠ B, then 1 ⊂ B.
Examples:
• {<, *, 9, 6, 8} ⊆ {<, 3, ;, g, *, … }
• {1,2,3,4,5} = 5,4,3,2,1
• {1,6,6,6,2,2,1,8} = {1,2,6,8}
• ℕ⊂ℤ⊂ℚ⊂ℝ⊂ℂ
1. Sets – Subsets
Properties of set inclusion:
• Reflexive: 1 ⊆ 1.
• Symmetric: 1 ⊆ B ∧ B ⊆ 1 ⟹ 1 = B.
• Transitive: 1 ⊆ B ∧ B ⊆ F ⟹ 1 ⊆ F.
Two important sets:
• The universal set, k. Contains all objects under consideration, including itself.
• The empty set, ∅ or {}. A set with no elements. It’s a subset of any set.
Important: ∅ ≠ ∅ .
Example:
• Represent the a file system using a set. The elements of the sets are the files.
/home/joseangel/
The set containing all subsets of a set 1 is called the power set of 1 and it is
denoted as ℘(1).
Examples:
• ℘ {<, 3, ;} = {∅, < , 3 , ; , <, 3 , <, ; , 3, ; , {<, 3, ;}}
• ℘ {∅} = {∅, {∅}}
• ℘ {<, 3, ;} = 2"#$%&' () &*&$&"+, -" +.& ,&+ = 8
2. Cartesian products Chapter 1.3
The ordered collection of elements (</, <0, … , <" ) is called an ordered n-tuple. For
two elements, 2-tuples, we call it ordered pairs.
Two ordered pairs (<, 3) and (;, g) are equal if and only if < = ; and 3 = g.
Let 1 and B be sets. We call 1×B the Cartesian product, which denotes
1×B = <, 3 < ∈ 1 ∧ 3 ∈ B}.
Example:
• Let 1 = {<, 3, ;} and B = {1,2}, what is the Cartesian product of 1 and B?
1×B = { <, 1 , <, 2 , 3, 1 , 3, 2 , ;, 1 , (;, 2)}
2
3 4 5
2. Cartesian products
Consider > sets 1/, 10, … , 1" . The Cartesian product is
1/×10× ⋯×1" = </, <0, … , <" <- ∈ 1- }.
If all the sets 1- are equal, then we write 1" instead of 1/×10× ⋯×1" .
Examples:
• Let 1 = <, 3 , what is the Cartesian product 10?
10 = 1×1 = { <, < , <, 3 , 3, < , 3, 3 }
• And 16?
16 = 1×1×1 = { <, <, < , <, <, 3 , <, 3, < , (<, 3, 3), 3, <, < , 3, <, 3 , 3, 3, < , (3, 3, 3)}
3. Set operations & identities Chapter 1.4
Example:
• The set m contains all vowels in the Latin alphabet and the set n contains the
first five letters in the Latin alphabet. What is the union, intersection and
difference of m and n?
Example:
• Let 1 = 0,3 = {+ ∈ ℝ ∣ 0 ≤ + < 3} and B= (1,5] = {+ ∈ ℝ ∣ 1 < + ≤ 5}.
What is the union, intersection and difference of 1 and B?
• 1 ∪ B = [0,5]
• 1 ∩ B = (1,3)
• 1 − B = [0,1]
• B − 1 = [3,5]
3. Set operations & identities
3. Set operations & identities
Example:
• Let 1, B, and F be sets. Show that 1 ∪ B ∩ F = F ∪ B ∩ 1.