Binary relation
Transitive binary relations | |||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||
indicates that the column's property is always true 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] A binary relation over sets X and Y is a set of ordered pairs (x, y) consisting of elements x from X and y from Y.[2] It is a generalization of the more widely understood idea of a unary function. It encodes the common concept of relation: an element x is related to an element y, if and only if the pair (x, y) belongs to the set of ordered pairs that defines the binary relation. A binary relation is the most studied special case n = 2 of an n-ary relation over sets X1, ..., Xn, which is a subset of the Cartesian product [2]
An example of a binary relation is the "
Binary 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 X and Y is an element of the power set of Since the latter set is ordered by
Since relations are sets, they can be manipulated using set operations, including
In some systems of
The terms correspondence,[7] 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 X and Y, and reserve the term "correspondence" for a binary relation with reference to X and Y.[citation needed]
Definition
Given sets X and Y, the Cartesian product is defined as and its elements are called ordered pairs.
A binary relation R over sets X and Y is a subset of [2][8] The set X is called the domain[2] or set of departure of R, and the set Y the codomain or set of destination of R. In order to specify the choices of the sets X and Y, some authors define a binary relation or correspondence as an ordered triple (X, Y, G), where G is a subset of called the graph of the binary relation. The statement reads "x is R-related to y" and is denoted by xRy.[4][5][6][note 1] The domain of definition or active domain[2] of R is the set of all x such that xRy for at least one y. The codomain of definition, active codomain,[2] image or range of R is the set of all y such that xRy for at least one x. The field of R is the union of its domain of definition and its codomain of definition.[10][11][12]
When a binary relation is called a homogeneous relation (or endorelation). To emphasize the fact that X and Y are allowed to be different, a binary relation is also called a heterogeneous relation.[13][14][15]
In a binary relation, the order of the elements is important; if then yRx can be true or false independently of xRy. For example, 3 divides 9, but 9 does not divide 3.
Operations
Union
If R and S are binary relations over sets X and Y then is the union relation of R and S over X and Y.
The identity element is the empty relation. For example, is the union of < and =, and is the union of > and =.
Intersection
If R and S are binary relations over sets X and Y then is the intersection relation of R and S over X and Y.
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
If R is a binary relation over sets X and Y, and S is a binary relation over sets Y and Z then (also denoted by R; S) is the composition relation of R and S over X and Z.
The identity element is the identity relation. The order of R and S in the notation used here agrees with the standard notational order for
Converse
If R is a binary relation over sets X and Y then is the converse relation,[16] also called inverse relation,[17] of R over Y and X.
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
If R is a binary relation over sets X and Y then (also denoted by R or ¬ R) is the complementary relation of R over X and Y.
For example, and are each other's complement, as are and 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 orderis a total preorder—and vice versa.
Restriction
If R is a binary homogeneous relation over a set X and S is a subset of X then is the restriction relation of R to S over X.
If R is a binary relation over sets X and Y and if S is a subset of X then is the left-restriction relation of R to S over X and Y.[clarification needed]
If R is a binary relation over sets X and Y and if S is a subset of Y then is the right-restriction relation of R to S over X and Y.
If a relation is
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 "x is parent of y" to females yields the relation "x is mother of the woman y"; 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
A binary relation R over sets X and Y is said to be contained in a relation S over X and Y, written if R is a subset of S, that is, for all and if xRy, then xSy. If R is contained in S and S is contained in R, then R and S are called equal written R = S. If R is contained in S but S is not contained in R, then R is said to be smaller than S, written For example, on the rational numbers, the relation is smaller than and equal to the composition
Matrix representation
Binary relations over sets X and Y can be represented algebraically by
Examples
A B′
|
ball | car | doll | cup |
---|---|---|---|---|
John | + | − | − | − |
Mary | − | − | + | − |
Venus | − | + | − | − |
A B
|
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 A and B 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, R does not involve Ian, and therefore R could have been viewed as a subset of i.e. a relation over A and see the 2nd example. 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 A = {Indian, Arctic, Atlantic, Pacific}, the oceans of the globe, and B = { NA, SA, AF, EU, AS, AU, AA }, the continents. Let aRb represent that ocean a borders continent b. 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 bicliquesare used to describe heterogeneous relations; indeed, they are the "concepts" that generate a lattice associated with a relation.
Specific types of binary relations
Some important types of binary relations over sets and are listed below.
Uniqueness properties:
- Injective (also called left-unique):[22] for all and all if and then . 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 ).
- Univalent[6] (also called right-unique,[22] right-definite[23] or functional[24]): for all and all if and then . Such a binary relation is called a partial function. For such a relation, is called a primary key of .[2] For example, the red and green binary relations in the diagram are univalent, 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 (also called left-total):[22] for all there exists a such that . 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 .[25] 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 (also called right-total[22] or onto): for all , there exists an such that . 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: a binary relation that is functional and total. 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 binary relation in the diagram is an injection, but the red, blue and black ones are not.
- A surjection: a function that is surjective. For example, the green binary relation in the diagram is a surjection, but the red, blue and black ones are not.
- A bijection: a function that is injective and surjective. For example, the green binary relation in the diagram is a bijection, but the red, blue and black ones are 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.[26] The usual ordering < over the class of ordinal numbers is a set-like relation, while its inverse > is not.[citation needed]
Sets versus classes
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
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 A, that contains all the objects of interest, and work with the restriction =A instead of =. Similarly, the "subset of" relation needs to be restricted to have domain and codomain P(A) (the power set of a specific set A): the resulting set relation can be denoted by Also, the "member of" relation needs to be restricted to have domain A and codomain P(A) 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
Homogeneous relation
A homogeneous relation over a set X is a binary relation over X and itself, i.e. it is a subset of the Cartesian product [15][28][29] It is also simply called a (binary) relation over X.
A homogeneous relation R over a set X may be identified with a directed simple graph permitting loops, where X is the vertex set and R is the edge set (there is an edge from a vertex x to a vertex y if and only if xRy). The set of all homogeneous relations over a set X 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 R over a set X may have are:
- Reflexive: for all xRx. For example, is a reflexive relation but > is not.
- Irreflexive: for all not xRx. For example, is an irreflexive relation, but is not.
- Symmetric: for all if xRy then yRx. For example, "is a blood relative of" is a symmetric relation.
- Antisymmetric: for all if xRy and yRx then For example, is an antisymmetric relation.[30]
- Asymmetric: for all if xRy then not yRx. A relation is asymmetric if and only if it is both antisymmetric and irreflexive.[31] For example, > is an asymmetric relation, but is not.
- Transitive: for all if xRy and yRz then xRz. A transitive relation is irreflexive if and only if it is asymmetric.[32] For example, "is ancestor of" is a transitive relation, while "is parent of" is not.
- Connected: for all if then xRy or yRx.
- Strongly connected: for all xRy or yRx.
- 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.[33] 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, "x divides y" is a partial, but not a total order on
All operations defined in section § Operations also apply to homogeneous relations. Beyond that, a homogeneous relation over a set X may be subjected to closure operations like:
- Reflexive closure
- the smallest reflexive relation over X containing R,
- Transitive closure
- the smallest transitive relation over X containing R,
- Equivalence closure
- the smallest equivalence relation over X containing R.
Heterogeneous relation
In mathematics, a heterogeneous relation is a binary relation, a subset of a Cartesian product where A and B are possibly distinct sets.[34] The prefix hetero is from the Greek ἕτερος (heteros, "other, another, different").
A heterogeneous relation has been called a rectangular relation,[15] 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."[35]
Calculus of relations
Developments in
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
Binary relations have been described through their induced
- The logical matrix of C is the outer product of logical vectors logical vectors.[clarification needed]
- C is maximal, not contained in any other outer product. Thus C 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
- where f and g are functions, called mappings or left-total, univalent relations in this context. The "induced concept lattice is isomorphic to the cut completion of the partial order E that belongs to the minimal decomposition (f, g, E) of the relation R."
Particular cases are considered below: E total order corresponds to Ferrers type, and E 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.[37] Structural analysis of relations with concepts provides an approach for data mining.[38]
Particular relations
- Proposition: If R is a serial relation and RT is its transpose, then where I is the m × m identity relation.
- Proposition: If R is a surjective relation, then where I is the identity relation.
Difunctional
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
In 1950 Rigeut showed that such relations satisfy the inclusion:[39]
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.[40] More formally, a relation R 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 X and the likewise a partition of a subset of Y.[41]
Using the notation {y: xRy} = xR, a difunctional relation can also be characterized as a relation R such that wherever x1R and x2R have a non-empty intersection, then these two sets coincide; formally implies [42]
In 1997 researchers found "utility of binary decomposition based on difunctional dependencies in database management."[43] Furthermore, difunctional relations are fundamental in the study of bisimulations.[44]
In the context of homogeneous relations, a partial equivalence relation is difunctional.
Ferrers type
A
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. [34]
Contact
Suppose B is the power set of A, the set of all subsets of A. Then a relation g is a contact relation if it satisfies three properties:
The
In terms of the calculus of relations, sufficient conditions for a contact relation include
Preorder R\R
Every relation R generates a preorder which is the left residual.[49] 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)
- (definition)
The
- [48]: 283
Fringe of a relation
Given a relation R, a sub-relation called its fringe is defined as
When R is a partial identity relation, difunctional, or a block diagonal relation, then fringe(R) = R. Otherwise the fringe operator selects a boundary sub-relation described in terms of its logical matrix: fringe(R) is the side diagonal if R is an upper right triangular
On the other hand, Fringe(R) = ∅ when R is a dense, linear, strict order.[48]
Mathematical heaps
Given two sets A and B, the set of binary relations between them can be equipped with a ternary operation where bT denotes the converse relation of b. In 1953 Viktor Wagner used properties of this ternary operation to define semiheaps, heaps, and generalized heaps.[50][51] The contrast of heterogeneous and homogeneous relations is highlighted by these definitions:
There is a pleasant symmetry in Wagner's work between heaps, semiheaps, and generalised heaps on the one hand, and groups, semigroups, and generalised groups on the other. Essentially, the various types of semiheaps appear whenever we consider binary relations (and partial one-one mappings) between different sets A and B, while the various types of semigroups appear in the case where A = B.
— Christopher Hollings, "Mathematics across the Iron Curtain: a history of the algebraic theory of semigroups"[52]
See also
- Abstract rewriting system
- Additive relation, a many-valued homomorphism between modules
- Allegory (category theory)
- Category of relations, a category having sets as objects and binary relations as morphisms
- Confluence (term rewriting), discusses several unusual but fundamental properties of binary relations
- Correspondence (algebraic geometry), a binary relation defined by algebraic equations
- Hasse diagram, a graphic means to display an order relation
- Incidence structure, a heterogeneous relation between set of points and lines
- Logic of relatives, a theory of relations by Charles Sanders Peirce
- Order theory, investigates properties of order relations
Notes
- ^ Authors who deal with binary relations only as a special case of n-ary relations for arbitrary n usually write Rxy as a special case of Rx1...xn (prefix notation).[9]
References
- ^ Meyer, Albert (17 November 2021). "MIT 6.042J Math for Computer Science, Lecture 3T, Slide 2" (PDF). Archived (PDF) from the original on 2021-11-17.
- ^ (PDF) from the original on 2004-09-08. Retrieved 2020-04-29.
- ^ "Relation definition – Math Insight". mathinsight.org. Retrieved 2019-12-11.
- ^ a b Ernst Schröder (1895) Algebra und Logic der Relative, via Internet Archive
- ^ a b C. I. Lewis (1918) A Survey of Symbolic Logic, pages 269–279, via internet Archive
- ^ ISBN 978-0-521-76268-7, Chapt. 5
- ^ Jacobson, Nathan (2009), Basic Algebra II (2nd ed.) § 2.1.
- ^ Enderton 1977, Ch 3. pg. 40
- ISSN 1431-4657. Sect.II.§1.1.4
- ^
ISBN 0-486-61630-4.
- ^
ISBN 978-0-486-47484-7.
- ^
ISBN 0-486-42079-5.
- ISBN 978-3-642-77968-8.
- ISBN 978-0-387-74758-3.
- ^ ISBN 978-1-4020-6164-6.
- ^ Garrett Birkhoff & Thomas Bartee (1970) Modern Applied Algebra, page 35, McGraw-Hill
- ^ Mary P. Dolciani (1962) Modern Algebra: Structure and Method, Book 2, page 339, Houghton Mifflin
- Usenet: [email protected]. Retrieved November 25, 2018.
- , pp. 7-10
- ^ Relative simultaneity at Wikibooks
- ISBN 978-0-521-44432-3
- ^ a b c d Kilp, Knauer and Mikhalev: p. 3. The same four definitions appear in the following:
- Peter J. Pahl; Rudolf Damrath (2001). Mathematical Foundations of Computational Engineering: A Handbook. Springer Science & Business Media. p. 506. ISBN 978-3-540-67995-0.
- ISBN 978-0-13-460643-9.
- Robert-Christoph Riemann (1999). Modelling of Concurrent Systems: Structural and Semantical Methods in the High Level Petri Net Calculus. Herbert Utz Verlag. pp. 21–22. ISBN 978-3-89675-629-9.
- Peter J. Pahl; Rudolf Damrath (2001). Mathematical Foundations of Computational Engineering: A Handbook. Springer Science & Business Media. p. 506.
- .
- ^ Yao, Y.Y.; Wong, S.K.M. (1995). "Generalization of rough sets using relationships between attribute values" (PDF). Proceedings of the 2nd Annual Joint Conference on Information Sciences: 30–33..
- Zbl 0443.03021.
- ISBN 0-8218-1041-3.
- ISBN 978-0-521-19021-3.
- ISBN 978-3-540-67995-0.
- ISBN 0-534-39900-2
- ^ Nievergelt, Yves (2002), Foundations of Logic and Mathematics: Applications to Computer Science and Cryptography, Springer-Verlag, p. 158.
- ^ Flaška, V.; Ježek, J.; Kepka, T.; Kortelainen, J. (2007). Transitive Closures of Binary Relations I (PDF). Prague: School of Mathematics – Physics Charles University. p. 1. Archived from the original (PDF) on 2013-11-02. Lemma 1.1 (iv). This source refers to asymmetric relations as "strictly antisymmetric".
- ISBN 0-12-597680-1, p. 4
- ^ ISBN 978-3-642-77968-8.
- ISBN 3-211-82971-7
- ISBN 0-8247-1788-0
- MR2781235
- ^ Riguet, Jacques (January 1950). "Quelques proprietes des relations difonctionelles". Comptes rendus (in French). 230: 1999–2000.
- ISBN 978-1-4613-8853-1.
- S2CID 54527913.
- ISBN 978-3-211-82971-4.
- ISBN 978-3-211-82971-4
- ISBN 978-3-662-44123-7.
- Comptes Rendus232: 1729,30
- ^ Georg Aumann (1971). "Kontakt-Relationen". Sitzungsberichte der mathematisch-physikalischen Klasse der Bayerischen Akademie der Wissenschaften München. 1970 (II): 67–77.
- ^ Anne K. Steiner (1970) Review:Kontakt-Relationen from Mathematical Reviews
- ^ ISBN 978-0-521-76268-7
- ^ In this context, the symbol does not mean "set difference".
- MR0059267
- MR3729305
- ISBN 978-1-4704-1493-1
Bibliography
- ISBN 978-3-642-77968-8.
- Ernst Schröder (1895) Algebra der Logik, Band III, via Internet Archive
- ISBN 978-0201141924. Archived(PDF) from the original on 2022-10-09.
- ISBN 978-0-12-238440-0.
- Kilp, Mati; Knauer, Ulrich; Mikhalev, Alexander (2000). Monoids, Acts and Categories: with Applications to Wreath Products and Graphs. Berlin: ISBN 978-3-11-015248-7.
- JSTOR 25058006. Retrieved 2020-05-05.
- ISBN 978-0-521-76268-7.
External links
- Media related to Binary relations at Wikimedia Commons
- "Binary relation", Encyclopedia of Mathematics, EMS Press, 2001 [1994]