MathGroup Archive 2008

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

Search the Archive

Re: How to get an optimal simplification?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg89441] Re: How to get an optimal simplification?
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Mon, 9 Jun 2008 06:20:27 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <g2iir2$rj5$1@smc.vnet.net>

yaqi wrote:

> I expected to get:
>   {t1,t2,t3}
> 
> with the expression:
>   Simplify[{a - b, b - c, c - a}, {t1 == a - b, t2 == b - c, t3 == c -
> a}]
> 
> But I only get {-t2-t3,t2,t3}, which is a little bit annoying.
> 
> I know I can do the simplifications separately like,
>   Simplify[Simplify[Simplify[{a - b, b - c, c - a}, t1 == a - b], t2
> == b - c], t3 == c - a]
> 
> But I still like to get the optimal result with one simplify
> operation.
> 
> Is there an answer? (the answer is useful for one of my big
> derivations.)

I am not sure if the following will apply straightforwardly to your 
bigger expressions, but you could use a list of rules with the 
*ReplaceRepeated[]* operator (short cut //. double-forward slash and 
period, though in your example *ReplaceAll[]* is enough) or compute a 
*GroebnerBasis[]* for the variables t1, t2, t3, and eliminating a, b, 
and c. For instance,

In[1]:= {a - b, b - c, c - a} //. {a - b -> t1, b - c -> t2,
   c - a -> t3}

Out[1]= {t1, t2, t3}

In[2]:= GroebnerBasis[{a - b, b - c, c - a, t1 - a + b, t2 - b + c,
   t3 - c + a}, {t1, t2, t3}, {a, b, c}]

Out[2]= {t3, t2, t1}


Regards,
-- Jean-Marc



  • Prev by Date: Re: Show and 6.0
  • Next by Date: Re: where is "Mathematica in education and research"?
  • Previous by thread: Re: How to get an optimal simplification?
  • Next by thread: Re: How to get an optimal simplification?