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

comparabilityGraph -- produces the comparability graph of a poset

Synopsis

Description

The comparability graph of a poset P is the Graph with vertices given by the ground set of P and which has edges between two vertices if they are comparable in P.
i1 : comparabilityGraph booleanLattice 3

o1 = Graph{0 => set {1, 2, 3, 4, 5, 6, 7}}
           1 => set {0, 3, 5, 7}
           2 => set {0, 3, 6, 7}
           3 => set {0, 1, 2, 7}
           4 => set {0, 5, 6, 7}
           5 => set {0, 1, 4, 7}
           6 => set {0, 2, 4, 7}
           7 => set {0, 1, 2, 3, 4, 5, 6}

o1 : Graph

Caveat

This method renames the vertices with integers 0, 1, ... corresponding to the index of the vertices in the GroundSet.

See also

Ways to use comparabilityGraph :