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
Last revisionBoth sides next revision
tutorial:face_lattice_tutorial [2012/05/22 11:57] – [Dealing with Large Polytopes] joswiguser_guide:tutorials:face_lattice_tutorial [2019/01/25 09:38] – ↷ Page moved from user_guide:face_lattice_tutorial to user_guide:tutorials:face_lattice_tutorial oroehrig
Line 25: Line 25:
 Very often just a part of the face lattice is interesting.  The following command lists just the 1-dimensional faces. Very often just a part of the face lattice is interesting.  The following command lists just the 1-dimensional faces.
 <code> <code>
-polytope > for (my $k=$HD->DIMS->[1]; $k<$HD->DIMS->[2]; ++$k) print $HD->FACES->[$k] +polytope > print map { $p->HASSE_DIAGRAM->FACES->[$_} @{$p->HASSE_DIAGRAM->nodes_of_dim(1)}; 
-{1 2}{2 3}{3 4}{0 4}{0 1}+{2 3}{3 4}{0 4}{0 1}{1 2}
 </code> </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.+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. We need to specify 3 as a limit since this function uses the rank which is one more than the dimension.
 <code> <code>
 polytope > $c=cube(8); polytope > $c=cube(8);
-polytope > $HD_partial = hasse_diagram($c->VERTICES_IN_FACETS,2); +polytope > $HD_partial = lower_hasse_diagram($c->VERTICES_IN_FACETS,3); 
-polytope > print $HD_partial->DIMS+polytope > print $HD_partial->INVERSE_RANK_MAP
-1 257 1281 3073+{(0 (0 0)) ((1 256)) (2 (257 1280)) (3 (1281 3072)) (4 (3073 3073))}
 </code> </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.  The (partial) f-vector is obtained by taking successive differences.+Instead of listing all those thousands of faces here we give only the pairs indicating the start-node and end-node for each rank.
 <code> <code>
-polytope > $partial_f = $HD_partial->DIMS; +polytope > print map { $HD_partial->nodes_of_rank($_)->size," " } (1..3);
-polytope > for (my $i=1; $i<$partial_f->size(); ++$i) { print $partial_f->[$i]-$partial_f->[$i-1], " " }+
 256 1024 1792  256 1024 1792 
 </code> </code>
Line 65: Line 63:
 The subsequent second stage looks as above; but the difference is that VERTICES_IN_FACETS is known already. The subsequent second stage looks as above; but the difference is that VERTICES_IN_FACETS is known already.
 <code> <code>
-polytope > $HD_partial = hasse_diagram($p->VERTICES_IN_FACETS,2); +polytope > $HD_partial = lower_hasse_diagram($p->VERTICES_IN_FACETS,3); 
-polytope > print $HD_partial->DIMS+polytope > print map { $HD_partial->nodes_of_rank($_)->size," " } (1..3)
-1 101 2082 12534+100 2004 10638 
 </code> </code>
-The executive summary: While polymake is designed to to all kinds of things automatically, you might have to guide it a little if you are computing with large or special input.+The executive summary: While polymake is designed to do all kinds of things automatically, you might have to guide it a little if you are computing with large or special input.
  
 One more caveat:  A //d//-polytope with //n// vertices has at most //O(n^(d/2))// facets.  This is the consequence of the Upper-Bound-Theorem. One more caveat:  A //d//-polytope with //n// vertices has at most //O(n^(d/2))// facets.  This is the consequence of the Upper-Bound-Theorem.
   * McMullen, Peter:  The maximum numbers of faces of a convex polytope. Mathematika 17 (1970) 179-184.   * McMullen, Peter:  The maximum numbers of faces of a convex polytope. Mathematika 17 (1970) 179-184.
 This number is actually attained by neighborly polytopes; for example, by the cyclic polytopes. This number is actually attained by neighborly polytopes; for example, by the cyclic polytopes.
  • user_guide/tutorials/face_lattice_tutorial.txt
  • Last modified: 2019/02/04 22:55
  • by 127.0.0.1