Binary relation

In mathematics, a binary relation on a set A is a collection of ordered pairs of elements of A. In other words, it is a subset of the Cartesian product A2 = A × A. More generally, a binary relation between two sets A and B is a subset of A × B. The terms correspondence, dyadic relation and 2-place relation are synonyms for binary relation.

An example is the "divides" relation between the set of prime numbers P and the set of integers Z, in which every prime p is associated with every integer z that is a multiple of p (but with no integer that is not a multiple of p). In this relation, for instance, the prime 2 is associated with numbers that include −4, 0, 6, 10, but not 1 or 9; and the prime 3 is associated with numbers that include 0, 6, and 9, but not 4 or 13.

Binary relations are used in many branches of mathematics to model concepts like "is greater than", "is equal to", and "divides" in arithmetic, "is congruent to" in geometry, "is adjacent to" in graph theory, "is orthogonal to" in linear algebra and many more. The concept of function is defined as a special kind of binary relation. Binary relations are also heavily used in computer science.

A binary relation is the special case n = 2 of an n-ary relation R  A1 ×  × An, that is, a set of n-tuples where the jth component of each n-tuple is taken from the jth domain Aj of the relation. An example for a ternary relation on Z×Z×Z is " ... lies between ... and ...", containing e.g. the triples (5,2,8), (5,8,2), and (−4,9,−7).

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.

Formal definition

A binary relation R between arbitrary sets (or classes) X (the set of departure) and Y (the set of destination or codomain) is specified by its graph G, which is a subset of the Cartesian product X × Y. The binary relation R itself is usually identified with its graph G, but some authors define it as an ordered triple (X, Y, G), which is otherwise referred to as a correspondence.[1]

The statement (x, y) ∈ G is read "x is R-related to y", and is denoted by xRy or R(x, y). The latter notation corresponds to viewing R as the characteristic function of the subset G of X × Y, i.e. R(x, y) equals to 1 (true), if (x, y) ∈ G, and 0 (false) otherwise.

The order of the elements in each pair of G is important: if ab, then aRb and bRa can be true or false, independently of each other. Resuming the above example, the prime 3 divides the integer 9, but 9 doesn't divide 3.

The domain of R is the set of all x such that xRy for at least one y. The 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 and its range.[2][3][4]

Is a relation more than its graph?

According to the definition above, two relations with identical graphs but different domains or different codomains are considered different. For example, if , then , , and are three distinct relations, where is the set of integers, is the set of real numbers and is the set of natural numbers.

Especially in set theory, binary relations are often defined as sets of ordered pairs, identifying binary relations with their graphs. The domain of a binary relation is then defined as the set of all such that there exists at least one such that , the range of is defined as the set of all such that there exists at least one such that , and the field of is the union of its domain and its range.[2][3][4]

A special case of this difference in points of view applies to the notion of function. Many authors insist on distinguishing between a function's codomain and its range. Thus, a single "rule," like mapping every real number x to x2, can lead to distinct functions and , depending on whether the images under that rule are understood to be reals or, more restrictively, non-negative reals. But others view functions as simply sets of ordered pairs with unique first components. This difference in perspectives does raise some nontrivial issues. As an example, the former camp considers surjectivity—or being onto—as a property of functions, while the latter sees it as a relationship that functions may bear to sets.

Either approach is adequate for most uses, provided that one attends to the necessary changes in language, notation, and the definitions of concepts like restrictions, composition, inverse relation, and so on. The choice between the two definitions usually matters only in very formal contexts, like category theory.

Example

2nd example relation
ball car doll gun
John +
Mary +
Venus +
1st example relation
ball car doll gun
John +
Mary +
Ian
Venus +

Example: Suppose there are four objects {ball, car, doll, gun} and four persons {John, Mary, Ian, Venus}. Suppose that John owns the ball, Mary owns the doll, and Venus owns the car. Nobody owns the gun and Ian owns nothing. Then the binary relation "is owned by" is given as

R = ({ball, car, doll, gun}, {John, Mary, Ian, Venus}, {(ball, John), (doll, Mary), (car, Venus)}).

