Discrete Structure & Theory of Logic Unit 1
G L Bajaj Group of Intitutions, Mathura | Compiled By: Nandini Sharma Page 1
Mathematical Definition of Inverse Relation:
Suppose R is a relation of the form {(x, y): x ∈ A and y ∈ B} such that the inverse relation of R
is denoted by R-1
and R-1
= {(y, x): y ∈ B and x ∈ A}. If R is from A to B, then R-1
is from B to
A. In other words, if (x, y) ∈ R, then (y, x) ∈ R-1
and vice versa. Also, we know that relation in
sets is a subset of the Cartesian product of sets, i.e. R is a subset of A x B, and R-1
is a subset of
B x A.
Composition of Relations
Let A, B, and C be sets, and let R be a relation from A to B and let S be a relation from B to C.
That is, R is a subset of A × B and S is a subset of B × C. Then R and S give rise to a relation
from A to C indicated by R◦S and defined by:
1. a (R◦S)c if for some b ∈ B we have aRb and bSc.
2. is,
3. R ◦ S = {(a, c)| there exists b ∈ B for which (a, b) ∈ R and (b, c) ∈ S}
The relation R◦S is known the composition of R and S; it is sometimes denoted simply by RS.
Let R is a relation on a set A, that is, R is a relation from a set A to itself. Then R◦R, the
composition of R with itself, is always represented. Also, R◦R is sometimes denoted by R2
.
Similarly, R3
= R2
◦R = R◦R◦R, and so on. Thus Rn
is defined for all positive n.
Example1: Let X = {4, 5, 6}, Y = {a, b, c} and Z = {l, m, n}. Consider the relation R1 from X to
Y and R2 from Y to Z.
R1 = {(4, a), (4, b), (5, c), (6, a), (6, c)}
R2 = {(a, l), (a, n), (b, l), (b, m), (c, l), (c, m), (c, n)}
Find the composition of relation (i) R1 o R2 (ii) R1o R1
-1
Solution:
(i) The composition relation R1 o R2 as shown in fig:
Discrete Structure & Theory of Logic Unit 1
G L Bajaj Group of Intitutions, Mathura | Compiled By: Nandini Sharma Page 2
R1 o R2 = {(4, l), (4, n), (4, m), (5, l), (5, m), (5, n), (6, l), (6, m), (6, n)}
(ii) The composition relation R1o R1
-1
as shown in fig:
R1o R1
-1 = {(4, 4), (5, 5), (5, 6), (6, 4), (6, 5), (4, 6), (6, 6)}
Composition of Relations and Matrices
There is another way of finding R◦S. Let MR and MS denote respectively the matrix
representations of the relations R and S. Then
Example
1. Let P = {2, 3, 4, 5}. Consider the relation R and S on P defined by
2. R = {(2, 2), (2, 3), (2, 4), (2, 5), (3, 4), (3, 5), (4, 5), (5, 3)}
3. S = {(2, 3), (2, 5), (3, 4), (3, 5), (4, 2), (4, 3), (4, 5), (5, 2), (5, 5)}.
Discrete Structure & Theory of Logic Unit 1
G L Bajaj Group of Intitutions, Mathura | Compiled By: Nandini Sharma Page 3
4.
5. Find the matrices of the above relations.
6. Use matrices to find the following composition of the relation R and S.
7. (i)RoS (ii)RoR (iii)SoR
Solution: The matrices of the relation R and S are a shown in fig:
(i) To obtain the composition of relation R and S. First multiply MR with MS to obtain the matrix
MR x MS as shown in fig:
The non zero entries in the matrix MR x MS tells the elements related in RoS. So,
Hence the composition R o S of the relation R and S is
1. 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)}.
(ii) First, multiply the matrix MR by itself, as shown in fig
Discrete Structure & Theory of Logic Unit 1
G L Bajaj Group of Intitutions, Mathura | Compiled By: Nandini Sharma Page 4
Hence the composition R o R of the relation R and S is
1. R o R = {(2, 2), (3, 2), (3, 3), (3, 4), (4, 2), (4, 5), (5, 2), (5, 3), (5, 5)}
(iii) Multiply the matrix MS with MR to obtain the matrix MS x MR as shown in fig:
The non-zero entries in matrix MS x MR tells the elements related in S o R.
Hence the composition S o R of the relation S and R is
1. 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)}.
Partial Order Relations
A relation R on a set A is called a partial order relation if it satisfies the following three
properties:
1. Relation R is Reflexive, i.e. aRa ∀ a∈A.
2. Relation R is Antisymmetric, i.e., aRb and bRa ⟹ a = b.
3. Relation R is transitive, i.e., aRb and bRc ⟹ aRc.
Discrete Structure & Theory of Logic Unit 1
G L Bajaj Group of Intitutions, Mathura | Compiled By: Nandini Sharma Page 5
Example1: Show whether the relation (x, y) ∈ R, if, x ≥ y defined on the set of +ve integers is a
partial order relation.
Solution: Consider the set A = {1, 2, 3, 4} containing four +ve integers. Find the relation for this
set such as R = {(2, 1), (3, 1), (3, 2), (4, 1), (4, 2), (4, 3), (1, 1), (2, 2), (3, 3), (4, 4)}.
Reflexive: The relation is reflexive as for every a ∈ A. (a, a) ∈ R, i.e. (1, 1), (2, 2), (3, 3), (4, 4) ∈
R.
Antisymmetric: The relation is antisymmetric as whenever (a, b) and (b, a) ∈ R, we have a = b.
Transitive: The relation is transitive as whenever (a, b) and (b, c) ∈ R, we have (a, c) ∈ R.
Example: (4, 2) ∈ R and (2, 1) ∈ R, implies (4, 1) ∈ R.
As the relation is reflexive, antisymmetric and transitive. Hence, it is a partial order relation.
Example2: Show that the relation 'Divides' defined on N is a partial order relation.
Solution:
Reflexive: We have a divides a, ∀ a∈N. Therefore, relation 'Divides' is reflexive.
Antisymmetric: Let a, b, c ∈N, such that a divides b. It implies b divides a iff a = b. So, the
relation is antisymmetric.
Transitive: Let a, b, c ∈N, such that a divides b and b divides c.
Then a divides c. Hence the relation is transitive. Thus, the relation being reflexive,
antisymmetric and transitive, the relation 'divides' is a partial order relation.
Example3: (a) The relation ⊆ of a set of inclusion is a partial ordering or any collection of sets
since set inclusion has three desired properties:
1. A ⊆ A for any set A.
2. If A ⊆ B and B ⊆ A then B = A.
3. If A ⊆ B and B ⊆ C then A ⊆ C
(b) The relation ≤ on the set R of real no that is Reflexive, Antisymmetric and transitive.
(c) Relation ≤ is a Partial Order Relation

