SlideShare a Scribd company logo
1 of 32
Download to read offline
Relations & Digraphs
Product Sets
Definition: An ordered pair 𝑎𝑎, 𝑏𝑏 is a listing of the
objects/items 𝑎𝑎 and 𝑏𝑏 in a prescribed order: 𝑎𝑎 is the first
and 𝑏𝑏 is the second. (a sequence of length 2)
Definition: The ordered pairs 𝑎𝑎1, 𝑏𝑏1 and 𝑎𝑎2, 𝑏𝑏2 are
equal iff 𝑎𝑎1 = 𝑎𝑎2 and 𝑏𝑏1 = 𝑏𝑏2.
Definition: If 𝐴𝐴 and 𝐵𝐵 are two nonempty sets, we define
the product set or Cartesian product 𝐴𝐴 × 𝐵𝐵 as the set of
all ordered pairs 𝑎𝑎, 𝑏𝑏 with 𝑎𝑎 ∈ 𝐴𝐴 and 𝑏𝑏 ∈ 𝐵𝐵:
𝐴𝐴 × 𝐵𝐵 = 𝑎𝑎, 𝑏𝑏 𝑎𝑎 ∈ 𝐴𝐴 and 𝑏𝑏 ∈ 𝐵𝐵}
© S. Turaev, CSC 1700 Discrete Mathematics 2
Product Sets
Example: Let 𝐴𝐴 = 1,2,3 and 𝐵𝐵 = 𝑟𝑟, 𝑠𝑠 , then
𝐴𝐴 × 𝐵𝐵 =
𝐵𝐵 × 𝐴𝐴 =
© S. Turaev, CSC 1700 Discrete Mathematics 3
Product Sets
Theorem: For any two finite sets 𝐴𝐴 and 𝐵𝐵,
𝐴𝐴 × 𝐵𝐵 = 𝐴𝐴 ⋅ 𝐵𝐵 .
Proof: Use multiplication principle!
© S. Turaev, CSC 1700 Discrete Mathematics 4
Definitions:
 Let 𝐴𝐴 and 𝐵𝐵 be nonempty sets. A relation 𝑅𝑅 from 𝐴𝐴
to 𝐵𝐵 is a subset of 𝐴𝐴 × 𝐵𝐵.
 If 𝑅𝑅 ⊆ 𝐴𝐴 × 𝐵𝐵 and 𝑎𝑎, 𝑏𝑏 ∈ 𝑅𝑅, we say that 𝑎𝑎 is related
to 𝑏𝑏 by 𝑅𝑅, and we write 𝑎𝑎 𝑅𝑅 𝑏𝑏.
 If 𝑎𝑎 is not related to 𝑏𝑏 by 𝑅𝑅, we write 𝑎𝑎 𝑅𝑅 𝑏𝑏.
 If 𝑅𝑅 ⊆ 𝐴𝐴 × 𝐴𝐴, we say 𝑅𝑅 is a relation on 𝐴𝐴.
Relations & Digraphs
© S. Turaev, CSC 1700 Discrete Mathematics 5
Example 1: Let 𝐴𝐴 = 1,2,3 and 𝐵𝐵 = 𝑟𝑟, 𝑠𝑠 . Then
𝑅𝑅 = 1, 𝑟𝑟 , 2, 𝑠𝑠 , 3, 𝑟𝑟 ⊆ 𝐴𝐴 × 𝐵𝐵
is a relation from 𝐴𝐴 to 𝐵𝐵.
Example 2: Let 𝐴𝐴 and 𝐵𝐵 are sets of positive integer
numbers. We define the relation 𝑅𝑅 ⊆ 𝐴𝐴 × 𝐵𝐵 by
𝑎𝑎 𝑅𝑅 𝑏𝑏 ⇔ 𝑎𝑎 = 𝑏𝑏
Relations & Digraphs
© S. Turaev, CSC 1700 Discrete Mathematics 6
Example 3: Let 𝐴𝐴 = 1,2,3,4,5 . The relation 𝑅𝑅 ⊆ 𝐴𝐴 × 𝐴𝐴 is
defined by
𝑎𝑎 𝑅𝑅 𝑏𝑏 ⇔ 𝑎𝑎 < 𝑏𝑏
Then 𝑅𝑅 =
Example 4: Let 𝐴𝐴 = 1,2,3,4,5,6,7,8,9,10 . The relation
𝑅𝑅 ⊆ 𝐴𝐴 × 𝐴𝐴 is defined by
𝑎𝑎 𝑅𝑅 𝑏𝑏 ⇔ 𝑎𝑎|𝑏𝑏
Then 𝑅𝑅 =
Relations & Digraphs
© S. Turaev, CSC 1700 Discrete Mathematics 7
Definition: Let 𝑅𝑅 ⊆ 𝐴𝐴 × 𝐵𝐵 be a relation from 𝐴𝐴 to 𝐵𝐵.
 The domain of 𝑅𝑅, denoted by Dom 𝑅𝑅 , is the set of
elements in 𝐴𝐴 that are related to some element in
𝐵𝐵.
 The range of 𝑅𝑅, denoted by Ran 𝑅𝑅 , is the set of
elements in 𝐵𝐵 that are second elements of pairs in
𝑅𝑅.
Relations & Digraphs
© S. Turaev, CSC 1700 Discrete Mathematics 8
Relations & Digraphs
Example 5: Let 𝐴𝐴 = 1,2,3 and 𝐵𝐵 = 𝑟𝑟, 𝑠𝑠 .
𝑅𝑅 = 1, 𝑟𝑟 , 2, 𝑠𝑠 , 3, 𝑟𝑟
Dom R =
Ran R =
Example 6: Let 𝐴𝐴 = 1,2,3,4,5 . The relation 𝑅𝑅 ⊆ 𝐴𝐴 × 𝐴𝐴 is
defined by 𝑎𝑎 𝑅𝑅 𝑏𝑏 ⇔ 𝑎𝑎 < 𝑏𝑏
Dom R =
Ran R =
© S. Turaev, CSC 1700 Discrete Mathematics 9
The Matrix of a Relation
Definition: Let 𝐴𝐴 = 𝑎𝑎1, 𝑎𝑎2, … , 𝑎𝑎 𝑚𝑚 , 𝐵𝐵 = 𝑏𝑏1, 𝑏𝑏2, … , 𝑏𝑏𝑛𝑛
and 𝑅𝑅 ⊆ 𝐴𝐴 × 𝐵𝐵 be a relation. We represent 𝑅𝑅 by the 𝑚𝑚 ×
𝑛𝑛 matrix 𝐌𝐌𝑅𝑅 = [𝑚𝑚𝑖𝑖𝑖𝑖], which is defined by
𝑚𝑚𝑖𝑖𝑖𝑖 = �
1, 𝑎𝑎𝑖𝑖, 𝑏𝑏𝑗𝑗 ∈ 𝑅𝑅
0, 𝑎𝑎𝑖𝑖, 𝑏𝑏𝑗𝑗 ∉ 𝑅𝑅
The matrix 𝐌𝐌𝑅𝑅 is called the matrix of 𝑅𝑅.
Example: Let 𝐴𝐴 = 1,2,3 and 𝐵𝐵 = 𝑟𝑟, 𝑠𝑠 .
𝑅𝑅 = 1, 𝑟𝑟 , 2, 𝑠𝑠 , 3, 𝑟𝑟 𝐌𝐌𝑅𝑅 =
© S. Turaev, CSC 1700 Discrete Mathematics 10
The Digraph of a Relation
Definition: If 𝐴𝐴 is finite and 𝑅𝑅 ⊆ 𝐴𝐴 × 𝐴𝐴 is a relation. We
represent 𝑅𝑅 pictorially as follows:
 Draw a small circle, called a vertex/node, for each
