Some New Results on Binary Relations

Some New Results on Binary Relations

It is well known that if a function from set A to set B has a right inverse then the function is a surjection and the right inverse is an injection. For finite sets, the number of functions, injections, and surjections can also be counted. Relations generalize functions: do similar results exist for relations? This paper proves several new results concerning binary relations. For finite sets, we derive formulas for the number of right total, right unique, left total, and left unique relations. We also provide formulas that count the number of relations that are both right unique and left unique; right unique and right total; and left unique and left total. We conclude by discussing the probability that a relation selected at random is right unique or right total.


💡 Research Summary

The paper begins by recalling the well‑known fact that a function f : A → B that possesses a right inverse must be surjective, and that the right inverse is injective. It then observes that a function is simply a binary relation that satisfies two specific properties: right‑uniqueness (each element of B is related to at most one element of A) and left‑totality (every element of A is related to some element of B). Motivated by this observation, the authors set out to investigate whether analogous counting results can be obtained for arbitrary binary relations, which are far less constrained than functions.

Four elementary properties of a binary relation R ⊆ A × B are defined:

  • Right‑total (RT): for every b ∈ B there exists at least one a ∈ A with (a,b) ∈ R.
  • Right‑unique (RU): for every b ∈ B there is at most one a ∈ A with (a,b) ∈ R.
  • Left‑total (LT): for every a ∈ A there exists at least one b ∈ B with (a,b) ∈ R.
  • Left‑unique (LU): for every a ∈ A there is at most one b ∈ B with (a,b) ∈ R.

Assuming finite sets |A| = m and |B| = n, the total number of possible relations is 2^{mn}. The authors then derive closed‑form formulas for the number of relations possessing each individual property:

  • RT: each column of the m × n incidence matrix must be a non‑zero binary vector, giving (2^{m} − 1)^{n} possibilities.
  • RU: each column may be the all‑zero vector or a unit vector, yielding (1 + m)^{n} possibilities.
  • LT and LU are obtained by symmetry, namely (2^{n} − 1)^{m} and (1 + n)^{m}, respectively.

The paper proceeds to count relations that satisfy pairs of properties. Using inclusion‑exclusion and direct combinatorial constructions, the following results are obtained:

  1. RU ∧ LU (both sides unique) – these are precisely the partial bijections (matchings) between A and B. The number is
    Σ_{k=0}^{min(m,n)} C(m,k)·C(n,k)·k! ,
    where k is the size of the matching.

  2. RU ∧ RT (right‑unique and right‑total) – each b must be related to exactly one a, which is equivalent to a function B → A. Hence the count is m^{n}.

  3. LU ∧ LT (left‑unique and left‑total) – dually, the count is n^{m}.

  4. RT ∧ LT (both sides total) – the authors give an inclusion‑exclusion expression that counts relations where every row and every column contains at least one 1. Although the formula is more involved, upper and lower bounds are provided to illustrate its growth.

Having established the exact enumeration, the authors turn to probabilistic questions. If a relation is selected uniformly at random from the 2^{mn} possibilities, the probability that it enjoys a given property is simply the ratio of the corresponding count to 2^{mn}. Consequently:

  • P(RU) = (1 + m)^{n} / 2^{mn}
  • P(RT) = (2^{m} − 1)^{n} / 2^{mn}
  • P(RU ∧ RT) = m^{n} / 2^{mn}

The paper analyses the asymptotic behavior of these probabilities when m and n grow. For square sets (m = n) it is shown that P(RU) decays roughly like e·2^{−m}, while P(RT) approaches 1 − e^{−1} as m becomes large. The joint probability P(RU ∧ RT) shrinks even faster, reflecting the rarity of relations that are simultaneously functional‑like and surjective‑like.

In the discussion section, the authors highlight several practical implications. In database theory, constraints such as “every foreign key must reference a primary key” correspond to right‑totality, while “a foreign key must reference at most one primary key” corresponds to right‑uniqueness. The derived formulas thus give exact counts of admissible schema instances under various integrity constraints. In graph theory, binary relations are adjacency matrices of bipartite graphs; RU and LU correspond to matchings, while RT and LT correspond to coverings. The enumeration of partial bijections therefore recovers classic results on the number of matchings, but now expressed in a unified relational framework.

Overall, the paper successfully generalizes the familiar surjection/injection counting results for functions to the broader universe of binary relations. By providing explicit combinatorial formulas, asymptotic probability estimates, and connections to database design and graph algorithms, it offers a valuable toolkit for researchers working at the intersection of combinatorics, theoretical computer science, and information systems.