Thus the first element of R is the set of objects, the second is the set of persons, and the last element is a set of ordered pairs of the form (object, owner).

The pair (ball, John), denoted by ballRJohn means that the ball is owned by John.

Two different relations could have the same graph. For example: the relation

({ball, car, doll, gun}, {John, Mary, Venus}, {(ball, John), (doll, Mary), (car, Venus)})

is different from the previous one as everyone is an owner. But the graphs of the two relations are the same.

Nevertheless, R is usually identified or even defined as G(R) and "an ordered pair (x, y) ∈ G(R)" is usually denoted as "(x, y) ∈ R".[5]

Special types of binary relations

Example relations between real numbers. Red: y=x2. Green: y=2x+20.

Some important types of binary relations R between two sets X and Y are listed below. To emphasize that X and Y can be different sets, some authors call such binary relations heterogeneous.[6][7]

Uniqueness properties:

Totality properties (only definable if the sets of departure X resp. destination Y are specified; not to be confused with a total relation):

Uniqueness and totality properties:

Difunctional

Less commonly encountered is the notion of difunctional (or regular) relation, defined as a relation R such that R=RR−1R.[12]

To understand this notion better, it helps to consider a relation as mapping every element xX to a set xR = { yY | xRy }.[12] This set is sometimes called the successor neighborhood of x in R; one can define the predecessor neighborhood analogously.[13] Synonymous terms for these notions are afterset and respectively foreset.[6]

A difunctional relation can then be equivalently characterized as a relation R such that wherever x1R and x2R have a non-empty intersection, then these two sets coincide; formally x1Rx2R ≠ ∅ implies x1R = x2R.[12]

As examples, any function or any functional (right-unique) relation is difunctional; the converse doesn't hold. If one considers a relation R from set to itself (X = Y), then if R is both transitive and symmetric (i.e. a partial equivalence relation), then it is also difunctional.[14] The converse of this latter statement also doesn't hold.

A characterization of difunctional relations, which also explains their name, is to consider two functions f: AC and g: BC and then define the following set which generalizes the kernel of a single function as joint kernel: ker(f, g) = { (a, b) ∈ A × B | f(a) = g(b) }. Every difunctional relation RA × B arises as the joint kernel of two functions f: AC and g: BC for some set C.[15]

In automata theory, the term rectangular relation has also been used to denote a difunctional relation. This terminology is justified by the fact that when represented as a boolean matrix, the columns and rows of a difunctional relation can be arranged in such a way as to present rectangular blocks of true on the (asymmetric) main diagonal.[16] Other authors however use the term "rectangular" to denote any heterogeneous relation whatsoever.[7]

Relations over a set

If X = Y then we simply say that the binary relation is over X, or that it is an endorelation over X.[17] In computer science, such a relation is also called a homogeneous (binary) relation.[7][17][18] Some types of endorelations are widely studied in graph theory, where they are known as simple directed graphs permitting loops.

The set of all binary relations Rel(X) on a set X is the set 2X × X which is a Boolean algebra augmented with the involution of mapping of a relation to its inverse relation. For the theoretical explanation see Relation algebra.

Some important properties that a binary relation R over a set X may have are:

The previous 3 alternatives are far from being exhaustive; e.g. the red relation y=x2 from the above picture is neither irreflexive, nor coreflexive, nor reflexive, since it contains the pair (0,0), and (2,4), but not (2,2), respectively.

A relation that is reflexive, symmetric, and transitive is called an equivalence relation. A relation that is symmetric, transitive, and serial is also reflexive. A relation that is only symmetric and transitive (without necessarily being reflexive) is called a partial equivalence relation.

A relation that is reflexive, antisymmetric, and transitive is called a partial order. A partial order that is total is called a total order, simple order, linear order, or a chain.[25] A linear order where every nonempty subset has a least element is called a well-order.

Binary endorelations by property
reflexivity symmetry transitivity symbol example
directed graph
undirected graph irreflexive symmetric
tournament irreflexive antisymmetric pecking order
dependency reflexive symmetric
strict weak order irreflexive antisymmetric yes <
total preorder reflexive yes
preorder reflexive yes preference
partial order reflexive antisymmetric yes subset
partial equivalence symmetric yes
equivalence relation reflexive symmetric yes ∼, ≅, ≈, ≡ equality
strict partial order irreflexive antisymmetric yes < proper subset

