user_guide:tutorials:face_lattice_tutorial

This tutorial is probably also available as a Jupyter notebook in the demo folder in the polymake source and on github.

Different versions of this tutorial: latest release, release 4.11, release 4.10, release 4.9, release 4.8, release 4.7, release 4.6, release 4.5, release 4.4, release 4.3, release 4.2, release 4.1, release 4.0, release 3.6, nightly master

This is an old revision of the document!


Face lattices (of Polytopes)

By definition the face lattice of a polytope contains all the combinatorial information about a polytope. Here we want to explore how to work with this in polymake. Let's start simple.

polytope > $p = n_gon(5);
polytope > $HD = $p->HASSE_DIAGRAM;       
polytope > print $HD->FACES;
{}
{0}
{1}
{2}
{3}
{4}
{1 2}
{2 3}
{3 4}
{0 4}
{0 1}
{0 1 2 3 4}

The obvious question is: How to interpret that output? Well, the Hasse diagram of a partially ordered set is implemented as a special kind of a directed graph. Hence all operations on (directed) graphs work. Each node of the Hasse diagram represents a face. One way to give a name to such a face is to list all the vertices contained, and this is the output above. A key feature is that the faces come sorted by dimension.

Very often just a part of the face lattice is interesting. The following command lists just the 1-dimensional faces.

polytope > for (my $k=$HD->DIMS->[1]; $k<$HD->DIMS->[2]; ++$k) { print $HD->FACES->[$k] }
{1 2}{2 3}{3 4}{0 4}{0 1}

The above works as described since DIMS return an array with the first nodes of each dimension.

Face lattices of polytopes can be huge. So it may be an advantage to compute only a part. The following computes the 2-skeleton of an 8-dimensional cube.

polytope > $c=cube(8);
polytope > $HD_partial = hasse_diagram($c->VERTICES_IN_FACETS,2);
polytope > print $HD_partial->DIMS;
1 257 1281 3073

Instead of listing all those thousands of faces here we give only the vector of starting nodes. This can be treated just like above.

  • user_guide/tutorials/face_lattice_tutorial.1320690365.txt.gz
  • Last modified: 2014/01/03 15:45
  • (external edit)