I am trying to find an algorithm to determine existence of strictly positive integral solutions for a set of linear inequalities with two variables and the following form:
The problem also involves a final inequality of the following form:
Some linear programming techniques should work here, and I am not well versed in them. I have been looking for a more adhoc solution, perhaps exploiting the nature and constraints (types of inequality) given in the problem. Any insight or algorithm would be welcome, but something deterministic and linear in terms of 𝑛, where 𝑛 is the number of inequalities, would be particularly interesting.
Additional constraint: 𝑎𝑖, 𝑏𝑖, 𝑙𝑖 > 0
The first 𝑛−1 inequalities describe lines with a negative slope. In other words, they are of the form 𝑦=𝑚𝑥+𝑐 where 𝑚 is a negative rational number (this follows from 𝑎𝑖, 𝑏𝑖, 𝑙𝑖 > 0), and they exclude the area "above" them.
The last inequality describes a line at 45° with negative slope (-1), and it excludes the area "below" it.
We could picture an example problem like this:
The white area contains the solution points. The dark area is excluded by the 𝑛−1 first constraints, the violet area is excluded by the last constraint, and the purple areas exclude solutions with a negative 𝑥 or 𝑦.
As the slopes of the orange lines are guaranteed to be negative, we can conclude that if there is no point on the last line (the dark red one with slope -1) that belongs to the solution, there is no other point either. There is no way another point could be in the solution while the points on the last (dark red) line would all be excluded.
So, we "only" need to check the integer points on the last line. In other words, we can replace the final constraint with:
𝑥 + 𝑦 = 𝑙𝑛
We can iterate all other constraints and see how the corresponding line's slope compares to the slope of the last line:
At the end of this process we have a maximum lower bound and minimum upper bound for 𝑥. If these (rational) bounds still allow for a positive integer 𝑥 solution and for which the corresponding 𝑦 would also be positive, then report a success. Otherwise there is no solution.
This algorithm has a O(𝑛) time complexity.