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

> 

with⁡PartiallyOrderedSets&colon;

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

> 

V≔∅&colon;leq≔`<=`&colon;empty_poset≔PartiallyOrderedSet⁡V&comma;leq

empty_poset≔< a poset with 0 elements >

(1)

Compute an adjacency list representation of this poset

> 

AdjacencyList⁡empty_poset

(2)

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 >

(3)

Display this poset

> 

DrawGraph⁡poset1

Compute an adjacency list representation of this poset

> 

AdjacencyList⁡poset1

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

(4)

Create a poset from a set and a strict partial order

> 

lneq≔`<`&colon;poset1_1≔PartiallyOrderedSet⁡S&comma;lneq

poset1_1≔< a poset with 5 elements >

(5)

Display this poset

> 

DrawGraph⁡poset1_1

Compute an adjacency list representation of this poset

> 

AdjacencyList⁡poset1_1

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

(6)

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 >

(7)

Display this poset

> 

DrawGraph⁡poset2

Compute an adjacency list representation of this poset

> 

AdjacencyList⁡poset2

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

(8)

Create a poset from a set and a strict partial order

> 

divisibNE≔x&comma;y↦irem⁡y&comma;x=0andy≠x&colon;

> 

poset2_1≔PartiallyOrderedSet⁡T&comma;divisibNE&comma;reflexive=checkfalse

poset2_1≔< a poset with 7 elements >

(9)

Display this poset

> 

DrawGraph⁡poset2_1

Compute an adjacency list representation of this poset

> 

AdjacencyList⁡poset2_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

> 

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

(11)
> 

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

poset5≔< a poset with 7 elements >

(12)

Display this poset

> 

DrawGraph⁡poset5

Compute an adjacency list representation of this poset

> 

AdjacencyList⁡poset5

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

(13)

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

(14)
> 

poset6≔PartiallyOrderedSet⁡G

poset6≔< a poset with 6 elements >

(15)

Display this poset

> 

DrawGraph⁡poset6

Compute an adjacency list representation of this poset

> 

AdjacencyList⁡poset6

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

(16)

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

(17)
> 

d≔PolyhedralSets:-Dimension⁡t

d≔3

(18)

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 >

(19)

Display this poset

> 

DrawGraph⁡polyhedral_poset

Compute an adjacency list representation of this poset

> 

AdjacencyList⁡polyhedral_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]