Suppose we have polytopes P, P1, P2 defined by:
P:
(1) x1 + x2 + x3 + x4 + ... + x8 + x9 + x10 = 8,
(2) 0 <= xi <= 3, for i = 1, 2, ..., 10,
(3) M:= x1 + x2 + 2x3 + 3x4 + 3x5 + 4x6 + 4x7 + 5x8
+ 6x9 + 6x10.
(4) 10 <= M <= 46.
P1:
Satisfying (1), (2), (3) and:
(4)' 10 <= M <= 15.
P2:
Satisfying (1), (2), (3) and:
(4)'' 41 <= M <= 46.
Let f(z) be a generating function of P.
Let f1(z) be a generating function of P1.
Let f2(z) be a generating function of P2.
Basically, for each monomial z^a in generating functions f(z), f1(z), and f2(z), we need to multiply the monomial by 8! and also divide it by (a1)! * (a2)! * ... * (a10)! (this is because we want to send each monomial z^a to (8 choose a1,a2,...,a10) * z^a where a1+a2+...+a10 = 8 so that when we send z -> 1, we get the right count).
To achieve this modification, we need to add 10 more variables, and 20 more constraints to each system of inequalities for P, P1, and P2, as follows:
(5) 0 <= yi <= 5, for i = 1, 2, ..., 10
(6) 3 yi <= 24 - 8 xi, for i = 1, 2, ..., 10
Note that for each xi there will be:
6 feasible values of yi, if xi = 0 or 1,
3 feasible values of yi, if xi = 2,
1 feasible value of yi, if xi = 3.
So, if we divide by 6^{10} (once for each xi) then, for each xi, the achieved effect on a given monomial in f, f1, or f2 will be:
we divide the monomial by 3! when xi = 3.
we divide the monomial by 2! when xi = 2.
we divide the monomial by 1! when xi = 1.
we divide the monomial by 0! when xi = 0.
So an outline of the process is the following:
Algorithm:
Step 1:
Compute generating functions for polytopes P', P1', and P2' which are defined by systems:Step 2:
P': (1), (2), (3), (4), (5), and (6).
P1': (1), (2), (3), (4)', (5), and (6).
P2': (1), (2), (3), (4)'', (5), and (6).
Compute the number of lattice points in P', P1', and P2' using the software LattE.Step 3:
(case 1) If we want to compute the number of all valid outcomes of 8 balls with 10 boxes, then multiply the number of lattice points inside P' by 8! and divide by 6^10.
(case 2) If we want to compute the number of valid outcomes whose values are less than 16 or greater than 40, then add the number of lattice points inside of P1' and P2' and then multiply the answer by 8! and divide by 6^10.
The dimension of polytopes P', P1' and P2' is 19, so it is conceivable that LattE could perform these computations. (LattE has solved problems in the past which involved polytopes of dimension 25 or so.)