A d-dimensional alcoved polytope is an integral polytope in \(\mathbb{R}^d\) that is an intersection of half-spaces of the form
\[ x_i – x_j \le b_{ij} \]where \(b_{ij} \in \mathbb{Z}\) for all pairs of distinct \(i,j \in [d+1]\). We set \(x_{d+1}=0\) by convention.
To each alcoved polytope we can associate a unique set of parameters \((b_{ij})\) such that \(b_{ij}+b_{jk}\ge b_{ik}\) for all distinct \(i,j,k\in [d+1].\) Equivalently, these conditions mean that all the linear inequalities above are tight. The set of all tuples satisfying these inequalities forms a cone (called a type cone) in \(\mathbb{R}^{d(d+1)}\) and has a fan structure corresponding to the types of normal fans of alcoved polytopes. This fan is called the type fan of alcoved polytopes and denoted \(\mathcal{F}_d\). Polytopes that lie in the interior of a maximal cone of \(\mathcal{F}_d\) are called maximal, and they are smooth polytopes with \(\binom{2d}{d}\) vertices.
Simple alcoved polytopes are smooth, so we can compute their weighted count with our weighted Khovanskiǐ–Pukhlikov theorem.
We now demonstrate our algorithm by computing the formula for weighted lattice counts of any 2-dimensional alcoved polytope \(P_A(\mathbf b)\) with the degree-2 homogeneous weight \(w(\mathbf{p})=p_1p_2.\) To begin, we compute \(\int_{P_A(\mathbf{b+h})}w(\mathbf{x})\,d\mathbf{x}\) by fixing a triangulation of the polytope and computing the integral over each simplex.
The figure above shows a triangulation of \(P_A(\mathbf b)\) with the following four simplices:
- \(\Delta_1=\{(-b_{31},b_{21}-b_{31}),\;(b_{12}-b_{32},-b_{32}),\;(-b_{31},-b_{32})\}\)
- \(\Delta_2=\{(-b_{31},b_{21}-b_{31}),\;(b_{12}-b_{32},-b_{32}),\;(-b_{23}-b_{21},b_{23})\}\)
- \(\Delta_3=\{(b_{12}-b_{32},-b_{32}),\;(-b_{23}-b_{21},b_{23}),\;(b_{13},b_{13}-b_{12})\}\)
- \(\Delta_4=\{(-b_{23}-b_{21},b_{23}),\;(b_{13},b_{13}-b_{12}),\;(b_{13},b_{23})\}\)
For \(P_A(\mathbf{b+h})\), we simply replace each \(b_{ij}\) with \(b_{ij}+h_{ij}.\) For each simplex \(\Delta\) with vertices \(\mathbf{s}_1,\mathbf{s}_2,\mathbf{s}_3\) we compute
\[ \int_{\Delta} w(\mathbf{x})\,d\mathbf{x} = \frac{\mathrm{vol}(\Delta)}{48} \sum_{1\le i_1\le i_2\le 3} \sum_{\boldsymbol{\epsilon}\in \{\pm 1\}^2} \epsilon_1\epsilon_2\,w(\epsilon_1\mathbf{s}_{i_1}+\epsilon_2\mathbf{s}_{i_2}) \]with \(d=m=2.\) The coordinates of the vertices in this triangulation of \(P_A(\mathbf{b+h})\) are polynomials in \(b_{ij}\) and \(h_{ij},\) so taking this sum over each simplex gives us a polynomial formula for \(\int_{P_A(\mathbf{b+h})}w(\mathbf{x})\,d\mathbf{x}.\) Finally, we iteratively apply the Todd operator six times (once for each \(h_{ij}\)) and set each \(h_{ij}=0.\) This results in the following formula:
By replacing each \(b_{ij}\) with \(t b_{ij},\) we obtain a parametric formula for the weighted Ehrhart polynomial \(\mathrm{ehr}_{P_A(\mathbf b),w}(t).\) We can then compute the weighted \(h^*\) polynomial after a linear change of basis.
\[ \begin{aligned} h^*_{P_A(\mathbf b),w}(z)= \frac{1}{24}\Big(& b_{12}^4z^4 – 6b_{12}^2b_{13}^2z^4 + 8b_{12}b_{13}^3z^4 – 3b_{13}^4z^4 + b_{21}^4z^4 + 6b_{13}^2b_{23}^2z^4 – 6b_{21}^2b_{23}^2z^4 + 8b_{21}b_{23}^3z^4 – 3b_{23}^4z^4 – 6b_{21}^2b_{31}^2z^4 \\ & + 8b_{21}b_{31}^3z^4 – 3b_{31}^4z^4 – 6b_{12}^2b_{32}^2z^4 + 6b_{31}^2b_{32}^2z^4 + 8b_{12}b_{32}^3z^4 – 3b_{32}^4z^4 + 11b_{12}^4z^3 – 66b_{12}^2b_{13}^2z^3 + 88b_{12}b_{13}^3z^3 – \\ & 33b_{13}^4z^3 + 11b_{21}^4z^3 + 66b_{13}^2b_{23}^2z^3 – 66b_{21}^2b_{23}^2z^3 + 88b_{21}b_{23}^3z^3 – 33b_{23}^4z^3 – 66b_{21}^2b_{31}^2z^3 + 88b_{21}b_{31}^3z^3 – 33b_{31}^4z^3 – 66b_{12}^2b_{32}^2z^3 + \\ & 66b_{31}^2b_{32}^2z^3 + 88b_{12}b_{32}^3z^3 – 33b_{32}^4z^3 – 2b_{12}^3z^4 + 6b_{12}^2b_{13}z^4 – 6b_{12}b_{13}^2z^4 + 2b_{13}^3z^4 – 2b_{21}^3z^4 – 6b_{13}^2b_{23}z^4 + 6b_{21}^2b_{23}z^4 – \\ & 6b_{13}b_{23}^2z^4 – 6b_{21}b_{23}^2z^4 + 2b_{23}^3z^4 + 6b_{21}^2b_{31}z^4 – 6b_{21}b_{31}^2z^4 + 2b_{31}^3z^4 + 6b_{12}^2b_{32}z^4 – 6b_{31}^2b_{32}z^4 – 6b_{12}b_{32}^2z^4 – 6b_{31}b_{32}^2z^4 + \\ & 2b_{32}^3z^4 + 11b_{12}^4z^2 – 66b_{12}^2b_{13}^2z^2 + 88b_{12}b_{13}^3z^2 – 33b_{13}^4z^2 + 11b_{21}^4z^2 + 66b_{13}^2b_{23}^2z^2 – 66b_{21}^2b_{23}^2z^2 + 88b_{21}b_{23}^3z^2 – 33b_{23}^4z^2 – \\ & 66b_{21}^2b_{31}^2z^2 + 88b_{21}b_{31}^3z^2 – 33b_{31}^4z^2 – 66b_{12}^2b_{32}^2z^2 + 66b_{31}^2b_{32}^2z^2 + 88b_{12}b_{32}^3z^2 – 33b_{32}^4z^2 – 6b_{12}^3z^3 + 18b_{12}^2b_{13}z^3 – \\ & 18b_{12}b_{13}^2z^3 + 6b_{13}^3z^3 – 6b_{21}^3z^3 – 18b_{13}^2b_{23}z^3 + 18b_{21}^2b_{23}z^3 – 18b_{13}b_{23}^2z^3 – 18b_{21}b_{23}^2z^3 + 6b_{23}^3z^3 + 18b_{21}^2b_{31}z^3 – 18b_{21}b_{31}^2z^3 + \\ & 6b_{31}^3z^3 + 18b_{12}^2b_{32}z^3 – 18b_{31}^2b_{32}z^3 – 18b_{12}b_{32}^2z^3 – 18b_{31}b_{32}^2z^3 + 6b_{32}^3z^3 – b_{12}^2z^4 – 2b_{12}b_{13}z^4 + 3b_{13}^2z^4 – b_{21}^2z^4 + \\ & 6b_{13}b_{23}z^4 – 2b_{21}b_{23}z^4 + 3b_{23}^2z^4 – 2b_{21}b_{31}z^4 + 3b_{31}^2z^4 – 2b_{12}b_{32}z^4 + 6b_{31}b_{32}z^4 + 3b_{32}^2z^4 + b_{12}^4z – 6b_{12}^2b_{13}^2z + 8b_{12}b_{13}^3z – 3b_{13}^4z + \\ & b_{21}^4z + 6b_{13}^2b_{23}^2z – 6b_{21}^2b_{23}^2z + 8b_{21}b_{23}^3z – 3b_{23}^4z – 6b_{21}^2b_{31}^2z + 8b_{21}b_{31}^3z – 3b_{31}^4z – 6b_{12}^2b_{32}^2z + 6b_{31}^2b_{32}^2z + \\ & 8b_{12}b_{32}^3z – 3b_{32}^4z + 6b_{12}^3z^2 – 18b_{12}^2b_{13}z^2 + 18b_{12}b_{13}^2z^2 – 6b_{13}^3z^2 + 6b_{21}^3z^2 + 18b_{13}^2b_{23}z^2 – 18b_{21}^2b_{23}z^2 + 18b_{13}b_{23}^2z^2 + 18b_{21}b_{23}^2z^2 – \\ & 6b_{23}^3z^2 – 18b_{21}^2b_{31}z^2 + 18b_{21}b_{31}^2z^2 – 6b_{31}^3z^2 – 18b_{12}^2b_{32}z^2 + 18b_{31}^2b_{32}z^2 + 18b_{12}b_{32}^2z^2 + 18b_{31}b_{32}^2z^2 – 6b_{32}^3z^2 + b_{12}^2z^3 + \\ & 2b_{12}b_{13}z^3 – 3b_{13}^2z^3 + b_{21}^2z^3 – 6b_{13}b_{23}z^3 + 2b_{21}b_{23}z^3 – 3b_{23}^2z^3 + 2b_{21}b_{31}z^3 – 3b_{31}^2z^3 + 2b_{12}b_{32}z^3 – 6b_{31}b_{32}z^3 – 3b_{32}^2z^3 + 2b_{12}z^4 – \\ & 2b_{13}z^4 + 2b_{21}z^4 – 2b_{23}z^4 – 2b_{31}z^4 – 2b_{32}z^4 + 2b_{12}^3z – 6b_{12}^2b_{13}z + 6b_{12}b_{13}^2z – 2b_{13}^3z + 2b_{21}^3z + 6b_{13}^2b_{23}z – 6b_{21}^2b_{23}z + 6b_{13}b_{23}^2z + \\ & 6b_{21}b_{23}^2z – 2b_{23}^3z – 6b_{21}^2b_{31}z + 6b_{21}b_{31}^2z – 2b_{31}^3z – 6b_{12}^2b_{32}z + 6b_{31}^2b_{32}z + 6b_{12}b_{32}^2z + 6b_{31}b_{32}^2z – 2b_{32}^3z + b_{12}^2z^2 + 2b_{12}b_{13}z^2 – \\ & 3b_{13}^2z^2 + b_{21}^2z^2 – 6b_{13}b_{23}z^2 + 2b_{21}b_{23}z^2 – 3b_{23}^2z^2 + 2b_{21}b_{31}z^2 – 3b_{31}^2z^2 + 2b_{12}b_{32}z^2 – 6b_{31}b_{32}z^2 – 3b_{32}^2z^2 – 6b_{12}z^3 + 6b_{13}z^3 – \\ & 6b_{21}z^3 + 6b_{23}z^3 + 6b_{31}z^3 + 6b_{32}z^3 – b_{12}^2z – 2b_{12}b_{13}z + 3b_{13}^2z – b_{21}^2z + 6b_{13}b_{23}z – 2b_{21}b_{23}z + 3b_{23}^2z – 2b_{21}b_{31}z + 3b_{31}^2z – 2b_{12}b_{32}z + \\ & 6b_{31}b_{32}z + 3b_{32}^2z + 6b_{12}z^2 – 6b_{13}z^2 + 6b_{21}z^2 – 6b_{23}z^2 – 6b_{31}z^2 – 6b_{32}z^2 – 2b_{12}z + 2b_{13}z – 2b_{21}z + 2b_{23}z + 2b_{31}z + 2b_{32}z\Big) \end{aligned} \]