user_guide:tutorials:face_lattice_tutorial

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tutorial:face_lattice_tutorial [2011/11/07 18:26] 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 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. 
-<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. 
- 
-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. 
-<code> 
-polytope > $c=cube(8); 
-polytope > $HD_partial = hasse_diagram($c->VERTICES_IN_FACETS,2); 
-polytope > print $HD_partial->DIMS; 
-1 257 1281 3073 
-</code> 
-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)