
transitive_reduction(x)
transitive_closure(x)
relation
,
representing an endorelation.The transitive reduction of $R$ is the smallest relation $R'$ on $X$ so that the the transitive closure of $R'$ is the same than the transitive closure of $R$. The function is implemented using a depth-first-search approach, also with complexity $O(n^3)$.
relation
, reflexive_reduction
.R <- as.relation(1 : 5)
relation_incidence(R)
RR <- transitive_reduction(R)
relation_incidence(RR)
R == transitive_closure(RR)
Run the code above in your browser using DataLab