Professional Documents
Culture Documents
Math4190 Lecture-04-02 H
Math4190 Lecture-04-02 H
Matthew Macauley
M. Macauley (Clemson) Lecture 4.2: Equivalence relations & classes Discrete Mathematical Structures 1 / 11
Recall the basic concepts
Definition
An equivalence relation on a set A is a relation that is
(i) reflexive,
(ii) transitive,
(iii) symmetric.
We can always visualize a relation R on a finite set A with a directed graph (digraph):
the vertex set is A;
include a directed edge a → b if (a, b) ∈ R.
M. Macauley (Clemson) Lecture 4.2: Equivalence relations & classes Discrete Mathematical Structures 2 / 11
Equivalence classes
Definition
Given an equivalence relation R on A (write a ≡ b for (a, b) ∈ R), the equivalence class
containing a ∈ A is the set
[a] := b ∈ A | (a, b) ∈ R = b ∈ A | a ≡ b .
We denote the set of equivalence classes by A/R, or A/ ≡, and say “A modulo R.”
Example 1
Let A be the set of all people.
1. Say that two people are equivalent iff they were born in the same year.
2. Say that two people are equivalent iff they have the same last name.
Proposition
Let R be an equivalence relation on A.
(i) If b ∈ [a], then [a] = [b].
(ii) If b 6∈ [a], then [a] ∩ [b] = ∅.
In other words, the set of equivalence classes forms a partition of A.
M. Macauley (Clemson) Lecture 4.2: Equivalence relations & classes Discrete Mathematical Structures 3 / 11
Examples of equivalence classes
Example 2: isomorphic graphs
Let S be the following graphs, under the equivalence relation of isomorphism.
1 2 1 2 1 1
2 3
4 3 4 3 4 3 4 2
1 2 1 2 1 2 1 2
4 3 4 3 4 3 4 3
M. Macauley (Clemson) Lecture 4.2: Equivalence relations & classes Discrete Mathematical Structures 4 / 11
Examples of equivalence classes
Example 4: equivalence relation from partitions
Let V be a finite set. Every undirected graph on V defines an equivalence relation, where
v ≡ w iff v and w lie on the same connected component.
Moreover, any arbitrary partition of V defines an equivalence relation.
M. Macauley (Clemson) Lecture 4.2: Equivalence relations & classes Discrete Mathematical Structures 5 / 11
Example 5: Bitstrings
Given a length-n Boolean vector x, its Hamming weight H(x) is the number of 1 bits in it.
Consider the equivalence on the set of length-3 Boolean vectors (or strings), where
The equivalence classes are the connected components in the graph below:
(1, 1, 1)
(0, 0, 0)
M. Macauley (Clemson) Lecture 4.2: Equivalence relations & classes Discrete Mathematical Structures 6 / 11
Example 6: Digital logic circuits
There are infinitely many possible digital logic circuits with n inputs.
n
However, there are only 22 Boolean functions with n inputs.
Declare two digital logic circuits to be equivalent iff they give the same output on all inputs.
P not
and P
R or not R
Q
Q not
M. Macauley (Clemson) Lecture 4.2: Equivalence relations & classes Discrete Mathematical Structures 7 / 11
Example 7: Modular arithmetic
Let A = Z, and fix n > 1.
Say that a ≡ b iff n | (a − b). We say that a and b are equivalent modulo n, and write
Proposition
Let a, b, c ∈ N, n > 1 and suppose that a ≡ b (mod n). Then
1. a + c ≡ b + c (mod n),
2. ac ≡ bc (mod n),
3. ac ≡ b c (mod n).
Corollary
Reducing modulo n can be done before or after doing arithmetic, i.e.,
1. (a + b) (mod n) ≡ a (mod n) + b (mod n),
2. (ab) (mod n) ≡ (a (mod n))(b (mod n)).
M. Macauley (Clemson) Lecture 4.2: Equivalence relations & classes Discrete Mathematical Structures 8 / 11
Example 7: Modular arithmetic
Let n = 12. The equivalence classes of Z modulo n are
The fact that addition and multiplication is well-defined with respect to ≡n means that it
does not depend on choice of representative, i.e.,
Equivalently,
M. Macauley (Clemson) Lecture 4.2: Equivalence relations & classes Discrete Mathematical Structures 9 / 11
Example 8: the rational numbers
“God created the integers; all else is the work of man.”
. –Leopold Kronecker (1880s)
Definition
We can define addition and multiplication of equivalence classes as follows:
a c ad+bc
(i) b
+ d
= bd
,
a c ac
(ii) b
· d
= bd
.
M. Macauley (Clemson) Lecture 4.2: Equivalence relations & classes Discrete Mathematical Structures 10 / 11
Example 8: the rational numbers
Exercise
Check that addition and multiplication of equivalence classes, defined as
a c ad+bc
(i) b
+ d
= bd
,
a c ac
(ii) b
· d
= bd
,
is well-defined.
This means checking that if [(a, b)] = [(c, d)] and [(p, q)] = [(r , s)], then
M. Macauley (Clemson) Lecture 4.2: Equivalence relations & classes Discrete Mathematical Structures 11 / 11