MathGroup Archive 2006

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

Search the Archive

Re: unable to FullSimplify

  • To: mathgroup at
  • Subject: [mg65846] Re: unable to FullSimplify
  • From: "Vladimir" <vladimir347 at>
  • Date: Tue, 18 Apr 2006 06:56:41 -0400 (EDT)
  • References: <><e1vebv$995$>
  • Sender: owner-wri-mathgroup at

Andrzej Kozlowski wrote:
> This seems to me to be an unfortunate consequence of the fact that
> the outcome of FullSimplify (and Simplify)  depends on the ordering
> of the variables. This is because a variable order independent
> Simplify has very much higher complexity and will get stuck on a
> complicated expressions. Some time ago Adam Strzebonski of WRI sent
> the following implementation of order independent FullSimplify:
> VOISimplify[vars_, expr_, assum_:True] :=
>      Module[{perm, ee, best},
>         perm = Permutations[vars];
>         ee = (FullSimplify @@ ({expr, assum} /. Thread[vars -> #]))
> & /@ perm;
>         best = Sort[Transpose[{LeafCount /@ ee, ee, perm}]][[1]];
>         best[[2]] /. Thread[best[[3]] -> vars]]

Looks rather interesting! Hmm, it's even possible to enhance it further
to extract variables from a given expression automatically...

Unfortunately, ordering of the variables isn't the only problem:

FullSimplify[Expand[x + (x + x^2)^4]]

x + x^4 + 4*x^5 + 6*x^6 + 4*x^7 + x^8

whose LeafCount is a whopping 23 instead of expected 9.

And don't even try higher powers like:
FullSimplify[Expand[x + (x + x^2)^16]]

My confidence in FullSimplify and Mathematica is slowly fading,
which is rather sad, because my current research heavily depends on
understanding returned symbolic solutions which can be too hard
when any simplification opportunities are missed.


  • Prev by Date: Re: setps problem/how to set matrix elements
  • Next by Date: Re: Mathlink and C/C++
  • Previous by thread: Re: unable to FullSimplify
  • Next by thread: Re: Re: unable to FullSimplify