element of 𝐴𝐴 and label the circle with the
corresponding element of 𝐴𝐴.
 Draw an arrow, called an edge, from vertex 𝑎𝑎𝑖𝑖 to
vertex 𝑎𝑎𝑗𝑗 iff 𝑎𝑎𝑖𝑖 𝑅𝑅 𝑎𝑎𝑗𝑗.
The resulting pictorial representation of 𝑅𝑅 is called a
directed graph or digraph of 𝑅𝑅.
© S. Turaev, CSC 1700 Discrete Mathematics 11
The Digraph of a Relation
Example: Let 𝐴𝐴 = 1, 2, 3, 4 and
𝑅𝑅 = 1,1 , 1,2 , 2,1 , 2,2 , 2,3 , 2,4 , 3,4 , 4,1
The digraph of 𝑅𝑅:
Example: Let 𝐴𝐴 = 1, 2, 3, 4 and
Find the relation 𝑅𝑅:
© S. Turaev, CSC 1700 Discrete Mathematics
1
2
3
4
12
The Digraph of a Relation
Definition: If 𝑅𝑅 is a relation on a set 𝐴𝐴 and 𝑎𝑎 ∈ 𝐴𝐴, then
 the in-degree of 𝑎𝑎 is the number of 𝑏𝑏 ∈ 𝐴𝐴 such that
𝑏𝑏, 𝑎𝑎 ∈ 𝑅𝑅;
 the out-degree of 𝑎𝑎 is the number of 𝑏𝑏 ∈ 𝐴𝐴 such
that 𝑎𝑎, 𝑏𝑏 ∈ 𝑅𝑅.
Example: Consider the digraph:
List in-degrees and out-degrees of all vertices.
© S. Turaev, CSC 1700 Discrete Mathematics
1
2
3
4
13
The Digraph of a Relation
Example: Let 𝐴𝐴 = 𝑎𝑎, 𝑏𝑏, 𝑐𝑐, 𝑑𝑑 and let 𝑅𝑅 be the relation on
𝐴𝐴 that has the matrix
𝐌𝐌𝑅𝑅 =
1 0
0 1
0 0
0 0
1 1
0 1
1 0
0 1
Construct the digraph of 𝑅𝑅 and list in-degrees and out-
degrees of all vertices.
© S. Turaev, CSC 1700 Discrete Mathematics 14
The Digraph of a Relation
Example: Let 𝐴𝐴 = 1,4,5 and let 𝑅𝑅 be given the digraph
Find 𝐌𝐌𝑅𝑅 and 𝑅𝑅.
© S. Turaev, CSC 1700 Discrete Mathematics
1 4
5
15
Paths in Relations & Digraphs
Definition: Suppose that 𝑅𝑅 is a relation on a set 𝐴𝐴.
A path of length 𝑛𝑛 in 𝑅𝑅 from 𝑎𝑎 to 𝑏𝑏 is a finite sequence
𝜋𝜋 ∶ 𝑎𝑎, 𝑥𝑥1, 𝑥𝑥2, … , 𝑥𝑥𝑛𝑛−1, 𝑏𝑏
beginning with 𝑎𝑎 and ending with 𝑏𝑏, such that
𝑎𝑎 𝑅𝑅 𝑥𝑥1, 𝑥𝑥1 𝑅𝑅 𝑥𝑥2, … , 𝑥𝑥𝑛𝑛−1 𝑅𝑅 𝑏𝑏.
Definition: A path that begins and ends at the same
vertex is called a cycle:
𝜋𝜋 ∶ 𝑎𝑎, 𝑥𝑥1, 𝑥𝑥2, … , 𝑥𝑥𝑛𝑛−1, 𝑎𝑎
© S. Turaev, CSC 1700 Discrete Mathematics 16
Paths in Relations & Digraphs
Example: Give the examples for paths of length 1,2,3,4
and 5.
© S. Turaev, CSC 1700 Discrete Mathematics
1 2
43
5
17
Paths in Relations & Digraphs
Definition: If 𝑛𝑛 is a fixed number, we define a relation 𝑅𝑅 𝑛𝑛
as follows: 𝑥𝑥 𝑅𝑅𝑛𝑛
𝑦𝑦 means that there is a path of length 𝑛𝑛
from 𝑥𝑥 to 𝑦𝑦.
Definition: We define a relation 𝑅𝑅∞
(connectivity relation
for 𝑅𝑅) on 𝐴𝐴 by letting 𝑥𝑥 𝑅𝑅∞
𝑦𝑦 mean that there is some
path from 𝑥𝑥 to 𝑦𝑦.
Example: Let 𝐴𝐴 = 𝑎𝑎, 𝑏𝑏, 𝑐𝑐, 𝑑𝑑, 𝑒𝑒 and
𝑅𝑅 = 𝑎𝑎, 𝑎𝑎 , 𝑎𝑎, 𝑏𝑏 , 𝑏𝑏, 𝑐𝑐 , 𝑐𝑐, 𝑒𝑒 , 𝑐𝑐, 𝑑𝑑 , 𝑑𝑑, 𝑒𝑒 .
Compute (a) 𝑅𝑅2
; (b) 𝑅𝑅3
; (c) 𝑅𝑅∞
.
© S. Turaev, CSC 1700 Discrete Mathematics 18
Paths in Relations & Digraphs
Let 𝑅𝑅 be a relation on a finite set 𝐴𝐴 = 𝑎𝑎1, 𝑎𝑎2, … , 𝑎𝑎𝑛𝑛 , and
let 𝐌𝐌𝑅𝑅 be the 𝑛𝑛 × 𝑛𝑛 matrix representing 𝑅𝑅.
Theorem 1: If 𝑅𝑅 is a relation on 𝐴𝐴 = 𝑎𝑎1, 𝑎𝑎2, … , 𝑎𝑎𝑛𝑛 , then
𝐌𝐌𝑅𝑅2 = 𝐌𝐌𝑅𝑅 ⊙ 𝐌𝐌𝑅𝑅.
Example: Let 𝐴𝐴 = 𝑎𝑎, 𝑏𝑏, 𝑐𝑐, 𝑑𝑑, 𝑒𝑒 and
𝑅𝑅 = 𝑎𝑎, 𝑎𝑎 , 𝑎𝑎, 𝑏𝑏 , 𝑏𝑏, 𝑐𝑐 , 𝑐𝑐, 𝑒𝑒 , 𝑐𝑐, 𝑑𝑑 , 𝑑𝑑, 𝑒𝑒 .
© S. Turaev, CSC 1700 Discrete Mathematics 19
Paths in Relations & Digraphs
Example: Let 𝐴𝐴 = 𝑎𝑎, 𝑏𝑏, 𝑐𝑐, 𝑑𝑑, 𝑒𝑒 and
𝑅𝑅 = 𝑎𝑎, 𝑎𝑎 , 𝑎𝑎, 𝑏𝑏 , 𝑏𝑏, 𝑐𝑐 , 𝑐𝑐, 𝑒𝑒 , 𝑐𝑐, 𝑑𝑑 , 𝑑𝑑, 𝑒𝑒 .
𝐌𝐌𝑅𝑅 =
1 1
0 0
0 0
1 0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
1
0
Compute 𝐌𝐌𝑅𝑅2.
© S. Turaev, CSC 1700 Discrete Mathematics 20
Reflexive & Irreflexive Relations
Definition:
 A relation 𝑅𝑅 on a set 𝐴𝐴 is reflexive if 𝑎𝑎, 𝑎𝑎 ∈ 𝑅𝑅 for
