next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Posets :: isConnected(Poset)

isConnected(Poset) -- determines if a poset is connected

Synopsis

Description

The poset P is connected if the number of connectedComponents is 1. Equivalently, the poset P is connected if between every pair of vertices in P there exists a chain of relations going from one to the other.

The divisorPoset of n is always connected.
i1 : isConnected divisorPoset 18

o1 = true
The disjoint union of any two posets on disjoint vertex sets is disconnected.
i2 : C = chain 3;
i3 : P = sum(5, i -> naturalLabeling(C, 10*i));
i4 : isConnected P

o4 = false

See also