5.4 Relations

  1. Let A and B be sets. A relation from A to B is a subset A×B
  2. Let k∈Z+ 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 k∈N
    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 a∈A

Symmetric

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

Antisymmetric

A relation R on a set A such that for all a,b∈A 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,c∈A

Total

A relation R on a set A is called total if all a,b∈A 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 v∈V we let[v]E:={v′∈V | (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 W⊆V is an equivalence class (of E), if there exists an element v∈V with W=[v]E
The element v is then called a representative of its equivalence class W