all 𝑎𝑎 ∈ 𝐴𝐴, i.e., if 𝑎𝑎 𝑅𝑅 𝑎𝑎 for all 𝑎𝑎 ∈ 𝐴𝐴.
 A relation 𝑅𝑅 on a set 𝐴𝐴 is irreflexive if 𝑎𝑎 𝑅𝑅 𝑎𝑎 for all
𝑎𝑎 ∈ 𝐴𝐴.
Example:
 Δ = 𝑎𝑎, 𝑎𝑎 | 𝑎𝑎 ∈ 𝐴𝐴 , the relation of equality on the
set 𝐴𝐴.
 𝑅𝑅 = 𝑎𝑎, 𝑏𝑏 ∈ 𝐴𝐴 × 𝐴𝐴| 𝑎𝑎 ≠ 𝑏𝑏 , the relation of
inequality on the set 𝐴𝐴.
© S. Turaev, CSC 1700 Discrete Mathematics 21
Reflexive & Irreflexive Relations
Exercise: Let 𝐴𝐴 = 1, 2, 3 , and let 𝑅𝑅 = 1,1 , 1,2 .
Is 𝑅𝑅 reflexive or irreflexive?
Exercise: How is a reflexive or irreflexive relation
identified by its matrix?
Exercise: How is a reflexive or irreflexive relation
characterized by the digraph?
© S. Turaev, CSC 1700 Discrete Mathematics 22
(A-, Anti-) Symmetric Relations
Definition:
 A relation 𝑅𝑅 on a set 𝐴𝐴 is symmetric if whenever
𝑎𝑎 𝑅𝑅 𝑏𝑏, then 𝑏𝑏 𝑅𝑅 𝑎𝑎.
 A relation 𝑅𝑅 on a set 𝐴𝐴 is asymmetric if whenever
𝑎𝑎 𝑅𝑅 𝑏𝑏, then 𝑏𝑏 𝑅𝑅 𝑎𝑎.
 A relation 𝑅𝑅 on a set 𝐴𝐴 is antisymmetric if whenever
𝑎𝑎 𝑅𝑅 𝑏𝑏 and 𝑏𝑏 𝑅𝑅 𝑎𝑎, then 𝑎𝑎 = 𝑏𝑏.
© S. Turaev, CSC 1700 Discrete Mathematics 23
(A-, Anti-) Symmetric Relations
Example: Let 𝐴𝐴 = 1, 2, 3, 4, 5, 6 and let
𝑅𝑅 = 𝑎𝑎, 𝑏𝑏 ∈ 𝐴𝐴 × 𝐴𝐴 | 𝑎𝑎 < 𝑏𝑏
Is 𝑅𝑅 symmetric, asymmetric or antisymmetric?
 Symmetry:
 Asymmetry:
 Antisymmetry:
© S. Turaev, CSC 1700 Discrete Mathematics 24
(A-, Anti-) Symmetric Relations
Example: Let 𝐴𝐴 = 1, 2, 3, 4 and let
𝑅𝑅 = 1,2 , 2,2 , 3,4 , 4,1
Is 𝑅𝑅 symmetric, asymmetric or antisymmetric?
Example: Let 𝐴𝐴 = ℤ+
and let
𝑅𝑅 = 𝑎𝑎, 𝑏𝑏 ∈ 𝐴𝐴 × 𝐴𝐴 | 𝑎𝑎 divides 𝑏𝑏
Is 𝑅𝑅 symmetric, asymmetric or antisymmetric?
© S. Turaev, CSC 1700 Discrete Mathematics 25
(A-, Anti-) Symmetric Relations
Exercise: How is a symmetric, asymmetric or
antisymmetric relation identified by its matrix?
Exercise: How is a symmetric, asymmetric or
antisymmetric relation characterized by the digraph?
© S. Turaev, CSC 1700 Discrete Mathematics 26
Transitive Relations
Definition: A relation 𝑅𝑅 on a set 𝐴𝐴 is transitive if
whenever 𝑎𝑎 𝑅𝑅 𝑏𝑏 and 𝑏𝑏 𝑅𝑅 𝑐𝑐 then 𝑎𝑎 𝑅𝑅 𝑐𝑐.
Example: Let 𝐴𝐴 = 1, 2, 3, 4 and let
𝑅𝑅 = 1,2 , 1,3 , 4,2
Is 𝑅𝑅 transitive?
Example: Let 𝐴𝐴 = ℤ+
and let
𝑅𝑅 = 𝑎𝑎, 𝑏𝑏 ∈ 𝐴𝐴 × 𝐴𝐴 | 𝑎𝑎 divides 𝑏𝑏
Is 𝑅𝑅 transitive?
© S. Turaev, CSC 1700 Discrete Mathematics 27
Transitive Relations
Exercise: Let 𝐴𝐴 = 1,2,3 and 𝑅𝑅 be the relation on 𝐴𝐴
whose matrix is
𝐌𝐌𝑅𝑅 =
1 1 1
0 0 1
0 0 1
Show that 𝑅𝑅 is transitive. (Hint: Check if 𝐌𝐌𝑅𝑅 ⊙
2
= 𝐌𝐌𝑅𝑅)
Exercise: How is a transitive relation identified by its
matrix?
Exercise: How is a transitive relation characterized by the
digraph?
© S. Turaev, CSC 1700 Discrete Mathematics 28
Equivalence Relations
Definition: A relation 𝑅𝑅 on a set 𝐴𝐴 is called an equi-
valence relation if it is reflexive, symmetric and transitive.
Example: Let 𝐴𝐴 = 1, 2, 3, 4 and let
𝑅𝑅 = 1,1 , 1,2 , 2,1 , 2,2 , 3,4 , 4,3 , 3,3 , 4,4 .
Then 𝑅𝑅 is an equivalence relation.
Example: Let 𝐴𝐴 = ℤ and let
𝑅𝑅 = 𝑎𝑎, 𝑏𝑏 ∈ 𝐴𝐴 × 𝐴𝐴 ∶ 𝑎𝑎 ≡ 𝑏𝑏 mod 2 .
Show that 𝑅𝑅 is an equivalence relation.
© S. Turaev, CSC 1700 Discrete Mathematics 29
Exercises : Relations
© S. Turaev, CSC 1700 Discrete Mathematics 30
Exercises : Relations
© S. Turaev, CSC 1700 Discrete Mathematics 31
Exercises : Relations
© S. Turaev, CSC 1700 Discrete Mathematics 32

More Related Content

What's hot

Linear transformations and matrices
Linear transformations and matricesLinear transformations and matrices
Linear transformations and matricesEasyStudy3
 
Modular arithmetic
Modular arithmeticModular arithmetic
Modular arithmeticsangeetha s
 
systems of linear equations & matrices
systems of linear equations & matricessystems of linear equations & matrices
systems of linear equations & matricesStudent
 
