Can polymake help me translate my polytopes?

Questions and problems about using polymake go here.
done-with-fish
Posts: 16
Joined: 12 Feb 2015, 21:44

Can polymake help me translate my polytopes?

Postby done-with-fish » 11 Dec 2015, 19:47

I often find myself working with lattice polytopes whose vertices live in an affine hyperplane H of R^d defined by H={ x in R^d : <v,x>=1 } where v is some fixed integral vector. What is the best way to input these polytopes into polymake?

For example, suppose that the vertices of my polytope are the columns of

Code: Select all

A= -4 -2 -5 -3 3 2 3 2 2 1 3 2
The vertices of this polytope live in the hyperplane defined by the integral vector v=<1,1,1>. To input my data into polymake I need to translate this hyperplane defined by e=<1,0,0>.

Banging my head against the wall, I find that A = R*B where

Code: Select all

R= B= -4 2 -1 1 1 1 1 3 -1 0 0 1 0 1 2 -1 1 0 0 1 1
Since det R = -1 I find that my original polytope is the square and I can use the columns of B to define my polytope in polymake.

Can polymake automate this process?

blorenz
Developer
Posts: 139
Joined: 10 Jan 2011, 17:21

Re: Can polymake help me translate my polytopes?

Postby blorenz » 16 Dec 2015, 11:17

Hi,

one way to do this is to add an additional homogenization first:

Code: Select all

$p = new Polytope(POINTS=>ones_vector() | transpose($A));
Many properties also work fine for non-full-dimensional polytopes. But you can also project the polytope down again while preserving the lattice (as long as it is bounded and integral):

Code: Select all

> $q = ambient_lattice_normalization($p); > print $q->VERTICES; 1 0 0 1 -1 0 1 0 1 1 -1 1
Alternatively you could also use smith_normal_form(M) directly.

Benjamin


Return to “Helpdesk”