Operations on binary relations

If R, S are binary relations over X and Y, then each of the following is a binary relation over X and Y:

If R is a binary relation over X and Y, and S is a binary relation over Y and Z, then the following is a binary relation over X and Z: (see main article composition of relations)

A relation R on sets X and Y is said to be contained in a relation S on X and Y if R is a subset of S, that is, if x R y always implies x S y. In this case, if R and S disagree, R is also said to be smaller than S. For example, > is contained in ≥.

If R is a binary relation over X and Y, then the following is a binary relation over Y and X:

If R is a binary relation over X, then each of the following is a binary relation over X:

Complement

If R is a binary relation over X and Y, then the following too:

The complement of the inverse is the inverse of the complement.

If X = Y, the complement has the following properties:

The complement of the inverse has these same properties.

Restriction

The restriction of a binary relation on a set X to a subset S is the set of all pairs (x, y) in the relation for which x and y are in S.

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, its restrictions are too.

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 doesn't 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, on the set of real numbers a property of the relation "≤" is that every non-empty subset S of R with an upper bound in R has a least upper bound (also called supremum) in R. However, for a set of rational numbers this supremum is not necessarily rational, so the same property does not hold on the restriction of the relation "≤" to the set of rational numbers.

The left-restriction (right-restriction, respectively) of a binary relation between X and Y to a subset S of its domain (codomain) is the set of all pairs (x, y) in the relation for which x (y) is an element of S.

Algebras, categories, and rewriting systems

Various operations on binary endorelations can be treated as giving rise to an algebraic structure, known as relation algebra. It should not be confused with relational algebra which deals in finitary relations (and in practice also finite and many-sorted).

For heterogenous binary relations, a category of relations arises.[7]

Despite their simplicity, binary relations are at the core of an abstract computation model known as an abstract rewriting system.

Sets versus classes

Certain mathematical "relations", such as "equal to", "member of", and "subset 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, if we try to model the general concept of "equality" as a binary relation =, we must 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 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 ⊆A. Also, the "member of" relation needs to be restricted to have domain A and codomain P(A) to obtain a binary relation ∈A that is a set. Bertrand Russell has shown that assuming ∈ to be defined on all sets leads to a contradiction in naive set theory.

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 (X, Y, G), as normally a proper class cannot be a member of an ordered tuple; or of course one can identify the function with its graph in this context.)[26] With this definition one can for instance define a function relation between every set and its power set.

The number of binary relations

The number of distinct binary relations on an n-element set is 2n2 (sequence A002416 in the OEIS):

Number of n-element binary relations of different types
nalltransitivereflexivepreorderpartial ordertotal preordertotal orderequivalence relation
011111111
122111111
21613443322
35121716429191365
46553639944096355219752415
n2n2 2n2n Σn
k=0
 
k! S(n, k)
n!Σn
k=0
 
S(n, k)
OEIS A002416 A006905 A053763 A000798 A001035 A000670 A000142 A000110

Notes:

The binary relations can be grouped into pairs (relation, complement), except that for n = 0 the relation is its own complement. The non-symmetric ones can be grouped into quadruples (relation, complement, inverse, inverse complement).

Examples of common binary relations

See also

