DM 13 RelationsAndTheirProperties
DM 13 RelationsAndTheirProperties
• Example: The relation R = {(1, 1), (1, 2), (2, 1), (2, 2), (3, 3)} on
the set {1, 2, 3}, is reflexive.
Determining whether a Relation is Reflexive
20
Symmetric & Antisymmetric Relation: Example
Example 10 : Consider the following relations on {1, 2, 3, 4}:
R1 = {(1,1), (1,2), (2,1), (2,2), (3,4), (4,1), (4,4)}
R2 = {(1,1), (1,2), (2,1)}
R3 = {(1,1), (1,2), (1,4), (2,1), (2,2), (3,3), (4,1), (4,4)}
R4 = {(2,1), (3,1), (3,2), (4,1), (4,2), (4,3)}
R5 = {(1,1), (1,2), (1,3), (1,4), (2,2), (2,3), (2,4), (3,3), (3,4), (4,4)}
R6 = {(3,4)}
R7={(1,1), (3,3), (4,4)}
Which of the relations are symmetric and which are antisymmetric?
Solution:
The relations R2 and R3 are symmetric.
The relations R4 , R5 , and R6 are antisymmetric.
Question: What about R1? Neither symmetric nor antisymmetric
Transitive Relation
• Is the relation R = { (a, a), (b, c), (c, b), (d, d)}
on the set X = {a, b, c, d} is transitive?
• Solution:
No.
Because (b, c) and (c, b) are in R, but (b, b) is not in R
Combining Relations
• Because relations from A to B are subsets of A X B,
two relations from A to B can be combined in any
way two sets can be combined.
R1 ∩ R2 ={(1,1)}
R1 − R2 ={(2,2),(3,3)}
R2 − R1 ={(1,2),(1,3),(1,4)}
Composite of Relations
• Let R be a relation from A to B and S a relation from B to a set
C. The composite of R and S is the relation consisting of
ordered pairs (a, c), where a A, c C, and for which there
exists an element b B such that (a,b) R and (b, c) S.
• We denote the composite of R and S by S ∘ R
• Online tutorial
https://www.tutorialspoint.com/discrete_mathematics/discrete_mathematics_rela
tions.htm
• University of Pittsburgh
https://people.cs.pitt.edu/~milos/courses/cs441/lectures/Class21b.pdf