Prerequisite : Introduction to Relations
, Representation of Relations
Combining Relations :
As we know that relations are just sets of ordered pairs, so all set operations apply to them as well. Two relations can be combined in several ways such as –
- Union – consists of all ordered pairs from both relations. Duplicate ordered pairs removed from Union.
- Intersection – consists of ordered pairs which are in both relations.
- Difference – consists of all ordered pairs only in , but not in .
- Symmetric Difference – consists of all ordered pairs which are either in or but not both.
There is another way two relations can be combined that is analogous to the composition of functions.
be a relation from
be a relation from
, then the composite of
, denoted by
, is the relation consisting of ordered pairs
and for which there exists an element
- Example – What is the composite of the relations and where is a relation from to with and is a relation from to with ?
Solution – By computing all ordered pairs where the first element belongs to and the second element belongs to , we get –
Composition of Relation on itself :
A relation can be composed with itself to obtain a degree of separation between the elements of the set on which
Let be a relation on the set .
The powers where are defined recursively by -
be a relation on set A, represented by a di-graph. There is a path of length
is a positive integer, from
if and only if
Important Note :
is transitive if and only if
Closure of Relations :
Consider a relation
may or may not have a property
, such as reflexivity, symmetry, or transitivity.
If there is a relation
is the subset
of every relation with property
is called the closure of
with respect to
We can obtain closures of relations with respect to property
in the following ways –
- Reflexive Closure – is the diagonal relation on set . The reflexive closure of relation on set is .
- Symmetric Closure – Let be a relation on set , and let be the inverse of . The symmetric closure of relation on set is .
- Transitive Closure – Let be a relation on set . The connectivity relation is defined as – . The transitive closure of is .
be a relation on set
. Find the reflexive, symmetric, and transitive closure of R.
For the given set,
. So the reflexive closure of
For the symmetric closure we need the inverse of
, which is
The symmetric closure of
For the transitive closure, we need to find
we need to find
. We stop when this condition is achieved since finding higher powers of
would be the same.
we stop the process.
Equivalence Relations :
be a relation on set
is reflexive, symmetric, and transitive then it is said to be a equivalence relation.
Consequently, two elements
related by an equivalence relation are said to be equivalent.
Show that the relation
is an equivalence relation.
is the congruence modulo
function. It is true if and only if
To show that the relation is an equivalence relation we must prove that the relation is reflexive, symmetric and transitive.
- Reflexive – For any element , is divisible by .
. So, congruence modulo is reflexive.
- Symmetric – For any two elements and , if or i.e. is divisible by , then is also divisible by .
. So Congruence Modulo is symmetric.
- Transitive – For any three elements , , and if then-
Adding both equations,
Since the relation is reflexive, symmetric, and transitive, we conclude that is an equivalence relation.
. So, is transitive.
Equivalence Classes :
Let be an equivalence relation on set .
We know that if then and are said to be equivalent with respect to .
The set of all elements that are related to an element of is called the
equivalence class of . It is denoted by or simply if there is only one
relation to consider.
Any element is said to be the representative of .
Important Note : All the equivalence classes of a Relation on set are either equal or disjoint and their union gives the set .
The equivalence classes are also called partitions since they are disjoint and their union gives the set on which the relation is defined
- Example : What are the equivalence classes of the relation Congruence Modulo ?
- Solution : Let and be two numbers such that . This means that the remainder obtained by dividing and with is the same.
Possible values for the remainder-
Therefore, there are equivalence classes –
GATE CS Corner Questions
Practicing the following questions will help you test your knowledge. All questions have been asked in GATE in previous years or in GATE Mock Tests. It is highly recommended that you practice them.
1. GATE CS 2013, Question 1
2. GATE CS 2005, Question 42
3. GATE CS 2001, Question 2
4. GATE CS 2000, Question 28
Composition of Relations – Wikipedia
Discrete Mathematics and its Applications, by Kenneth H Rosen
Share your thoughts in the comments
Please Login to comment...