Professional Documents
Culture Documents
Relations
Determine whether each of the following relations are reflexive, symmetric and
transitive:
(i) Relation R in the set A = {1, 2, 3…13, 14} defined as
R = {(x, y): 3x − y = 0}
(ii) Relation R in the set N of natural numbers defined
as R = {(x, y): y = x + 5 and x < 4}
(iii) Relation R in the set A = {1, 2, 3, 4, 5, 6} as
R = {(x, y): y is divisible by x}
(iv) Relation R in the set Z of all integers defined as
R = {(x, y): x − y is as integer}
Solution
R = {(x, y): 3x − y = 0}
(ii) R = {(x, y): y = x + 5 and x < 4} = {(1, 6), (2, 7), (3, 8)}
It is clear that (1, 1) ∉ R.
∴ R is not reflexive.
(1, 6) ∈ R But, (1, 6) ∉ R.
∴ R is not symmetric.
Now, since there is no pair in R such that (x, y) and (y, z) ∈ R, then (x, z) cannot
belong to R.
∴ R is not transitive.
Hence, R is neither reflexive, nor symmetric, nor transitive.
CS 100 T
First semester of the academic year 1442 H
(iii) A = {1, 2, 3, 4, 5, 6}
∴ R is transitive.
∴ R is
symmetr
ic. Now,
Let (x, y) and (y, z) ∈ R, where x, y, z ∈ Z.
⇒ (x − y) and (y − z) are integers.
⇒ x − z = (x − y) + (y − z) is an integer.
∴ (x, z) ∈ R
∴ R is transitive.
Hence, R is reflexive, symmetric, and transitive.
Question#2:
Solution
(2, 3) ∈ R
But, (1, 3) ∉ R
∴ R is not transitive
Hence, R is neither reflexive, nor symmetric, nor transitive.
Question#3:
R = {(a, b): a ≤ b}
⇒ (a, c) ∈ R
∴ R is transitive.
Hence R is reflexive and transitive but not symmetric.
CS 100 T
First semester of the academic year 1442 H
Question#4:
a. R1 ∪ R2
b. R1 ∩ R2
c. R1 − R2
d. R2 − R1
Solution
a. R1 ∪ R2 = {(1, 1), (2, 2), (3, 3),(1, 2), (1, 3), (1, 4)}.
b. R1 ∩ R2 = {(1, 1)}
Question#5:
R ={(1,1),(1,2),(2,4),(3,2),(4,3)}
S ={(1,0),(2,4),(3,1),(3,2),(4,1)}
Solution
S ◦ R = {(1,0),(1,4),(2,1),(3,4),(4,1),(4,2)}
Question#6:
Solution
CS 100 T
First semester of the academic year 1442 H
The non zero entries in the matrix MR x MS tells the elements related in
RoS. So,
R o S = {(2, 2), (2, 3), (2, 4), (3, 2), (3, 3), (4, 2), (4, 5), (5, 2), (5, 3), (5, 4
), (5, 5)}.
1. R o R = {(2, 2), (3, 2), (3, 3), (3, 4), (4, 2), (4, 5), (5, 2), (5, 3), (5, 5)}
S o R = {(2, 4) , (2, 5), (3, 3), (3, 4), (3, 5), (4, 2), (4, 4), (4, 5), (5, 2), (5,
3), (5, 4), (5, 5)}.
CS 100 T
First semester of the academic year 1442 H
Question#7:
increasing order).
Solution
111
000
000
010
110
001
111
011
001
CS 100 T
First semester of the academic year 1442 H
Question#8:
Solution:
a.
b.
c.
CS 100 T
First semester of the academic year 1442 H
Question#9:
a.
b.
Solution:
a. Not reflexive because every vertex does not have a self loop.
Not transitive because the path for (b, c), (c, b) from b to b is missing the
edge(b, b).
b. Not reflexive because every vertex does not have a self loop.
Not transitive because we do not have (a, d) for the edges (a, c) and (c, d).
Question#10:
Let R be the relation on the set {0, 1, 2, 3} containing the ordered pairs
b) symmetric closure of R
Solution:
a) reflexive closure of R
b) symmetric closure of R
Question#11:
(d) {(0, 0),(1, 1),(2, 2),(0, 1),(0, 2),(1, 0),(1, 2),(2, 0),(2, 1)}
Solution:
Question#12:
Solution
Question#13:
P={{1},{3},{2,4,5,6}}
of A={1,2,3,4,5,6}
(a) Write the equivalence classes for this equivalence relation. (b) Write
the equivalence relation as a set of ordered pairs.
Solution :
(b) From the two 1-element equivalence classes {1}{1} and {3}{3}, we
find two ordered pairs (1,1)(1,1) and (3,3)(3,3) that belong to RR. From
the equivalence class {2,4,5,6}{2,4,5,6}, any pair of elements produce an
ordered pair that belongs to R. Therefore,
R={(1,1),(3,3),(2,2),(2,4),(2,5),(2,6),(4,2),(4,4),(4,5),(4,6),(5,2),(5,4),(5,5)
,(5,6),(6,2),(6,4),(6,5),(6,6)}