Relations and Digraphs
Relations and Digraphs
EXERCISE I I
relations
A {1, 2, 3, 4, 5) Band "a Rb, if and only if a b"
=
(a) =
3.
(a) Lot A {1,2,3, 4, 5) and
=
1 2 5
11 0
31 04
2 1 1 0
MA 3 0 1 10 1
4 0 0 11 0
50 0 0 1 1
1's in Ma and the
Also find the number of pairs in R and the number of
f i n dR an d its digraph.
ber
of arrow-heads in the digraph.
b, c, d, e) and
(b) Let A=a,
a b
a1 0 0
b0 0 1 0
MR C 1 0 0 1 0
d0 1 0 0
e0 11
its digraph.
Find A and
Ans.:(a) R= {(1, 1), (1, 3), (1, 5), (2, 1), (2, 2), (2,5)
(3, 2), (3, 3), (3, 5), (4, 3), (4,4), (5, 4), (5, 5))
The number pairs in R= the number of 1's in MA = the number of a
(b)R={(a, a). (a, d). (a, e), (b, o), (b, e), (¢, a), (c, d,
(d, b), (d, e). (e, b) (e, c)
4. From the igraph given below, find the relation R and its matrix Ma
(a) (b)
Ans. : (a) R= {(1,2), (1, 5), (2, 2), (2, 3), (3, 4), (4, 5). (5, 5))
3
1|0
1
21 o 0 1
2 0 1 1
1 0
Ma 3 0 0 0
4 0 0 00
50 0 o 0 1
EXERCISE III
1. Let A be a set with 12 distinct elements. Answer the following with justification
(a) How many different binary relations are there ?
(b) How many of them are reflexive ?
(c) How many of them are symmetric ?
(d) How many of them are reflexive and symmetric ? (M.U. 1996)
Ans.: (a) 2**, (b) 2 , (c) 28, (d) 28
2. Let A = {1, 2} write the power set P(A) of A. Write all relationsthat can be definedon A.A.
Find all reflexive relations, symmetric relations, reflexive and symmetric relations.
2ph
EXERCISE IV
1. Determine whether the relation A whose matrix Ma is given below is
is reflexive, syro
reflexive, symnetric
Justify your answer.
1 0 0 11 1 00 1 [1 1 0 1
0 1 1 O O1 1 O 1 0 0 0
(a)o 1 1 1 (b)o (c)
0 1
0 o 0 1 o
1 0 11 o 10 1 1 00 o
Ans. (a) Yes. MA is a square symmetric matrix with all diagonal elements unity. Refiav
and symmetric. (b) No. Mpis a square matrix with all diagonal elements unity but it is not symmeleive
Reflexive but not symmetric. (c) All diagonal elements are not unity. Not reflexive. But
But symmetric
symmetric
2, Determine whether the relation R whose digraph is given below is an equivalence relatin
n.
Justify your answer.
(a) (b)
) A=(a, b, c, d)}
R={(a, a), (a, b), (b, a), (b, b), (c, d), (c, c), (d, c). (d, d)) (M.U. 2006)
(i) A= {1,2, 3, 4, 5)
R={(1, 1), (1,2), (1, 3), (2, 1), (2, 2) (3, 1). (2, 3). (3, 3), (4, 4), (3, 2), (5, 5))
(i) A= {1,2, 3, 4)
R=(1. 1). (1,2), (2, 1). (2, 2). (3, 1). (3, 3). (1, 3), (4, 2). (4, 4)
CV) A=the set of all triangles, a Rbif and only if a is similar to b.
5. If
R=(1,2).(2, 3). (3,3), (3, 4), (4,3). (4, 5), (4, 1), (6, 4),
1, (i) all paths ot length 3 starting from the (1,6)). Find (i) all paths of lengu
vertex 2, (ii) a cycle starting at vertex 2.
(Ans.: (i)
(i)
1,2;1,6;2,3;3,3;3,
2,3, 4;4,3;4,5;4,1 ;6,4.
3,3;2,3, 3, 4;2,3, 4, 3; 2,3, 4, 5;2,3, 4, 1.
(ii) 2, 3, 4, 1,2.1
6. Let R be the relation whose digraph is given in adjoiningfigure.
()List all paths of length 3 starting from p.
(i) Find a cycle starting from s.
Ans. () p. r S, rp,r, s, qip, r,t, u
P, q, q, 9p. q, 9, up. q. u, s.
(ii) s, q u, ss, r s .
Co
c
S
- o oo,
1 23 4
0 11 0 1
1 0 1 1 0 0
(c) 01 1 1
O
30 1 0 0 (d)o 0 1
1 0 0 1 (b) None
4 1 1o 0 antisymmetric,
transitive.
not asymmetric,
reflexive, not symmetric,
AnS. (a) Reflexive, symmetric. irreflexive, symmetric,
asymmetric
(C) Irreflexive, symmetric (d) set A is reflexive,
relation Aon the
whether the
4. Determine
Where A
4).
=
{1, 2, 3,
antisymmetric transitive.
(b)
(e)
-
not reflexive,
not irreflexive, notsymmetric, not
asymmetric,
transitive. (b)
[Ans.: (a) irreflexive, transitive. ]
antisymmetric, not
asymmetric, not which is
a relation
2, 3). Give an example of transitive. (ii) Reflexive,
5. Let A {1,
=
symmetric but not
Reflexive, Reflexive but neither
and transitive. (ii)
(i) Reflexive, symmetric (iv) Symmetric, transitive but not reflexive. (v) Transitive but neither
symmetric. reflexive. (vii)
transitive but not neither transitive nor
(vi) Symmetric but Symmetric but not
transitive. nor transitive. (ix)
symmetric nor reflexive, nor symmetric,
reflexive nor symmetric.
(vii) Neither (xi) Neither symmetric
nor antisymmetric.
and anti-symmetric.
ant-symmetric. (x) Symmetric
transitive but not antisymmetric.
(xll) Symmetric, 3), (3, 2))
(2, 2), (3, 3), (1, 2), (2, 1), (1, 3), (3, 1). (2,
[Ans.: ) A={(1, 1),
(3, 3))
(i) A= {(1, 1), (2, 2).
(3, 3), (1, 2))
(ii) R={(1, 1), (2, 2),
(1,2). (2, 1))
(iv) A={(1, 1). (2, 2).
3). (1, 3), (3, 2))
() A={(1, 1), (2, 2). (3,
3). (3, 2))
(vi) R= {(1, 2), (2, 1). (2,
2). (1, 3). (3, 2))
(vii) A= {(1, 1), (1, 2), (2,
(vii) R= {(1, 2). (3, 1)) (ix) A= {(1, 2), (2, 1)}
(x) A {(1, 1), (2, 2)) (xi) A= {(1, 1). (1, 3), (3, 2), (2, 3)}
(xi) R= {(1, 2), (2, 1). (1, 1))
the relations to convince yourself.)] |
are advised to draw digraphs and also write matrices of
(You
relation giving proper justification.
6. Determine the nature of the following of
on the set of lines in Euclidean plane. (ii) The relation
(9 The relation of perpendicularity of positive
relation "is greater than" on the set
division on the set of positive integers. (ii) The
are positive integers. (v)
The relation of "being
integers. (iv) The relation x+ y= 16 where x and y
disjoint "on the power set of A having at least three elements.
transitive not antisymmetric.
[Ans.: (0 Symmetric if a l bthen bi a; but not reflexive, not
b;
(i) Reflexive, 3 divides 3; antisymmetric, if a divides b and b divides a then
a =
R={(1, 1), (1,2). (2,2), (3, 1)) R {(a, 1). (a, 2). (b, 1), (c, 1). (c, 2))
S= {(1, 2), (2, 2), (2, 3), (3, 2)) S {(a, 1),. (a, 3), (b, 2), (c, 1), (c, 3))
D i s c r e t e Waunt Helations ana 1graphs
()
N
o o o o
o
o
O o o
o o o o
EXERCISE VII
th
. Findte reflexive closure of each of the
following relations defined on A ={(a, b, c).
( (a, b)) (i) ((b, a), (c, b))
(ii) ((a, a), (a, b)}
(iv) {(a, b), (a, c), (b, c)} (){(a, b),. (b,
b), (b, c), (c, a))
Ans.: (i) {(a, b), (a, a), (b, b), (c, c (ii) {(a, a), (b, b). (c, c), (b, a), (c, b)}.
(ii) (a, a), (a, b), (b, b), (c, c)}, (iv) ((a, b), (a, c), (b, c), (a, a), (b, b), (c, c)},
(v)((a, b), (b, b), (b, c), (c, a), (a, a), (c, c)}]
Find the symmetric closures of the relations defined on A {a, =
b, c) and as given above in
Ex. 1.
Ans. () {a, b), (b, a)), (ii) {(b, a),. (a, b), (b, c), (c, b)}.
(ii) ((a, a),. (a, b), (b, a). (iv) {(a, b),. (b, a), (a, c), (c, a), (b, c), (c, b)}.
() {(a, b), (b, a), (b, b), (b, o). (c, b), (c, a), (a, c)}1
EXERCISE VIIIL
1. Find the transitive closure of each
of the following relations defined on A =fp. a.
(a) {(p, q). (9. p)) (b) (p. q). (q, n. (t. (c){(g. P). (g. n, (r, q)
(d) ((p. P). (P. ). (g, . (t, P} (e){(P. 9). (9. P). (q. )
Ans.: (a) {(p, q), (q, p). (p. p). (q. g)}
(b) {(p. q). (9, ). (p, d. (. p). (P. P). (4. P). (, 9)}
(c) ((a. P). (q. . (t, o). (a. o). (. ). (, P))
(d) {(P. p), (p, ). (q, d. (G, p), (P. P). (9. p). (r, r)}
(e) {(p. p). (p, 9), (p, ), (g. P). (g. 9). (g. }]
2. The following the matrices of the relations defined
are on a set A {a, b, c). Find th
transitive closures of these relations and their matrices.
o 1 1 o 1 0 1 0 1
(a)0 0 1 (b)0 11 (c)0 0 1
1 01 1
[Ans.: (a) A ={(a, b), (a, c), (b, c)
o 1 1
MR, =0 0 1
(a, a). (a, b), (a, c). (b, a),. (b,
(b) Ra
=
a), (a, b), (a, o), (6, a), (c, b), (c, c), (d, b), (d,
d}.
RE {(a.
c), (d, d)
E Ro {(a, a), (b, b), (6, o), (c, b), (c, d), (d, b), (d, d)}
.ns.:
Ans. (0 ((a, a), (a, b), (a, c), (a, d), (b, a), (b, b), (b, c), (b, o),
(c, a),
(c, b), (c, c), (c, d), (d, a), (d, b),
(d, c), (d. d)
(i)(a, a), (b, b). (b, d). (c, b), (c, d), (d, b). (d, d)}]
Find the transitive closure of the relations A and R2 defined on A
{1, 2,3, 4).
0 A=(1,2), (2, 2), (2, 4), (3, 2), (3, 4), (4, 1), (4, 3))
6)Ra= (1, 3), (1, 4), (3, 2). (3, 3), (3, 4))
[Ans.: 0) AxA, (i) {(1,2), (1,3), (1,4), (3, 2). (3, 3), (3,
4))1
6. Find the transitive closure of the following relation defined on A
generalise the result?
{1,2, 3, 4, 5, 6). Can you
=
R=(1,2). 2, 3). (3, 4). (4, 5), (5, 6), (6, 1))
ns. :
AxA; Yes. If R {(1,2). (2, 3),(n-1, n), (n, 1),
=
9.
ind the transitive closure of R= ((a, a). (a, d). (b, b), (c, d), (c, e), (d, a), (0, b), (o,
(e, ,e))
o)}
Ans.: (a, a). (a, d). (b, b), (c, a), (c, b), (c, d), (c, e). (d, a). (d, b), (d(d, e)|
e)
T0. Find the transitive closure of R= ((a, b). (a, o), (c, b), (E, d), (0, , (e, c)}
Ans. : {(a, b), (a, c). (a, d). (a, e). (b, b). (b, c). (b, d). (b, e). (c, b), (C, C),
(e, d), (e, e))
e), (d, b), (d, c). (d, d). (d, e), (0, b), (0, C), .
0 0 1 0 1
1 1 0 0
MA 1
0 1 1 0 0
0 0 1 0 1
closure of A
(M.U. 2007)
Find the symmetric
(0, c), (0, o)]
(a, d). (a, e). (b, c), (b, e). (c, a), (c, b). (¢, c), (d, b), (d, o),
[ Ans. : R=
{(a, a).
e). (e, a). (b, c). (c, b), (b, e), (e, b), {c, a), (a, c), (c, c), (d, b).
(a, a), (a. d). (d. a). (a,
(b, d), (d c), (c, d). (e, o), (c, o), (0, e))
Aand S be relations on A
defined by
12. Let A =
{1, 2, 3, 4) and
0 0 0 1 [1 1 0 0
0 1 0 0
o 0 and 0 0
Ma o 1 0 0 Mslo o 1
O
o01 0 0 10 0
closure of Au S. (M.U. 2007)
Use Warshall's algorithm to compute the transitive
[1 10 1
0 1 0 0
Hint: MAUs 0 1 1 0
0 1 1 1
[1 0 0 1 0
10 0 0
List
3.
Ans.23 2 3 123 132
[A 1), (2), 13]). {{1}. (2,3]). {1, 2).
ic (3)). {1,3), (2))1
ba
A bethe relation on the set of real
4. Let
numbers such that a Rbif and
integer. Prove that R is an equivalence
relation only if a -b is an
a relation on the set (a, b, c, d} that is (M.U. 2007)
5. Def
lfX={1,2, 3), R= {(1, 2), (2, 1). (1, 1)} is atransitive relation.
(M.U. 2002)
Ans.: No. (2, 1) E A, (1,2) E
Rbut (2, 2) R]
8. State true or false with proper justification.
symmetric.
(M.U. 2002)
Ans.: No:|B-A|=(-1)"|A- B|=|A|-|B|#| B|-| A|]
9. Give examplesof relations R and R2 defined on A {1, 2, 3, 4) such that
=
R, Ra and
RuR are equivalent relations. (M.U. 2002)
Ans.: A = {(1, 1). (2, 2), (3, 3), (4, 4), (1, 2), (2, 1).
Re = {(1, 1), (2, 2), (3, 3), (4, 4), (1, 3), (3, 1)} 1
10. Let R be a symmetric and transitive relation on a set. Suppose for every a in A there exists
bin Asuch that (a, b) is in R. Show that R is an equivalence relation.
(M.U. 1995)
11. Let A= {a, b, c, d} and let R {(a, b), (a, c), (a, a), (b, d)}. Find the reflexive closure and
symmetric closure of R.
[ Ans. : Reflexive Closure R1 = {(a, a), (b, b), (c, c), (d, d), (a, b), (a, c), (b, d)}
Symmetric Closure A2 = {(a, b), (a, o), (b, d), (b, a), (c, a), (d, b)}]
12. Let Rbe a reflexive relation on a set A = {a, b, c}. Show that Ris an equivalence relation
and only if (a, b) and (a, c) in Rimplies that (b, c) in R.
(M.U. 2002)
13. How many relations can be defined on a set of 2 elements ? (See Ex. 3, page 3-19)
(M.U. 2002)
14. Givetwo distinct partitions of S = {a, b, c). (M.U. 2002) [ Ans.: {{a}, (b), {o}}. {a, b, c}]
15. Let S = (a, b, c). Write down two parttions of S and the corresponding equivalence relations.
(M.U. 2002)
Ans.: (i) As above
(i) ffa), {b}, {c}. {(a, a), (b, b), (c, c), (a, b), (a, c), (b, a), (b, c), (c, a), (c, b)}]|
DIgapha
16. Let Tbe the set of trianglos in a plano and Abe the relation R= {(a, b)l
b, a, bE T). Show that A is an equivalont relation èis conartom.
nt to
(M.L 1996)
17. Let Sbe the set of all points in a plane. Lot Abo a relation such that if a and bare Anu
points on tho plane then "a b i f and only if distance between b and a is less than k u n e t w o
Examine whether R is an equivalence relation.
Ans. : Ris not
trmsitive
18. Let S = {1, 2, 3) x (1, 2, 3, 4) and let a relation b e defined on S as follows:
(x. y)R ( . v) il and only if | x- yl = | u- v[ for (x, y), (u, v) e S.
Show that Ris an equivalence relation. (M.U. 1A7)
19. State how many elements are there in a power set A, and how many relation Can t
defined on A.
IAns. If A has n elements then the power set of A has 2" elements and the number
Of
be defined on A is 2n
relationsthat can
(a, b, c, d)
20. Let S
=
Give examples of relations H and H2 on S such that Rs and A2 are equivalence relations
is not an equivalence
relation. (M.U. 2002, 03)
R c)}
Ans. R =
{(a, a), (b, b), (a, b), (b, a), (C, c), (d, d), (c, d), (d,
(d, b)}
Ap {(a, a), (c, c), (a, c), (C, a), (b, b), (d, d), (b, d),
(c, d), (d, c),
AuRz =
((a, a), (b, b), (C, ©), (d, d), (a, b), (b, a),
(b, d), (d, b), (a, c ). (C, a))
R2 {(a, b), (b, a). (a, c), (c, a). (b, c), (c, b)} ]
23. Show that if a relation on a set A is transitive and irreflexive then it is asymmetric
(M.U. 1997, 2014)
24. Let S =
{a, b,
and P= c, d} {(a, b), (d), (c, e)).
Show that Pis a partition on S.
Find the equivalence classes [ a]. [ c], [ d] (M.U. 1998)
Ans.: [ a] = {a, b}. [d] ={d}. [c] ={c, e}1
25. Let S =
{a, b, c, d, e) and P =
((a), (b, c). (d, e))
(i) Show that P is a partition onS
(ii) Express the equivalence relation Ron
Scorresponding to Pas a set of ordered
pairs
(ii) Find the equivalence classes [ a]. [
b). [ e]. (M.U. 1998)
[Ans.: R =((a, a). (b, b), (c, c), (b, c), (c, b),
(d, d). (o, e). (d, o). (e,
[al aTb] ={b, c).
=
d)}
o
ation on all
relation e {d, e) =
26. Let
be a
A
R is
integers Z and x R yif and
Examine
whether an
equivalence relation ? only if 2x
2x+ 3y is divisible
by 5.
et A
be the relation defined on Zby x (M.U. 2004) [Ans. : Yes
27.
relation and lescribe the Ryif |x- yl is divisible by 4, show that Ris an
equivalence rela
equivalence classes.
9uvale 8,-4,0,4, 8, ...).. (M.U. 2004)
Ans.:
7,-3,1,5,9,.)
6,-2,2, 6, 10, .).-9,-5,-1,3,7,..)]
28. Let RbeRbe the relation defined on Z xR
relation and find the by yif |x- yl is divisible
equivalence rela
equivalence classes. by 6. Show that R is an
ns.: E(0)
Ans.
=
16,
l et Sbe the set of prime numbers less E(5)
{,-7,-1,5,11, 17, =
R (1,4). (1, 9). (2, 2), (2, 8), (3, 3). (4, 1). (4, 4), (4, 9). (5, 5).
(6,6),(7,7). (8, 2), (9, 1),. (9, 9), (10, 10)}
E(1) {1,4, 9) E(2) = (2,8): E) 13): E(5) ={5}
E(6) = {6}
E7) {7) E(9)= (9}: E(10)={10}1
33. Describe the equivalence relation corresponding to the following partition of Z.
-8, 4, 0, 4, 8,.} u -7,-3, 1,5, . u
6,-2,2,6,. u{.5,-1,3,7, (M.U. 2004, 05)
Ans.: R= {(a, b) | (a- b) is divisible by4, a, bE Z}1
4. Given a set S = {1, 2, 3, 4, 5), find the equivalence relation on S which generates the
Paruion ((1, 2), (M.U. 1997)
(3), (4, 5)). Draw the graph of the relation.
ana
Digraph
Ans.: R={(1, 1). (1, 2), (2, 2), (2, 1), (3, 3). (4, 5), (4, 4), (5, 5), (5, 4))}
1, 2
C 3
4, 5
induced by A on A.
relation. Also find the partition
12 3 4 5 6
11 0 0 01 0
2 0 1 1 0 0 1|
1 0 0 1 4
3 0 1 CCO
[Ans. 4o o o 1 0
0
5 1 0 0 0 1 0
60 1 1 o o 1
closure of a relation.
39. Define reflexive closure, symmetric closure and transitive
A where A is defined
on set A =
{1, 2, 3, 4
Find thereflexive closure, symmetric closure of (M.U. 1996)
and R {(1, 1), (1,2), (1, 4), (2, 4), (3, 1), (3, 2), (4, 2), (4, 3). (4, 4))
Ans.:() RuA ={(1, 1), (2, 2), (3, 3), (4, 4), (1, 2),
(1,4), (2, 4), (3, 1), (3, 2), (4, 2). (4, 3))
(ii) AuR' = {(1, 1), (1, 2), (2, 1), (1, 4), (4, 1), (2, 4), (4, 2), (3, 1),
(1, 3). (3, 2), (2, 3), (4, 3). (3, 4), (4,
4))
D i s c r e l
and =
A11.2.3,
{1,2, 3, 4) {(1, 1), (1,2), (1, 4),
(2, 4), (3, 1), (3, 2), (4, 2), (4, 3), (4, 4)).
40.IfA
=
1 10
o o o
A=(1,2, 3, 4) and F={(1,2), (2, 2), (2, 4), (3, 2), (3, 4),. (4, 1), (4, 3)),find the transitive
closure of A. (M.U. 2000)
1 1 1 11
Ans.: W4 = 1 1 1 1
1 11 1
1 1 11
13 Let A = {1,2,3, 4, 5} and let Rand S be the equivalence relations on A whose matrices are
iven below. Compute the matrix of the smallest equivalence relation containing A and S.
asgiven b
[1 1 10 [1 0 0 0 0 1 1 1 1 1
11 1 0 0 1 1 1 o 1 1 1 1 1
M=0 0 1 1 1.Ms= 0 1 1 10
Ans.:W =| 1 1 1 1 1
0 0 1 1 1 o111 1 0 1 1 1 1 1
o 0 1 1 1 0 0 0 0 1 11 1 1 1]