PartiallyOrderedSets
ConnectedComponents
returns the connected components of a poset
Calling Sequence
Parameters
Description
Examples
References
Compatibility
ConnectedComponents(P)
P
-
PartiallyOrderedSet
The command ConnectedComponents(P) returns as a set of sets the connected components of the partially ordered set P.
Terminology
A partially ordered set, or poset for short, is a pair (P, <=) where P is a set and <= is a partial order on P. The poset (P, <=) defines a directed graph whose vertices are the elements of P and (a,b) is a directed edge whenever a <= b holds. Conversely, a poset can be defined from a directed graph, assuming that the defined binary relation is anti-symmetric, and transitive, and, either reflexive, or irreflexive.
The connected components of a poset are the connected components of its associated directed graph
with⁡PartiallyOrderedSets:
Create a poset from a set and a non-strict partial order
V≔∅:leq≔`<=`:empty_poset≔PartiallyOrderedSet⁡V,leq
empty_poset≔< a poset with 0 elements >
Compute the connected components of this poset
ConnectedComponents⁡empty_poset
∅
S≔1,2,3,4,5:poset1≔PartiallyOrderedSet⁡S,leq
poset1≔< a poset with 5 elements >
Display this poset
DrawGraph⁡poset1
ConnectedComponents⁡poset1
1,2,3,4,5
divisibility≔x,y↦irem⁡y,x=0:T≔3,4,5,6,7,8,9:
poset2≔PartiallyOrderedSet⁡T,divisibility
poset2≔< a poset with 7 elements >
DrawGraph⁡poset2
ConnectedComponents⁡poset2
5,7,4,8,3,6,9
Richard P. Stanley: Enumerative Combinatorics 1. 1997, Cambridge Studies in Advanced Mathematics. Vol. 49. Cambridge University Press.
The PartiallyOrderedSets[ConnectedComponents] command was introduced in Maple 2025.
For more information on Maple 2025 changes, see Updates in Maple 2025.
See Also
PartiallyOrderedSets[PartiallyOrderedSet]
PartiallyOrderedSets[ToGraph]
Download Help Document