Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rel_total

Total Binary Relations


Description

A binary relation R is total (or strong complete), iff for all x, y we have xRy or yRx.

Usage

rel_is_total(R)

rel_closure_total_fair(R)

Arguments

R

an object coercible to a 0-1 (logical) square matrix, representing a binary relation on a finite set.

Details

Note that each total relation is also reflexive, see rel_is_reflexive.

rel_is_total determines if a given binary relation R is total. The algorithm has O(n^2) time complexity, where n is the number of rows in R. If R[i,j] and R[j,i] is NA for some (i,j), then the functions outputs NA.

The problem of finding a total closure or reduction is not well-defined in general.

When dealing with preorders, however, the following closure may be useful, see (Gagolewski, 2013). Fair totalization of R, performed by rel_closure_total_fair, is the minimal superset R' of R such that if not xRy and not yRx then xR'y and yR'x.

Even if R is transitive, the resulting relation might not necessarily fulfil this property. If you want a total preorder, call rel_closure_transitive afterwards. Missing values in R are not allowed and result in an error.

Value

rel_is_total returns a single logical value.

rel_closure_reflexive returns a logical square matrix. dimnames of R are preserved.

References

Gagolewski M., Scientific Impact Assessment Cannot be Fair, Journal of Informetrics 7(4), 2013, pp. 792-802.

Gagolewski M., Data Fusion: Theory, Methods, and Applications, Institute of Computer Science, Polish Academy of Sciences, 2015, 290 pp. isbn:978-83-63159-20-7

See Also


agop

Aggregation Operators and Preordered Sets

v0.2-3
LGPL (>= 3)
Authors
Marek Gagolewski [aut, cre] (<https://orcid.org/0000-0003-0637-6028>), Anna Cena [ctb] (<https://orcid.org/0000-0001-8697-5383>)
Initial release
2020-01-06

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.