<<

Discrete

(c) Marcin Sydow

Properties

Equivalence Relations Order relation

N-ary relations (c) Marcin Sydow Contents

Discrete Mathematics

(c) Marcin Sydow

Properties

Equivalence relation domain, codomain, , preimage Order inverse and composition relation

N-ary properties of relations relations of relation order relation Binary relation

Discrete Mathematics

(c) Marcin Sydow

Properties Let A, B be two sets. A binary relation between the elements Equivalence relation of A and B is any of the of A and B, Order i.e. R ⊆ A × B. relation

N-ary We denote relations by capital letters, e.g. R, S, etc. relations We say that two elements a ∈ A and b ∈ B are in relation R iff the pair (a, b) ∈ R (it can be also denoted as: aRb). Examples

Discrete Mathematics

(c) Marcin Sydow

Properties

Equivalence relation empty relation (no pair belongs to it)

Order relation relation ∆ = {(x, x): x ∈ X } (it is the “

N-ary relation) relations full relation: any pair belongs to it (i.e. R = X 2) Binary relation as a predicate and as a graph

Discrete Mathematics

(c) Marcin Sydow

Properties Binary relation can be represented as a predicate with 2 free Equivalence relation variables as follows:

Order relation Given a predicate R(x, y), for x ∈ X and y ∈ Y , the relation is

N-ary the of all pairs (x, y) ∈ X × Y that satisfy the predicate relations (i.e. make it true) Each binary relation can be naturally represented as a graph. Example

Discrete Mathematics

(c) Marcin Sydow

Properties

Equivalence relation R(x, y): “x is less than y” Order relation The relation R represented by the above predicate is the set of N-ary relations all pairs (x, y) ∈ X × Y so that R(x, y) is true (i.e. x < y) Examples of binary relations

Discrete Mathematics

(c) Marcin Sydow A = B = N Properties Equivalence diagonal relation ∆ (x = y) relation

Order x > y relation x ≤ y N-ary relations x is a of y x and y have common divisor x2 + y 2 ≥ 10 More examples

Discrete Mathematics

(c) Marcin Sydow

Properties Examples of relations on the set P × P, where P is the set of all Equivalence people. relation

Order relation (x, y) ∈ R ⇔ x is a son of y N-ary (x, y) ∈ R ⇔ x is the mother of y relations (x, y) ∈ R ⇔ x is the father of y (x, y) ∈ R ⇔ x is a grandmother of y More examples

Discrete Mathematics

(c) Marcin Sydow

Properties Examples of R ⊆ P × C, where C is the set of all courses in the Equivalence relation univeristy for last 5 years.

Order relation (p, c) ∈ R ⇔ p passed course c N-ary relations (p, c) ∈ R ⇔ p attended course c (p, c) ∈ R ⇔ p thinks course c is interesting Domain and co-domain of relation

Discrete Mathematics

(c) Marcin Sydow

Properties

Equivalence relation For binary relation R ⊆ A × B, the set A is called its domain Order relation and B is called its co-domain

N-ary relations Domain and co-domain can be the same set. Image and pre-image of relation

Discrete Mathematics

(c) Marcin Sydow

Properties

Equivalence relation Pre-image of binary relation R ⊆ X × Y :

Order {x ∈ X : ∃y ∈ Y (x, y) ∈ R} relation

N-ary Image of binary relation R ⊆ X × Y : relations {y ∈ Y : ∃x ∈ X (x, y) ∈ R} {(5, 3), (5, 4), (6, 3), (6, 4), (6, 5)} domain of R?: A co-domain of R?: B pre-image of R?: {5, 6} image of R?: {3, 4, 5}

Example

Discrete Mathematics

(c) Marcin Sydow

Properties A = {1, 3, 5, 6}, B = {3, 4, 5, 6, 7}. Relation R ⊆ A × B is

Equivalence defined as follows: relation

Order xRy ⇔ x > y relation R =? N-ary relations A co-domain of R?: B pre-image of R?: {5, 6} image of R?: {3, 4, 5}

Example

Discrete Mathematics

(c) Marcin Sydow

Properties A = {1, 3, 5, 6}, B = {3, 4, 5, 6, 7}. Relation R ⊆ A × B is

Equivalence defined as follows: relation

