On 1/5/07, ZINTEL Gerhard <gerhard.zintel at faurecia.com> wrote:
> I'm a bit disappointed that there seems to be no easy way to do such kind of
> transformation in a save, automatic way
Yes, it would be nice. Part of the issue is that there is no unique
"best" representation of an expression.
> I have put a real example of what I
> have to simplify (to make more compact) below. None of your tips give me a
> good result with those monsters. On the other side, I know that there is a
> much more compact form for them (doing it by hand).
>
> Concerning your "combinatorial search functions", can I make use of them for
> this special case and where can I find them. The time consumption is not the
> problem.
The combinatorial technique I used is very naive: look at partitions
of the expression and use some standard tools (e.g. factor) on them.
The problem is of course that the number of partitions is exponential
in the number of terms, so time consumption *is* a problem, no matter
how large your machine, if you have 96 terms.... And if there are any
shared terms in the decomposition (e.g. (a-b)*(c-d)+b*d) ), this
approach fails.
If you were able to analyze your expression manually, then you must
have followed some strategy which allowed you to master this
combinatorial blowup, which may be based on a priori knowledge of the
form of the result. You should be able to program this strategy in
Maxima. For example, if every term is of the form (v1+v2)*(v3-v4),
then you could try divide'ing the expression by all possible (vm+vn)
etc.
-s