Pigeonhole principle
Pigeonhole principlePigeonhole principle
Pigeonhole principleNivegeetha
 
Mathematical Induction
Mathematical InductionMathematical Induction
Mathematical InductionEdelyn Cagas
 
Linear differential equation with constant coefficient
Linear differential equation with constant coefficientLinear differential equation with constant coefficient
Linear differential equation with constant coefficientSanjay Singh
 
Modular arithmetic
Modular arithmeticModular arithmetic
Modular arithmeticJanani S
 
2.9 Cartesian products
2.9 Cartesian products2.9 Cartesian products
2.9 Cartesian productsJan Plaza
 
Lattice lecture Final DM Updated2.ppt
Lattice lecture Final DM Updated2.pptLattice lecture Final DM Updated2.ppt
Lattice lecture Final DM Updated2.pptAkash588342
 
Higher Order Differential Equation
Higher Order Differential EquationHigher Order Differential Equation
Higher Order Differential EquationShrey Patel
 
Discrete Mathematics Lecture
Discrete Mathematics LectureDiscrete Mathematics Lecture
Discrete Mathematics LectureGenie Rose Santos
 
Discrete mathematics Ch1 sets Theory_Dr.Khaled.Bakro د. خالد بكرو
Discrete mathematics Ch1 sets Theory_Dr.Khaled.Bakro د. خالد بكروDiscrete mathematics Ch1 sets Theory_Dr.Khaled.Bakro د. خالد بكرو
Discrete mathematics Ch1 sets Theory_Dr.Khaled.Bakro د. خالد بكروDr. Khaled Bakro
 
Function and Its Types.
Function and Its Types.Function and Its Types.
Function and Its Types.Awais Bakshy
 
Divisibility
DivisibilityDivisibility
Divisibilitymstf mstf
 

What's hot (20)

Linear transformations and matrices
Linear transformations and matricesLinear transformations and matrices
Linear transformations and matrices
 
Modular arithmetic
Modular arithmeticModular arithmetic
Modular arithmetic
 
Trees
Trees Trees
Trees
 
systems of linear equations & matrices
systems of linear equations & matricessystems of linear equations & matrices
systems of linear equations & matrices
 
Pigeonhole principle
Pigeonhole principlePigeonhole principle
Pigeonhole principle
 
lattice
 lattice lattice
lattice
 
Mathematical Induction
Mathematical InductionMathematical Induction
Mathematical Induction
 
13 Boolean Algebra
13 Boolean Algebra13 Boolean Algebra
13 Boolean Algebra
 
Linear differential equation with constant coefficient
Linear differential equation with constant coefficientLinear differential equation with constant coefficient
Linear differential equation with constant coefficient
 
Modular arithmetic
Modular arithmeticModular arithmetic
Modular arithmetic
 
2.9 Cartesian products
2.9 Cartesian products2.9 Cartesian products
2.9 Cartesian products
 
Lattice lecture Final DM Updated2.ppt
Lattice lecture Final DM Updated2.pptLattice lecture Final DM Updated2.ppt
Lattice lecture Final DM Updated2.ppt
 
Higher Order Differential Equation
Higher Order Differential EquationHigher Order Differential Equation
Higher Order Differential Equation
 
Discrete Mathematics Lecture
Discrete Mathematics LectureDiscrete Mathematics Lecture
Discrete Mathematics Lecture
 
Discrete mathematics Ch1 sets Theory_Dr.Khaled.Bakro د. خالد بكرو
Discrete mathematics Ch1 sets Theory_Dr.Khaled.Bakro د. خالد بكروDiscrete mathematics Ch1 sets Theory_Dr.Khaled.Bakro د. خالد بكرو
Discrete mathematics Ch1 sets Theory_Dr.Khaled.Bakro د. خالد بكرو
 
Set Theory Presentation
Set Theory PresentationSet Theory Presentation
Set Theory Presentation
 
Function and Its Types.
Function and Its Types.Function and Its Types.
Function and Its Types.
 
Generating function
Generating functionGenerating function
Generating function
 
Differential calculus
Differential calculus  Differential calculus
Differential calculus
 
Divisibility
DivisibilityDivisibility
Divisibility
 

Similar to Relations digraphs

Logic (slides)
Logic (slides)Logic (slides)
Logic (slides)IIUM
 
Relations and Functions.pdf
Relations and Functions.pdfRelations and Functions.pdf
Relations and Functions.pdfGhanshyamGUPTA61
 
Module 1 (Part 1)-Sets and Number Systems.pdf
Module 1 (Part 1)-Sets and Number Systems.pdfModule 1 (Part 1)-Sets and Number Systems.pdf
Module 1 (Part 1)-Sets and Number Systems.pdfGaleJean
 
Section 9: Equivalence Relations & Cosets
Section 9: Equivalence Relations & CosetsSection 9: Equivalence Relations & Cosets
Section 9: Equivalence Relations & CosetsKevin Johnson
 
Generalised Statistical Convergence For Double Sequences
Generalised Statistical Convergence For Double SequencesGeneralised Statistical Convergence For Double Sequences
Generalised Statistical Convergence For Double SequencesIOSR Journals
 
Counting i (slides)
Counting i (slides)Counting i (slides)
Counting i (slides)IIUM
 
Trees (slides)
Trees (slides)Trees (slides)
Trees (slides)IIUM
 
Chapter 2 Mathematical Language and Symbols.pdf
Chapter 2 Mathematical Language and Symbols.pdfChapter 2 Mathematical Language and Symbols.pdf
Chapter 2 Mathematical Language and Symbols.pdfRaRaRamirez
 
MAT-314 Relations and Functions
MAT-314 Relations and FunctionsMAT-314 Relations and Functions
MAT-314 Relations and FunctionsKevin Johnson
 
Matrix Transformations on Some Difference Sequence Spaces
Matrix Transformations on Some Difference Sequence SpacesMatrix Transformations on Some Difference Sequence Spaces
Matrix Transformations on Some Difference Sequence SpacesIOSR Journals
 
A Probabilistic Algorithm for Computation of Polynomial Greatest Common with ...
A Probabilistic Algorithm for Computation of Polynomial Greatest Common with ...A Probabilistic Algorithm for Computation of Polynomial Greatest Common with ...
A Probabilistic Algorithm for Computation of Polynomial Greatest Common with ...mathsjournal
 
Lecture 1.2 quadratic functions
Lecture 1.2 quadratic functionsLecture 1.2 quadratic functions
Lecture 1.2 quadratic functionsnarayana dash
 
Lesson 7: Graphing Inequalities
Lesson 7: Graphing InequalitiesLesson 7: Graphing Inequalities
Lesson 7: Graphing InequalitiesKevin Johnson
 
Tutorial on EM algorithm – Part 1
Tutorial on EM algorithm – Part 1Tutorial on EM algorithm – Part 1
Tutorial on EM algorithm – Part 1Loc Nguyen
 
Matrix Transformations on Paranormed Sequence Spaces Related To De La Vallée-...
Matrix Transformations on Paranormed Sequence Spaces Related To De La Vallée-...Matrix Transformations on Paranormed Sequence Spaces Related To De La Vallée-...
Matrix Transformations on Paranormed Sequence Spaces Related To De La Vallée-...inventionjournals
 
2 borgs
2 borgs2 borgs
2 borgsYandex
 