Order xRy ⇔ x > y relation R =? {(5, 3), (5, 4), (6, 3), (6, 4), (6, 5)} N-ary relations domain of R?: B pre-image of R?: {5, 6} image of R?: {3, 4, 5}

Example

Discrete Mathematics

(c) Marcin Sydow

Properties A = {1, 3, 5, 6}, B = {3, 4, 5, 6, 7}. Relation R ⊆ A × B is

Equivalence defined as follows: relation

Order xRy ⇔ x > y relation R =? {(5, 3), (5, 4), (6, 3), (6, 4), (6, 5)} N-ary relations domain of R?: A co-domain of R?: {5, 6} image of R?: {3, 4, 5}

Example

Discrete Mathematics

(c) Marcin Sydow

Properties A = {1, 3, 5, 6}, B = {3, 4, 5, 6, 7}. Relation R ⊆ A × B is

Equivalence defined as follows: relation

Order xRy ⇔ x > y relation R =? {(5, 3), (5, 4), (6, 3), (6, 4), (6, 5)} N-ary relations domain of R?: A co-domain of R?: B pre-image of R?: {3, 4, 5}

Example

Discrete Mathematics

(c) Marcin Sydow

Properties A = {1, 3, 5, 6}, B = {3, 4, 5, 6, 7}. Relation R ⊆ A × B is

Equivalence defined as follows: relation

Order xRy ⇔ x > y relation R =? {(5, 3), (5, 4), (6, 3), (6, 4), (6, 5)} N-ary relations domain of R?: A co-domain of R?: B pre-image of R?: {5, 6} image of R?: Example

Discrete Mathematics

(c) Marcin Sydow

Properties A = {1, 3, 5, 6}, B = {3, 4, 5, 6, 7}. Relation R ⊆ A × B is

Equivalence defined as follows: relation

Order xRy ⇔ x > y relation R =? {(5, 3), (5, 4), (6, 3), (6, 4), (6, 5)} N-ary relations domain of R?: A co-domain of R?: B pre-image of R?: {5, 6} image of R?: {3, 4, 5} “x is a parent of y”?

Inverse of relation

Discrete Mathematics

(c) Marcin Sydow

Properties Equivalence If R ⊆ X × Y is a binary relation then its inverse relation R−1 ⊆ Y × X is defined as R−1 = {(y, x):(x, y) ∈ R} Order relation Examples: what is the inverse of: N-ary relations “x < y”? Inverse of relation

Discrete Mathematics

(c) Marcin Sydow

Properties Equivalence If R ⊆ X × Y is a binary relation then its inverse relation R−1 ⊆ Y × X is defined as R−1 = {(y, x):(x, y) ∈ R} Order relation Examples: what is the inverse of: N-ary relations “x < y”? “x is a parent of y”? Composition of relations

Discrete Mathematics If S ⊆ A × B and R ⊆ B × C are two binary relations on sets (c) Marcin Sydow A,B and B,C, respectively, then the composition of these relations, denoted as R ◦ S is the binary relation defined as Properties follows: Equivalence relation

Order relation R ◦ S = {(a, c) ∈ A × C : ∃b∈B [(a, b) ∈ R ∧ (b, c) ∈ S]} N-ary relations Sometimes it is denoted as RS. If R = S then the composition of R with itself: R ◦ R can be denoted as R2. More than 2 relations can be composed. We denote the n-th composition of R with itself as Rn (e.g. R3 = R ◦ R ◦ R, etc.) Composition is associative, i.e.: (R ◦ S) ◦ T = R ◦ (S ◦ T ) {(1, z), (1, v), (3, z), (3, v), (2, y)} (some operations in relational are based on this operator) Is composition commutative?(i.e. is R ◦ S the same as S ◦ R for any binary relations R, S?) For what binary relations their composition is commutative?

Example

Discrete Mathematics

(c) Marcin Sydow A = {0, 1, 2, 3, 4}, B = {a, b, c}, C = {x, y, z, v}

Properties R = {(1, a), (2, c), (3, a)}, Equivalence S = {(a, z), (a, v), (b, x), (b, z), (c, y)} relation Order R ◦ S =? relation

