# Ehrhart polynomial

In mathematics, an integral polytope has an associated Ehrhart polynomial that encodes the relationship between the volume of a polytope and the number of integer points the polytope contains. The theory of Ehrhart polynomials can be seen as a higher-dimensional generalization of Pick's theorem in the Euclidean plane.
These polynomials are named after Eugène Ehrhart who studied them in the 1960s.

## Definition

Informally, if P is a polytope, and tP is the polytope formed by expanding P by a factor of t in each dimension, then L(P, t) is the number of integer lattice points in tP.
More formally, consider a lattice ${\mathcal {L}}$ in Euclidean space $\mathbb {R} ^{n}$ and a d-dimensional polytope P in $\mathbb {R} ^{n}$ with the property that all vertices of the polytope are points of the lattice. (A common example is ${\mathcal {L}}=\mathbb {Z} ^{n}$ and a polytope for which all vertices have integer coordinates.) For any positive integer t, let tP be the t-fold dilation of P (the polytope formed by multiplying each vertex coordinate, in a basis for the lattice, by a factor of t), and let
    $L(P,t)=\#\left(tP\cap {\mathcal {L}}\right)$
be the number of lattice points contained in the polytope tP. Ehrhart showed in 1962 that L is a rational polynomial of degree d in t, i.e. there exist rational numbers $L_{0}(P),\dots ,L_{d}(P)$ such that:
    $L(P,t)=L_{d}(P)t^{d}+L_{d-1}(P)t^{d-1}+\cdots +L_{0}(P)$
for all positive integers t.
The Ehrhart polynomial of the interior of a closed convex polytope P can be computed as:
    $L(\operatorname {int} (P),t)=(-1)^{d}L(P,-t),$
where d is the dimension of P. This result is known as Ehrhart–Macdonald reciprocity.

## Examples

Let P be a d-dimensional unit hypercube whose vertices are the integer lattice points all of whose coordinates are 0 or 1. In terms of inequalities,
    $P=\left\{x\in \mathbb {R} ^{d}:0\leq x_{i}\leq 1;1\leq i\leq d\right\}.$
Then the t-fold dilation of P is a cube with side length t, containing (t + 1)$^d$ integer points. That is, the Ehrhart polynomial of the hypercube is L(P,t) = (t + 1)$^d$. Additionally, if we evaluate L(P, t) at negative integers, then
    $L(P,-t)=(-1)^{d}(t-1)^{d}=(-1)^{d}L(\operatorname {int} (P),t),$
as we would expect from Ehrhart–Macdonald reciprocity.
Many other figurate numbers can be expressed as Ehrhart polynomials. For instance, the square pyramidal numbers are given by the Ehrhart polynomials of a square pyramid with an integer unit square as its base and with height one; the Ehrhart polynomial in this case is ⁠1/6⁠(t + 1)(t + 2)(2t + 3).

## Ehrhart quasi-polynomials

Let P be a rational polytope. In other words, suppose
    $P=\left\{x\in \mathbb {R} ^{d}:Ax\leq b\right\},$
where $A\in \mathbb {Q} ^{k\times d}$ and $b\in \mathbb {Q} ^{k}.$ (Equivalently, P is the convex hull of finitely many points in $\mathbb {Q} ^{d}.$) Then define
    $L(P,t)=\#\left(\left\{x\in \mathbb {Z} ^{d}:Ax\leq tb\right\}\right).$
In this case, L(P, t) is a quasi-polynomial in t. Just as with integral polytopes, Ehrhart–Macdonald reciprocity holds, that is,
    $L(\operatorname {int} (P),t)=(-1)^{d}L(P,-t).$

## Examples of Ehrhart quasi-polynomials

Let P be a polygon with vertices (0,0), (0,2), (1,1) and (⁠3/2⁠, 0). The number of integer points in tP will be counted by the quasi-polynomial
    $L(P,t)={\frac {7t^{2}}{4}}+{\frac {5t}{2}}+{\frac {7+(-1)^{t}}{8}}.$

## Interpretation of coefficients

