L20 21 Relations
L20 21 Relations
(Discrete Mathematics)
Lecture # 20-21
Lecture Outline
• Relations
– What is a Relation?
– Binary Relation
– Representation of Relation
– Relation Properties
– Combining Relations
– Composition of Relation with itself
6
Binary Relation
A {1, 2, 3, 4}
R1 {(a, b) a divides b}
R1 {(1,1),(1, 2),(1,3),(1, 4),(2, 2),(2, 4),(3,3),(4, 4)}
1 1 1 1
0 1 0 1
MR1=
0 0 1 0
0 0 0 1
Describing Binary Relations-Matrix
A {1, 2, 3, 4}
𝑅1 ={(𝑎 , 𝑏)|𝑎+𝑏=4 }
𝑅1 ={(1 , 3) ,(2 , 2) ,( 3 ,1) }
Describing Binary Relations-Directed Graph
R3
1 1
2 2
3 3
4 4
2
A:
1 3
4
Properties of Relations
Note: from now on we will consider only binary
relations on A. i.e. such relations are subsets of .
Properties of Relations
Reflexive
Symmetric
Anti-symmetric
Transitive
Properties of Relations-Reflexive
𝑎 ,𝑏 ∈ 𝐴 ,( 𝑎 , 𝑏) ∈ 𝑅 →(𝑏 , 𝑎 )∈ 𝑅
* 0 1 1
If, every value and the value in
0 * 0 0
its transposed position, is same
then the relation is symmetric.
If MR=MRt
1 0 * 1
then Symmetric 1 0 1 *
Else
Not Symmetric
Properties of Relations - Anti-Symmetricity
Anti-Symmetricity
Case 1 True True True
Case 2 True False False
Case 3 False True
R1 = {(1,1),(2,2),(3,3)}
anti-symmetric + symmetric
If Transitive
Case 1 True True True
Case 2 True False False
Case 3 False True
Properties of Relations -Transitivity
Let R1={(1,1),(1,2), (1,3),(1,4), (2,2),(2,4), (3,3),(4,4)}
Transitive
Non-Zero Non-Zero True
Non-Zero Zero True
Zero Non-Zero False
Summary of properties of relations
reflexive a (a, a) R
irreflexive a (a, a) R
• R= {(1, 1), (1, 2), (2, 1), (2, 2), (3, 3), (4, 4)}
R is Reflexive, Symmetric and transitive therefore equivalence
relation.
• R= Ø (empty relation defined on A)
R is not reflexive therefore not an equivalence relation. But R is
symmetric and Transitive.
• R= AxA
R has all the possible ordered pairs therefore it is reflexive,
symmetric and transitive, therefore it is an equivalence relation.
Example
• Which of these relations on {0, 1, 2, 3} are equivalence
relations? Determine the properties of an equivalence
relation that the others lack
• { (0,0), (1,1), (2,2), (3,3) }
– Has all the properties, thus, is an equivalence relation
• { (0,0), (0,2), (2,0), (2,2), (2,3), (3,2), (3,3) }
– Not reflexive: (1,1) is missing
– Not transitive: (0,2) and (2,3) are in the relation, but not (0,3)
• { (0,0), (1,1), (1,2), (2,1), (2,2), (3,3) }
– Has all the properties, thus, is an equivalence relation
• { (0,0), (0,1) (0,2), (1,0), (1,1), (1,2), (2,0), (2,2), (3,3) }
– Not symmetric: (1,2) is present, but not (2,1)
– Not transitive: (2,0) and (0,1) are in the relation, but not (2,1)
Combining Relations
• Let
• The relations
•
•
Combining Relations
• Let
• = AxB -
Combining Relations
1. Find .
A {1, 2, 3, 4}
𝑅1 ={(𝑎 , 𝑏)|𝑎+𝑏=4 }
𝑅 2={(𝑎 , 𝑏)|𝑎> 𝑏 }
• Describe R1 and R2 as list of pairs, Matrix and
directed graph.
• Describe their properties(reflexive, irreflexive,
symmetric, anti-symmetric, transitive)
Chapter Reading and Exercise
Chapter # 9
Topic # 9.1
Q-1,2,3,10,11-14, 18-21,30,32
Topic # 9.3
Q-1-8,13-c,14,23-28