N-ary relations (some join operations in relational databases are based on this operator) Is composition commutative?(i.e. is R ◦ S the same as S ◦ R for any binary relations R, S?) For what binary relations their composition is commutative?

Example

Discrete Mathematics

(c) Marcin Sydow A = {0, 1, 2, 3, 4}, B = {a, b, c}, C = {x, y, z, v}

Properties R = {(1, a), (2, c), (3, a)}, Equivalence S = {(a, z), (a, v), (b, x), (b, z), (c, y)} relation Order R ◦ S =?{(1, z), (1, v), (3, z), (3, v), (2, y)} relation

N-ary relations Is composition commutative?(i.e. is R ◦ S the same as S ◦ R for any binary relations R, S?) For what binary relations their composition is commutative?

Example

Discrete Mathematics

(c) Marcin Sydow A = {0, 1, 2, 3, 4}, B = {a, b, c}, C = {x, y, z, v}

Properties R = {(1, a), (2, c), (3, a)}, Equivalence S = {(a, z), (a, v), (b, x), (b, z), (c, y)} relation Order R ◦ S =?{(1, z), (1, v), (3, z), (3, v), (2, y)} relation N-ary (some join operations in relational databases are based on this relations operator) (i.e. is R ◦ S the same as S ◦ R for any binary relations R, S?) For what binary relations their composition is commutative?

Example

Discrete Mathematics

(c) Marcin Sydow A = {0, 1, 2, 3, 4}, B = {a, b, c}, C = {x, y, z, v}

Properties R = {(1, a), (2, c), (3, a)}, Equivalence S = {(a, z), (a, v), (b, x), (b, z), (c, y)} relation Order R ◦ S =?{(1, z), (1, v), (3, z), (3, v), (2, y)} relation N-ary (some join operations in relational databases are based on this relations operator) Is composition commutative? For what binary relations their composition is commutative?

Example

Discrete Mathematics

(c) Marcin Sydow A = {0, 1, 2, 3, 4}, B = {a, b, c}, C = {x, y, z, v}

Properties R = {(1, a), (2, c), (3, a)}, Equivalence S = {(a, z), (a, v), (b, x), (b, z), (c, y)} relation Order R ◦ S =?{(1, z), (1, v), (3, z), (3, v), (2, y)} relation N-ary (some join operations in relational databases are based on this relations operator) Is composition commutative?(i.e. is R ◦ S the same as S ◦ R for any binary relations R, S?) Example

Discrete Mathematics

(c) Marcin Sydow A = {0, 1, 2, 3, 4}, B = {a, b, c}, C = {x, y, z, v}

Properties R = {(1, a), (2, c), (3, a)}, Equivalence S = {(a, z), (a, v), (b, x), (b, z), (c, y)} relation Order R ◦ S =?{(1, z), (1, v), (3, z), (3, v), (2, y)} relation N-ary (some join operations in relational databases are based on this relations operator) Is composition commutative?(i.e. is R ◦ S the same as S ◦ R for any binary relations R, S?) For what binary relations their composition is commutative? Properties

Discrete Mathematics

(c) Marcin Sydow The following abstract properties of binary relations are Properties commonly used: Equivalence relation reflexivity Order relation N-ary counter-symmetry relations anti-symmetry transitivity connectedness “x is a divisor of y”? x < y? diagonal relation ∆ (i.e. x == y)?

Reflexivity

Discrete Mathematics

(c) Marcin Sydow

Properties Binary relation R ⊆ X × X is reflexive iff: Equivalence relation ∀x ∈ X xRx Order relation Examples? (assume X is the set of all positive naturals) N-ary relations x < y? diagonal relation ∆ (i.e. x == y)?

Reflexivity

Discrete Mathematics

(c) Marcin Sydow

Properties Binary relation R ⊆ X × X is reflexive iff: Equivalence relation ∀x ∈ X xRx Order relation Examples? (assume X is the set of all positive naturals) N-ary relations “x is a divisor of y”? diagonal relation ∆ (i.e. x == y)?

Reflexivity

Discrete Mathematics

(c) Marcin Sydow

Properties Binary relation R ⊆ X × X is reflexive iff: Equivalence relation ∀x ∈ X xRx Order relation Examples? (assume X is the set of all positive naturals) N-ary relations “x is a divisor of y”? x < y? Reflexivity

