Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2003
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Solving a system of Inequalities

  • To: mathgroup at smc.vnet.net
  • Subject: [mg39883] Re: [mg39764] Solving a system of Inequalities
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Sun, 9 Mar 2003 05:31:01 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Even your "toy" system is in fact too complicated for  Mathematica to 
solve in reasonable time, or at least in any time that I can spare. So 
I think that when you originally wrote that InequalitySolve gave you an 
answer that was "more complicated than the original problem" you 
probably made a mistake in the input. I very much doubt that 
InequalitySolve can produce any answer to the original question in any 
reasonable time.

Moreover, I am not sure what you mean by:

"Solving the set of inequatlities by hand allows us to express all 
variables with dependence on g".

Do you mean to say that once we are given the value of g we can 
determine the bounds for each of the other variables, in a way that is 
equivalent to the original equations? This seems to be false. To see 
that, let's first of all simplify your inequalities so that Mathematica 
can handle them reasonably quickly, say by substituting some arbitrary 
values for a, b  and c. For example,

{a, b, c} = {1, 2, 3};

Now, your inequalities take the form:


ineqs = And @@ {a + b + c + 4*g > 2*d + 2*e + 2*f, 2*e > b, 2*e > c, a 
+ 2*e > b + c,
     a + 4*g > 2*d + 2*f, 2*f > a, b + 2*f > a + c, 2*f > c, b + 4*g > 
2*d + 2*e, c + 2*d > a + b,
     2*d > a, 2*d > b, c + 4*g > 2*e + e*f}


6 + 4*g > 2*d + 2*e + 2*f && 2*e > 2 && 2*e > 3 && 1 + 2*e > 5 && 1 + 
4*g > 2*d + 2*f &&
   2*f > 1 && 2 + 2*f > 4 && 2*f > 3 && 2 + 4*g > 2*d + 2*e && 3 + 2*d > 
3 && 2*d > 1 &&
   2*d > 2 && 3 + 4*g > 2*e + e*f

Here are the variables, (the order is chosen deliberately):


vars=Reverse[Union[Cases[ineqs,_Symbol,Infinity]]]


{g,f,e,d}

Let's load in the Experimental context, which contains the fastest 
functions for this sort of problem:

   << Experimental`

The fastest function for this sort of thing is 
GenericCylindricalAlgebraicDecomposition


GenericCylindricalAlgebraicDecomposition[ineqs, vars][[1]]


1 < g < 7/4 && (3/2 < f < -(5/4) + (1/4)*Sqrt[57 + 64*g] &&
      (2 < e < (1/2)*(1 + 2*f) && 1 < d < (1/2)*(1 - 2*f + 4*g) ||
       (1/2)*(1 + 2*f) < e < (3 + 4*g)/(2 + f) && 1 < d < 1 - e + 2*g) ||
     -(5/4) + (1/4)*Sqrt[57 + 64*g] < f < (1/2)*(-1 + 4*g) && 2 < e < (3 
+ 4*g)/(2 + f) &&
      1 < d < (1/2)*(1 - 2*f + 4*g)) ||
   g > 7/4 && (3/2 < f < 2 && (2 < e < (1/2)*(1 + 2*f) && 1 < d < 
(1/2)*(1 - 2*f + 4*g) ||
       (1/2)*(1 + 2*f) < e < (3 + 4*g)/(2 + f) && 1 < d < 1 - e + 2*g) ||
     2 < f < (1/5)*(-4 + 8*g) && (2 < e < 5/2 && 1 < d < (1/2)*(1 - 2*f 
+ 4*g) ||
       5/2 < e < (3 + 4*g)/(2 + f) && 1 < d < 3 - e - f + 2*g) ||
     (1/5)*(-4 + 8*g) < f < (1/2)*(-1 + 4*g) && 2 < e < (3 + 4*g)/(2 + 
f) &&
      1 < d < (1/2)*(1 - 2*f + 4*g))

Looking at it carefully you see that you can't express the bounds for 
the other parameters in terms of g alone. Perhaps I have misunderstood 
you, but it seems to me that the problem you are trying to solve is 
much more complex than you seem to realize.

Andrzej Kozlowski
Yokohama, Japan
http://www.mimuw.edu.pl/~akoz/
http://platon.c.u-tokyo.ac.jp/andrzej/


On Sunday, March 9, 2003, at 12:31  am, Christina Chan wrote:

> The problem I am working on involves 28 variables in 192 inequalities. 
> I tried a simpler problem (one that involves 6 variables and 16 
> inequalities) using InequalitySolve and it gave me a solution that was 
> very difficult to comprehend. The sample problem is solving 
> {a,b,c,d,e,f,g}, from
>
> c>0,
>
> b>0,
>
> a>0,
>
> a+b+c+4g>2d+2e+2f,
>
> 2e>b,
>
> 2e>c
>
> a+2e>b+c,
>
> a+4g>2d+2f,
>
> 2f>a,
>
> b+2f>a+c,
>
> 2f>c,
>
> b+4g>2d+2e,
>
> c+2d>a+b,
>
> 2d>a,
>
> 2d>b,
>
> c+4g>2e+ef
>
> Solving the set of inequatlities by hand allows us to express all 
> variables with dependence on g. Is there a way Mathematica can do > that?
>
> Christina
>
>
>
> >From: Andrzej Kozlowski
To: mathgroup at smc.vnet.net
>
> >To: "Christina Chan"
>
> >CC: mathgroup at smc.vnet.net
>
> >Subject: [mg39883] Re: [mg39764] Solving a system of Inequalities
>
> >Date: Thu, 6 Mar 2003 19:10:09 +0900
>
> >
>
> >Mathematica has in fact a very rich collection of functions for
>
> >solving algebraic inequalities, but your message makes me doubt that
>
> >that the kind of solution you seem to expect to get for your system
>
> >is actually possible. You say that "InequalitySolve gives me a
>
> >solution that is more complicated than the problem itself". Actually
>
> >InequalitySolve represents the solution of a system in cylindrical
>
> >form, which is usually the most convenient for further processing.
>
> >In general there is nothing simpler available, although in special
>
> >cases humans rather than computer can find simpler representations.
>
> >To decide if your case is one of these one would have either to see
>
> >the full problem or at least a toy problem with the same sort of
>
> >structure.
>
> >
>
> >Andrzej Kozlowski
>
> >Yokohama, Japan
>
> >http://www.mimuw.edu.pl/~akoz/
>
> >http://platon.c.u-tokyo.ac.jp/andrzej/
>
> >
>
> >
>
> >On Thursday, March 6, 2003, at 04:36 pm, Christina Chan wrote:
>
> >
>
> >>Hi,
>
> >>I have 192 linear inequalities containing 28 variables and I want
>
> >>to find the constraints for each of the variables. I am thinking
>
> >>about solving the system by eiliminating the variables one by one
>
> >>(similar to the Gaussian Elimination). Is there a way I can do it
>
> >>with Mathematica? The function InequalitySolve gives me a solution
>
> >>that is more complicated than the problem itself.Is there any other
>
> >>functions that might help? Thank you!!
>
> >>
>
> >>Christina
>
> >>
>
> >>
>
> >>
>
> >
>
> >
>

>
<image.tiff>
>
> Tired of spam? Get advanced junk mail protection with MSN 8.



  • Prev by Date: Re: Fwd: RE: Antiderivatives and Definite Integrals
  • Next by Date: Re: Conclusion: Mathematica will output plain text
  • Previous by thread: Re: Solving a system of Inequalities
  • Next by thread: Desciphering Solve[] output.