PartiallyOrderedSets/MaximalChains - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : PartiallyOrderedSets/MaximalChains

PartiallyOrderedSets

  

MaximalChains

  

returns all the maximal chains of a poset

 

Calling Sequence

Parameters

Description

Examples

References

Compatibility

Calling Sequence

MaximalChains(P)

MaximalChains(P,opts)

Parameters

P

-

PartiallyOrderedSet

opts

-

(optional) option of the form output = o, where o is list or iterator

Description

• 

The command MaximalChains(P) returns the maximal chains of the partially ordered set P.

• 

By default, the chains are returned as a list of lists. If the option output = iterator is passed to the MaximalChains command, the chains are returned as an iterator; that is, an object that can be used in a for loop or a seq command. Each iteration yields a chain as a list. This can be more efficient than returning a list of all chains if there are very, very many of them. The default list of lists can be explicitly selected by using the option output = list.

Remarks

• 

MaximalAntichains will generate and store the transitive closure and adjacency list 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, <=).

• 

A subset C of P is called a chain if any two elements of C are comparable. A chain C of P is said maximal if P does not admit another chain D of which C would be a proper subset.

• 

A subset C of P is called an antichain if any two distinct elements of C are incomparable. An antichain C of P is said maximal if P does not admit another antichain D of which C would be a proper subset. We note that any singleton of P is both a chain and an antichain.

Examples

withPartiallyOrderedSets&colon;

leq`<=`&colon;

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

S1&comma;2&comma;3&comma;4&comma;5&colon;poset1PartiallyOrderedSetS&comma;leq

poset1< a poset with 5 elements >

(1)

Display this poset

DrawGraphposet1

Compute the maximal chains of this poset

MaximalChainsposet1

1&comma;2&comma;3&comma;4&comma;5

(2)

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

divisibilityx&comma;yiremy&comma;x=0&colon;T3&comma;4&comma;5&comma;6&comma;7&comma;8&comma;9&colon;

poset2PartiallyOrderedSetT&comma;divisibility

poset2< a poset with 7 elements >

(3)

Display this poset

DrawGraphposet2

Compute the maximal chains of this poset

MaximalChainsposet2

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

(4)

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

adjMatrix4Matrix1&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

adjMatrix41111101111001110001100001

(5)

poset4PartiallyOrderedSetconvertS&comma;list&comma;adjMatrix4

poset4< a poset with 5 elements >

(6)

Display this poset

DrawGraphposet4

Compute the maximal chains of this poset

MaximalChainsposet4

1&comma;2&comma;3&comma;4&comma;5

(7)

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

adjList5map2map&comma;`+`&comma;Array1&comma;4&comma;7&comma;2&comma;6&comma;3&comma;4&comma;5&comma;6&comma;7&comma;2

adjList53&comma;6&comma;94&comma;856789

(8)

poset5PartiallyOrderedSetconvertT&comma;list&comma;adjList5

poset5< a poset with 7 elements >

(9)

Display this poset

DrawGraphposet5

Compute the maximal chains of this poset

MaximalChainsposet5

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

(10)

Create a poset from a set and a directed graph

GGraphTheory:-Graphdirected&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

GGraph 1: a directed graph with 6 vertices, 11 arcs, and 6 self-loops

(11)

poset6PartiallyOrderedSetG

poset6< a poset with 6 elements >

(12)

Display this poset

DrawGraphposet6

Compute the maximal chains of this poset

MaximalChainsposet6

1&comma;2&comma;4&comma;6&comma;1&comma;3&comma;5&comma;6

(13)

Define a polyhedral set and get its dimension

tPolyhedralSets:-ExampleSets:-Octahedron

t&lcub;Coordinates&colon;x1&comma;x2&comma;x3Relations&colon;x1x2x31&comma;x1x2+x31&comma;x1+x2x31&comma;x1+x2+x31&comma;x1x2x31&comma;x1x2+x31&comma;x1+x2x31&comma;x1+x2+x31

(14)

dPolyhedralSets:-Dimensiont

d3

(15)

Collect the faces of this polyhedral set

t_facesseqopPolyhedralSets:-Facest&comma;dimension=i&comma;i=0..d&colon;

t_facest_facesunionPolyhedralSets:-ExampleSets:-EmptySetd&colon;

FLconvertt_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_posetPartiallyOrderedSetseqi&comma;i=1..nopsFL&comma;inclusion

polyhedral_poset< a poset with 28 elements >

(16)

Display this poset

DrawGraphpolyhedral_poset

Compute the maximal chains of this poset

MaximalChainspolyhedral_poset

