Re: How to solve system of inequalities?

*To*: mathgroup at christensen.cybernetics.net*Subject*: [mg1099] Re: How to solve system of inequalities?*From*: bientin at cli.di.unipi.it (Paolo Bientinesi)*Date*: Sun, 14 May 1995 22:31:35 -0400*Organization*: Dipartimento di Informatica, Universita' di Pisa

jeff at econ.berkeley.edu wrote: : Hi. I have a system of linear inequlities specified symbolically. : I want to test whether they are consistent. (i.e. whether the : solution region is non-empty). I don't see how to do this and : it is not covered in Wolfram's book. : For example, I can surely type : In[1] 1<0 : and get back the expected : Out[1] False : But if I enter : In[2] y<x && x<y : I get back the unhelpful : Out[2] y < x && x < y : Apparently Mathematica cannot deduce that this is impossible. : Is there any way to get Mathematica to tell me when a series of : inequalities is logically consistent? The workaround I tried : was to use ConstrainedMin which returns an error when the : Constraint inequalities have empty solution region. The problem : is that I need to enforce the inequalities to be strict and : Constrained seems to be willing to assume weak inequalites when : necessary. For example : In[3] ConstrainedMin[x,{x<y,y<x},{x,y}] : returns : Out[3] {0, {x->0, y->0}} : which is not what I wanted. : There has got to be a simple way to do this, right? : Jeff : ps I am sending this from my brand new Linux box and may not have : the reply-to set correctly so if replying by mail, reply to : jeff at econ.berkeley.edu The matter of your question is TYPE. When you write 1 < 0, MMA works well because understands you're are speaking about integers, in the same way if you write 1. < 0. MMA knows you're speaking about reals. The expression x < y && y < x is meaningless if you don't define the type of variables. If x,y would be boolean, any ordinal expression is without sense. Again, exist sets and operat r for which one element could be "less" and "more" than another at the same time. This is WHY Mathematica doesn't work, but I can't tell you HOWhto solveosooolve the problem. I wait with you for a solution. Paul Dj.