PartiallyOrderedSets/AdjacencyList - 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/AdjacencyList

PartiallyOrderedSets

  

AdjacencyList

  

returns an adjacency list representation of the directed graph associated with a poset

 

Calling Sequence

Parameters

Description

Examples

References

Compatibility

Calling Sequence

AdjacencyList(P)

Parameters

P

-

PartiallyOrderedSet

Description

• 

The command AdjacencyList(P) returns an adjacency list representation of the partially ordered set P.

Remarks

• 

AdjacencyList(P) will generate and store the transitive reduction 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. 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. Consequently, a poset can be given by an adjacency list or an adjacency matrix of a directed graph.

Examples

withPartiallyOrderedSets&colon;

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

V&colon;leq`<=`&colon;empty_posetPartiallyOrderedSetV&comma;leq

empty_poset< a poset with 0 elements >

(1)

Compute an adjacency list representation of this poset

AdjacencyListempty_poset

(2)

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 >

(3)

Display this poset

DrawGraphposet1

Compute an adjacency list representation of this poset

AdjacencyListposet1

1&comma;22&comma;33&comma;44&comma;55

(4)

Create a poset from a set and a strict partial order

lneq`<`&colon;poset1_1PartiallyOrderedSetS&comma;lneq

poset1_1< a poset with 5 elements >

(5)

Display this poset

DrawGraphposet1_1

Compute an adjacency list representation of this poset

AdjacencyListposet1_1

1&comma;22&comma;33&comma;44&comma;55

(6)

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 >

(7)

Display this poset

DrawGraphposet2

Compute an adjacency list representation of this poset

AdjacencyListposet2

3&comma;6&comma;94&comma;856789

(8)

Create a poset from a set and a strict partial order

divisibNEx&comma;yiremy&comma;x=0andyx&colon;

poset2_1PartiallyOrderedSetT&comma;divisibNE&comma;reflexive=checkfalse

poset2_1< a poset with 7 elements >

(9)

Display this poset

DrawGraphposet2_1

Compute an adjacency list representation of this poset

AdjacencyListposet2_1

3&comma;6&comma;94&comma;856789

(10)

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

(11)

poset5PartiallyOrderedSetconvertT&comma;list&comma;adjList5

poset5< a poset with 7 elements >

(12)

Display this poset

DrawGraphposet5

Compute an adjacency list representation of this poset

AdjacencyListposet5

3&comma;6&comma;94&comma;856789

(13)

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

(14)

poset6PartiallyOrderedSetG

poset6< a poset with 6 elements >

(15)

Display this poset

DrawGraphposet6

Compute an adjacency list representation of this poset

AdjacencyListposet6

1&comma;2&comma;32&comma;43&comma;54&comma;65&comma;66

(16)

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

(17)

dPolyhedralSets:-Dimensiont

d3

(18)

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 >

(19)

Display this poset

DrawGraphpolyhedral_poset

Compute an adjacency list representation of this poset

AdjacencyListpolyhedral_poset

4&comma;10&comma;15&comma;19&comma;21&comma;22&comma;287&comma;8&comma;10&comma;11&comma;135&comma;8&comma;15&comma;17&comma;2417&comma;19&comma;20&comma;23&comma;2511&comma;16&comma;21&comma;23&comma;2713&comma;16&comma;22&comma;24&comma;255&comma;7&comma;20&comma;27&comma;283&comma;5&comma;147&comma;9&comma;148&comma;12&comma;146&comma;9&comma;116&comma;12&comma;136&comma;16&comma;182&comma;3&comma;171&comma;3&comma;201&comma;18&comma;232&comma;12&comma;242&comma;18&comma;251&comma;9&comma;271&comma;262&comma;263&comma;266&comma;269&comma;2612&comma;2614&comma;2618&comma;2626

(20)

References

  

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

Compatibility

• 

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

• 

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

See Also

PartiallyOrderedSets[PartiallyOrderedSet]

PartiallyOrderedSets[ToGraph]

PartiallyOrderedSets[TransitiveClosure]

PartiallyOrderedSets[TransitiveReduction]