Here's an example problem:

Find the number of integer solutions to the equation:

x1 + x2 + x3 + x4 = 20

with the restrictions:

x1 >=1; x2 >=3; x3 >= -3; x4 >= 0

To do this we create new variables as follows:

y1 = x1 - 1 >=0; y2 = x2 - 3 >=0; y3 = x3 + 3 >=0; y4 = x4 - 0 >=0

y1 + y2 + y3 + y4 = (x1-1) + (x2-3) + (x3+3) + (x4-0) = x1 + x2 + x3 + x4 -1 = 20 -1 = 19.

Thus, 19+4-1 C 4-1 = 22C3 integer solutions.

How do I go about it if my restrictions are as follows: (less than instead of greater)

x1 <= 8; x2 <=10; x3 <= 12; x4 <=5

Thansk