Abstract
- Basically a Subset of Cartesian Product or Order n-tuples filtered by some conditions which define the relation among the elements from the given Set
Real-world Implication
Commonly used in Database, the columns are the different sets, the Cartesian Product of the columns are all the potential relation aka all the rows that can be stored inside the database. Each row is a actual Order n-tuples inside the relation
Binary Relation
- Let , we say
Inversion of Relation
- Basically reverse the order of elements of the Order n-tuples
Composition of Relation
- For all in and all in , the below 2 conditions must be fulfilled in order to have composition of relation
- If there is a ‘path’ from to , there must have a path from to AND to , the part
- If there is a ‘path’ from to and to , there must has a path from to , the part
Composition is Associative
Inverse of Composition
Relation Properties
- Not properties of the elements of the Set!
Reflexive
- Every element in the given Set must be related to itself
Symmetric
- If an element is related to another element, the another element must be related to this element too
Transitive
- If an element is related to another element, and that element is related to a third element. Then this must be related to the third element
Equivalence Relation
- Let be a Set and be a Relation on
- is equivalence relation iff is Reflexive, Symmetric and Transitive
Equivalence Class
- Basically same as the component of a Partition or elements of Equivalence Relation
- Can be represented with , it means the Equivalence Class contains element
- and are the same iff is in the same equivalence class as
Theorem
Lemma Rel.1
- Equivalence Relation
- Let
~
be an Equivalence Class on Set and- is equivalent related to
- The equivalent class is in is same as the equivalent class is in
Theorem 8.3.4
- The Partition induced by Equivalence Relation
- If is equivalence relation on Set , then the distinct Equivalence Class form a partition of
Terminologies
Arrow Diagram
Domain
Co-domain
- The whole Set at the right hand side
Range
N-ary Relation
- A Relation involving 2 Set is called binary relation, also known as 2-ary
- Ternary is 3-ary
- Quaternary is 4-ary
Congruence Modulo 3
- Congruence Modulo 3 means the Integer (整数) is divisible by 3
- A Relation that is Reflexive Symmetric & Transitive
Transitive Closure of Relation
- The Relation obtained by adding the least number of Ordered Pair to ensure Transitive
- Represented with
- Following 3 properties:
- is transitive
- , where is any other transitive relation that contains