Binary relation
Transitive binary relations | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
indicates that the column's property is always true for the row's term (at the very left), while ✗ indicates that the property is not guaranteed in general (it might, or might not, hold). For example, that every equivalence relation is symmetric, but not necessarily antisymmetric, is indicated by in the "Symmetric" column and ✗ in the "Antisymmetric" column, respectively. All definitions tacitly require the homogeneous relation be transitive: for all if and then |
In mathematics, a binary relation associates elements of one set called the domain with elements of another set called the codomain.[1] Precisely, a binary relation over sets and is a set of ordered pairs where is in and is in .[2] It encodes the common concept of relation: an element is related to an element , if and only if the pair belongs to the set of ordered pairs that defines the binary relation.
An example of a binary relation is the "divides" relation over the set of prime numbers and the set of integers , in which each prime is related to each integer that is a multiple of , but not to an integer that is not a multiple of . In this relation, for instance, the prime number is related to numbers such as , , , , but not to or , just as the prime number is related to , , and , but not to or .
Binary relations, and especially homogeneous relations, are used in many branches of mathematics to model a wide variety of concepts. These include, among others:
- the "is greater than", "is equal to", and "divides" relations in arithmetic;
- the "is congruent to" relation in geometry;
- the "is adjacent to" relation in graph theory;
- the "is orthogonal to" relation in linear algebra.
A function may be defined as a binary relation that meets additional constraints.[3] Binary relations are also heavily used in computer science.
A binary relation over sets and is an element of the power set of Since the latter set is ordered by inclusion (), each relation has a place in the lattice of subsets of A binary relation is called a homogeneous relation when . A binary relation is also called a heterogeneous relation when it is not necessary that .
Since relations are sets, they can be manipulated using set operations, including union, intersection, and complementation, and satisfying the laws of an algebra of sets. Beyond that, operations like the converse of a relation and the composition of relations are available, satisfying the laws of a calculus of relations, for which there are textbooks by Ernst Schröder,[4] Clarence Lewis,[5] and Gunther Schmidt.[6] A deeper analysis of relations involves decomposing them into subsets called concepts, and placing them in a complete lattice.
In some systems of axiomatic set theory, relations are extended to classes, which are generalizations of sets. This extension is needed for, among other things, modeling the concepts of "is an element of" or "is a subset of" in set theory, without running into logical inconsistencies such as Russell's paradox.
A binary relation is the most studied special case of an -ary relation over sets , which is a subset of the Cartesian product [2]
Definition
[edit]Given sets and , the Cartesian product is defined as and its elements are called ordered pairs.
A binary relation over sets and is a subset of [2][7] The set is called the domain[2] or set of departure of , and the set the codomain or set of destination of . In order to specify the choices of the sets and , some authors define a binary relation or correspondence as an ordered triple , where is a subset of called the graph of the binary relation. The statement reads " is -related to " and is denoted by .[4][5][6][note 1] The domain of definition or active domain[2] of is the set of all such that for at least one . The codomain of definition, active codomain,[2] image or range of is the set of all such that for at least one . The field of is the union of its domain of definition and its codomain of definition.[9][10][11]
When a binary relation is called a homogeneous relation (or endorelation). To emphasize the fact that and are allowed to be different, a binary relation is also called a heterogeneous relation.[12][13][14] The prefix hetero is from the Greek ἕτερος (heteros, "other, another, different").
A heterogeneous relation has been called a rectangular relation,[14] suggesting that it does not have the square-like symmetry of a homogeneous relation on a set where Commenting on the development of binary relations beyond homogeneous relations, researchers wrote, "... a variant of the theory has evolved that treats relations from the very beginning as heterogeneous or rectangular, i.e. as relations where the normal case is that they are relations between different sets."[15]
The terms correspondence,[16] dyadic relation and two-place relation are synonyms for binary relation, though some authors use the term "binary relation" for any subset of a Cartesian product without reference to and , and reserve the term "correspondence" for a binary relation with reference to and .[citation needed]
In a binary relation, the order of the elements is important; if then can be true or false independently of . For example, divides , but does not divide .
Operations
[edit]Union
[edit]If and are binary relations over sets and then is the union relation of and over and .
The identity element is the empty relation. For example, is the union of < and =, and is the union of > and =.
Intersection
[edit]If and are binary relations over sets and then is the intersection relation of and over and .
The identity element is the universal relation. For example, the relation "is divisible by 6" is the intersection of the relations "is divisible by 3" and "is divisible by 2".
Composition
[edit]If is a binary relation over sets and , and is a binary relation over sets and then (also denoted by ) is the composition relation of and over and .
The identity element is the identity relation. The order of and in the notation used here agrees with the standard notational order for composition of functions. For example, the composition (is parent of)(is mother of) yields (is maternal grandparent of), while the composition (is mother of)(is parent of) yields (is grandmother of). For the former case, if is the parent of and is the mother of , then is the maternal grandparent of .
Converse
[edit]If is a binary relation over sets and then is the converse relation,[17] also called inverse relation,[18] of over and .
For example, is the converse of itself, as is , and and are each other's converse, as are and . A binary relation is equal to its converse if and only if it is symmetric.
Complement
[edit]If is a binary relation over sets and then (also denoted by ) is the complementary relation of over and .
For example, and are each other's complement, as are and , and , and , and for total orders also and , and and .
The complement of the converse relation is the converse of the complement:
If the complement has the following properties:
- If a relation is symmetric, then so is the complement.
- The complement of a reflexive relation is irreflexive—and vice versa.
- The complement of a strict weak order is a total preorder—and vice versa.
Restriction
[edit]If is a binary homogeneous relation over a set and is a subset of then is the restriction relation of to over .
If is a binary relation over sets and and if is a subset of then is the left-restriction relation of to over and .[clarification needed]
If a relation is reflexive, irreflexive, symmetric, antisymmetric, asymmetric, transitive, total, trichotomous, a partial order, total order, strict weak order, total preorder (weak order), or an equivalence relation, then so too are its restrictions.
However, the transitive closure of a restriction is a subset of the restriction of the transitive closure, i.e., in general not equal. For example, restricting the relation " is parent of " to females yields the relation " is mother of the woman "; its transitive closure does not relate a woman with her paternal grandmother. On the other hand, the transitive closure of "is parent of" is "is ancestor of"; its restriction to females does relate a woman with her paternal grandmother.
Also, the various concepts of completeness (not to be confused with being "total") do not carry over to restrictions. For example, over the real numbers a property of the relation is that every non-empty subset with an upper bound in has a least upper bound (also called supremum) in However, for the rational numbers this supremum is not necessarily rational, so the same property does not hold on the restriction of the relation to the rational numbers.
A binary relation over sets and is said to be contained in a relation over and , written if is a subset of , that is, for all and if , then . If is contained in and is contained in , then and are called equal written . If is contained in but is not contained in , then is said to be smaller than , written For example, on the rational numbers, the relation is smaller than , and equal to the composition .
Matrix representation
[edit]Binary relations over sets and can be represented algebraically by logical matrices indexed by and with entries in the Boolean semiring (addition corresponds to OR and multiplication to AND) where matrix addition corresponds to union of relations, matrix multiplication corresponds to composition of relations (of a relation over and and a relation over and ),[19] the Hadamard product corresponds to intersection of relations, the zero matrix corresponds to the empty relation, and the matrix of ones corresponds to the universal relation. Homogeneous relations (when ) form a matrix semiring (indeed, a matrix semialgebra over the Boolean semiring) where the identity matrix corresponds to the identity relation.[20]
Examples
[edit]ball | car | doll | cup | |
---|---|---|---|---|
John | + | − | − | − |
Mary | − | − | + | − |
Venus | − | + | − | − |
ball | car | doll | cup | |
---|---|---|---|---|
John | + | − | − | − |
Mary | − | − | + | − |
Ian | − | − | − | − |
Venus | − | + | − | − |
- The following example shows that the choice of codomain is important. Suppose there are four objects and four people A possible relation on and is the relation "is owned by", given by That is, John owns the ball, Mary owns the doll, and Venus owns the car. Nobody owns the cup and Ian owns nothing; see the 1st example. As a set, does not involve Ian, and therefore could have been viewed as a subset of i.e. a relation over and see the 2nd example. But in that second example, contains no information about the ownership by Ian.
While the 2nd example relation is surjective (see below), the 1st is not.
Ocean borders continent NA SA AF EU AS AU AA Indian 0 0 1 0 1 1 1 Arctic 1 0 0 1 1 0 0 Atlantic 1 1 1 1 0 0 1 Pacific 1 1 0 0 1 1 1 - Let , the oceans of the globe, and , the continents. Let represent that ocean borders continent . Then the logical matrix for this relation is:
- Visualization of relations leans on graph theory: For relations on a set (homogeneous relations), a directed graph illustrates a relation and a graph a symmetric relation. For heterogeneous relations a hypergraph has edges possibly with more than two nodes, and can be illustrated by a bipartite graph. Just as the clique is integral to relations on a set, so bicliques are used to describe heterogeneous relations; indeed, they are the "concepts" that generate a lattice associated with a relation.
- Hyperbolic orthogonality: Time and space are different categories, and temporal properties are separate from spatial properties. The idea of simultaneous events is simple in absolute time and space since each time determines a simultaneous hyperplane in that cosmology. Hermann Minkowski changed that when he articulated the notion of relative simultaneity, which exists when spatial events are "normal" to a time characterized by a velocity. He used an indefinite inner product, and specified that a time vector is normal to a space vector when that product is zero. The indefinite inner product in a composition algebra is given by
- where the overbar denotes conjugation.
- A geometric configuration can be considered a relation between its points and its lines. The relation is expressed as incidence. Finite and infinite projective and affine planes are included. Jakob Steiner pioneered the cataloguing of configurations with the Steiner systems which have an n-element set and a set of k-element subsets called blocks, such that a subset with elements lies in just one block. These incidence structures have been generalized with block designs. The incidence matrix used in these geometrical contexts corresponds to the logical matrix used generally with binary relations.
- An incidence structure is a triple where and are any two disjoint sets and is a binary relation between and , i.e. The elements of will be called points, those of blocks, and those of flags.[22]
Types of binary relations
[edit]Some important types of binary relations over sets and are listed below.
Uniqueness properties:
- Injective[23] (also called left-unique[24]): for all and all if and then . In other words, every element of the codomain has at most one preimage element. For such a relation, is called a primary key of .[2] For example, the green and blue binary relations in the diagram are injective, but the red one is not (as it relates both and to ), nor the black one (as it relates both and to ).
- Functional[23][25][26] (also called right-unique[24] or univalent[27]): for all and all if and then . In other words, every element of the domain has at most one image element. Such a binary relation is called a partial function or partial mapping.[28] For such a relation, is called a primary key of .[2] For example, the red and green binary relations in the diagram are functional, but the blue one is not (as it relates to both and ), nor the black one (as it relates to both and ).
- One-to-one: injective and functional. For example, the green binary relation in the diagram is one-to-one, but the red, blue and black ones are not.
- One-to-many: injective and not functional. For example, the blue binary relation in the diagram is one-to-many, but the red, green and black ones are not.
- Many-to-one: functional and not injective. For example, the red binary relation in the diagram is many-to-one, but the green, blue and black ones are not.
- Many-to-many: not injective nor functional. For example, the black binary relation in the diagram is many-to-many, but the red, green and blue ones are not.
Totality properties (only definable if the domain and codomain are specified):
- Total[23] (also called left-total[24]): for all there exists a such that . In other words, every element of the domain has at least one image element. In other words, the domain of definition of is equal to . This property, is different from the definition of connected (also called total by some authors)[citation needed] in Properties. Such a binary relation is called a multivalued function. For example, the red and green binary relations in the diagram are total, but the blue one is not (as it does not relate to any real number), nor the black one (as it does not relate to any real number). As another example, is a total relation over the integers. But it is not a total relation over the positive integers, because there is no in the positive integers such that .[29] However, is a total relation over the positive integers, the rational numbers and the real numbers. Every reflexive relation is total: for a given , choose .
- Surjective[23] (also called right-total[24]): for all , there exists an such that . In other words, every element of the codomain has at least one preimage element. In other words, the codomain of definition of is equal to . For example, the green and blue binary relations in the diagram are surjective, but the red one is not (as it does not relate any real number to ), nor the black one (as it does not relate any real number to ).
Uniqueness and totality properties (only definable if the domain and codomain are specified):
- A function (also called mapping[24]): a binary relation that is functional and total. In other words, every element of the domain has exactly one image element. For example, the red and green binary relations in the diagram are functions, but the blue and black ones are not.
- An injection: a function that is injective. For example, the green relation in the diagram is an injection, but the red one is not; the black and the blue relation is not even a function.
- A surjection: a function that is surjective. For example, the green relation in the diagram is a surjection, but the red one is not.
- A bijection: a function that is injective and surjective. In other words, every element of the domain has exactly one image element and every element of the codomain has exactly one preimage element. For example, the green binary relation in the diagram is a bijection, but the red one is not.
If relations over proper classes are allowed:
- Set-like (also called local): for all , the class of all such that , i.e. , is a set. For example, the relation is set-like, and every relation on two sets is set-like.[30] The usual ordering < over the class of ordinal numbers is a set-like relation, while its inverse > is not.[citation needed]
Sets versus classes
[edit]Certain mathematical "relations", such as "equal to", "subset of", and "member of", cannot be understood to be binary relations as defined above, because their domains and codomains cannot be taken to be sets in the usual systems of axiomatic set theory. For example, to model the general concept of "equality" as a binary relation , take the domain and codomain to be the "class of all sets", which is not a set in the usual set theory.
In most mathematical contexts, references to the relations of equality, membership and subset are harmless because they can be understood implicitly to be restricted to some set in the context. The usual work-around to this problem is to select a "large enough" set , that contains all the objects of interest, and work with the restriction instead of . Similarly, the "subset of" relation needs to be restricted to have domain and codomain (the power set of a specific set ): the resulting set relation can be denoted by Also, the "member of" relation needs to be restricted to have domain and codomain to obtain a binary relation that is a set. Bertrand Russell has shown that assuming to be defined over all sets leads to a contradiction in naive set theory, see Russell's paradox.
Another solution to this problem is to use a set theory with proper classes, such as NBG or Morse–Kelley set theory, and allow the domain and codomain (and so the graph) to be proper classes: in such a theory, equality, membership, and subset are binary relations without special comment. (A minor modification needs to be made to the concept of the ordered triple , as normally a proper class cannot be a member of an ordered tuple; or of course one can identify the binary relation with its graph in this context.)[31] With this definition one can for instance define a binary relation over every set and its power set.
Homogeneous relation
[edit]A homogeneous relation over a set is a binary relation over and itself, i.e. it is a subset of the Cartesian product [14][32][33] It is also simply called a (binary) relation over .
A homogeneous relation over a set may be identified with a directed simple graph permitting loops, where is the vertex set and is the edge set (there is an edge from a vertex to a vertex if and only if ). The set of all homogeneous relations over a set is the power set which is a Boolean algebra augmented with the involution of mapping of a relation to its converse relation. Considering composition of relations as a binary operation on , it forms a semigroup with involution.
Some important properties that a homogeneous relation over a set may have are:
- Reflexive: for all . For example, is a reflexive relation but > is not.
- Irreflexive: for all not . For example, is an irreflexive relation, but is not.
- Symmetric: for all if then . For example, "is a blood relative of" is a symmetric relation.
- Antisymmetric: for all if and then For example, is an antisymmetric relation.[34]
- Asymmetric: for all if then not . A relation is asymmetric if and only if it is both antisymmetric and irreflexive.[35] For example, > is an asymmetric relation, but is not.
- Transitive: for all if and then . A transitive relation is irreflexive if and only if it is asymmetric.[36] For example, "is ancestor of" is a transitive relation, while "is parent of" is not.
- Connected: for all if then or .
- Strongly connected: for all or .
- Dense: for all if then some exists such that and .
A partial order is a relation that is reflexive, antisymmetric, and transitive. A strict partial order is a relation that is irreflexive, asymmetric, and transitive. A total order is a relation that is reflexive, antisymmetric, transitive and connected.[37] A strict total order is a relation that is irreflexive, asymmetric, transitive and connected. An equivalence relation is a relation that is reflexive, symmetric, and transitive. For example, " divides " is a partial, but not a total order on natural numbers "" is a strict total order on and " is parallel to " is an equivalence relation on the set of all lines in the Euclidean plane.
All operations defined in section § Operations also apply to homogeneous relations. Beyond that, a homogeneous relation over a set may be subjected to closure operations like:
- Reflexive closure
- the smallest reflexive relation over containing ,
- Transitive closure
- the smallest transitive relation over containing ,
- Equivalence closure
- the smallest equivalence relation over containing .
Calculus of relations
[edit]Developments in algebraic logic have facilitated usage of binary relations. The calculus of relations includes the algebra of sets, extended by composition of relations and the use of converse relations. The inclusion meaning that implies , sets the scene in a lattice of relations. But since the inclusion symbol is superfluous. Nevertheless, composition of relations and manipulation of the operators according to Schröder rules, provides a calculus to work in the power set of
In contrast to homogeneous relations, the composition of relations operation is only a partial function. The necessity of matching target to source of composed relations has led to the suggestion that the study of heterogeneous relations is a chapter of category theory as in the category of sets, except that the morphisms of this category are relations. The objects of the category Rel are sets, and the relation-morphisms compose as required in a category.[citation needed]
Induced concept lattice
[edit]Binary relations have been described through their induced concept lattices: A concept satisfies two properties:
- The logical matrix of is the outer product of logical vectors logical vectors.[clarification needed]
- is maximal, not contained in any other outer product. Thus is described as a non-enlargeable rectangle.
For a given relation the set of concepts, enlarged by their joins and meets, forms an "induced lattice of concepts", with inclusion forming a preorder.
The MacNeille completion theorem (1937) (that any partial order may be embedded in a complete lattice) is cited in a 2013 survey article "Decomposition of relations on concept lattices".[38] The decomposition is
- , where and are functions, called mappings or left-total, functional relations in this context. The "induced concept lattice is isomorphic to the cut completion of the partial order that belongs to the minimal decomposition of the relation ."
Particular cases are considered below: total order corresponds to Ferrers type, and identity corresponds to difunctional, a generalization of equivalence relation on a set.
Relations may be ranked by the Schein rank which counts the number of concepts necessary to cover a relation.[39] Structural analysis of relations with concepts provides an approach for data mining.[40]
Particular relations
[edit]- Proposition: If is a surjective relation and is its transpose, then where is the identity relation.
- Proposition: If is a serial relation, then where is the identity relation.
Difunctional
[edit]The idea of a difunctional relation is to partition objects by distinguishing attributes, as a generalization of the concept of an equivalence relation. One way this can be done is with an intervening set of indicators. The partitioning relation is a composition of relations using functional relations Jacques Riguet named these relations difunctional since the composition involves functional relations, commonly called partial functions.
In 1950 Riguet showed that such relations satisfy the inclusion:[41]
In automata theory, the term rectangular relation has also been used to denote a difunctional relation. This terminology recalls the fact that, when represented as a logical matrix, the columns and rows of a difunctional relation can be arranged as a block matrix with rectangular blocks of ones on the (asymmetric) main diagonal.[42] More formally, a relation on is difunctional if and only if it can be written as the union of Cartesian products , where the are a partition of a subset of and the likewise a partition of a subset of .[43]
Using the notation , a difunctional relation can also be characterized as a relation such that wherever and have a non-empty intersection, then these two sets coincide; formally implies [44]
In 1997 researchers found "utility of binary decomposition based on difunctional dependencies in database management."[45] Furthermore, difunctional relations are fundamental in the study of bisimulations.[46]
In the context of homogeneous relations, a partial equivalence relation is difunctional.
Ferrers type
[edit]A strict order on a set is a homogeneous relation arising in order theory. In 1951 Jacques Riguet adopted the ordering of an integer partition, called a Ferrers diagram, to extend ordering to binary relations in general.[47]
The corresponding logical matrix of a general binary relation has rows which finish with a sequence of ones. Thus the dots of a Ferrer's diagram are changed to ones and aligned on the right in the matrix.
An algebraic statement required for a Ferrers type relation R is
If any one of the relations is of Ferrers type, then all of them are. [48]
Contact
[edit]Suppose is the power set of , the set of all subsets of . Then a relation is a contact relation if it satisfies three properties:
The set membership relation, "is an element of", satisfies these properties so is a contact relation. The notion of a general contact relation was introduced by Georg Aumann in 1970.[49][50]
In terms of the calculus of relations, sufficient conditions for a contact relation include where is the converse of set membership ().[51]: 280
Preorder R\R
[edit]Every relation generates a preorder which is the left residual.[52] In terms of converse and complements, Forming the diagonal of , the corresponding row of and column of will be of opposite logical values, so the diagonal is all zeros. Then
- , so that is a reflexive relation.
To show transitivity, one requires that Recall that is the largest relation such that Then
- (repeat)
- (Schröder's rule)
- (complementation)