Lecture 20: Equivalences

In this lecture, we will revise some of the concepts on relations that we covered previously.

  • Reflexive, Symmetric and Transitive Relations.

  • Partial and Total Orders.

Then we will look into equivalence relations and equivalence classes. We will see how an equivalence on a set partitions the set into equivalence classes.

Revision

Let us make sure we understand key concepts before we move on. To do so, take five minutes to solve the following problems on your own. You are welcome to discuss your solutions with me after class.

  • All these problems concern a set A = {1,2,3,4}.

  • Relation R_1 = { (1,1), (2,2), (3,3), (4,4) }.

  • Relation R_2 = { (1,1), (2,2), (2,3), (3,2) }.

  • Relation R_3 = { (3,2), (2,3) }.

  • Relation R_4 = { (1,1), (1,2), (2,2), (1,3), (3,3), (1,4), (4,4) } .

  • Relation R_5 = { (1,2), (2,3), (1,3), (2,2) }.

  • Relation R_6 = { } (empty relation).

ID R_1 R_2 R_3 R_4 R_5 R_6
Reflexive?
Symmetric?
Transitive?
Irreflexive?
Anti-Symmetric?

Equivalence Relation

An equivalence relation R over a set A is a reflexive, symmetric and transitive relation.

Question

Which of the following are examples of equivalence relations over A = {1,2,3,4}.

  • R_1 = { }.

  • R_2 = {(1,1), (1,2), (2,1), (2,2), (3,3), (4,4) }.

  • R_3 = { (1,1), (1,2), (2,1), (2,2), (3,1), (3,2), (1,3), (2,3), (3,3), (4,4) }.

Just check that the relations above are reflexive, symmetric and transitive.

Answer
  • R_1 fails to be reflexive.

  • R_2 is an equivalence relation.

  • R_3 is also an equivalence relation.

Example-1

The relation  R = { (n,n) | n in mathbb{N} } is an equivalence relation.

The Cartesian product of any set A with itself is a relation R = A times A. All possible tuples exist in R. This relation is also an equivalence.

Modular-Congruences

For any number p, we have an equivalence relation R_p = { (m,n) |  m - n mod p = 0  }.

Often we denote  (m,n) in R_p by the notation m equiv n mod p (read as m and n are congruent modulo p).

Verify that R_p is an equivalence for any p.

Reflexivity:

For all n in N, we have that n - n mod p = 0. Therefore (n,n) in R_p.

Symmetry:

Clearly if m - n mod p = 0 then n-m mod p = 0.

Transitivity:

If m- n mod p = 0 and n - k mod p = 0 then displaystyle{ (m - k) mod p = ((m-n) + (n-k)) mod p = (m-n) mod p + (n-k) mod p = 0 }.

Equivalence Classes

We now look at how equivalence relation on A partitions the original set A.

Let us take the set A = {1,2,3,4}. And the equivalence R_1 = { (1,1), (1,2), (2,1), (2,2), (3,3), (4,4) }.

Let us collect everything that 1 is equivalent to. This gives us the set S_1 = {1,2}. Collecting everything equivalent to 2 again gives us S_1. Collecting everything that 3 is equivalent to gives us {3} and similarly for 4, we get {4}.

Therefore, R_1 is said to induce the following partition of the set A:

 { {1,2}, {3}, {4} }

Question

What is the partition induced by the equivalence: R_2 = { (1,1), (1,2), (2,1), (2,2), (3,1), (3,2), (1,3), (2,3), (3,3), (4,4) }?

To answer this, consider:

  • [1]_{R_2} = { 1, 2, 3 }

  • [2]= [1]

  • [3] = [1]

  • [4] = { 4 }.

The partition induced by R_2 is therefore: { { 1,2,3}, {4} }.

Notation

The equivalence class of an element a in A under an equivalence relation R is denoted as [a]_R.

 [a]_R = { b  | (a,b) in R

Claim-1

If (a,b) in R then [a]_R = [b]_R.

Proof

Let (a,b) in R. We show that [a]_R subseteq [b]_R and vice versa, [b]_R subseteq [a]_R.

To show that [a]_R subseteq [b]_R, let x in [a]_R. We have (x,a) in R. Since (a,b) in R, we conclude by transitivity of R that (x,b) in R. Therefore x in [b]_R.

The proof of [b]_R subseteq [a]_R is very similar. Therefore [a]_R = [b]_R represent the same equivalence classes.

We now show that two equivalence classes are either the same or disjoint.

Claim-2

Whenever [a]_R cap [b]_R not= emptyset then [a]_R  = [b]_R.

{Proof} Let c in [a]_R cap [b]_R. We have (c,a) in R and (c,b) in R. Therefore by symmetry and transitivity of R, we conclude that (a,b) in R. Therefore [a]_R = [b]_R.

This shows that given any set A, and equivalence relation R, the equivalence classes

 { [a]_R |  a in A }

is a partition of the set A:

  • If [a]_R not= [b]_R, we conclude that [a]_R cap [b]_R = emptyset.

  • bigcup_{ain A} [a]_R = A .