PartiallyOrderedSets
MaximalElements
returns the maximal elements of a poset
Calling Sequence
Parameters
Description
Examples
References
Compatibility
MaximalElements(P)
P
-
PartiallyOrderedSet
The command MaximalElements(P) returns the set of maximal elements of the partially ordered set P.
Remarks
MaximalElements will generate and store the transitive closure of 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.
From now on, we fix a poset (P, <=). Two elements a and b of P are said comparable if either a <= b or b <= a holds, otherwise a and b are said incomparable.
The element b of P covers the element a of P if a is strictly less than b and for no element c of P, distinct from both a and b, both a <= c and c <= b hold.
The relation b covers a defines a homogeneous binary relation on P which is the transitive reduction of (P, <=). This is also a directed acyclic graph on P often refers as the Hasse diagram of (P, <=).
The element a of P is a maximal element of (P, <=) if for no element b of P the element a is strictly less than b. The element a of P is a minimal element of (P, <=) if no element b of P is strictly less than a. Observe that if P is not empty then it necessarily admits at least one maximal element and at least one minimal element.
with⁡PartiallyOrderedSets:
leq≔`<=`:
Create a poset from a set and a non-strict partial order
S≔1,2,3,4,5:poset1≔PartiallyOrderedSet⁡S,leq
poset1≔< a poset with 5 elements >
Display this poset
DrawGraph⁡poset1
Compute the maximal elements of this poset
MaximalElements⁡poset1
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
MaximalElements⁡poset2
5,6,7,8,9
Create a poset from a set and an adjacency matrix of a partial order regarded as a directed graph
adjMatrix4≔Matrix⁡1,1,1,1,1,0,1,1,1,1,0,0,1,1,1,0,0,0,1,1,0,0,0,0,1
adjMatrix4≔1111101111001110001100001
poset4≔PartiallyOrderedSet⁡convert⁡S,list,adjMatrix4
poset4≔< a poset with 5 elements >
DrawGraph⁡poset4
MaximalElements⁡poset4
Create a poset from a set and an adjacency list of a partial order regarded as a directed graph
adjList5≔map2⁡map,`+`,Array⁡1,4,7,2,6,3,4,5,6,7,2
adjList5≔3,6,94,856789
poset5≔PartiallyOrderedSet⁡convert⁡T,list,adjList5
poset5≔< a poset with 7 elements >
DrawGraph⁡poset5
MaximalElements⁡poset5
Create a poset from a set and a directed graph
G≔GraphTheory:-Graph⁡directed,1,2,3,4,5,6,1,1,1,2,1,3,1,4,1,5,1,6,2,2,2,4,2,6,3,3,3,5,3,6,4,4,4,6,5,5,5,6,6,6
G≔Graph 1: a directed graph with 6 vertices, 11 arcs, and 6 self-loops
poset6≔PartiallyOrderedSet⁡G
poset6≔< a poset with 6 elements >
DrawGraph⁡poset6
MaximalElements⁡poset6
6
Define a polyhedral set and get its dimension
t≔PolyhedralSets:-ExampleSets:-Octahedron⁡
t≔{Coordinates:x1,x2,x3Relations:−x1−x2−x3≤1,−x1−x2+x3≤1,−x1+x2−x3≤1,−x1+x2+x3≤1,x1−x2−x3≤1,x1−x2+x3≤1,x1+x2−x3≤1,x1+x2+x3≤1
d≔PolyhedralSets:-Dimension⁡t
d≔3
Collect the faces of this polyhedral set
t_faces≔seq⁡op⁡PolyhedralSets:-Faces⁡t,dimension=i,i=−0..d:
t_faces≔t_facesunionPolyhedralSets:-ExampleSets:-EmptySet⁡d:
FL≔convert⁡t_faces,list:
Construct the face lattice of that polyhedral set
inclusion := proc(x,y) PolyhedralSets:-`subset`(FL[x],FL[y]) end proc:
polyhedral_poset≔PartiallyOrderedSet⁡seq⁡i,i=1..nops⁡FL,inclusion
polyhedral_poset≔< a poset with 28 elements >
DrawGraph⁡polyhedral_poset
MaximalElements⁡polyhedral_poset
11
M≔Matrix⁡1,1,1,1,1,0,1,1,0,1,0,0,1,0,1,0,0,0,1,1,0,0,0,0,1:
poset9≔PartiallyOrderedSet⁡seq⁡1..5,M
poset9≔< a poset with 5 elements >
DrawGraph⁡poset9
MaximalElements⁡poset9
Z≔1,2,3,4,5,6,10,12,15,20,30,60
poset10≔PartiallyOrderedSet⁡Z,divisibility
poset10≔< a poset with 12 elements >
DrawGraph⁡poset10
MaximalElements⁡poset10
60
ZZ≔1,2,3,4,5,6,12,15,60
poset11≔PartiallyOrderedSet⁡ZZ,divisibility
poset11≔< a poset with 9 elements >
DrawGraph⁡poset11
MaximalElements⁡poset11
Richard P. Stanley: Enumerative Combinatorics 1. 1997, Cambridge Studies in Advanced Mathematics. Vol. 49. Cambridge University Press.
The PartiallyOrderedSets[MaximalElements] command was introduced in Maple 2025.
For more information on Maple 2025 changes, see Updates in Maple 2025.
See Also
PartiallyOrderedSets[GreatestElement]
PartiallyOrderedSets[GreatestLowerBound]
PartiallyOrderedSets[LeastElement]
PartiallyOrderedSets[LeastUpperBound]
PartiallyOrderedSets[MaximalElements]
PartiallyOrderedSets[MinimalElements]
PartiallyOrderedSets[PartiallyOrderedSet]
Download Help Document