and Equivalences Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) August 9, 2012 Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) and Equivalences
Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) and Equivalences
Definition (Equivalence Relation) A binary relation R on set A is said to be an equivalence relation if it is reflexive, symmetric, and transitive. Let R People People. Pair (a, b) R if and only if a and b are of the same age. Let R Animals Animals. Pair (a, b) R if and only if a and b belong to same species. Let R Students Students. Pair (a, b) R if and only if a and b belong to same gender. Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) and Equivalences
Equivalence Classes Let R be an equivalence relation on set A. Take a A. The set C(a) = {b (a, b) R} is called the equivalence class of a. For example, if Ali is 34 years old, then C( Ali ) is the set of all 34 year old people. Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) and Equivalences
Equivalence (cntd) Lemma For any a A, the class C(a) Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) and Equivalences
Equivalence (cntd) Lemma For any a A, the class C(a) Proof. R is reflexive, therefore, (a, a) R. Hence a C(a). Thus, C(a). Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) and Equivalences
Equivalence (cntd) Lemma If C(a) C(b) then C(a) C(b) = Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) and Equivalences
Equivalence (cntd) Lemma If C(a) C(b) then C(a) C(b) = Proof. Proof by contraposition. Suppose c C(a) C(b). Hence, (a, c), (b, c) R. By symmetricity (c, b) R. Then, by transitivity, (a, b) R. Take x C(b). We have (b, x) R. By transitivity, (a, x) R. Hence, x C(a). Thus C(b) C(a). The case of C(a) C(b) is similar. Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) and Equivalences
Equivalence (cntd) Lemma A = a A C(a) Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) and Equivalences
Equivalence (cntd) Lemma A = a A C(a) Proof. Obvious because a C(a) for all a A Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) and Equivalences
The equivalence classes divide set A into disjoint subsets. Definition (Partition) A collection of subsets M 1,..., M n of a set A is called a partition if the following conditions hold. (1) Every M i (2) If M i M j then M i M j = (3) A = n i=1 M i Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) and Equivalences
and Lemma shows that the equivalence classes constitute a partition of the set. Actually, a stronger statement is true. Theorem Let A be a set. If R is an equivalence relation on A, then its equivalence classes form a partition on A. If M 1,..., M n is a partition of set A, then the relation R defined as follows: (a, b) R if and only if a, b M i for some i, is an equivalence relation on A. Proof. homework Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) and Equivalences
Definition (Congruency) Let k be an integer. Integers a, b are congruent modulo k, if their reminders are equal when divided by k, or, equivalently, if k divides a b. Congruency of a and b modulo k is denoted by a b(mod k) Example: 4 1(mod 3) Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) and Equivalences
(cntd) The relation (mod k), to be congruent modulo k is reflexive, because k divides a a = 0 symmetric, because if k divides a b then it also divides b a transitive, because if k divides a b and b c, then it also divides a c = (a b) + (b c) (mod k) is an equivalence relation with equivalence classes C(c) = {a b (a = bk + c)} Arithmetic on these classes are called modular arithmetic Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) and Equivalences
A relation R on set A is called a (partial) order if it is reflexive, transitive, and anti-symmetric. Example: a b on the set of real numbers Example: (a, b) Div if and only if a divides b Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) and Equivalences
Diagrams of Partial Due to anti-symmetricity, all the elements of A are ranked with respect to the order R. That is b is ranked higher than a if (a, b) R. Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) and Equivalences
Diagrams of Partial Due to transitivity, we do not need to know all pairs (a, b) from relation, but only those in which b is just higher than a. Connect every element only with elements that are just higher, so avoid triangles Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) and Equivalences
Diagrams of Partial Example: Show diagram for relation of divisibility on {1, 2,..., 12} Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) and Equivalences
Diagrams of Partial Example: Show diagram for relation of divisibility on {1, 2,..., 12} Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) and Equivalences
Diagrams of Partial Elements a, b are said to be comparable if (a, b) R or (b, a) R; Otherwise they are called incomparable Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) and Equivalences
Diagrams of Partial Elements a, b are said to be comparable if (a, b) R or (b, a) R; Otherwise they are called incomparable Element a is minimal if (b A) (((b, a) R) (a = b)) Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) and Equivalences
Diagrams of Partial Elements a, b are said to be comparable if (a, b) R or (b, a) R; Otherwise they are called incomparable Element a is minimal if (b A) (((b, a) R) (a = b)) Element a is maximal if (b A) (((a, b) R) (a = b)) Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) and Equivalences
Diagrams of Partial Elements a, b are said to be comparable if (a, b) R or (b, a) R; Otherwise they are called incomparable Element a is minimal if (b A) (((b, a) R) (a = b)) Element a is maximal if (b A) (((a, b) R) (a = b)) Element a is the least if (b A) ((a, b) R) Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) and Equivalences
Diagrams of Partial Elements a, b are said to be comparable if (a, b) R or (b, a) R; Otherwise they are called incomparable Element a is minimal if (b A) (((b, a) R) (a = b)) Element a is maximal if (b A) (((a, b) R) (a = b)) Element a is the least if (b A) ((a, b) R) Element a is the greatest if (b A) ((b, a) R) Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) and Equivalences
Total A partial order is said to be total if every two elements are comparable. Sets N, Z, Q, R are all totally ordered with respect to The diagram for a total order is a chain Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) and Equivalences