# Heterogeneous relation

In mathematics, a heterogeneous relation is a binary relation, a subset of a Cartesian product A × B, where A and B are distinct sets. The prefix hetero is from the Greek ἕτερος (heteros, "other, another, different").

A heterogeneous relation has been called a rectangular relation, suggesting that it does not have the square-symmetry of a homogeneous relation on a set where A = B. 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."

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 RS, meaning that aRb implies aSb, sets the scene in a lattice of relations. But since $P\subseteq Q\equiv (P\cap {\bar {Q}}=\varnothing )\equiv (P\cap Q=P),$ 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 A × B.

In contrast to homogeneous relations, the composition of relations operation is only a partial function. The necessity of matching range to domain 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.

## Examples

Ocean borders continent
NA SA AF EU AS OC AA
Indian0010111
Arctic1001100
Atlantic1111001
Pacific1100111

1) Let A = {Indian, Arctic, Atlantic, Pacific}, the oceans of the globe, and B = { NA, SA, AF, EU, AS, OC, AA }, the continents. Let aRb represent that ocean a borders continent b. Then the logical matrix for this relation is:

$R={\begin{pmatrix}0&0&1&0&1&1&1\\1&0&0&1&1&0&0\\1&1&1&1&0&0&1\\1&1&0&0&1&1&1\end{pmatrix}}.$ The connectivity of the planet Earth can be viewed through R RT and RT R, the former being a 4 × 4 relation on A, which is the universal relation (A × A or a logical matrix of all ones). This universal relation reflects the fact that every ocean is separated from the others by at most one continent. On the other hand, RT R is a relation on B × B which fails to be universal because at least two oceans must be traversed to voyage from Europe to Oceania.

2) 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.

3) 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 t determines a simultaneous hyperplane in that cosmology. Herman 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

$\ =\ x{\bar {z}}+{\bar {x}}z$ where the overbar denotes conjugation.

As a relation between some temporal events and some spatial events, hyperbolic orthogonality (as found in split-complex numbers) is a heterogeneous relation.

4) 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 S(t,k,n) which have an n-element set S and a set of k-element subsets called blocks, such that a subset with t 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 D = (V, B, I) where V and B are any two disjoint sets and I is a binary relation between V and B, i.e. IV × B. The elements of V will be called points, those of B blocks and those of I flags.

## Induced concept lattice

Heterogeneous relations have been described through their induced concept lattices: A concept CR satisfies two properties: (1) The logical matrix of C is the outer product of logical vectors

$C_{ij}\ =\ u_{i}v_{j},\quad u,v$ logical vectors. (2) C is maximal, not contained in any other outer product. Thus C is described as a non-enlargeable rectangle.

For a given relation R: XY, the set of concepts, enlarged by their joins and meets, forms an "induced lattice of concepts", with inclusion $\sqsubseteq$ 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". The decomposition is

$R\ =\ f\ E\ g^{T},$ 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. Structural analysis of relations with concepts provides an approach for data mining.

## Particular relations

• Proposition: If R is a total relation and RT is its transpose, then $I\subseteq R^{T}R$ where I is the m × m identity relation.
• Proposition: If R is a surjective relation, then $I\subseteq RR^{T}$ where I is the n × n identity relation.

### Difunctional

Among the homogeneous relations on a set, the equivalence relations are distinguished for their ability to partition the set. With heterogeneous relations the idea is to partition objects by distinguishing attributes. One way this can be done is with an intervening set Z = {x, y, z, ...} of indicators. The partitioning relation R = F GT is a composition of relations using univalent relations FA × Z and GB × Z.

The logical matrix of such a relation R can be re-arranged as a block matrix with blocks of ones along the diagonal. In terms of the calculus of relations, in 1950 Jacques Riguet showed that such relations satisfy the inclusion

$R\ R^{T}\ R\ \subseteq \ R.$ He named these relations difunctional since the composition F GT involves univalent relations, commonly called functions.

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 x1Rx2R ≠ ∅ implies x1R = x2R.

In 1997 researchers found "utility of binary decomposition based on difunctional dependencies in database management." Furthermore, difunctional relations are fundamental in the study of bisimulations.

In the context of homogeneous relations, a partial equivalence relation is difunctional.

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 diagonal matrix with rectangular blocks of true on the (asymmetric) main diagonal.

### Ferrers type

A strict order on a set is a homogeneous relation arising in order theory. In 1951 Jacques Riguet adopted the ordering of a partition of an integer, called a Ferrers diagram, to extend ordering to heterogeneous relations.

The corresponding logical matrix of a heterogeneous relation has rows which finish with a non-increasing 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

$R{\bar {R}}^{T}R\subseteq R.$ If any one of the relations $R,\ {\bar {R}},\ R^{T}$ is of Ferrers type, then all of them are. 

### Contact

Suppose B is the power set of A, the set of all subsets of A. Then a contact relation g satisfies three properties: (1) ∀ x in A, Y = {x} implies x g Y. (2) YZ and x g Y implies x g Z. (3) ∀ y in Y, y g Z and x g Y implies x g Z. 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 his book Kontakt-Relationen (1970).

In terms of the calculus of relations, sufficient conditions for a contact relation include

$C^{T}{\bar {C}}\ \subseteq \ \ni {\bar {C}}\ \ \equiv \ C\ {\overline {\ni {\bar {C}}}}\ \subseteq \ C,$ where $\ni$ is the converse of set membership (∈).:280

## Preorder R\R

Every relation R generates a preorder R\R which is the left residual. In terms of converse and complements, $R\backslash R\ \equiv \ {\overline {R^{T}{\bar {R}}}}.$ Forming the diagonal of $R^{T}{\bar {R}}$ , the corresponding row of RT and column of ${\bar {R}}$ will be of opposite logical values, so the diagonal is all zeros. Then

$R^{T}{\bar {R}}\subseteq {\bar {I}}\ \implies \ I\subseteq {\overline {R^{T}{\bar {R}}}}\ =\ R\backslash R,$ so that R\R is a reflexive relation.

To show transitivity, one requires that (R\R)(R\R) ⊂ R\R. Recall that X = R\R is the largest relation such that R XR. Then

$R(R\backslash R)\subseteq R$ $R(R\backslash R)(R\backslash R)\subseteq R$ (repeat)
$\equiv R^{T}{\bar {R}}\subseteq {\overline {(R\backslash R)(R\backslash R)}}$ (Schröder's rule)
$\equiv (R\backslash R)(R\backslash R)\subseteq {\overline {R^{T}{\bar {R}}}}$ (complementation)
$\equiv (R\backslash R)(R\backslash R)\subseteq R\backslash R.$ (definition)

The inclusion relation Ω on the power set of U can be obtained in this way from the membership relation ∈ on subsets of U:

$\Omega \ =\ {\overline {\ni {\bar {\in }}}}\ =\ \in \backslash \in .$ :283

## Fringe of a relation

Given a relation R, a sub-relation called its fringe is defined as

$\operatorname {fringe} (R)=R\cap {\overline {R{\bar {R}}^{T}R}}.$ 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 linear order or strict order. Fringe(R) is the block fringe if R is irreflexive ($R\subseteq {\bar {I}}$ ) or upper right block triangular. Fringe(R) is a sequence of boundary rectangles when R is of Ferrers type.

On the other hand, Fringe(R) = ∅ when R is a dense, linear, strict order.

## Mathematical heaps

Given two sets A and B, the set of binary relations between them ${\mathcal {B}}(A,B)$ can be equipped with a ternary operation $[a,\ b,\ c]\ =\ ab^{T}c$ 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. 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.