3

Given a linear inequality in $n$ variables:

$$\sum\limits_{i=1}^n c_i x_i \leq b$$

I want to estimate how many positive integer tuples $(x_1, x_2, \dots x_n)$ that satisfy that inequality. What is the best way to do this? Obviously, I'm looking for something much more efficient than simply counting up the points in the grid that satisfy it.

All the coefficients, $c_i$ and $b$ are positive.

Rohit Pandey
  • 6,803

1 Answers1

3

The question is:

Given a linear inequality in $n$ variables: $$\sum\limits_{i=1}^n c_i x_i \leq b$$ I want to estimate how many positive integer tuples $(x_1, x_2, \dots x_n)$ that satisfy that inequality.

All the coefficients, $c_i$ and $b$ are positive.

You didn't specify how accurate the estimate should be, but I will assume it's reasonable. I suggest first trying this for small values of $n$.

For example, suppose that $n=1$. The inequality to solve becomes

$$ 0 < c_1x_1 \le b.$$

The solution set region is the interval $(0,b/c_1]$. Thus, an estimate of the integer solutions is the length of the interval which is $(b/c_1).$

Similarly, suppose that $n=2.$ The inequality to solve becomes

$$ 0 < c_1x_1 + c_2x_2 \le b.$$

The solution set region is the right triangle with the right angle at the origin and with side lengths $b/c_1$ and $b/c_2$. An estimate of the number of integer solutions is the area of the triangle which is $(b/c_1)(b/c_2)/2.$

The same thing happens for $n=3$ where the volume of the tetrahedron solution set region is

$$(b/c_1)(b/c_2)(c/c_3)/3!.$$

In general the hypervolume of the solution set simplex is given by

$$\frac1{n!}\prod_{i=1}^n \frac{b}{c_i} $$

which should be a good estimate of the number of integer solutions.

Somos
  • 35,251
  • 3
  • 30
  • 76