Discrete Mathematics

(c) Marcin Sydow

Properties Binary relation R ⊆ X × X is reflexive iff: Equivalence relation ∀x ∈ X xRx Order relation Examples? (assume X is the set of all positive naturals) N-ary relations “x is a divisor of y”? x < y? diagonal relation ∆ (i.e. x == y)? “x and y have common divisor”? x ≤ y ? x == y ?

Symmetry

Discrete Mathematics

(c) Marcin Sydow

Properties Binary relation R ⊆ X × X is symmetric iff: Equivalence relation ∀x, y ∈ X xRy ⇒ yRx Order relation Examples? (assume X is the set of all positive naturals) N-ary relations x ≤ y ? x == y ?

Symmetry

Discrete Mathematics

(c) Marcin Sydow

Properties Binary relation R ⊆ X × X is symmetric iff: Equivalence relation ∀x, y ∈ X xRy ⇒ yRx Order relation Examples? (assume X is the set of all positive naturals) N-ary relations “x and y have common divisor”? x == y ?

Symmetry

Discrete Mathematics

(c) Marcin Sydow

Properties Binary relation R ⊆ X × X is symmetric iff: Equivalence relation ∀x, y ∈ X xRy ⇒ yRx Order relation Examples? (assume X is the set of all positive naturals) N-ary relations “x and y have common divisor”? x ≤ y ? Symmetry

Discrete Mathematics

(c) Marcin Sydow

Properties Binary relation R ⊆ X × X is symmetric iff: Equivalence relation ∀x, y ∈ X xRy ⇒ yRx Order relation Examples? (assume X is the set of all positive naturals) N-ary relations “x and y have common divisor”? x ≤ y ? x == y ? “x and y have common divisor”? x < y ? x == y ?

Counter-symmetry

Discrete Mathematics

(c) Marcin Sydow

Properties Binary relation R ⊆ X × X is counter-symmetric iff: Equivalence relation ∀x, y ∈ X xRy ⇒ ¬(yRx) Order relation Examples? (assume X is the set of all positive naturals) N-ary relations x < y ? x == y ?

Counter-symmetry

Discrete Mathematics

(c) Marcin Sydow

Properties Binary relation R ⊆ X × X is counter-symmetric iff: Equivalence relation ∀x, y ∈ X xRy ⇒ ¬(yRx) Order relation Examples? (assume X is the set of all positive naturals) N-ary relations “x and y have common divisor”? x == y ?

Counter-symmetry

Discrete Mathematics

(c) Marcin Sydow

Properties Binary relation R ⊆ X × X is counter-symmetric iff: Equivalence relation ∀x, y ∈ X xRy ⇒ ¬(yRx) Order relation Examples? (assume X is the set of all positive naturals) N-ary relations “x and y have common divisor”? x < y ? Counter-symmetry

Discrete Mathematics

(c) Marcin Sydow

Properties Binary relation R ⊆ X × X is counter-symmetric iff: Equivalence relation ∀x, y ∈ X xRy ⇒ ¬(yRx) Order relation Examples? (assume X is the set of all positive naturals) N-ary relations “x and y have common divisor”? x < y ? x == y ? “x and y have common divisor”? x ≤ y ? ”x is a divisor of y” ?

Anti-Symmetry

Discrete Mathematics

(c) Marcin Sydow

Properties Binary relation R ⊆ X × X is anti-symmetric iff: Equivalence relation ∀x, y ∈ X xRy ∧ yRx ⇒ x = y Order relation Examples? (assume X is the set of all positive naturals) N-ary relations x ≤ y ? ”x is a divisor of y” ?

Anti-Symmetry

Discrete Mathematics

(c) Marcin Sydow

Properties Binary relation R ⊆ X × X is anti-symmetric iff: Equivalence relation ∀x, y ∈ X xRy ∧ yRx ⇒ x = y Order relation Examples? (assume X is the set of all positive naturals) N-ary relations “x and y have common divisor”? ”x is a divisor of y” ?

Anti-Symmetry

Discrete Mathematics

(c) Marcin Sydow

