PartiallyOrderedSets/MaximalElements - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : PartiallyOrderedSets/MaximalElements

PartiallyOrderedSets

  

MaximalElements

  

returns the maximal elements of a poset

 

Calling Sequence

Parameters

Description

Examples

References

Compatibility

Calling Sequence

MaximalElements(P)

Parameters

P

-

PartiallyOrderedSet

Description

• 

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.

Examples

> 

with⁡PartiallyOrderedSets&colon;

> 

leq≔`<=`&colon;

Create a poset from a set and a non-strict partial order

> 

S≔1&comma;2&comma;3&comma;4&comma;5&colon;poset1≔PartiallyOrderedSet⁡S&comma;leq

poset1≔< a poset with 5 elements >

(1)

Display this poset

> 

DrawGraph⁡poset1

Compute the maximal elements of this poset

> 

MaximalElements⁡poset1

5

(2)

Create a poset from a set and a non-strict partial order

> 

divisibility≔x&comma;y↦irem⁡y&comma;x=0&colon;T≔3&comma;4&comma;5&comma;6&comma;7&comma;8&comma;9&colon;

> 

poset2≔PartiallyOrderedSet⁡T&comma;divisibility

poset2≔< a poset with 7 elements >

(3)

Display this poset

> 

DrawGraph⁡poset2

Compute the maximal elements of this poset

> 

MaximalElements⁡poset2

5&comma;6&comma;7&comma;8&comma;9

(4)

Create a poset from a set and an adjacency matrix of a partial order regarded as a directed graph

> 

adjMatrix4≔Matrix⁡1&comma;1&comma;1&comma;1&comma;1&comma;0&comma;1&comma;1&comma;1&comma;1&comma;0&comma;0&comma;1&comma;1&comma;1&comma;0&comma;0&comma;0&comma;1&comma;1&comma;0&comma;0&comma;0&comma;0&comma;1

adjMatrix4≔1111101111001110001100001

(5)
> 

poset4≔PartiallyOrderedSet⁡convert⁡S&comma;list&comma;adjMatrix4

poset4≔< a poset with 5 elements >

(6)

Display this poset

> 

DrawGraph⁡poset4

Compute the maximal elements of this poset

> 

MaximalElements⁡poset4

5

(7)

Create a poset from a set and an adjacency list of a partial order regarded as a directed graph

> 

adjList5≔map2⁡map&comma;`+`&comma;Array⁡1&comma;4&comma;7&comma;2&comma;6&comma;3&comma;4&comma;5&comma;6&comma;7&comma;2

adjList5≔3&comma;6&comma;94&comma;856789

(8)
> 

poset5≔PartiallyOrderedSet⁡convert⁡T&comma;list&comma;adjList5

poset5≔< a poset with 7 elements >

(9)

Display this poset

> 

DrawGraph⁡poset5

Compute the maximal elements of this poset

> 

MaximalElements⁡poset5

5&comma;6&comma;7&comma;8&comma;9

(10)

Create a poset from a set and a directed graph

> 

G≔GraphTheory:-Graph⁡directed&comma;1&comma;2&comma;3&comma;4&comma;5&comma;6&comma;1&comma;1&comma;1&comma;2&comma;1&comma;3&comma;1&comma;4&comma;1&comma;5&comma;1&comma;6&comma;2&comma;2&comma;2&comma;4&comma;2&comma;6&comma;3&comma;3&comma;3&comma;5&comma;3&comma;6&comma;4&comma;4&comma;4&comma;6&comma;5&comma;5&comma;5&comma;6&comma;6&comma;6

G≔Graph 1: a directed graph with 6 vertices, 11 arcs, and 6 self-loops

(11)
> 

poset6≔PartiallyOrderedSet⁡G

poset6≔< a poset with 6 elements >

(12)

Display this poset

> 

DrawGraph⁡poset6

Compute the maximal elements of this poset

> 

MaximalElements⁡poset6

6

(13)

Define a polyhedral set and get its dimension

> 

t≔PolyhedralSets:-ExampleSets:-Octahedron⁡

t≔&lcub;Coordinates&colon;x1&comma;x2&comma;x3Relations&colon;−x1−x2−x3≤1&comma;−x1−x2+x3≤1&comma;−x1+x2−x3≤1&comma;−x1+x2+x3≤1&comma;x1−x2−x3≤1&comma;x1−x2+x3≤1&comma;x1+x2−x3≤1&comma;x1+x2+x3≤1

(14)
> 

d≔PolyhedralSets:-Dimension⁡t

d≔3

(15)

Collect the faces of this polyhedral set

> 

t_faces≔seq⁡op⁡PolyhedralSets:-Faces⁡t&comma;dimension=i&comma;i=−0..d&colon;

> 

t_faces≔t_facesunionPolyhedralSets:-ExampleSets:-EmptySet⁡d&colon;

> 

FL≔convert⁡t_faces&comma;list&colon;

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&comma;i=1..nops⁡FL&comma;inclusion

polyhedral_poset≔< a poset with 28 elements >

(16)

Display this poset

> 

DrawGraph⁡polyhedral_poset

Compute the maximal elements of this poset

> 

MaximalElements⁡polyhedral_poset

11

(17)

Create a poset from a set and an adjacency matrix of a partial order regarded as a directed graph

> 

M≔Matrix⁡1&comma;1&comma;1&comma;1&comma;1&comma;0&comma;1&comma;1&comma;0&comma;1&comma;0&comma;0&comma;1&comma;0&comma;1&comma;0&comma;0&comma;0&comma;1&comma;1&comma;0&comma;0&comma;0&comma;0&comma;1&colon;

> 

poset9≔PartiallyOrderedSet⁡seq⁡1..5&comma;M

poset9≔< a poset with 5 elements >

(18)

Display this poset

> 

DrawGraph⁡poset9

Compute the maximal elements of this poset

> 

MaximalElements⁡poset9

5

(19)

 

Create a poset from a set and a non-strict partial order

> 

Z≔1&comma;2&comma;3&comma;4&comma;5&comma;6&comma;10&comma;12&comma;15&comma;20&comma;30&comma;60

Z≔1&comma;2&comma;3&comma;4&comma;5&comma;6&comma;10&comma;12&comma;15&comma;20&comma;30&comma;60

(20)
> 

poset10≔PartiallyOrderedSet⁡Z&comma;divisibility

poset10≔< a poset with 12 elements >

(21)

Display this poset

> 

DrawGraph⁡poset10

Compute the maximal elements of this poset

> 

MaximalElements⁡poset10

60

(22)

Create a poset from a set and a non-strict partial order

> 

ZZ≔1&comma;2&comma;3&comma;4&comma;5&comma;6&comma;12&comma;15&comma;60

ZZ≔1&comma;2&comma;3&comma;4&comma;5&comma;6&comma;12&comma;15&comma;60

(23)
> 

poset11≔PartiallyOrderedSet⁡ZZ&comma;divisibility

poset11≔< a poset with 9 elements >

(24)

Display this poset

> 

DrawGraph⁡poset11

Compute the maximal elements of this poset

> 

MaximalElements⁡poset11

60

(25)

References

  

Richard P. Stanley: Enumerative Combinatorics 1. 1997, Cambridge Studies in Advanced Mathematics. Vol. 49. Cambridge University Press.

Compatibility

• 

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]