If P is closed (i.e. the boundary faces belong to P), some of the coefficients of L(P, t) have an easy interpretation:
* the leading coefficient, $L_{d}(P)$, is equal to the d-dimensional volume of P, divided by d(L) (see lattice for an explanation of the content or covolume d(L) of a lattice);
* the second coefficient, $L_{d-1}(P)$, can be computed as follows: the lattice L induces a lattice L$_F$ on any face F of P; take the (d − 1)-dimensional volume of F, divide by 2d(L$_F$), and add those numbers for all faces of P;
* the constant coefficient, $L_{0}(P)$, is the Euler characteristic of P. When P is a closed convex polytope, $L_{0}(P)=1$.

## The Betke–Kneser theorem

Ulrich Betke and Martin Kneser established the following characterization of the Ehrhart coefficients. A functional $Z$ defined on integral polytopes is an $\operatorname {SL} (n,\mathbb {Z} )$ and translation invariant valuation if and only if there are real numbers $c_{0},\ldots ,c_{n}$ such that
    $Z=c_{0}L_{0}+\cdots +c_{n}L_{n}.$

## Ehrhart series

We can define a generating function for the Ehrhart polynomial of an integral d-dimensional polytope P as
    $\operatorname {Ehr} _{P}(z)=\sum _{t\geq 0}L(P,t)z^{t}.$
This series can be expressed as a rational function. Specifically, Ehrhart proved (1962) that there exist complex numbers $h_{j}^{*}$, $0\leq j\leq d$, such that the Ehrhart series of P is
    $\operatorname {Ehr} _{P}(z)={\frac {\sum _{j=0}^{d}h_{j}^{\ast }(P)z^{j}}{(1-z)^{d+1}}},\qquad \sum _{j=0}^{d}h_{j}^{\ast }(P)\neq 0.$
Richard P. Stanley's non-negativity theorem states that under the given hypotheses, $h_{j}^{*}$ will be non-negative integers, for $0\leq j\leq d$.
Another result by Stanley shows that if P is a lattice polytope contained in Q, then $h_{j}^{*}(P)\leq h_{j}^{*}(Q)$ for all j. The $h^{*}$-vector is in general not unimodal, but it is whenever it is symmetric and the polytope has a regular unimodular triangulation.

### Ehrhart series for rational polytopes

As in the case of polytopes with integer vertices, one defines the Ehrhart series for a rational polytope. For a d-dimensional rational polytope P, where D is the smallest integer such that DP is an integer polytope (D is called the denominator of P), then one has
    $\operatorname {Ehr} _{P}(z)=\sum _{t\geq 0}L(P,t)z^{t}={\frac {\sum _{j=0}^{D(d+1)}h_{j}^{\ast }(P)z^{j}}{\left(1-z^{D}\right)^{d+1}}},$
where the $h_{j}^{*}$ are still non-negative integers.

## Non-leading coefficient bounds

The polynomial's non-leading coefficients $c_{0},\dots ,c_{d-1}$ in the representation
    $L(P,t)=\sum _{r=0}^{d}c_{r}t^{r}$
can be upper bounded:
    $c_{r}\leq |s(d,r)|c_{d}+{\frac {1}{(d-1)!}}|s(d,r+1)|$
where $s(n,k)$ is the Stirling number of the first kind. Lower bounds also exist.

## Toric variety

The case $n=d=2$ and $t=1$ of these statements yields Pick's theorem. Formulas for the other coefficients are much harder to get; Todd classes of toric varieties, the Riemann–Roch theorem as well as Fourier analysis have been used for this purpose.
If X is the toric variety corresponding to the normal fan of P, then P defines an ample line bundle on X, and the Ehrhart polynomial of P coincides with the Hilbert polynomial of this line bundle.
Ehrhart polynomials can be studied for their own sake. For instance, one could ask questions related to the roots of an Ehrhart polynomial. Furthermore, some authors have pursued the question of how these polynomials could be classified.

## Generalizations

It is possible to study the number of integer points in a polytope P if we dilate some facets of P but not others. In other words, one would like to know the number of integer points in semi-dilated polytopes. It turns out that such a counting function will be what is called a multivariate quasi-polynomial. An Ehrhart-type reciprocity theorem will also hold for such a counting function.
Counting the number of integer points in semi-dilations of polytopes has applications in enumerating the number of different dissections of regular polygons and the number of non-isomorphic unrestricted codes, a particular kind of code in the field of coding theory.