Relations: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
 
(22 intermediate revisions by the same user not shown)
Line 2: Line 2:


* [[Mathematics]]
* [[Mathematics]]
* [[Data Structures#Totally_Ordered_Set|Data Structures]]


=Overview=
=Overview=
Line 11: Line 12:
A n-ary relation on sets A<sub>1</sub>, A<sub>2</sub>, .... A<sub>n</sub> is a subset of the Cartesian product A<sub>1</sub> x A<sub>2</sub> x ... x A<sub>n</sub>.
A n-ary relation on sets A<sub>1</sub>, A<sub>2</sub>, .... A<sub>n</sub> is a subset of the Cartesian product A<sub>1</sub> x A<sub>2</sub> x ... x A<sub>n</sub>.


An example of a binary relation on a finite set is the [[Graph#Concepts|edge set]] of a graph.
An example of a binary relation on a finite set is the [[Graph_Concepts#Graph_Definition|edge set]] of a graph.


=Binary Relation Properties=
=Binary Relation Properties=


<span id='Reflexive_Relation'></span>A binary relation R ⊆ A x A is '''reflexive''' if ''a R a'' for all a ∈ A.
<span id='Reflexive_Relation'></span>A binary relation R ⊆ A x A is '''reflexive''' if <code>a R a</code> for all a ∈ A.


<span id='Symmetric_Relation'></span>A binary relation R ⊆ A x A is '''symmetric''' if ''a R b'' implies ''b R a'' for all a, b ∈ A.
<span id='Symmetric_Relation'></span>A binary relation R ⊆ A x A is '''symmetric''' if <code>a R b</code> implies <code>b R a</code> for all a, b ∈ A.


<span id='Transitive_Relation'></span>A binary relation R ⊆ A x A is '''transitive''' if ''a R b'' and ''b R c'' implies ''a R c'' for all a, b, c ∈ A.
<span id='Transitive_Relation'></span>A binary relation R ⊆ A x A is '''transitive''' if <code>a R b</code> and <code>b R c</code> implies <code>a R c</code> for all a, b, c ∈ A.


<span id='Antysymmetric_Relation'></span>A binary relation R ⊆ A x A is '''antisymmetric''' if ''a R b'' and ''b R a'' imply a = b. For example, the "≤" relation on natural numbers is antisymmetric, since a ≤ b and b ≤ a imply a = b.
<span id='Antysymmetric_Relation'></span>A binary relation R ⊆ A x A is '''antisymmetric''' if <code>a R b</code> and <code>b R a</code> imply a = b. For example, the "≤" relation on natural numbers is antisymmetric, since a ≤ b and b ≤ a imply a = b.


=Equivalence=
=Equivalence=


<span id=Equivalence_Relation'></span>A relation that is [[#Reflexive_Relation|reflexive]], [[#Symmetric_Relation|symmetric]] and [[#Transitive_Relation|transitive]] is an '''equivalence relation'''. For example, "=" is an equivalence relation on the natural numbers.
<span id=Equivalence_Relation'></span>A relation that is:
# [[#Reflexive_Relation|reflexive]]
# [[#Symmetric_Relation|symmetric]]
# [[#Transitive_Relation|transitive]]  
is an '''equivalence relation'''. For example, "=" is an equivalence relation on the natural numbers.
 
Informally, when you want to say "the maximal subset of something where everything is the same", the right way to make that mathematical is to use an equivalence relation.
 
==Equivalence Class==
 
Equivalence relations have equivalence classes.
 
If R is an [[#Equivalence_Relation|equivalence relation]] on the set A, then for a ∈ A, the '''equivalence class''' of a is the set [a] = {b ∈ A, where a R b}. In other words, the equivalence set of a is the set of all elements equivalent to a, relative to relation R.


<span id=Equivalence_Class'></span>'''Equivalence class'''. If R is an [[#Equivalence_Relation|equivalence relation]] on the set A, then for a ∈ A, the '''equivalence class''' of a is the set [a] = {b ∈ A, where a R b}. In other words, the equivalence set of a is the set of all elements equivalent to a, relative to relation R.


'''Theorem: An equivalence relation is the same as a partition'''. The equivalence classes of any equivalence relation R on a set A for a partition of A, and any partition of A determines an equivalence relation on A for which the sets in the partition are the equivalence classes.
'''Theorem: An equivalence relation is the same as a partition'''. The equivalence classes of any equivalence relation R on a set A for a partition of A, and any partition of A determines an equivalence relation on A for which the sets in the partition are the equivalence classes.
Line 33: Line 45:
=Partial Order=
=Partial Order=


A relation that is [[#Reflexive_Relation|reflexive]], [[#Antisymmetric_Relation|antisymmetric]] and [[#Transitive_Relation|transitive]] is a '''partial order'''. We call a set on which a partial order is defined a '''partially ordered set'''.
A relation that is:
# [[#Reflexive_Relation|reflexive]]
# [[#Antisymmetric_Relation|antisymmetric]]  
# [[#Transitive_Relation|transitive]]  
is a '''partial order'''. We call a set on which a partial order is defined a '''partially ordered set'''.


For example, the relation "is a descendant of" is a partial order on the set of all people, if we allow that individuals are being their own descendants.
For example, the relation "is a descendant of" is a partial order on the set of all people, if we allow that individuals are being their own descendants.


In a partially ordered set, there may be no single "maximum" element a such that ''b R a'' for all b ∈ A. Instead, the set may contain several '''maximal''' elements a such that for no b ∈ A, where b ≠ a, is it the case that ''a R b''.
In a partially ordered set, there may be no single "maximum" element a such that <code>b R a</code> for all b ∈ A. Instead, the set may contain several '''maximal''' elements a such that for no b ∈ A, where b ≠ a, is it the case that <code>a R b</code>.
 
=Total Relation=
 
A relation R on a set A is a '''total relation''' if for all a, b ∈ A, we have <code>a R b</code> or <code>b R a</code>, or both. In other words, every pairing of elements of A is related by R. This is also known as the comparability condition or the trichotomy law.


=Total Order=
=Total Order=
{{External|https://mathworld.wolfram.com/TotallyOrderedSet.html}}


<span id='Total_Relation'></span>A relation R on a set A is a '''total relation''' if for all a, b ∈ A, we have ''a R b'' or ''b R a'', or both. In other words, every pairing of elements of A is related by R.
A '''total order''' (or '''linear order''', '''totally ordered set''', '''linearly ordered set''') is a [[Set|set]] plus a relation on the set, called a "total order", that satisfies the axioms of the [[#Partial_Order|partial order]] ([[#Reflexive_Relation|reflexivity]], [[#Antisymmetric_Relation|antisymmetry]] and [[#Transitive_Relation|transitivity]]) plus an additional condition known as the comparability condition or the trichotomy law.


A [[#Partial_Order|partial order]] that is also a [[#Total_Relation|total relation]] is a '''total order''' or '''linear order'''.  
The comparability condition, or the trichotomy law, states that for any a, b ∈ S, either <code>a R b</code> or <code>b R a</code>.


For example, the relation "≤" is a total order on the natural numbers, but the "is a descendant of" relation is not a total order on the set of all people, since there are individuals neither of whom is descendant of the other.
For example, the relation "≤" is a total order on the natural numbers, but the "is a descendant of" relation is not a total order on the set of all people, since there are individuals neither of whom is descendant of the other.

Latest revision as of 23:34, 1 October 2021

Internal

Overview

A binary relation R on two sets A and B is a subset of the Cartesian product A x B. If (a, b) belongs to the subset of the Cartesian product that defines the relation, we write a R b.

A binary relation R on a set A is a subset of the Cartesian product A x A.

A n-ary relation on sets A1, A2, .... An is a subset of the Cartesian product A1 x A2 x ... x An.

An example of a binary relation on a finite set is the edge set of a graph.

Binary Relation Properties

A binary relation R ⊆ A x A is reflexive if a R a for all a ∈ A.

A binary relation R ⊆ A x A is symmetric if a R b implies b R a for all a, b ∈ A.

A binary relation R ⊆ A x A is transitive if a R b and b R c implies a R c for all a, b, c ∈ A.

A binary relation R ⊆ A x A is antisymmetric if a R b and b R a imply a = b. For example, the "≤" relation on natural numbers is antisymmetric, since a ≤ b and b ≤ a imply a = b.

Equivalence

A relation that is:

  1. reflexive
  2. symmetric
  3. transitive

is an equivalence relation. For example, "=" is an equivalence relation on the natural numbers.

Informally, when you want to say "the maximal subset of something where everything is the same", the right way to make that mathematical is to use an equivalence relation.

Equivalence Class

Equivalence relations have equivalence classes.

If R is an equivalence relation on the set A, then for a ∈ A, the equivalence class of a is the set [a] = {b ∈ A, where a R b}. In other words, the equivalence set of a is the set of all elements equivalent to a, relative to relation R.


Theorem: An equivalence relation is the same as a partition. The equivalence classes of any equivalence relation R on a set A for a partition of A, and any partition of A determines an equivalence relation on A for which the sets in the partition are the equivalence classes.

Partial Order

A relation that is:

  1. reflexive
  2. antisymmetric
  3. transitive

is a partial order. We call a set on which a partial order is defined a partially ordered set.

For example, the relation "is a descendant of" is a partial order on the set of all people, if we allow that individuals are being their own descendants.

In a partially ordered set, there may be no single "maximum" element a such that b R a for all b ∈ A. Instead, the set may contain several maximal elements a such that for no b ∈ A, where b ≠ a, is it the case that a R b.

Total Relation

A relation R on a set A is a total relation if for all a, b ∈ A, we have a R b or b R a, or both. In other words, every pairing of elements of A is related by R. This is also known as the comparability condition or the trichotomy law.

Total Order

https://mathworld.wolfram.com/TotallyOrderedSet.html

A total order (or linear order, totally ordered set, linearly ordered set) is a set plus a relation on the set, called a "total order", that satisfies the axioms of the partial order (reflexivity, antisymmetry and transitivity) plus an additional condition known as the comparability condition or the trichotomy law.

The comparability condition, or the trichotomy law, states that for any a, b ∈ S, either a R b or b R a.

For example, the relation "≤" is a total order on the natural numbers, but the "is a descendant of" relation is not a total order on the set of all people, since there are individuals neither of whom is descendant of the other.

A total relation that is transitive, but not necessarily reflexive and antisymmetric is a total preorder.

TODO

CLRS page 1163