# Fourier-Motzkin Elimination

Is there any method available in mathematica to eliminate variable from set of inequalities? I tried Eliminate function available, but I guess it works on equalities only.

-
Please add an example that you used with Eliminate that didn't work. Thanks! – tkott Dec 11 '12 at 17:09

I'll borrow an example from another response. Recast as an existance problem in the variable you want to eliminate, then use Resolve.

sol =
Resolve[Exists[y,
And @@ {x >= 4 y, x <= 3 + 4 y, x >= 0, x <= 63, y >= 0, y <= 15}]]

(* x \[Element]
Reals && ((-3 + x <= 0 && -x <= 0) || (-60 + x <= 0 && -x <=
0) || (-63 + x <= 0 && 3 - x <= 0) || (-63 + x <= 0 &&
60 - x <= 0)) *)

-

You might want to have a look at Reduce :

sol = Reduce[{x >= 4 y, x <= 3 + 4 y, x >= 0, x <= 63, y >= 0, y <= 15}, {y}, Integers] ;


You can then build a function with :

ysol[x_] =  Piecewise[Transpose[{sol[[All, 2, 2]] /. Or -> List,
sol[[All, 1]] /. Or -> List}]];

DiscretePlot[ysol[x], {x, 0, 63}]


-
I feed this {x >= 4 y, x <= 3 + 4 y, x >= 0, x <= 63, y >= 0, y <= 15} and it says Eliminate::eqf: "y<=15 is not a well-formed equation" what does it mean? – username_4567 Dec 11 '12 at 18:42
What output are you trying to get ? – b.gatessucks Dec 11 '12 at 18:57
I want to eliminate variable y from above inequalities.. – username_4567 Dec 11 '12 at 19:19
Isn't there a single simple method to remove a variable for system of inequalities ???/ – username_4567 Dec 12 '12 at 11:23
If the solution provided by Daniel Lichtblau is not what you want please say why. – b.gatessucks Dec 12 '12 at 11:34