BITS Pilani
Pilani Campus
MATH F213
Relations and Digraphs
BITS Pilani
Pilani Campus
Equivalence Relations
Purpose of equivalence
relations
• Abstraction : Abstractions of objects can be achieved by
ignoring some minor details. Thus even when the objects are
not equal, we may call them equivalent when after ignoring
some details they are non-distinguishable.
• Classification of objects : We may want to divide collection of
objects into classes (or partition the collection of objects into
disjoint parts.) This process is equivalent to defining an
equivalence relation on the collection of objects.
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Partitions and equivalence relation
Definition : Let 𝐴 be a set. A partition of 𝐴 is a collection 𝑃 of
pairwise disjoint subsets of 𝐴 whose union is 𝐴. In other words we
have the following :
1) If 𝐵 ∈ 𝑃, 𝑡ℎ𝑒𝑛 ∅ ≠ 𝐵 ⊆ 𝐴. 2) For 𝐵, 𝐶 ∈ 𝑃, 𝐵 = 𝐶 𝑜𝑟 𝐵 ∩ 𝐶 = ∅.
3) ∀𝑥 ∈ 𝐴, ∃ 𝐵 ∈ 𝑃 such that 𝑥 ∈ 𝐵.
Recall that an equivalence relation on 𝐴 is a (binary) relation on
𝐴 which is reflexive, symmetric and transitive.
To relate it to a partition of 𝐴, we make the following
Definition : Let 𝑅 be an equivalence relation on a set 𝐴. For any
𝑥 ∈ 𝐴, the equivalence class of 𝑥 in 𝐴 (with respect to 𝑅) is
defined by 𝑥 = 𝑦 ∈ 𝐴 ∶ 𝑥𝑅𝑦 .
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
𝐓𝐡𝐞𝐨𝐫𝐞𝐦 ∶ For an equivalence relation on A, the collection
𝑃 = { 𝑥 : 𝑥 ∈ 𝐴} of subsets of 𝐴 is a partition of 𝐴. Conversely if 𝑃 is any
partition of 𝐴 then there is an equivalence relation on A whose
equivalence classes give the partition 𝑃.
Proof : Clearly 𝑥 = {𝑦 ∈ 𝐴 ∶ 𝑥𝑅𝑦} ⊆ 𝐴 for all 𝑥 ∈ 𝑃. Suppose
𝑥 , [𝑦] ∈ 𝑃 be such that 𝑥 ∩ 𝑦 ≠ ∅. To show : 𝑥 = 𝑦 .
Let 𝑤 ∈ [𝑦] be any element.
There is 𝑧 ∈ 𝐴 such that z ∈ 𝑥 ∩ 𝑦 . Since z ∈ 𝑥 , 𝑥𝑅𝑧.
As z ∈ 𝑦 , 𝑦𝑅𝑧. Since 𝑅 is symmetric, 𝑧𝑅𝑦. As 𝑥𝑅𝑧 and 𝑦𝑅𝑧, by
transitivity of 𝑅, 𝑥𝑅𝑦. Since 𝑦𝑅𝑤, again by transitivity, 𝑥𝑅𝑤.
Thus 𝑤 ∈ 𝑥 . This shows that 𝑦 ⊆ 𝑥 .
Reverting the roles of 𝑥, 𝑦, we also get 𝑥 ⊆ [𝑦]. This proves 𝑥 =
𝑦.
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Finally to prove for any 𝑥 ∈ 𝐴, 𝑥 ∈ 𝐵 for some 𝐵 ∈ 𝑃.
This follows by taking 𝐵 = 𝑥 ; as by reflexivity of 𝑅 𝑥𝑅𝑥, hence
𝑥∈ 𝑥.
So far, we have seen that an equivalence relation on 𝐴 gives rise
to a partition of 𝐴.
The reverse of this is also possible, and thus we get a one-to-one
correspondence between the equivalence relations on 𝐴 and
partitions of 𝐴.
Let 𝑃 be a partition of 𝐴. We want to show that 𝑃 is obtained from
some equivalence relation 𝑅 of 𝐴.
Define, for 𝑥, 𝑦 ∈ 𝐴, 𝑥𝑅𝑦 if and only if ∃ 𝐵 ∈ 𝑃 such that 𝑥, 𝑦 ∈ 𝐵.
Show that 𝑅 is an equivalence relation on 𝐴 and its equivalence
classes are exactly all elements of 𝑃.
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Ex. (p. 351)
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Solution : 𝑎 𝐴 =The set of all people, 𝑅 is a relation on 𝐴 defined
by 𝑥𝑅𝑦 if and only if 𝑥, 𝑦 are members of the same party (out of the
two) or members of none of them.
(b) 𝐴 = the set of all integers. 𝑅 is a relation on 𝐴 defined by
𝑥𝑅𝑦 if and only if 𝑥𝑦 > 0 or 𝑥𝑦 = min{𝑥, 𝑦} = 0.
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
(c) (Assuming 𝑖 is an integer) 𝐴 =the set of all integers.
𝑥 𝑦
For 𝑥, 𝑦 ∈ 𝐴, 𝑥𝑅𝑦 if and only if = .
2 2
(d) 𝐴 = the set of all integers.
For 𝑥, 𝑦 ∈ 𝐴, 𝑥𝑅𝑦 if and only if 𝑥 − 𝑦 is even.
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Ex. (P. 351)
Reflexivity :
Let 𝐺 = (𝑉, 𝐸) be a digraph. To show 𝐺 𝑅 𝐺, note that the identity
map 𝑖: 𝑉 → 𝑉 defined by 𝑖 𝑣 = 𝑣 is an isomorphism of 𝐺 with
itself.
For symmetry, suppose 𝐺1 𝑅𝐺2 for digraphs 𝐺𝑖 = 𝑉𝑖 , 𝐸𝑖 , 𝑖 = 1,2.
Hence there is an isomorphism 𝑓: 𝑉1 → 𝑉2 . Since 𝑓 is one-one
and onto, it has an inverse 𝑓 −1 : 𝑉2 → 𝑉1 .
For transitivity of 𝑅, show that if 𝑓: 𝐺1 → 𝐺2 and 𝑔: 𝐺2 → 𝐺3 are
isomorphisms of digraphs then so is 𝑔𝑓: 𝐺1 → 𝐺3 .
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Ex. p. 352
Solution : Assume 𝑅 is reflexive and circular. To show 𝑅 is
symmetric and transitive.
Let 𝑎𝑅𝑏. Since 𝑅 is reflexive, 𝑏𝑅𝑏. Since 𝑅 is circular, taking 𝑐 = 𝑏
in its definition, we get 𝑏𝑅𝑎.
To show transitivity of 𝑅, let 𝑎𝑅𝑏 and 𝑏𝑅𝑐. By circularity of 𝑅, 𝑐𝑅𝑎.
But 𝑅 is already shown to be symmetric. Hence 𝑎𝑅𝑐, thus R is
transitive.
Conversely, assume 𝑅 is an equivalence relation. To show 𝑅 is
circular.
Let 𝑎, 𝑏 , 𝑏, 𝑐 ∈ 𝑅. As 𝑅 is transitive, 𝑎, 𝑐 ∈ 𝑅. Since R is
symmetric, 𝑐, 𝑎 ∈ 𝑅. Hence 𝑅 is circular.
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Ex. (p. 352)
Solution : Assume 𝑅 is an equivalence relation. To show :
𝑎, 𝑏 , 𝑎, 𝑐 ∈ 𝑅 implies 𝑏, 𝑐 ∈ 𝑅.
By symmetry of 𝑅, as 𝑎, 𝑐 ∈ 𝑅 , 𝑐, 𝑎 ∈ 𝑅. By transitivity of
𝑅, as 𝑐, 𝑎 , 𝑎, 𝑏 ∈ 𝑅, we get (𝑐, 𝑏) ∈ 𝑅 . Hence by symmetry of
𝑅, 𝑏, 𝑐 ∈ 𝑅.
For transitivity, let 𝑎, 𝑏 , 𝑏, 𝑐 ∈ 𝑅.
Since symmetry is already proved, 𝑏, 𝑎 ∈ 𝑅.
Now 𝑏, 𝑎 , 𝑏, 𝑐 ∈ 𝑅, (𝑎, 𝑐) ∈ 𝑅 by assumption.
Thus R is transitive, hence an equivalence relation.
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Ex.(p. 352)
Solution : To show 𝑅 is reflexive, let 𝑎 ∈ 𝐴 be any element.
Since 𝑓 𝑎 = 𝑓 𝑏 , 𝑎𝑅𝑎.
For symmetry, let 𝑎𝑅𝑏. This implies
𝑓 𝑎 = 𝑓 𝑏 . But then 𝑓 𝑏 = 𝑓 𝑎 , hence 𝑏𝑅𝑎.
For transitivity, let 𝑎𝑅𝑏, 𝑏𝑅𝑐. Hence 𝑓 𝑎 = 𝑓 𝑏 , 𝑓 𝑏 = 𝑓 𝑐 .
Thus 𝑓 𝑎 = 𝑓(𝑐), hence 𝑎𝑅𝑐.
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Ex.(p. 353)
(a) Equivalence classes are circles with center origin.
𝑥 2 + 𝑦 2 = 𝜆 (> 0) and a point 0,0 for 𝜆 = 0
(b) Hyperbolas 𝑥𝑦 = 𝜆, if 𝜆 ≠ 0, pair of lines if 𝜆 = 0.
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
BITS Pilani, Pilani Campus
Decimal representation
Between 0 and 1, there is an infinite number of decimal numbers (or real
numbers) that exist. The set of numbers between 0 and 1 includes all
decimal numbers that have a value greater than 0 and less than 1. For
example, 0.1, 0.01, 0.001, 0.00001 and so on.
In decimals,. 0.4 = 0.399999999…
Thus we can’t say that two numbers are equal implies their decimal
representations are equal.
We may need to identify these two types of representations to have a
one-to-one and onto correspondence between a number in (0,1) and
their decimal representations.
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Decimal representation
We may define two decimal representations 0. 𝑎1 𝑎2 … and
0. 𝑏1 𝑏2 … , 0 ≤ 𝑎𝑖 , 𝑏𝑖 ≤ 9, to be equivalent if and only if either 𝑎𝑖 = 𝑏𝑖 ∀𝑖 or
there exists an integer 𝑁 such that
𝑎𝑖 = 𝑏𝑖 for 𝑖 < 𝑁, 𝑎𝑁 < 9, 𝑎𝑖 = 9 ∀𝑖 > 𝑁, 𝑏𝑁 = 𝑏𝑁 + 1, 𝑏𝑖 = 0 ∀𝑖 > 𝑁
or there exists an integer 𝑁 such that
𝑎𝑖 = 𝑏𝑖 for 𝑖 < 𝑁, 𝑏𝑁 < 9, 𝑏𝑖 = 9 ∀𝑖 > 𝑁, 𝑎𝑁 = 𝑎𝑁 + 1, 𝑎𝑖 = 0 ∀𝑖 > 𝑁.
Thus the numbers in (0,1) are uniquely represented by these
equivalence classes of decimal representations.
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Clock arithmetic (Integers modulo n)
What is the time 4 hours after 10’O clock? In stead of 14’O clock,
we say 2’O clock. Generally we explain this using remainder after
dividing by 12. Better way is using equivalence classes. This can
be generalized also.
For a positive integer 𝑛, we define an equivalence relation 𝑅 on
the set ℤ of all integers by 𝑎𝑅𝑏 if and only if 𝑎 − 𝑏 is divisible by 𝑛.
(Verify this is an equivalence relation).
It is common to write 𝑎 ≡ 𝑏 (𝑚𝑜𝑑 𝑚) in stead of 𝑎𝑅𝑏 .
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Integers modulo m
The set of all equivalence classes is
𝑎 : 𝑎 ∈ ℤ = 0 , 1 ,…, 𝑛 − 1 .
(Note that any integer is related to the remainder when it
is divided by n).
They can be added and multiplied easily,
𝒂 + 𝒃 = 𝒂 + 𝒃 , 𝒂 𝒃 = 𝒂𝒃 .
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
A useful Theorem
For two integers 𝑎, 𝑏, we say 𝑎, 𝑏 are relatively prime if gcd(𝒂, 𝒃)=1
(i.e. 𝑎, 𝑏 don’t have a common factor except ±1, ±𝑎.
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
BITS Pilani, Pilani Campus