Volumes: inequalities and equations

Questions and problems about using polymake go here.
richi
Posts: 2
Joined: 12 Dec 2015, 10:20

Volumes: inequalities and equations

Postby richi » 12 Dec 2015, 10:53

Dear all,

I followed your tutorial in order to find the volume of a region but my output is always 0 which is not correct.

My region is determined by the following inequalities and one equation:
x1 >= 0;
x2 >= 0;
x3 >= 0;
x4 >= 0;
x5 >= 0;
x6 >= 0;
x1 + x2 - x3 - x4 >= 0;
x1 + x2 - x5 - x6 >= 0;
and
x1 + x2 + x3 + x4 + x5 + x6 = 1;

Thank you very much!

paffenholz
Developer
Posts: 211
Joined: 24 Dec 2010, 13:47

Re: Volumes: inequalities and equations

Postby paffenholz » 13 Dec 2015, 15:48

The volume computation in polymake is always done with respect to the ambient space. Your polytope lives inside the hyperplane H defined by the equation x1+...+x6=1, so it has at most dimension 5, and as such its six-dimensional volume is always 0.

What you probably want is its "relative volume", i.e., its volume considered as full dimensional point set inside the affine hyperplane H. There is no property implemented in polymake that would compute this directly. You can either transform your polytope into a full-dimensional one by applying a transformation that sends your polytope to R^5 (and take into account its determinant), or you artificially make the polytope full dimensional by, e.g., taking a pyramid. The latter approach is described in detail in this forum post.

Best
Andreas

richi
Posts: 2
Joined: 12 Dec 2015, 10:20

Re: Volumes: inequalities and equations

Postby richi » 14 Dec 2015, 15:52

Dear Andreas,

I am sorry for disturbing you again but I have no idea about how I can translate the method described in this discussion viewtopic.php?t=401 to my case. I am not a specialist and it would be nice if you can help me in that.

Thank you very much!

Best regards

paffenholz
Developer
Posts: 211
Joined: 24 Dec 2010, 13:47

Re: Volumes: inequalities and equations

Postby paffenholz » 28 Dec 2015, 13:03

You can start with the second code block in that reply, so define a point outside your hyperplane and add this to a new polytope together with the vertices of your original one. You can use the same point as in the example, with the correct dimension of course:

Code: Select all

polytope > $point_outside_hyperplane=new Vector([1,0,0,0,0,0,0]); polytope > $pyramid=new Polytope(POINTS=>$poly_in_hyperplane->VERTICES/$point_outside_hyperplane);
The vertices of your polytope are computed automatically for the second command (replace $poly_in_hyperplane with the name of your polytope). The height of the origin above your hyperplane is

Code: Select all

polytope > $height=1/6 * (new QuadraticExtension(0,1,6)); # 1/6 sqrt(6)
with this you can compute your volume as

Code: Select all

polytope > print 6 * $pyramid->VOLUME / $height;
best
Andreas


Return to “Helpdesk”