MathGroup Archive 2009

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

Search the Archive

Re: Strange Output!!!Please help me thank you.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg98833] Re: Strange Output!!!Please help me thank you.
  • From: olfa <olfa.mraihi at yahoo.fr>
  • Date: Mon, 20 Apr 2009 01:33:44 -0400 (EDT)
  • References: <gs6pfe$h1o$1@smc.vnet.net> <gs9ei8$mq5$1@smc.vnet.net>

On 17 avr, 10:27, "Sjoerd C. de Vries" <sjoerd.c.devr... at gmail.com>
wrote:
> Combine both Reduces:
>
> Reduce[{Element[{i, j}, Integers], i <= iP, j >= jP, j + i == jP =
+ =
> iP,
>    Element[{n, iP}, Integers], Not[(iP < n)],
>   Exists[{iPP}, (iPP < n) && iP == iPP + 1]}, {iP, jP},
>  Backsubstitution -> True]
>
> Cheers -- Sjoerd
>
> On Apr 16, 10:15 am, olfa <olfa.mra... at yahoo.fr> wrote:
>
>
>
> > Hi Mathematica community,
> > I have to solve this system:
> > Reduce[{Element[{i, j}, Integers], i <= iP, j >= jP,
> >   1*j + 1*i == 1*jP + 1*iP,
> >   Reduce[{Element[{N, iP}, Integers], Not[(iP < N)],
> >     Exists[{iPP}, (iPP < N) && iP == iPP + 1]}]}, {iP, jP},
> >  Backsubstitution -> True]
>
> > the output should be:( i | j | N | iP) are Integers && i <= N && iP =
==
> =
> > N &&
> >  jP == i + j - N
> > but mathematica gave me this output:
> > (C[1] | C[2] | C[3] | C[4]) are Integers && C[1] >= 0 &&
> >  C[2] >= 0 && C[3] >= 0 && C[4] >= 0 && i == C[1] - C[2] - =
C[=
> 3] &&
> >  iP == C[1] - C[2] + C[4] && N == C[1] - C[2] + C[4] &&
> >  jP == j - C[3] - C[4]
>
> > which is not understandable at all! and I dont want the output to be
> > like that.
>
> > I have observed that when I remove i from Element[{i, j}, Integers]
> > mathematica give me the output I want and which is :iP == N &&  j=
P =
> ==
> > i + j - N
>
> > So how can I have this same output without removing i from Element[{i,
> > j}, Integers]?
>
> > Thank you very much in advance.- Masquer le texte des messages pr=E9c=
=E9dents -
>
> - Afficher le texte des messages pr=E9c=E9dents -

Hi Sjoerd,
Yes it works but I need to have 2 reduce because my system can be more
complicated than that and consequently one reduce won't be sufficient.
For example when I add some equations to my system and keep only one
reduce as you suggest.
mathematica can't solve it. So I need 2 reduce. Is there another
possibility to avoid having this kind of output:
(C[1] | C[2] | C[3] | C[4]) are Integers && C[1] >= 0 &&
 C[2] >= 0 && C[3] >= 0 && C[4] >= 0 && i == C[1] - C[2] - C[3] &=
&
 iP == C[1] - C[2] + C[4] && N == C[1] - C[2] + C[4] &&
 jP == j - C[3] - C[4] ?




  • Prev by Date: Re: Looking for more Mathematica online user groups/forums
  • Next by Date: Re: Looking for more Mathematica online user groups/forums
  • Previous by thread: Re: Strange Output!!!Please help me thank you.
  • Next by thread: Mathematica 7 problems