A connected component of P is a set of vertices of P such that every between every pair of vertices u and v in the set there exists a chain of vertices (a0=u,a1,...,an=v) such that ai-1 and ai are comparable in P for each i.
i1 : C = chain 3; |
i2 : connectedComponents C o2 = {{1, 2, 3}} o2 : List |
i3 : S = sum(5, i -> naturalLabeling(C, 10*i)); |
i4 : connectedComponents S o4 = {{0, 1, 2}, {10, 11, 12}, {20, 21, 22}, {30, 31, 32}, {40, 41, 42}} o4 : List |
This method was ported from John Stembridge’s Maple package available at http://www.math.lsa.umich.edu/~jrs/maple.html#posets.