Properties Binary relation R ⊆ X × X is anti-symmetric iff: Equivalence relation ∀x, y ∈ X xRy ∧ yRx ⇒ x = y Order relation Examples? (assume X is the set of all positive naturals) N-ary relations “x and y have common divisor”? x ≤ y ? Anti-Symmetry

Discrete Mathematics

(c) Marcin Sydow

Properties Binary relation R ⊆ X × X is anti-symmetric iff: Equivalence relation ∀x, y ∈ X xRy ∧ yRx ⇒ x = y Order relation Examples? (assume X is the set of all positive naturals) N-ary relations “x and y have common divisor”? x ≤ y ? ”x is a divisor of y” ? “x and y have common divisor”? x ≤ y ? x == y ?

Transitivity

Discrete Mathematics

(c) Marcin Sydow

Properties Binary relation R ⊆ X × X is transitive iff: Equivalence relation ∀(x, y, z) ∈ X , xRy ∧ yRz ⇒ xRz Order relation Examples? (assume X is the set of all positive naturals) N-ary relations x ≤ y ? x == y ?

Transitivity

Discrete Mathematics

(c) Marcin Sydow

Properties Binary relation R ⊆ X × X is transitive iff: Equivalence relation ∀(x, y, z) ∈ X , xRy ∧ yRz ⇒ xRz Order relation Examples? (assume X is the set of all positive naturals) N-ary relations “x and y have common divisor”? x == y ?

Transitivity

Discrete Mathematics

(c) Marcin Sydow

Properties Binary relation R ⊆ X × X is transitive iff: Equivalence relation ∀(x, y, z) ∈ X , xRy ∧ yRz ⇒ xRz Order relation Examples? (assume X is the set of all positive naturals) N-ary relations “x and y have common divisor”? x ≤ y ? Transitivity

Discrete Mathematics

(c) Marcin Sydow

Properties Binary relation R ⊆ X × X is transitive iff: Equivalence relation ∀(x, y, z) ∈ X , xRy ∧ yRz ⇒ xRz Order relation Examples? (assume X is the set of all positive naturals) N-ary relations “x and y have common divisor”? x ≤ y ? x == y ? a counter-symmetric closure of a , etc.)

Closure of a relation

Discrete Mathematics A closure of a binary relation R with regard to (wrt) some

(c) Marcin property P is the binary relation S such that the following Sydow conditions hold:

Properties

