Equivalence relations Binary relations Let S 1 and
Equivalence relations • Binary relations: – Let S 1 and S 2 be two sets, and R be a (binary relation) from S 1 to S 2 – Not every x in S 1 and y in S 2 have such relation – If R holds for a in S 1 and b in S 2, denote as a. Rb or R(a, b) Examples: Spouse relation from set Men to set Women – S 1 and S 2 can be the same set Examples: Parent relation on set Human > (greater than) relation on set Z (all integers) 1
Equivalence relations (cont) • Properties of binary relations: – Let R be a binary relation on set S – R is reflexive: if a. Ra for all a in S Ex: = relation, >= relation – R is symmetric: a. Rb iff b. Ra Ex: = relation, spouse relation – R is transitive: if a. Rb and b. Rc, then a. Rc Ex: = relation, >= relation, ancestor relation – R is an equivalence relation if it is reflexive, symmetric, and transitive. Ex. = relation, relative relation among humans Counter ex: >= relation, spouse relation – Use “~” to denote an abstract generic equivalence relation a~b 2
Equivalence relations (cont) • Equivalence classes – Let ~ be a equivalence relation defined on set S – S can be partitioned into disjoint subsets such that • If a ~ b, then a and b are in one subset • If a and b are in two different subsets, then a ~ b does not hold – Each of such subsets is called an equivalence class (with respect to relation ~), denoted C 1, C 2, . . . • All elements in an equivalence class relate to each other by ~ • No elements in different equivalence classes relate to each other by ~ – Equivalence classes can be represented as disjoint sets 3
- Slides: 3