sequence and series.docx
sequence and series.docxsequence and series.docx
sequence and series.docxGetachew Mulaw
 

Similar to Relations digraphs (20)

Logic (slides)
Logic (slides)Logic (slides)
Logic (slides)
 
Relations and Functions.pdf
Relations and Functions.pdfRelations and Functions.pdf
Relations and Functions.pdf
 
Module 1 (Part 1)-Sets and Number Systems.pdf
Module 1 (Part 1)-Sets and Number Systems.pdfModule 1 (Part 1)-Sets and Number Systems.pdf
Module 1 (Part 1)-Sets and Number Systems.pdf
 
Section 9: Equivalence Relations & Cosets
Section 9: Equivalence Relations & CosetsSection 9: Equivalence Relations & Cosets
Section 9: Equivalence Relations & Cosets
 
Generalised Statistical Convergence For Double Sequences
Generalised Statistical Convergence For Double SequencesGeneralised Statistical Convergence For Double Sequences
Generalised Statistical Convergence For Double Sequences
 
Counting i (slides)
Counting i (slides)Counting i (slides)
Counting i (slides)
 
Trees (slides)
Trees (slides)Trees (slides)
Trees (slides)
 
Chapter 2 Mathematical Language and Symbols.pdf
Chapter 2 Mathematical Language and Symbols.pdfChapter 2 Mathematical Language and Symbols.pdf
Chapter 2 Mathematical Language and Symbols.pdf
 
MAT-314 Relations and Functions
MAT-314 Relations and FunctionsMAT-314 Relations and Functions
MAT-314 Relations and Functions
 
Matrix Transformations on Some Difference Sequence Spaces
Matrix Transformations on Some Difference Sequence SpacesMatrix Transformations on Some Difference Sequence Spaces
Matrix Transformations on Some Difference Sequence Spaces
 
A Probabilistic Algorithm for Computation of Polynomial Greatest Common with ...
A Probabilistic Algorithm for Computation of Polynomial Greatest Common with ...A Probabilistic Algorithm for Computation of Polynomial Greatest Common with ...
A Probabilistic Algorithm for Computation of Polynomial Greatest Common with ...
 
Lecture 1.2 quadratic functions
Lecture 1.2 quadratic functionsLecture 1.2 quadratic functions
Lecture 1.2 quadratic functions
 
Regression.pptx
Regression.pptxRegression.pptx
Regression.pptx
 
Lesson 7: Graphing Inequalities
Lesson 7: Graphing InequalitiesLesson 7: Graphing Inequalities
Lesson 7: Graphing Inequalities
 
Tutorial on EM algorithm – Part 1
Tutorial on EM algorithm – Part 1Tutorial on EM algorithm – Part 1
Tutorial on EM algorithm – Part 1
 
Matrix Transformations on Paranormed Sequence Spaces Related To De La Vallée-...
Matrix Transformations on Paranormed Sequence Spaces Related To De La Vallée-...Matrix Transformations on Paranormed Sequence Spaces Related To De La Vallée-...
Matrix Transformations on Paranormed Sequence Spaces Related To De La Vallée-...
 
2 borgs
2 borgs2 borgs
2 borgs
 
SETS PPT-XI.pptx
SETS PPT-XI.pptxSETS PPT-XI.pptx
SETS PPT-XI.pptx
 
sequence and series.docx
sequence and series.docxsequence and series.docx
sequence and series.docx
 
lec14.ppt
lec14.pptlec14.ppt
lec14.ppt
 

More from IIUM

How to use_000webhost
How to use_000webhostHow to use_000webhost
How to use_000webhostIIUM
 
Chapter 2
Chapter 2Chapter 2
Chapter 2IIUM
 
Chapter 1
Chapter 1Chapter 1
Chapter 1IIUM
 
Kreydle internship-multimedia
Kreydle internship-multimediaKreydle internship-multimedia
Kreydle internship-multimediaIIUM
 
03phpbldgblock
03phpbldgblock03phpbldgblock
03phpbldgblockIIUM
 
Chap2 practice key
Chap2 practice keyChap2 practice key
Chap2 practice keyIIUM
 
Group p1
Group p1Group p1
Group p1IIUM
 
Tutorial import n auto pilot blogspot friendly seo
Tutorial import n auto pilot blogspot friendly seoTutorial import n auto pilot blogspot friendly seo
Tutorial import n auto pilot blogspot friendly seoIIUM
 
Visual sceneperception encycloperception-sage-oliva2009
Visual sceneperception encycloperception-sage-oliva2009Visual sceneperception encycloperception-sage-oliva2009
Visual sceneperception encycloperception-sage-oliva2009IIUM
 
03 the htm_lforms
03 the htm_lforms03 the htm_lforms
03 the htm_lformsIIUM
 
Exercise on algo analysis answer
Exercise on algo analysis   answerExercise on algo analysis   answer
Exercise on algo analysis answerIIUM
 
Redo midterm
Redo midtermRedo midterm
Redo midtermIIUM
 
Heaps
HeapsHeaps
HeapsIIUM
 
Report format
Report formatReport format
Report formatIIUM
 
Edpuzzle guidelines
Edpuzzle guidelinesEdpuzzle guidelines
Edpuzzle guidelinesIIUM
 
Final Exam Paper
Final Exam PaperFinal Exam Paper
Final Exam PaperIIUM
 
Final Exam Paper
Final Exam PaperFinal Exam Paper
Final Exam PaperIIUM
 
Group assignment 1 s21516
Group assignment 1 s21516Group assignment 1 s21516
Group assignment 1 s21516IIUM
 
Avl tree-rotations
Avl tree-rotationsAvl tree-rotations
Avl tree-rotationsIIUM
 
Week12 graph
Week12   graph Week12   graph
Week12 graph IIUM
 

More from IIUM (20)

How to use_000webhost
How to use_000webhostHow to use_000webhost
How to use_000webhost
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
Kreydle internship-multimedia
Kreydle internship-multimediaKreydle internship-multimedia
Kreydle internship-multimedia
 
03phpbldgblock
03phpbldgblock03phpbldgblock
03phpbldgblock
 
Chap2 practice key
Chap2 practice keyChap2 practice key
Chap2 practice key
 
Group p1
Group p1Group p1
Group p1
 
Tutorial import n auto pilot blogspot friendly seo
Tutorial import n auto pilot blogspot friendly seoTutorial import n auto pilot blogspot friendly seo
Tutorial import n auto pilot blogspot friendly seo
 
Visual sceneperception encycloperception-sage-oliva2009
Visual sceneperception encycloperception-sage-oliva2009Visual sceneperception encycloperception-sage-oliva2009
Visual sceneperception encycloperception-sage-oliva2009
 
03 the htm_lforms
03 the htm_lforms03 the htm_lforms
03 the htm_lforms
 
Exercise on algo analysis answer
Exercise on algo analysis   answerExercise on algo analysis   answer
Exercise on algo analysis answer
 
Redo midterm
Redo midtermRedo midterm
Redo midterm
 
Heaps
HeapsHeaps
Heaps
 
Report format
Report formatReport format
Report format
 
Edpuzzle guidelines
Edpuzzle guidelinesEdpuzzle guidelines
Edpuzzle guidelines
 
Final Exam Paper
Final Exam PaperFinal Exam Paper
Final Exam Paper
 
Final Exam Paper
Final Exam PaperFinal Exam Paper
Final Exam Paper
 
