# Shelling order of a simplicial polytope

Hi there,

In sage a simplicial complex C has a function "is_shellable" that could return a shelling order of the facets of C. I assume that every facet of C, a maximal face, has dimension d-1 and that C is pure, every face of C is contained in a facet. The dimension of a complex is the dimension of a facet.

A simplicial d-dimensional polytope P is a simplicial (d-1)-dimensional complex C.P is a Polyhedron in sage. Suppose I have a realisation of P in R^d, coordinates of all its vertices. Is there a reasonable direct way to make use of the function "is_shellable" to obtain a shelling order of a P?

Thank you in advance, and regards, Guillermo

edit retag close merge delete

Sort by » oldest newest most voted

Dear Guillermo,

The answer to your question is yes. Here is an illustration with the octahedron:

sage: P = polytopes.octahedron()
sage: Facets = {f.ambient_V_indices():f for f in P.faces(P.dimension() - 1)}  # Create the vertices-indices-to-facets dictionary
sage: P.is_simplicial()  # Check that P is simplicial, so we can get the boundary complex
True
sage: C = P.boundary_complex()  # Create the boundary complex
sage: Order = C.is_shellable(True); Order  # Get a shelling order
((0, 1, 2),
(1, 2, 5),
(1, 3, 5),
(0, 2, 4),
(0, 1, 3),
(0, 3, 4),
(2, 4, 5),
(3, 4, 5))


Finally, we can get the actual sequence of facet using our dictionary.

sage: Facet_shelling = [Facets[indices.tuple()] for indices in Order]; Facet_shelling
[A 2-dimensional face of a Polyhedron in ZZ^3 defined as the convex hull of 3 vertices,
A 2-dimensional face of a Polyhedron in ZZ^3 defined as the convex hull of 3 vertices,
A 2-dimensional face of a Polyhedron in ZZ^3 defined as the convex hull of 3 vertices,
A 2-dimensional face of a Polyhedron in ZZ^3 defined as the convex hull of 3 vertices,
A 2-dimensional face of a Polyhedron in ZZ^3 defined as the convex hull of 3 vertices,
A 2-dimensional face of a Polyhedron in ZZ^3 defined as the convex hull of 3 vertices,
A 2-dimensional face of a Polyhedron in ZZ^3 defined as the convex hull of 3 vertices,
A 2-dimensional face of a Polyhedron in ZZ^3 defined as the convex hull of 3 vertices]

more

@jipilab, thank you very much. For some reason, I had overlooked the function boundary_complex!

( 2020-07-24 09:37:20 +0100 )edit

Sure! If you want to keep track of the development related to polyhedral geometry in Sage visit the Polyhedral Geometry Trac Wiki. The .boundary_complex method is in Sage since version 9.0.

( 2020-07-24 09:41:57 +0100 )edit