powered by
Computes the transitive closure of the input binary relation.
TransitiveClosure(rel)
A transitive binary relation, as a two-columns character matrix (each row comprises an element (pair) of the transitivity closed relation).
A two-columns character matrix, each row comprising an element (pair) of the binary relation.
rel <- matrix(c( "a", "b", "c", "b", "d", "a", "c", "a", "a", "a", "b", "b", "c", "c", "d", "d" ), ncol = 2, byrow = TRUE) t.clo<-TransitiveClosure(rel)
Run the code above in your browser using DataLab