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

Interesting applications of graph theory
Interesting applications of graph theoryInteresting applications of graph theory
Interesting applications of graph theory
Tech_MX
 
Linear transformations and matrices
Linear transformations and matricesLinear transformations and matrices
Linear transformations and matrices
EasyStudy3
 

What's hot (20)

Relation in Discrete Mathematics
Relation in Discrete Mathematics Relation in Discrete Mathematics
Relation in Discrete Mathematics
 
Double Integrals
Double IntegralsDouble Integrals
Double Integrals
 
Poset in Relations(Discrete Mathematics)
Poset in Relations(Discrete Mathematics)Poset in Relations(Discrete Mathematics)
Poset in Relations(Discrete Mathematics)
 
Introduction to Graph Theory
Introduction to Graph TheoryIntroduction to Graph Theory
Introduction to Graph Theory
 
Linear algebra-Basis & Dimension
Linear algebra-Basis & DimensionLinear algebra-Basis & Dimension
Linear algebra-Basis & Dimension
 
Relations in Discrete Math
Relations in Discrete MathRelations in Discrete Math
Relations in Discrete Math
 
Number theory
Number theoryNumber theory
Number theory
 
Complex Number's Applications
Complex Number's ApplicationsComplex Number's Applications
Complex Number's Applications
 
application of differential equations
application of differential equationsapplication of differential equations
application of differential equations
 
Discrete mathematics
Discrete mathematicsDiscrete mathematics
Discrete mathematics
 
Applications of differential equations
Applications of differential equationsApplications of differential equations
Applications of differential equations
 
Relations and functions
Relations and functions Relations and functions
Relations and functions
 
Interesting applications of graph theory
Interesting applications of graph theoryInteresting applications of graph theory
Interesting applications of graph theory
 
Graph Theory: Trees
Graph Theory: TreesGraph Theory: Trees
Graph Theory: Trees
 
Relations and Its Applications
Relations and Its ApplicationsRelations and Its Applications
Relations and Its Applications
 
Linear transformation.ppt
Linear transformation.pptLinear transformation.ppt
Linear transformation.ppt
 
Recurrence relation
Recurrence relationRecurrence relation
Recurrence relation
 
Isomorphic graph
Isomorphic graphIsomorphic graph
Isomorphic graph
 
Linear transformations and matrices
Linear transformations and matricesLinear transformations and matrices
Linear transformations and matrices
 
Discrete Math Lecture 01: Propositional Logic
Discrete Math Lecture 01: Propositional LogicDiscrete Math Lecture 01: Propositional Logic
Discrete Math Lecture 01: Propositional Logic
 

Similar to Relations digraphs

Integers and matrices (slides)
Integers and matrices (slides)Integers and matrices (slides)
Integers and matrices (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.pdf
RaRaRamirez
 

Similar to Relations digraphs (20)

Integers and matrices (slides)
Integers and matrices (slides)Integers and matrices (slides)
Integers and matrices (slides)
 
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
 
P2-Chp3-SequencesAndSeries from pure maths 2.pptx
P2-Chp3-SequencesAndSeries from pure maths 2.pptxP2-Chp3-SequencesAndSeries from pure maths 2.pptx
P2-Chp3-SequencesAndSeries from pure maths 2.pptx
 
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
 

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

The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 

Recently uploaded (20)

This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptx
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 

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