I have graphs represented by matrices. For example,
Produces this graph:
The graphs are supposed to be transitive, i.e. the edge from A to C is redundant and should be removed.
From the Wikipedia Transitive Reduction page, the transitive reduction of a graph can be computed as follows:
$R^- = R - (R \circ R^+)$
Where $R^-$ is the transitive reduction, $R^+$ is the transitive closure of the matrix and $\circ$ denotes relation composition.
I have written algorithms to compute subtraction and the transitive closure of a matrix, but I'm having trouble understanding relation composition. My knowledge of set theory is pretty minimal and the notation on the Wikipedia page is beyond me.
All of the examples I've found seem to deal with sets of ordered pairs, and I'm wondering if anyone could recommend resources or give a brief outline of how to compute relation composition of two matrices.