Lecture 14 - Equivalence Relations and Partial Orders
ITSC 2175: Logic and Algorithms
Equivalence Relations
Definition: A relation R on a set A is called an equivalence relation if it meets the following criteria:
Reflexive: For every element a in A, the relation satisfies aRa (or a is related to itself).
Symmetric: For any elements a, b in A, if aRb, then bRa (if a is related to b, then b is related to a).
Transitive: For any elements a, b, c in A, if aRb and bRc, then aRc (if a is related to b and b is related to c, then a is related to c).
Notation: If aRb holds true, we write a ∼ b and assert that a and b are equivalent elements.
Example of Equivalence Relation
Let R be the binary relation defined on the set A = {1, 2, 3, 4}:
R = {(1,1), (2,2), (3,3), (4,4), (1,3), (3,1), (2,4), (4,2)}
Question: Is R an equivalence relation?
Answer: Yes, R is an equivalence relation due to satisfying all three properties (reflexivity, symmetry, transitivity).
Equivalence Class
Definition: Let R be an equivalence relation on set A and let a ∈ A. The set of all elements that are equivalent to a is called the equivalence class of a, denoted by [a].
Example of Equivalence Classes
Using the same relation R defined on A = {1, 2, 3, 4}, find the distinct equivalence classes of R:
Based on the equivalence relation R = {(1,1), (2,2), (3,3), (4,4), (1,3), (3,1), (2,4), (4,2)}, the equivalence classes are:
{{1, 3}, {2, 4}}.
Equivalence Classes and Partition
If an equivalence relation is defined on A, for any elements x, y ∈ A:
If x ~ y, then [x] = [y] (the equivalence classes of x and y are the same).
If it is not true that x ~ y, then [x] ∩ [y] = ∅ (the equivalence classes are disjoint).
Partition Definition: The equivalence classes of an equivalence relation partition the domain into disjoint, non-empty subsets.
Set Partition: A partition of a non-empty set A is a collection of non-empty subsets of A such that each element of A belongs to exactly one of the subsets.
Example of a Partition
Let R be another equivalence relation defined on A = {0, 1, 2, 3, 4}:
R = {(0,0), (1,1), (2,2), (3,3), (4,4), (0,3), (3,0), (1,4), (4,1)}
Task: Find the partition of A defined by the equivalence classes of R.
Further Examples of Equivalence Relations
Let R be a relation on the integers Z such that aRb if and only if a ≡ b mod 4 (a is congruent to b modulo 4).
Proof: R is reflexive, symmetric, and transitive, confirming that R is an equivalence relation on Z.
General Statement: For positive integers n, the congruence relation a ≡ (b mod n) is an equivalence relation.
Another example features the relation D defined on A = {0, 1, 2, 3, 4, 5, 6}:
For any x, y ∈ A, xDy if x ≡ y mod 3.
Conclusion: D is confirmed as an equivalence relation with the equivalence classes: {{0, 3}, {1, 4}, {2, 5}}.
Partial Orders
Definition: A relation R on a set S is known as a partial order if it satisfies:
Reflexive: For all a in S, the relation holds aRa.
Transitive: For all a, b, c in S, if aRb and bRc, then aRc.
Anti-symmetric: For all a, b in S, if aRb and bRa, then a must equal b (no distinct elements can be mutually comparable).
Notation: The ordered pair (S, R) is referred to as a partially ordered set, or poset.
The notation a ⪯ b indicates that (a, b) ∈ R in a partial order.
Example of Partial Order
An example of a partial order R defined on S = {1, 2, 3, 4, 6}:
R = {(1,1), (1,2), (1,4), (1,6), (2,2), (2,4), (2,6), (3,3), (3,6), (4,4), (6,6)}
Question: Is R a partial order?
Answer: Yes, R meets all the required conditions for being a partial order.
Comparability
Definition: In a poset (S, R), the elements a and b are said to be comparable if:
Either a ⪯ b (meaning (a, b) ∈ R)
Or b ⪯ a (meaning (b, a) ∈ R).
Incomparability: If neither condition holds, then a and b are considered incomparable.
Total Order: A partial order is termed a total order if every two elements in the domain are comparable.
Example of Comparability in Partial Order
Consider R defined on S = {1, 2, 3, 4, 6}:
R = {(1,1), (1,2), (1,4), (1,6), (2,2), (2,4), (2,6), (3,3), (3,6), (4,4), (6,6)}
Question: Are 2 and 3 comparable?
Answer: No, since neither (2,3) nor (3,2) is contained in R.
Question: Are 3 and 6 comparable?
Answer: Yes, because (3,6) ∈ R, thus 3 ⪯ 6.
Question: Is the poset a total order?
Answer: No, as not all elements in S are comparable.
Minimal and Maximal Elements
Minimal Element: An element a is classified as a minimal element if there exists no b ≠ a such that b ⪯ a (no other element is less than a in the order).
Characteristics: A minimal element can only be the first element in all ordered pairs (a, b) where a ≠ b.
Maximal Element: An element a is termed a maximal element if there exists no b ≠ a such that a ⪯ b (no other element is greater than a in the order).
Characteristics: A maximal element can only be the second element in all ordered pairs (a, b) where a ≠ b.
Multiplicity: It is possible to have multiple minimal elements and multiple maximal elements in a poset.
Example of Finding Minimal and Maximal Elements
Let R be a binary relation defined on S = {1, 2, 3, 4, 6}:
R = {(1,1), (1,2), (1,4), (2,2), (2,4), (2,6), (3,3), (3,6), (4,4), (6,6)}
Question: What are the minimal elements?
Answer: The minimal elements are 1 and 3, as they are always the first in all ordered pairs.
Question: What are the maximal elements?
Answer: The maximal elements are 4 and 6, as they are always the second in all ordered pairs.
Hasse Diagrams
Definition: A Hasse diagram is a visual representation of a partial ordering that omits edges that must be inferred through reflexive and transitive properties.
Example Usage: Assume R denotes the "less than or equal" relation (≤) on the set S = {1, 2, 3, 4}. Then (S, ≤) is a partial ordering.
Drawing Example for Hasse Diagram
For the relation R defined on S = {1, 2, 3, 4, 6}:
R = {(1,1), (1,2), (1,4), (1,6), (2,2), (2,4), (2,6), (3,3), (3,6), (4,4), (6,6)}
Task: Draw the Hasse Diagram for the relation R.
Further Example with Divisibility Relation
Let R represent the divisibility relation (|) on the positive integers Z+:
Definition: aRb if and only if a|b (a divides b).
Task: Prove that R is a partial order.
We need to verify that R satisfies reflexivity, anti-symmetry, and transitivity.
Proof of Reflexivity for Divisibility Relation
Predicate: ∀a ∈ Z+ (a|a)
Proof: For any positive integer a, since a = 1 * a, thus a|a.
Conclusion: R is reflexive.
Proof of Anti-symmetry for Divisibility Relation
Predicate: ∀a,b∈Z+ ((a≠b) → ((a∤b)∨(b∤a)))
Proof by Contradiction:
Assume a, b ∈ Z+ where a ≠ b, a|b, and b|a.
By the definition of a|b, we have b = ka for some integer k.
Therefore, we get a = (1/k)b. Since a ≠ b, then k ≠ 1.
Conclusively, since k is an integer and k ≠ 1, 1/k cannot be an integer, thus b∤a. This leads to contradiction with b|a, confirming R is anti-symmetric.
Conclusion: R is anti-symmetric.
Proof of Transitivity for Divisibility Relation
Predicate: ∀a,b,c∈Z+ ((a|b) ⋀ (b|c) → (a|c))
Proof:
Let a, b, c ∈ Z+ such that a|b and b|c.
From a|b, we have b = ka for some integer k.
From b|c, we get c = nb for some integer n.
Therefore, c = nb = n(ka) = (kn)a.
Since both k and n are integers, kn is an integer.
Consequently, since c is equal to a times integer, a|c holds.
Conclusion: R is transitive.
Final Example with Divisibility Relation
Let R be a binary relation defined on A = {1, 2, 3, 4, 6, 8, 12}:
For any x, y ∈ A, xRy if x | y.
Conclusion: R is confirmed as a partial order, and {A, |} forms a poset.
Task: Draw the Hasse diagram for R.