Tutorial8 Relation
Tutorial8 Relation
TUTORIAL8: RELATIONS 1. Change the matrices on set A below into set and diagraph. Then read the in-degree and out-degree.
1 1 0 1
a) A = {1, 2, 3, 4} and MR =
0 1 1 0 0 0 1 1 1 0 0 0
1 1 0 0 0 0 0 1 1 0 b) A = {a, b, c, d, e} and MR = 0 0 0 1 1 0 1 1 0 0 1 0 0 0 0
a 1 4 d
c (b)
b) Change diagraph (b) into matrix. c) Draw the digraph of R2 for (a). d) Find MR2 for (b). 3. Consider relations on set A = {1, 2, 3, 4}. Determine either the relation is reflexive, irreflexive, symmetric, asymmetric, antisymmetric and/or transitive?
R1 = {(1, 1), (1, 2), (2, 1), (2, 2), (3, 4), (4, 1), (4, 4)} R2 = {(1, 1), (1, 2), (2, 1)}
NMS 2006/07
Tutorial Relations
Discrete Structures
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)} 4. From the diagraphs below, determine either the relation is reflexive, irreflexive, symmetric, asymmetric, antisymmetric and/or transitive?
3 (a) 3 4 (b)
5. From the matrices below, determine either the relation is reflexive, irreflexive, symmetric, asymmetric, antisymmetric and/or transitive?.
0 1 0 1 1 1 0 0 1 0 1 1 0 1 0 0 1 1 0 0 1 1 0 0 0 0 1 0 0 0 0 1
a)
b)
a) MR =
b) MR =
a)
b)
NMS 2006/07
Tutorial Relations
Discrete Structures
NMS 2006/07
Tutorial Relations
Discrete Structures
i) ii) iii)
R = {(1, 1), (1, 2), (2, 3), (3, 1)}; S = {(1, 2), (2, 1), (3, 1), (3, 2), (3, 3)}. R = {(1, 1), (2, 1), (3, 2), (3, 3)}; S = {(1, 1), (1, 2), (2, 1), (2, 2)} A = B = {1, 2, 3, 4}
1 1 0 1 0 1 1 0 0 0 0 1 1 1 1 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 0
MR =
MS =
iv) 1 R 3 v) A = B = {a, b, c, d, e} 2 S 3 1 2
b a R e d c a S e
b c d
9. Let A = {1, 2, 3, 4}. R is given by matrices R and S below. Find the transitive closure by using Warshall Algorithm.
1 0 1 1 1 1 0 0 1 1 0 0 0 0 1 0 1 0 0 1 1 0 0 1 0 0 0 0 0 1 1 0
a)
MR =
b)
MR =
NMS 2006/07
Tutorial Relations