Relation in Discrete Mathematics

  • 1.
    Discrete Structure &Theory of Logic Unit 1 G L Bajaj Group of Intitutions, Mathura | Compiled By: Nandini Sharma Page 1 Mathematical Definition of Inverse Relation: Suppose R is a relation of the form {(x, y): x ∈ A and y ∈ B} such that the inverse relation of R is denoted by R-1 and R-1 = {(y, x): y ∈ B and x ∈ A}. If R is from A to B, then R-1 is from B to A. In other words, if (x, y) ∈ R, then (y, x) ∈ R-1 and vice versa. Also, we know that relation in sets is a subset of the Cartesian product of sets, i.e. R is a subset of A x B, and R-1 is a subset of B x A. Composition of Relations Let A, B, and C be sets, and let R be a relation from A to B and let S be a relation from B to C. That is, R is a subset of A × B and S is a subset of B × C. Then R and S give rise to a relation from A to C indicated by R◦S and defined by: 1. a (R◦S)c if for some b ∈ B we have aRb and bSc. 2. is, 3. R ◦ S = {(a, c)| there exists b ∈ B for which (a, b) ∈ R and (b, c) ∈ S} The relation R◦S is known the composition of R and S; it is sometimes denoted simply by RS. Let R is a relation on a set A, that is, R is a relation from a set A to itself. Then R◦R, the composition of R with itself, is always represented. Also, R◦R is sometimes denoted by R2 . Similarly, R3 = R2 ◦R = R◦R◦R, and so on. Thus Rn is defined for all positive n. Example1: Let X = {4, 5, 6}, Y = {a, b, c} and Z = {l, m, n}. Consider the relation R1 from X to Y and R2 from Y to Z. R1 = {(4, a), (4, b), (5, c), (6, a), (6, c)} R2 = {(a, l), (a, n), (b, l), (b, m), (c, l), (c, m), (c, n)} Find the composition of relation (i) R1 o R2 (ii) R1o R1 -1 Solution: (i) The composition relation R1 o R2 as shown in fig:
  • 2.
    Discrete Structure &Theory of Logic Unit 1 G L Bajaj Group of Intitutions, Mathura | Compiled By: Nandini Sharma Page 2 R1 o R2 = {(4, l), (4, n), (4, m), (5, l), (5, m), (5, n), (6, l), (6, m), (6, n)} (ii) The composition relation R1o R1 -1 as shown in fig: R1o R1 -1 = {(4, 4), (5, 5), (5, 6), (6, 4), (6, 5), (4, 6), (6, 6)} Composition of Relations and Matrices There is another way of finding R◦S. Let MR and MS denote respectively the matrix representations of the relations R and S. Then Example 1. Let P = {2, 3, 4, 5}. Consider the relation R and S on P defined by 2. R = {(2, 2), (2, 3), (2, 4), (2, 5), (3, 4), (3, 5), (4, 5), (5, 3)} 3. S = {(2, 3), (2, 5), (3, 4), (3, 5), (4, 2), (4, 3), (4, 5), (5, 2), (5, 5)}.
  • 3.
    Discrete Structure &Theory of Logic Unit 1 G L Bajaj Group of Intitutions, Mathura | Compiled By: Nandini Sharma Page 3 4. 5. Find the matrices of the above relations. 6. Use matrices to find the following composition of the relation R and S. 7. (i)RoS (ii)RoR (iii)SoR Solution: The matrices of the relation R and S are a shown in fig: (i) To obtain the composition of relation R and S. First multiply MR with MS to obtain the matrix MR x MS as shown in fig: The non zero entries in the matrix MR x MS tells the elements related in RoS. So, Hence the composition R o S of the relation R and S is 1. 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)}. (ii) First, multiply the matrix MR by itself, as shown in fig
  • 4.
    Discrete Structure &Theory of Logic Unit 1 G L Bajaj Group of Intitutions, Mathura | Compiled By: Nandini Sharma Page 4 Hence the composition R o R of the relation R and S is 1. R o R = {(2, 2), (3, 2), (3, 3), (3, 4), (4, 2), (4, 5), (5, 2), (5, 3), (5, 5)} (iii) Multiply the matrix MS with MR to obtain the matrix MS x MR as shown in fig: The non-zero entries in matrix MS x MR tells the elements related in S o R. Hence the composition S o R of the relation S and R is 1. 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)}. Partial Order Relations A relation R on a set A is called a partial order relation if it satisfies the following three properties: 1. Relation R is Reflexive, i.e. aRa ∀ a∈A. 2. Relation R is Antisymmetric, i.e., aRb and bRa ⟹ a = b. 3. Relation R is transitive, i.e., aRb and bRc ⟹ aRc.
  • 5.
    Discrete Structure &Theory of Logic Unit 1 G L Bajaj Group of Intitutions, Mathura | Compiled By: Nandini Sharma Page 5 Example1: Show whether the relation (x, y) ∈ R, if, x ≥ y defined on the set of +ve integers is a partial order relation. Solution: Consider the set A = {1, 2, 3, 4} containing four +ve integers. Find the relation for this set such as R = {(2, 1), (3, 1), (3, 2), (4, 1), (4, 2), (4, 3), (1, 1), (2, 2), (3, 3), (4, 4)}. Reflexive: The relation is reflexive as for every a ∈ A. (a, a) ∈ R, i.e. (1, 1), (2, 2), (3, 3), (4, 4) ∈ R. Antisymmetric: The relation is antisymmetric as whenever (a, b) and (b, a) ∈ R, we have a = b. Transitive: The relation is transitive as whenever (a, b) and (b, c) ∈ R, we have (a, c) ∈ R. Example: (4, 2) ∈ R and (2, 1) ∈ R, implies (4, 1) ∈ R. As the relation is reflexive, antisymmetric and transitive. Hence, it is a partial order relation. Example2: Show that the relation 'Divides' defined on N is a partial order relation. Solution: Reflexive: We have a divides a, ∀ a∈N. Therefore, relation 'Divides' is reflexive. Antisymmetric: Let a, b, c ∈N, such that a divides b. It implies b divides a iff a = b. So, the relation is antisymmetric. Transitive: Let a, b, c ∈N, such that a divides b and b divides c. Then a divides c. Hence the relation is transitive. Thus, the relation being reflexive, antisymmetric and transitive, the relation 'divides' is a partial order relation. Example3: (a) The relation ⊆ of a set of inclusion is a partial ordering or any collection of sets since set inclusion has three desired properties: 1. A ⊆ A for any set A. 2. If A ⊆ B and B ⊆ A then B = A. 3. If A ⊆ B and B ⊆ C then A ⊆ C (b) The relation ≤ on the set R of real no that is Reflexive, Antisymmetric and transitive. (c) Relation ≤ is a Partial Order Relation