isolve with inequalities

alec's picture

I understand that isolve doesn't work with inequalities, at least it is not mentioned on the isolve help page. Still, the following seems strange,

isolve({40*a+60*b<=150, a>=0, b>=0});

                             {b = _NN1~}

It is related to that post.

Alec

PS By the way, some of such problems that Maple can't solve, are not even high school problems - they are an elementary school (and maybe even kindergarten) problems. -Alec

isolve/inequalities

This output seems to be generated in `isolve/inequalities`, as traced by:

infolevel[all]:trace(isolve):
trace(`isolve/inequalities`):
trace(`isolve/isolve`):
isolve({40*a+60*b<=150, a>=0, b>=0});

Yes, it is strange...

about(_NN1);Originally _NN1, renamed _NN1~:
  is assumed to be: AndProp(integer,RealRange(0,infinity))

I have some doubts that kindergarten children are able to solve it.

alec's picture

kindergarten

I didn't mean exactly this one for kindergarten - just a similar one with smaller numbers. Say, there are not more than 3 apples. Tom and Jerry got one or more apples each. How many apples they could have? The answer is - either each got 1 apple, or one of them got 1 apple and another one - 2. Now, try that with isolve,

isolve({a+b<=3,a>0,b>0});
                           {b = 1 + _NN2~}

Jerry seems to be able to get as many apples as he want, and nothing is known about Tom. Same if only 2 apples were there, or less,

isolve({a+b<=2,a>0,b>0});
                           {b = 1 + _NN3~}

And even with 1 apple or less,

isolve({a+b<=1,a>0,b>0});
                           {b = 1 + _NN4~}

Some problems work OK though,

isolve({a>=1, a<=3});

                      {a = 1}, {a = 2}, {a = 3}

Alec

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
}