Notes

  1. Encyclopedic dictionary of Mathematics. MIT. 2000. pp. 1330–1331. ISBN 0-262-59020-4.
  2. 1 2 Suppes, Patrick (1972) [originally published by D. van Nostrand Company in 1960]. Axiomatic Set Theory. Dover. ISBN 0-486-61630-4.
  3. 1 2 Smullyan, Raymond M.; Fitting, Melvin (2010) [revised and corrected republication of the work originally published in 1996 by Oxford University Press, New York]. Set Theory and the Continuum Problem. Dover. ISBN 978-0-486-47484-7.
  4. 1 2 Levy, Azriel (2002) [republication of the work published by Springer-Verlag, Berlin, Heidelberg and New York in 1979]. Basic Set Theory. Dover. ISBN 0-486-42079-5.
  5. Megill, Norman (5 August 1993). "df-br (Metamath Proof Explorer)". Retrieved 18 November 2016.
  6. 1 2 Christodoulos A. Floudas; Panos M. Pardalos (2008). Encyclopedia of Optimization (2nd ed.). Springer Science & Business Media. pp. 299–300. ISBN 978-0-387-74758-3.
  7. 1 2 3 4 Michael Winter (2007). Goguen Categories: A Categorical Approach to L-fuzzy Relations. Springer. pp. x–xi. ISBN 978-1-4020-6164-6.
  8. 1 2 3 4 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.
    • Eike Best (1996). Semantics of Sequential and Parallel Programs. Prentice Hall. pp. 19–21. 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.
  9. Gunther Schmidt, 2010. Relational Mathematics. Cambridge University Press, ISBN 978-0-521-76268-7, Chapt. 5
  10. Mäs, Stephan (2007), "Reasoning on Spatial Semantic Integrity Constraints", Spatial Information Theory: 8th International Conference, COSIT 2007, Melbourne, Australia, September 19–23, 2007, Proceedings, Lecture Notes in Computer Science, 4736, Springer, pp. 285–302, doi:10.1007/978-3-540-74788-8_18
  11. Note that the use of "correspondence" here is narrower than as general synonym for binary relation.
  12. 1 2 3 Chris Brink; Wolfram Kahl; Gunther Schmidt (1997). Relational Methods in Computer Science. Springer Science & Business Media. p. 200. ISBN 978-3-211-82971-4.
  13. 1 2 Yao, Y. (2004). "Semantics of Fuzzy Sets in Rough Set Theory". Transactions on Rough Sets II. Lecture Notes in Computer Science. 3135. p. 309. ISBN 978-3-540-23990-1. doi:10.1007/978-3-540-27778-1_15.
  14. William Craig (2006). Semigroups Underlying First-order Logic. American Mathematical Soc. p. 72. ISBN 978-0-8218-6588-0.
  15. Gumm, H. P.; Zarrad, M. (2014). "Coalgebraic Simulations and Congruences". Coalgebraic Methods in Computer Science. Lecture Notes in Computer Science. 8446. p. 118. ISBN 978-3-662-44123-7. doi:10.1007/978-3-662-44124-4_7.
  16. Julius Richard Büchi (1989). Finite Automata, Their Algebras and Grammars: Towards a Theory of Formal Expressions. Springer Science & Business Media. pp. 35–37. ISBN 978-1-4613-8853-1.
  17. 1 2 M. E. Müller (2012). Relational Knowledge Discovery. Cambridge University Press. p. 22. ISBN 978-0-521-19021-3.
  18. Peter J. Pahl; Rudolf Damrath (2001). Mathematical Foundations of Computational Engineering: A Handbook. Springer Science & Business Media. p. 496. ISBN 978-3-540-67995-0.
  19. Fonseca de Oliveira, J. N., & Pereira Cunha Rodrigues, C. D. J. (2004). Transposing Relations: From Maybe Functions to Hash Tables. In Mathematics of Program Construction (p. 337).
  20. Smith, Douglas; Eggen, Maurice; St. Andre, Richard (2006), A Transition to Advanced Mathematics (6th ed.), Brooks/Cole, p. 160, ISBN 0-534-39900-2
  21. Nievergelt, Yves (2002), Foundations of Logic and Mathematics: Applications to Computer Science and Cryptography, Springer-Verlag, p. 158.
  22. 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. Lemma 1.1 (iv). This source refers to asymmetric relations as "strictly antisymmetric".
  23. Since neither 5 divides 3, nor 3 divides 5, nor 3=5.
  24. 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..
  25. Joseph G. Rosenstein, Linear orderings, Academic Press, 1982, ISBN 0-12-597680-1, p. 4
  26. Tarski, Alfred; Givant, Steven (1987). A formalization of set theory without variables. American Mathematical Society. p. 3. ISBN 0-8218-1041-3.

References

This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.