user_guide:tutorials:face_lattice_tutorial

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
tutorial:face_lattice_tutorial [2011/11/07 18:17] – created joswiguser_guide:tutorials:face_lattice_tutorial [2019/02/04 22:55] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== Face lattices (of Polytopes) ====== +{{page>.:latest:@FILEID@}}
- +
-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. +
- +
-<code> +
-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} +
-</code> +
- +
-The obvious question isHow 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. +
-<code> +
-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} +
-</code> +
-The above works as described since DIMS return an array with the first nodes of each dimension. +
- +
  
  • user_guide/tutorials/face_lattice_tutorial.1320689834.txt.gz
  • Last modified: 2014/01/03 15:45
  • (external edit)