I'm faced with a problem that requires me to find a solution to a system of linear equalities of the following form:\begin{aligned}a_1 + b &\ge a_2 \\\cdots \\a_4 + c &\ge a_1\end{aligned}Where $a_i$ is a natural number (excluding zero), and the b,c factors are integers. All inequalities consist of exactly two variables and one free factor. Note, all a() appear as they are, and have no coefficient other than 1.The goal is to find a solution (perhaps more than one, but not necessarily), or declare the system as not having one. Such a solution would be vastly preferable to any linear-programming ones.I do remember some algorithm based on constructing a graph and then launching Floyd-Warshall algorithm could solve a similiar problem, but I'm not sure.EDIT:Problem expansion - how can I find such a solution that the number of distinct integers in the solution is maximised (the default Bellman-Ford behavior minimises it).
Solve a simple system of linear inequalities in natural numbers
ds.algorithms;linear programming