Group assignment 1 s21516
Group assignment 1 s21516Group assignment 1 s21516
Group assignment 1 s21516
 
Avl tree-rotations
Avl tree-rotationsAvl tree-rotations
Avl tree-rotations
 
Week12 graph
Week12   graph Week12   graph
Week12 graph
 

Recently uploaded

ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinojohnmickonozaleda
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 

Recently uploaded (20)

YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipino
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 

Relations digraphs

  • 2. Product Sets Definition: An ordered pair 𝑎𝑎, 𝑏𝑏 is a listing of the objects/items 𝑎𝑎 and 𝑏𝑏 in a prescribed order: 𝑎𝑎 is the first and 𝑏𝑏 is the second. (a sequence of length 2) Definition: The ordered pairs 𝑎𝑎1, 𝑏𝑏1 and 𝑎𝑎2, 𝑏𝑏2 are equal iff 𝑎𝑎1 = 𝑎𝑎2 and 𝑏𝑏1 = 𝑏𝑏2. Definition: If 𝐴𝐴 and 𝐵𝐵 are two nonempty sets, we define the product set or Cartesian product 𝐴𝐴 × 𝐵𝐵 as the set of all ordered pairs 𝑎𝑎, 𝑏𝑏 with 𝑎𝑎 ∈ 𝐴𝐴 and 𝑏𝑏 ∈ 𝐵𝐵: 𝐴𝐴 × 𝐵𝐵 = 𝑎𝑎, 𝑏𝑏 𝑎𝑎 ∈ 𝐴𝐴 and 𝑏𝑏 ∈ 𝐵𝐵} © S. Turaev, CSC 1700 Discrete Mathematics 2
  • 3. Product Sets Example: Let 𝐴𝐴 = 1,2,3 and 𝐵𝐵 = 𝑟𝑟, 𝑠𝑠 , then 𝐴𝐴 × 𝐵𝐵 = 𝐵𝐵 × 𝐴𝐴 = © S. Turaev, CSC 1700 Discrete Mathematics 3
  • 4. Product Sets Theorem: For any two finite sets 𝐴𝐴 and 𝐵𝐵, 𝐴𝐴 × 𝐵𝐵 = 𝐴𝐴 ⋅ 𝐵𝐵 . Proof: Use multiplication principle! © S. Turaev, CSC 1700 Discrete Mathematics 4
  • 5. Definitions:  Let 𝐴𝐴 and 𝐵𝐵 be nonempty sets. A relation 𝑅𝑅 from 𝐴𝐴 to 𝐵𝐵 is a subset of 𝐴𝐴 × 𝐵𝐵.  If 𝑅𝑅 ⊆ 𝐴𝐴 × 𝐵𝐵 and 𝑎𝑎, 𝑏𝑏 ∈ 𝑅𝑅, we say that 𝑎𝑎 is related to 𝑏𝑏 by 𝑅𝑅, and we write 𝑎𝑎 𝑅𝑅 𝑏𝑏.  If 𝑎𝑎 is not related to 𝑏𝑏 by 𝑅𝑅, we write 𝑎𝑎 𝑅𝑅 𝑏𝑏.  If 𝑅𝑅 ⊆ 𝐴𝐴 × 𝐴𝐴, we say 𝑅𝑅 is a relation on 𝐴𝐴. Relations & Digraphs © S. Turaev, CSC 1700 Discrete Mathematics 5
  • 6. Example 1: Let 𝐴𝐴 = 1,2,3 and 𝐵𝐵 = 𝑟𝑟, 𝑠𝑠 . Then 𝑅𝑅 = 1, 𝑟𝑟 , 2, 𝑠𝑠 , 3, 𝑟𝑟 ⊆ 𝐴𝐴 × 𝐵𝐵 is a relation from 𝐴𝐴 to 𝐵𝐵. Example 2: Let 𝐴𝐴 and 𝐵𝐵 are sets of positive integer numbers. We define the relation 𝑅𝑅 ⊆ 𝐴𝐴 × 𝐵𝐵 by 𝑎𝑎 𝑅𝑅 𝑏𝑏 ⇔ 𝑎𝑎 = 𝑏𝑏 Relations & Digraphs © S. Turaev, CSC 1700 Discrete Mathematics 6
  • 7. Example 3: Let 𝐴𝐴 = 1,2,3,4,5 . The relation 𝑅𝑅 ⊆ 𝐴𝐴 × 𝐴𝐴 is defined by 𝑎𝑎 𝑅𝑅 𝑏𝑏 ⇔ 𝑎𝑎 < 𝑏𝑏 Then 𝑅𝑅 = Example 4: Let 𝐴𝐴 = 1,2,3,4,5,6,7,8,9,10 . The relation 𝑅𝑅 ⊆ 𝐴𝐴 × 𝐴𝐴 is defined by 𝑎𝑎 𝑅𝑅 𝑏𝑏 ⇔ 𝑎𝑎|𝑏𝑏 Then 𝑅𝑅 = Relations & Digraphs © S. Turaev, CSC 1700 Discrete Mathematics 7
  • 8. Definition: Let 𝑅𝑅 ⊆ 𝐴𝐴 × 𝐵𝐵 be a relation from 𝐴𝐴 to 𝐵𝐵.  The domain of 𝑅𝑅, denoted by Dom 𝑅𝑅 , is the set of elements in 𝐴𝐴 that are related to some element in 𝐵𝐵.  The range of 𝑅𝑅, denoted by Ran 𝑅𝑅 , is the set of elements in 𝐵𝐵 that are second elements of pairs in 𝑅𝑅. Relations & Digraphs © S. Turaev, CSC 1700 Discrete Mathematics 8
  • 9. Relations & Digraphs Example 5: Let 𝐴𝐴 = 1,2,3 and 𝐵𝐵 = 𝑟𝑟, 𝑠𝑠 . 𝑅𝑅 = 1, 𝑟𝑟 , 2, 𝑠𝑠 , 3, 𝑟𝑟 Dom R = Ran R = Example 6: Let 𝐴𝐴 = 1,2,3,4,5 . The relation 𝑅𝑅 ⊆ 𝐴𝐴 × 𝐴𝐴 is defined by 𝑎𝑎 𝑅𝑅 𝑏𝑏 ⇔ 𝑎𝑎 < 𝑏𝑏 Dom R = Ran R = © S. Turaev, CSC 1700 Discrete Mathematics 9
  • 10. The Matrix of a Relation Definition: Let 𝐴𝐴 = 𝑎𝑎1, 𝑎𝑎2, … , 𝑎𝑎 𝑚𝑚 , 𝐵𝐵 = 𝑏𝑏1, 𝑏𝑏2, … , 𝑏𝑏𝑛𝑛 and 𝑅𝑅 ⊆ 𝐴𝐴 × 𝐵𝐵 be a relation. We represent 𝑅𝑅 by the 𝑚𝑚 × 𝑛𝑛 matrix 𝐌𝐌𝑅𝑅 = [𝑚𝑚𝑖𝑖𝑖𝑖], which is defined by 𝑚𝑚𝑖𝑖𝑖𝑖 = � 1, 𝑎𝑎𝑖𝑖, 𝑏𝑏𝑗𝑗 ∈ 𝑅𝑅 0, 𝑎𝑎𝑖𝑖, 𝑏𝑏𝑗𝑗 ∉ 𝑅𝑅 The matrix 𝐌𝐌𝑅𝑅 is called the matrix of 𝑅𝑅. Example: Let 𝐴𝐴 = 1,2,3 and 𝐵𝐵 = 𝑟𝑟, 𝑠𝑠 . 𝑅𝑅 = 1, 𝑟𝑟 , 2, 𝑠𝑠 , 3, 𝑟𝑟 𝐌𝐌𝑅𝑅 = © S. Turaev, CSC 1700 Discrete Mathematics 10
  • 11. The Digraph of a Relation Definition: If 𝐴𝐴 is finite and 𝑅𝑅 ⊆ 𝐴𝐴 × 𝐴𝐴 is a relation. We represent 𝑅𝑅 pictorially as follows:  Draw a small circle, called a vertex/node, for each element of 𝐴𝐴 and label the circle with the corresponding element of 𝐴𝐴.  Draw an arrow, called an edge, from vertex 𝑎𝑎𝑖𝑖 to vertex 𝑎𝑎𝑗𝑗 iff 𝑎𝑎𝑖𝑖 𝑅𝑅 𝑎𝑎𝑗𝑗. The resulting pictorial representation of 𝑅𝑅 is called a directed graph or digraph of 𝑅𝑅. © S. Turaev, CSC 1700 Discrete Mathematics 11
  • 12. The Digraph of a Relation Example: Let 𝐴𝐴 = 1, 2, 3, 4 and 𝑅𝑅 = 1,1 , 1,2 , 2,1 , 2,2 , 2,3 , 2,4 , 3,4 , 4,1 The digraph of 𝑅𝑅: Example: Let 𝐴𝐴 = 1, 2, 3, 4 and Find the relation 𝑅𝑅: © S. Turaev, CSC 1700 Discrete Mathematics 1 2 3 4 12
  • 13. The Digraph of a Relation Definition: If 𝑅𝑅 is a relation on a set 𝐴𝐴 and 𝑎𝑎 ∈ 𝐴𝐴, then  the in-degree of 𝑎𝑎 is the number of 𝑏𝑏 ∈ 𝐴𝐴 such that 𝑏𝑏, 𝑎𝑎 ∈ 𝑅𝑅;  the out-degree of 𝑎𝑎 is the number of 𝑏𝑏 ∈ 𝐴𝐴 such that 𝑎𝑎, 𝑏𝑏 ∈ 𝑅𝑅. Example: Consider the digraph: List in-degrees and out-degrees of all vertices. © S. Turaev, CSC 1700 Discrete Mathematics 1 2 3 4 13
  • 14. The Digraph of a Relation Example: Let 𝐴𝐴 = 𝑎𝑎, 𝑏𝑏, 𝑐𝑐, 𝑑𝑑 and let 𝑅𝑅 be the relation on 𝐴𝐴 that has the matrix 𝐌𝐌𝑅𝑅 = 1 0 0 1 0 0 0 0 1 1 0 1 1 0 0 1 Construct the digraph of 𝑅𝑅 and list in-degrees and out- degrees of all vertices. © S. Turaev, CSC 1700 Discrete Mathematics 14
  • 15. The Digraph of a Relation Example: Let 𝐴𝐴 = 1,4,5 and let 𝑅𝑅 be given the digraph Find 𝐌𝐌𝑅𝑅 and 𝑅𝑅. © S. Turaev, CSC 1700 Discrete Mathematics 1 4 5 15
  • 16. Paths in Relations & Digraphs Definition: Suppose that 𝑅𝑅 is a relation on a set 𝐴𝐴. A path of length 𝑛𝑛 in 𝑅𝑅 from 𝑎𝑎 to 𝑏𝑏 is a finite sequence 𝜋𝜋 ∶ 𝑎𝑎, 𝑥𝑥1, 𝑥𝑥2, … , 𝑥𝑥𝑛𝑛−1, 𝑏𝑏 beginning with 𝑎𝑎 and ending with 𝑏𝑏, such that 𝑎𝑎 𝑅𝑅 𝑥𝑥1, 𝑥𝑥1 𝑅𝑅 𝑥𝑥2, … , 𝑥𝑥𝑛𝑛−1 𝑅𝑅 𝑏𝑏. Definition: A path that begins and ends at the same vertex is called a cycle: 𝜋𝜋 ∶ 𝑎𝑎, 𝑥𝑥1, 𝑥𝑥2, … , 𝑥𝑥𝑛𝑛−1, 𝑎𝑎 © S. Turaev, CSC 1700 Discrete Mathematics 16
  • 17. Paths in Relations & Digraphs Example: Give the examples for paths of length 1,2,3,4 and 5. © S. Turaev, CSC 1700 Discrete Mathematics 1 2 43 5 17
  • 18. Paths in Relations & Digraphs Definition: If 𝑛𝑛 is a fixed number, we define a relation 𝑅𝑅 𝑛𝑛 as follows: 𝑥𝑥 𝑅𝑅𝑛𝑛 𝑦𝑦 means that there is a path of length 𝑛𝑛 from 𝑥𝑥 to 𝑦𝑦. Definition: We define a relation 𝑅𝑅∞ (connectivity relation for 𝑅𝑅) on 𝐴𝐴 by letting 𝑥𝑥 𝑅𝑅∞ 𝑦𝑦 mean that there is some path from 𝑥𝑥 to 𝑦𝑦. Example: Let 𝐴𝐴 = 𝑎𝑎, 𝑏𝑏, 𝑐𝑐, 𝑑𝑑, 𝑒𝑒 and 𝑅𝑅 = 𝑎𝑎, 𝑎𝑎 , 𝑎𝑎, 𝑏𝑏 , 𝑏𝑏, 𝑐𝑐 , 𝑐𝑐, 𝑒𝑒 , 𝑐𝑐, 𝑑𝑑 , 𝑑𝑑, 𝑒𝑒 . Compute (a) 𝑅𝑅2 ; (b) 𝑅𝑅3 ; (c) 𝑅𝑅∞ . © S. Turaev, CSC 1700 Discrete Mathematics 18
  • 19. Paths in Relations & Digraphs Let 𝑅𝑅 be a relation on a finite set 𝐴𝐴 = 𝑎𝑎1, 𝑎𝑎2, … , 𝑎𝑎𝑛𝑛 , and let 𝐌𝐌𝑅𝑅 be the 𝑛𝑛 × 𝑛𝑛 matrix representing 𝑅𝑅. Theorem 1: If 𝑅𝑅 is a relation on 𝐴𝐴 = 𝑎𝑎1, 𝑎𝑎2, … , 𝑎𝑎𝑛𝑛 , then 𝐌𝐌𝑅𝑅2 = 𝐌𝐌𝑅𝑅 ⊙ 𝐌𝐌𝑅𝑅. Example: Let 𝐴𝐴 = 𝑎𝑎, 𝑏𝑏, 𝑐𝑐, 𝑑𝑑, 𝑒𝑒 and 𝑅𝑅 = 𝑎𝑎, 𝑎𝑎 , 𝑎𝑎, 𝑏𝑏 , 𝑏𝑏, 𝑐𝑐 , 𝑐𝑐, 𝑒𝑒 , 𝑐𝑐, 𝑑𝑑 , 𝑑𝑑, 𝑒𝑒 . © S. Turaev, CSC 1700 Discrete Mathematics 19
  • 20. Paths in Relations & Digraphs Example: Let 𝐴𝐴 = 𝑎𝑎, 𝑏𝑏, 𝑐𝑐, 𝑑𝑑, 𝑒𝑒 and 𝑅𝑅 = 𝑎𝑎, 𝑎𝑎 , 𝑎𝑎, 𝑏𝑏 , 𝑏𝑏, 𝑐𝑐 , 𝑐𝑐, 𝑒𝑒 , 𝑐𝑐, 𝑑𝑑 , 𝑑𝑑, 𝑒𝑒 . 𝐌𝐌𝑅𝑅 = 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 0 Compute 𝐌𝐌𝑅𝑅2. © S. Turaev, CSC 1700 Discrete Mathematics 20
  • 21. Reflexive & Irreflexive Relations Definition:  A relation 𝑅𝑅 on a set 𝐴𝐴 is reflexive if 𝑎𝑎, 𝑎𝑎 ∈ 𝑅𝑅 for all 𝑎𝑎 ∈ 𝐴𝐴, i.e., if 𝑎𝑎 𝑅𝑅 𝑎𝑎 for all 𝑎𝑎 ∈ 𝐴𝐴.  A relation 𝑅𝑅 on a set 𝐴𝐴 is irreflexive if 𝑎𝑎 𝑅𝑅 𝑎𝑎 for all 𝑎𝑎 ∈ 𝐴𝐴. Example:  Δ = 𝑎𝑎, 𝑎𝑎 | 𝑎𝑎 ∈ 𝐴𝐴 , the relation of equality on the set 𝐴𝐴.  𝑅𝑅 = 𝑎𝑎, 𝑏𝑏 ∈ 𝐴𝐴 × 𝐴𝐴| 𝑎𝑎 ≠ 𝑏𝑏 , the relation of inequality on the set 𝐴𝐴. © S. Turaev, CSC 1700 Discrete Mathematics 21
  • 22. Reflexive & Irreflexive Relations Exercise: Let 𝐴𝐴 = 1, 2, 3 , and let 𝑅𝑅 = 1,1 , 1,2 . Is 𝑅𝑅 reflexive or irreflexive? Exercise: How is a reflexive or irreflexive relation identified by its matrix? Exercise: How is a reflexive or irreflexive relation characterized by the digraph? © S. Turaev, CSC 1700 Discrete Mathematics 22
  • 23. (A-, Anti-) Symmetric Relations Definition:  A relation 𝑅𝑅 on a set 𝐴𝐴 is symmetric if whenever 𝑎𝑎 𝑅𝑅 𝑏𝑏, then 𝑏𝑏 𝑅𝑅 𝑎𝑎.  A relation 𝑅𝑅 on a set 𝐴𝐴 is asymmetric if whenever 𝑎𝑎 𝑅𝑅 𝑏𝑏, then 𝑏𝑏 𝑅𝑅 𝑎𝑎.  A relation 𝑅𝑅 on a set 𝐴𝐴 is antisymmetric if whenever 𝑎𝑎 𝑅𝑅 𝑏𝑏 and 𝑏𝑏 𝑅𝑅 𝑎𝑎, then 𝑎𝑎 = 𝑏𝑏. © S. Turaev, CSC 1700 Discrete Mathematics 23
  • 24. (A-, Anti-) Symmetric Relations Example: Let 𝐴𝐴 = 1, 2, 3, 4, 5, 6 and let 𝑅𝑅 = 𝑎𝑎, 𝑏𝑏 ∈ 𝐴𝐴 × 𝐴𝐴 | 𝑎𝑎 < 𝑏𝑏 Is 𝑅𝑅 symmetric, asymmetric or antisymmetric?  Symmetry:  Asymmetry:  Antisymmetry: © S. Turaev, CSC 1700 Discrete Mathematics 24
  • 25. (A-, Anti-) Symmetric Relations Example: Let 𝐴𝐴 = 1, 2, 3, 4 and let 𝑅𝑅 = 1,2 , 2,2 , 3,4 , 4,1 Is 𝑅𝑅 symmetric, asymmetric or antisymmetric? Example: Let 𝐴𝐴 = ℤ+ and let 𝑅𝑅 = 𝑎𝑎, 𝑏𝑏 ∈ 𝐴𝐴 × 𝐴𝐴 | 𝑎𝑎 divides 𝑏𝑏 Is 𝑅𝑅 symmetric, asymmetric or antisymmetric? © S. Turaev, CSC 1700 Discrete Mathematics 25
  • 26. (A-, Anti-) Symmetric Relations Exercise: How is a symmetric, asymmetric or antisymmetric relation identified by its matrix? Exercise: How is a symmetric, asymmetric or antisymmetric relation characterized by the digraph? © S. Turaev, CSC 1700 Discrete Mathematics 26
  • 27. Transitive Relations Definition: A relation 𝑅𝑅 on a set 𝐴𝐴 is transitive if whenever 𝑎𝑎 𝑅𝑅 𝑏𝑏 and 𝑏𝑏 𝑅𝑅 𝑐𝑐 then 𝑎𝑎 𝑅𝑅 𝑐𝑐. Example: Let 𝐴𝐴 = 1, 2, 3, 4 and let 𝑅𝑅 = 1,2 , 1,3 , 4,2 Is 𝑅𝑅 transitive? Example: Let 𝐴𝐴 = ℤ+ and let 𝑅𝑅 = 𝑎𝑎, 𝑏𝑏 ∈ 𝐴𝐴 × 𝐴𝐴 | 𝑎𝑎 divides 𝑏𝑏 Is 𝑅𝑅 transitive? © S. Turaev, CSC 1700 Discrete Mathematics 27
  • 28. Transitive Relations Exercise: Let 𝐴𝐴 = 1,2,3 and 𝑅𝑅 be the relation on 𝐴𝐴 whose matrix is 𝐌𝐌𝑅𝑅 = 1 1 1 0 0 1 0 0 1 Show that 𝑅𝑅 is transitive. (Hint: Check if 𝐌𝐌𝑅𝑅 ⊙ 2 = 𝐌𝐌𝑅𝑅) Exercise: How is a transitive relation identified by its matrix? Exercise: How is a transitive relation characterized by the digraph? © S. Turaev, CSC 1700 Discrete Mathematics 28
  • 29. Equivalence Relations Definition: A relation 𝑅𝑅 on a set 𝐴𝐴 is called an equi- valence relation if it is reflexive, symmetric and transitive. Example: Let 𝐴𝐴 = 1, 2, 3, 4 and let 𝑅𝑅 = 1,1 , 1,2 , 2,1 , 2,2 , 3,4 , 4,3 , 3,3 , 4,4 . Then 𝑅𝑅 is an equivalence relation. Example: Let 𝐴𝐴 = ℤ and let 𝑅𝑅 = 𝑎𝑎, 𝑏𝑏 ∈ 𝐴𝐴 × 𝐴𝐴 ∶ 𝑎𝑎 ≡ 𝑏𝑏 mod 2 . Show that 𝑅𝑅 is an equivalence relation. © S. Turaev, CSC 1700 Discrete Mathematics 29
  • 30. Exercises : Relations © S. Turaev, CSC 1700 Discrete Mathematics 30
  • 31. Exercises : Relations © S. Turaev, CSC 1700 Discrete Mathematics 31
  • 32. Exercises : Relations © S. Turaev, CSC 1700 Discrete Mathematics 32