Equivalence S has the property P relation R ⊆ S (S “extends” R) Order relation S is the smallest (with regard to inclusion) relation N-ary relations satisfying the two above conditions (i.e. for any T such that R ⊆ T it holds that S ⊆ T .

The property P can be for example: transitivity, symmetry, reflexivity, etc. Notice: the closure of relation may not exist (example?: Closure of a relation

Discrete Mathematics A closure of a binary relation R with regard to (wrt) some

(c) Marcin property P is the binary relation S such that the following Sydow conditions hold:

Properties

Equivalence S has the property P relation R ⊆ S (S “extends” R) Order relation S is the smallest (with regard to inclusion) relation N-ary relations satisfying the two above conditions (i.e. for any T such that R ⊆ T it holds that S ⊆ T .

The property P can be for example: transitivity, symmetry, reflexivity, etc. Notice: the closure of relation may not exist (example?: a counter-symmetric closure of a symmetric relation, etc.) R ∪ ∆ symmetric closure of R? R ∪ R−1 2 3 S i transtitive closure of R? R ∪ R ∪ R ... = i∈N+ R

Examples: How to compute the closure of a relation?

Discrete Mathematics

(c) Marcin Sydow

Properties If R is a binary relation, lets consider how to compute its Equivalence relation reflexive, symmetric and :

Order relation reflexive closure of R? N-ary relations R ∪ R−1 2 3 S i transtitive closure of R? R ∪ R ∪ R ... = i∈N+ R

Examples: How to compute the closure of a relation?

Discrete Mathematics

(c) Marcin Sydow

Properties If R is a binary relation, lets consider how to compute its Equivalence relation reflexive, symmetric and transitive closure:

Order relation reflexive closure of R? R ∪ ∆ N-ary relations symmetric closure of R? 2 3 S i R ∪ R ∪ R ... = i∈N+ R

Examples: How to compute the closure of a relation?

Discrete Mathematics

(c) Marcin Sydow

Properties If R is a binary relation, lets consider how to compute its Equivalence relation reflexive, symmetric and transitive closure:

Order relation reflexive closure of R? R ∪ ∆ N-ary −1 relations symmetric closure of R? R ∪ R transtitive closure of R? Examples: How to compute the closure of a relation?

Discrete Mathematics

(c) Marcin Sydow

Properties If R is a binary relation, lets consider how to compute its Equivalence relation reflexive, symmetric and transitive closure:

Order relation reflexive closure of R? R ∪ ∆ N-ary −1 relations symmetric closure of R? R ∪ R 2 3 S i transtitive closure of R? R ∪ R ∪ R ... = i∈N+ R “x is a son of y”? “x == y”? “x ≥ y”?

Examples: transitive closure of relation

Discrete Mathematics

(c) Marcin Sydow

Properties For a binary relation R ⊆ X 2 its transitive closure is defined Equivalence relation as the smallest relation T so that T is transitive and R ⊆ T Order relation Example: transitive closure of: N-ary relations “x == y”? “x ≥ y”?

Examples: transitive closure of relation

Discrete Mathematics

(c) Marcin Sydow

Properties For a binary relation R ⊆ X 2 its transitive closure is defined Equivalence relation as the smallest relation T so that T is transitive and R ⊆ T Order relation Example: transitive closure of: N-ary “x is a son of y”? relations “x ≥ y”?

Examples: transitive closure of relation

Discrete Mathematics

(c) Marcin Sydow

Properties For a binary relation R ⊆ X 2 its transitive closure is defined Equivalence relation as the smallest relation T so that T is transitive and R ⊆ T Order relation Example: transitive closure of: N-ary “x is a son of y”? relations “x == y”? Examples: transitive closure of relation

Discrete Mathematics

(c) Marcin Sydow

Properties For a binary relation R ⊆ X 2 its transitive closure is defined Equivalence relation as the smallest relation T so that T is transitive and R ⊆ T Order relation Example: transitive closure of: N-ary “x is a son of y”? relations “x == y”? “x ≥ y”? Equivalence relation

Discrete Mathematics

(c) Marcin Sydow

Properties 2 Equivalence A binary relation R ⊆ X is equivalence relation iff it is: relation

Order relation reflexive N-ary symmetric relations transitive x == y ? “x and y have common divisor”? x ≤ y ? “x-y is even”?

Examples

Discrete Mathematics

(c) Marcin Sydow

Properties Equivalence Examples? (assume X is the set of all positive naturals) relation

Order relation

N-ary relations “x and y have common divisor”? x ≤ y ? “x-y is even”?

Examples

Discrete Mathematics

(c) Marcin Sydow

Properties Equivalence Examples? (assume X is the set of all positive naturals) relation

Order x == y ? relation

N-ary relations x ≤ y ? “x-y is even”?

Examples

Discrete Mathematics

(c) Marcin Sydow

Properties Equivalence Examples? (assume X is the set of all positive naturals) relation

Order x == y ? relation “x and y have common divisor”? N-ary relations “x-y is even”?

Examples

Discrete Mathematics

(c) Marcin Sydow

Properties Equivalence Examples? (assume X is the set of all positive naturals) relation

Order x == y ? relation “x and y have common divisor”? N-ary relations x ≤ y ? Examples

Discrete Mathematics

(c) Marcin Sydow

Properties Equivalence Examples? (assume X is the set of all positive naturals) relation

Order x == y ? relation “x and y have common divisor”? N-ary relations x ≤ y ? “x-y is even”? Equivalence

Discrete Mathematics

(c) Marcin Sydow An of the x ∈ X of the equivalence relation R ⊆ X 2 is defined as: Properties

Equivalence relation [x]R = {y ∈ X : xRy} Order relation (notice that, due to symmetry of equivalence relation, xRy is N-ary relations equivalent to yRx)

For [x]R , x is called the representative of this equivalence class. There can be many representatives of the same equivalence class. odd an even numbers form two blocks of partition of

Partition of a set

Discrete Mathematics

(c) Marcin Sydow A family F of non-empty of some set X is called Properties partition of X if the following two conditions hold: Equivalence relation

Order for any two different A, B ∈ F it holds that A ∩ B = ∅ relation X is the of all sets from F (X = S F ) N-ary relations Each set from F is called a partition block. Examples?

Discrete Mathematics

(c) Marcin Sydow A family F of non-empty subsets of some set X is called Properties partition of X if the following two conditions hold: Equivalence relation

Order for any two different A, B ∈ F it holds that A ∩ B = ∅ relation X is the union of all sets from F (X = S F ) N-ary relations Each set from F is called a partition block. Examples? odd an even numbers form two blocks of partition of integers Properties of equivalence classes

Discrete Mathematics

(c) Marcin Sydow If [x]R and [y]R are two equivalence classes of some equivalence relation R, then either: Properties

Equivalence relation [x]R ∩ [y]R = ∅ (do not intersect) Order or: relation

N-ary [x]R == [y]R (are identical) relations

Since ∀x ∈ X [x]R 6= ∅ (due to reflexivity of R), and different equivalence classes are disjoint the following holds: The equivalence classes partition the domain of the equivalence relation. Example

Discrete Mathematics

(c) Marcin Sydow

Properties

Equivalence What are the equivalence classes of the following equivalence relation relations? Order relation

N-ary x == y relations “x has the same diploma supervisor as y” Quotient of the set by equivalence relation R (operation of abstraction)

Discrete Mathematics

(c) Marcin Sydow Given an equivalence relation R ⊆ X 2 we call the family of all Properties its equivalence classes the quotient of X by R: Equivalence relation X /R = {[x]R : x ∈ X } Order relation (the similarity to division symbol for numbers is not N-ary relations coincidental, since it has some similar properties) The X /R operation is also called the “abstraction operation”, i.e. we abstract from any properties that are indifferent for the equivalence relation R. X is the set of natural numbers and R is equality (x = y)? P is the set of students and R is the set of pairs of students that have the same diploma supervisor?

Example

Discrete Mathematics

(c) Marcin Sydow

Properties Equivalence What is X /R if: relation

Order relation

N-ary relations P is the set of students and R is the set of pairs of students that have the same diploma supervisor?

Example

Discrete Mathematics

(c) Marcin Sydow

Properties Equivalence What is X /R if: relation

Order relation X is the set of natural numbers and R is equality (x = y)?

N-ary relations Example

Discrete Mathematics

(c) Marcin Sydow

Properties Equivalence What is X /R if: relation

Order relation X is the set of natural numbers and R is equality (x = y)? N-ary P is the set of students and R is the set of pairs of relations students that have the same diploma supervisor? Order

Discrete Mathematics 2 (c) Marcin Consider a relation R ⊆ X is called a partial order and four Sydow properties:

Properties

Equivalence 1 reflexive relation 2 anti-symmetric Order relation 3 transitive N-ary relations 4 ∀x, y ∈ X xRy ∨ yRx

Relation R is: partial order if it satisfies conditions 1-3 above quasi order if it satisfies only 1 and 2 linear order if it satisfies all conditions 1-4 above Examples

Discrete Mathematics

(c) Marcin Sydow

Properties Is the following relation a partial order, quasi order, linear order, Equivalence ? relation

Order relation ≤ (on numbers) ? N-ary ∆ (on any set)? (“x=y”) relations < (on numbers) ⊆ (on sets)? Generalisation: n-ary relation

Discrete Mathematics

(c) Marcin Sydow An n-ary relation R, for n ∈ N is defined as R ⊆ X1 × X2 ... Xn. Properties Binary relation is a special case for n = 2. Equivalence relation In particular, for: Order n = 1, 1-ary relation is the set of some elements of the relation domain that satisfy some property (e.g. even numbers, N-ary relations etc.) n = 0, 0-ary relation, that is empty can be theoretically interpreted as a constant in the domain of the relation (e.g. “0” in natural numbers) that has some special properties Example tasks/questions/problems

Discrete Mathematics

(c) Marcin Sydow

Properties For each of the following: precise definition and ability to Equivalence relation compute on the given example (if applicable): Order Relation and basic concepts relation

N-ary Properties of binary relations relations Composition and inverse Equivalence relation, equivalence classes Discrete Mathematics

(c) Marcin Sydow

Properties

Equivalence relation

Order relation Thank you for your attention.

N-ary relations