next | previous | forward | backward | up | top | index | toc | Macaulay2 web site

transitiveClosure -- computes the transitive closure of a given set of relations.

Synopsis

Description

This function uses allPairsShortestPath method is used by the poset constructor to compute RelationMatrix from Relations in a Poset.
i1 : I = {a,b,c,d,e}; -- the ground set
i2 : R = {(a,b),(b,c),(a,c),(a,d),(d,e)}; -- relations
i3 : transitiveClosure(I,R)

o3 = | 1 1 1 1 1 |
     | 0 1 1 0 0 |
     | 0 0 1 0 0 |
     | 0 0 0 1 1 |
     | 0 0 0 0 1 |

                5          5
o3 : Matrix RR    <--- RR
              53         53

Caveat

Output matrix is over RR.

See also

Ways to use transitiveClosure :