Example of rational polytope with Ehrhart polynomial

General discussion on polymake goes here.
andres.vindas
Posts: 1
Joined: 25 Feb 2021, 00:36

Example of rational polytope with Ehrhart polynomial

Postby andres.vindas » 25 Feb 2021, 00:46

Hello, I was thinking of a small example of a rational polygon that encounters period collapse when obtaining its Ehrhart quasipolynomial and admits an Ehrhart polynomial instead. I put the polytope conv{(0,0),(0,1/2),(1/2,0)} into polymake and I got that the Ehrhart polynomial is 1/2*x^2 + 3/2*x + 1. This is certainly not correct since we should be getting 1 when evaluating the polynomial at 1 to account for (0,0) and I expect the leading term to be 1/8. Can someone check if I did anything incorrect?

polytope > $m = new Matrix([1,0,0],[1,1/2,0],[1,0,1/2]);
polytope > $p = new Polytope<Rational>(VERTICES=>$m);
polytope > print join("\n",@{$p->EHRHART_QUASI_POLYNOMIAL});
1/2*x^2 + 3/2*x + 1

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

Re: Example of rational polytope with Ehrhart polynomial

Postby blorenz » 25 Feb 2021, 01:15

Hi,

thanks for the report, when I tried it locally I got the following output:

Code: Select all

polytope > $m = new Matrix([1,0,0],[1,1/2,0],[1,0,1/2]); polytope > $p = new Polytope<Rational>(VERTICES=>$m); polytope > print join("\n",@{$p->EHRHART_QUASI_POLYNOMIAL}); 1/8*x^2 + 3/4*x + 1 1/8*x^2 + 1/2*x + 3/8

But after a few more tries I did find a different polymake installation that does reproduce the output that you get and the reason seems to be that in some configuration polymake passes a wrong grading to normaliz.
We will try to fix this for the next release.

For now you can try to work around this issue by setting the grading manually:

Code: Select all

polytope > $p = new Polytope<Rational>(VERTICES=>$m, MONOID_GRADING=>[1,0,0]);

Best,
Benjamin


Return to “General Discussion”