Sign up ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Is there a Mathematica implementation for computing the Ehrhart polynomial of a convex polytope which is specified either by its vertices or by a set of inequalities?

I am interested in knowing this because I understand that Ehrhart's polynomial for a polytope will determine the number of integer points inside this polytope.

Alternatively if someone knows of an existing method to count the number of integer points inside a convex polytope (described by its vertices or a set of inequalities), it would be equally helpful.

share|improve this question
This thread looks helpful: it shows brute force ways to count lattice points within a polytope given by inequalities. They likely will fail in high dimensions because there will be too many points to inspect. – whuber Mar 19 '13 at 17:56
Thanks whuber. You're right, its not useful in higher dimensions. For my applications, I am having to deal with inequalities having n variables and 2n constraints. Here n ~ 20 to 30 . Also, I had seen that computing the volume of a general polytope is #P-Hard. I am suspecting that computing the coefficients of its Erhart-Polynomial too is hard. But still I am in search of algorithms. I found this software called LattE which seems to be reasonably fast for n=10 . However, I do not know how to invoke commands of this software from within a mathematica notebook or a script. – Pavithran Iyer Mar 20 '13 at 3:34
Have you seen Barvinok's papers already? – J. M. is back. Apr 30 '13 at 3:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.