# Solving a system of 3 linear inequalities with 3 unknowns

find lowest possible x, y and z whole number variables where:

x  =< 2y+2z
6y =< x+z
3z =< x+y


I am trying to solve this system of 3 linear equations with 3 unknowns and get the ratio that x, y and z have to be in for the inequalities to work. So far I have been able to get a working ratio

Q1 : but I am trying to get a ratio that satisfies the equations below.

x  = 2y+2z
6y = x+z
3z = x+y


Q1, a : And if no such ratio exists how can I mathematically determine that?

The formular I used to get a working ratio for the inequality is by solving the equation. I made the equations all equal to each other as follows:

0.5x + x  =  x + y + z
6y + y  =  x + y + z
3z + z  =  x + y + z


This way I was able to get the equation below.

1.5x = 7y = 4z


The equation above satisfies the first inequality but not the corresponding equation.

PS: I am not very conversant with the tags if I have left any out please add. Thank you.

## migrated from mathoverflow.netApr 11 at 13:32

This question came from our site for professional mathematicians.

• Remark: the Stack Exchange system claims that I migrated this question from Mathoverflow (mathoverflow.net/posts/327772/revisions), but it is false. – Federico Poloni Apr 11 at 13:33
• The only solution of the system of equations is $(0,0,0)$. As the coefficients are small, you can try solutions by brute force. [$(5,1,2)$] – Yves Daoust Apr 11 at 13:53
• @YvesDaoust Is there no formular to get the suggested solution 5,1,2 I am trying to code an algorithm that solves such equations – YulePale Apr 11 at 14:44
• @YulePale: no, use brute force. – Yves Daoust Apr 11 at 14:46
• @YvesDaoust: kindly help , how do I start brute forcing? – YulePale Apr 11 at 14:54

This can be formulated as a Mixed Integer Linear Programming problem (MILP). To do so, you need to decide on an objective function to be minimized.

The statement "find lowest possible x, y and z whole number variables" is a little value. So we could separately solve 3 separate problems,, one for each objective function x, y, and z.

For instance, using YALMIP, this can be formulated as

intvar x y z;  % declares that x, y, and z are integer variables
optimize([x <= 2*y+2*z,6*y <= x+z,3*z <= x+y],x) % minimizes x subject to the constraints
value([x y z]) % displays optimal values of x, y, z
optimize([x <= 2*y+2*z,6*y <= x+z,3*z <= x+y],y) % same as above but objective function is y
value([x y z]) % displays optimal values of x, y, z
optimize([x <= 2*y+2*z,6*y <= x+z,3*z <= x+y],z) % same as above but objective function is z
value([x y z]) % displays optimal values of x, y, z


For each of the 3 problems, the optimal values of x, y and z are zero. So we have found the lowest possible x, y and z whole number variables under any reasonable interpretation.