PartiallyOrderedSets
AdjacencyList
returns an adjacency list representation of the directed graph associated with a poset
Calling Sequence
Parameters
Description
Examples
References
Compatibility
AdjacencyList(P)
P
-
PartiallyOrderedSet
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.
with⁡PartiallyOrderedSets:
Create a poset from a set and a non-strict partial order
V≔∅:leq≔`<=`:empty_poset≔PartiallyOrderedSet⁡V,leq
empty_poset≔< a poset with 0 elements >
Compute an adjacency list representation of this poset
AdjacencyList⁡empty_poset
S≔1,2,3,4,5:poset1≔PartiallyOrderedSet⁡S,leq
poset1≔< a poset with 5 elements >
Display this poset
DrawGraph⁡poset1
AdjacencyList⁡poset1
1,22,33,44,55
Create a poset from a set and a strict partial order
lneq≔`<`:poset1_1≔PartiallyOrderedSet⁡S,lneq
poset1_1≔< a poset with 5 elements >
DrawGraph⁡poset1_1
AdjacencyList⁡poset1_1
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
AdjacencyList⁡poset2
3,6,94,856789
divisibNE≔x,y↦irem⁡y,x=0andy≠x:
poset2_1≔PartiallyOrderedSet⁡T,divisibNE,reflexive=checkfalse
poset2_1≔< a poset with 7 elements >
DrawGraph⁡poset2_1
AdjacencyList⁡poset2_1
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
AdjacencyList⁡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
AdjacencyList⁡poset6
1,2,32,43,54,65,66
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
AdjacencyList⁡polyhedral_poset
4,10,15,19,21,22,287,8,10,11,135,8,15,17,2417,19,20,23,2511,16,21,23,2713,16,22,24,255,7,20,27,283,5,147,9,148,12,146,9,116,12,136,16,182,3,171,3,201,18,232,12,242,18,251,9,271,262,263,266,269,2612,2614,2618,2626
Richard P. Stanley: Enumerative Combinatorics 1. 1997, Cambridge Studies in Advanced Mathematics. Vol. 49. Cambridge University Press.
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]
Download Help Document