5.4 Relations

  1. Let A and B be sets. A relation from A to B is a subset A×B
  2. Let kZ+ and let A1,,Ak be sets
    A relation on A1,,Ak is a subset of A1××Ak
    The number k is called the arity of the relation 3. Let A be a set and let kN
    A k-ary relation over A is a subset of Ak

#TODO the example

Let A be a set. A relation on the set A is a relation from A to itself.

Example

Let A:={1,2,3,4}
Which pairs are in the relation R on A, given by R:={(a,b) | a divides b}?

The relation R can be represented both graphically and by an adjacency matrix

#TODO Continue example

Types of Relationships

Reflexive

A relation R on a set A is called reflexive if (a,a)R for every element aA

Symmetric

A relation R on a set A is called symmetric, if (a,b)R implies (b,a)R for all a,bA

Antisymmetric

A relation R on a set A such that for all a,bA if (a,b)R and (b,a)R, then a=b, is called antisymmetric

Transitive

A relation R on a set A is called transitive if whenever (a,b)R and (b,c)R, then (a,c)R, for all a,b,cA

Total

A relation R on a set A is called total if all a,bA satisfy: (a,b)R or (b,a)R

Equivalence Relation

An equivalence relation is a binary relation, that is reflexive, transitive and symmetric

Equivalence Classes and Representatives

Let E be an equivalence relation over a set V.
For every vV we let[v]E:={vV | (v,v)E}denote the equivalence class of v with respect to E (i.e. the equivalence class [V]E consists of all elements of V
that are equivalent to v according to E).
A set WV is an equivalence class (of E), if there exists an element vV with W=[v]E
The element v is then called a representative of its equivalence class W