Page 1 of 1

Ehrhart polynomial for non-full dimensional polytopes

Posted: 04 Dec 2015, 17:36
by josephineyu
Hi,
For lattice polytopes that are not full dimensional , EHRHART_POLYNOMIAL_COEFF outputs something strange. First applying ambient_lattice_normalization does the right thing, so I would expect polymake to do this instead. Perhaps EHRHART_POLYNOMIAL_COEFF assumes the input polytope to be full-dimensional. If it is the case, then it should be stated in the tutorial/documentation here:
http://polymake.org/doku.php/tutorial/l ... s_tutorial
--Josephine

Re: Ehrhart polynomial for non-full dimensional polytopes

Posted: 07 Dec 2015, 19:54
by blorenz
Hello,

thank you very much for the report. The Ehrhart polynomial is designed to work with non-full-dimensional polytopes as well. But there is a bug with the zero-padding of the H_STAR_VECTOR that, in this case, causes the conversion to the Ehrhart polynomial to go wrong.

The H_STAR_VECTOR should always be correct, the EHRHART_POLYNOMIAL_COEFF should be correct if you have LattE configured and preferred.
A somewhat ugly workaround which does not need the lattice normalization would be:

Code: Select all

print binomial_to_power_basis(new Vector($p->H_STAR_VECTOR->slice(0,$p->CONE_DIM)));
This will be fixed in the the next snapshot and release and I could also prepare a patch for the current release on request.

Best,
Benjamin

Re: Ehrhart polynomial for non-full dimensional polytopes

Posted: 10 Dec 2015, 15:27
by josephineyu
Thanks, Benjamin! This will work for now.
Josephine