1&comma;5&comma;3&comma;13&comma;26&comma;1&comma;5&comma;3&comma;24&comma;26&comma;1&comma;5&comma;4&comma;17&comma;26&comma;1&comma;5&comma;4&comma;24&comma;26&comma;1&comma;5&comma;6&comma;11&comma;26&comma;1&comma;5&comma;6&comma;13&comma;26&comma;1&comma;5&comma;7&comma;11&comma;26&comma;1&comma;5&comma;7&comma;17&comma;26&comma;1&comma;9&comma;2&comma;8&comma;26&comma;1&comma;9&comma;2&comma;24&comma;26&comma;1&comma;9&comma;4&comma;17&comma;26&comma;1&comma;9&comma;4&comma;24&comma;26&comma;1&comma;9&comma;10&comma;8&comma;26&comma;1&comma;9&comma;10&comma;28&comma;26&comma;1&comma;9&comma;12&comma;17&comma;26&comma;1&comma;9&comma;12&comma;28&comma;26&comma;1&comma;14&comma;2&comma;8&comma;26&comma;1&comma;14&comma;2&comma;24&comma;26&comma;1&comma;14&comma;3&comma;13&comma;26&comma;1&comma;14&comma;3&comma;24&comma;26&comma;1&comma;14&comma;15&comma;8&comma;26&comma;1&comma;14&comma;15&comma;27&comma;26&comma;1&comma;14&comma;16&comma;13&comma;26&comma;1&comma;14&comma;16&comma;27&comma;26&comma;1&comma;18&comma;10&comma;8&comma;26&comma;1&comma;18&comma;10&comma;28&comma;26&comma;1&comma;18&comma;15&comma;8&comma;26&comma;1&comma;18&comma;15&comma;27&comma;26&comma;1&comma;18&comma;21&comma;25&comma;26&comma;1&comma;18&comma;21&comma;27&comma;26&comma;1&comma;18&comma;22&comma;25&comma;26&comma;1&comma;18&comma;22&comma;28&comma;26&comma;1&comma;19&comma;6&comma;11&comma;26&comma;1&comma;19&comma;6&comma;13&comma;26&comma;1&comma;19&comma;16&comma;13&comma;26&comma;1&comma;19&comma;16&comma;27&comma;26&comma;1&comma;19&comma;21&comma;25&comma;26&comma;1&comma;19&comma;21&comma;27&comma;26&comma;1&comma;19&comma;23&comma;11&comma;26&comma;1&comma;19&comma;23&comma;25&comma;26&comma;1&comma;20&comma;7&comma;11&comma;26&comma;1&comma;20&comma;7&comma;17&comma;26&comma;1&comma;20&comma;12&comma;17&comma;26&comma;1&comma;20&comma;12&comma;28&comma;26&comma;1&comma;20&comma;22&comma;25&comma;26&comma;1&comma;20&comma;22&comma;28&comma;26&comma;1&comma;20&comma;23&comma;11&comma;26&comma;1&comma;20&comma;23&comma;25&comma;26

(17)

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

MMatrix1&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;

poset9PartiallyOrderedSetseq1..5&comma;M

poset9< a poset with 5 elements >

(18)

Display this poset

DrawGraphposet9

Compute the maximal chains of this poset

MaximalChainsposet9

1&comma;2&comma;3&comma;5&comma;1&comma;4&comma;5

(19)

We can examine these chains one by one by using the iterator output:

forchaininMaximalChainsposet9&comma;output=iteratordoprintfChain of length %d: %a\n&comma;numelemschain&comma;chainenddo&colon;

Chain of length 4: [1, 2, 3, 5]
Chain of length 3: [1, 4, 5]

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

Z1&comma;2&comma;3&comma;4&comma;5&comma;6&comma;10&comma;12&comma;15&comma;20&comma;30&comma;60

Z1&comma;2&comma;3&comma;4&comma;5&comma;6&comma;10&comma;12&comma;15&comma;20&comma;30&comma;60

(20)

poset10PartiallyOrderedSetZ&comma;divisibility

poset10< a poset with 12 elements >

(21)

Display this poset

DrawGraphposet10

Compute the maximal chains of this poset

MaximalChainsposet10

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

(22)

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

ZZ1&comma;2&comma;3&comma;4&comma;5&comma;6&comma;12&comma;15&comma;60

ZZ1&comma;2&comma;3&comma;4&comma;5&comma;6&comma;12&comma;15&comma;60

(23)

poset11PartiallyOrderedSetZZ&comma;divisibility

poset11< a poset with 9 elements >

(24)

Display this poset

DrawGraphposet11

Compute the maximal chains of this poset

MaximalChainsposet11

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

(25)

References

  

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

Compatibility

• 

The PartiallyOrderedSets[MaximalChains] command was introduced in Maple 2025.

• 

For more information on Maple 2025 changes, see Updates in Maple 2025.

See Also

PartiallyOrderedSets[Height]

PartiallyOrderedSets[IsAntichain]

PartiallyOrderedSets[IsChain]

PartiallyOrderedSets[LessEqual]

PartiallyOrderedSets[MaximalAntichains]

PartiallyOrderedSets[PartiallyOrderedSet]

PartiallyOrderedSets[Width]