Thank you very much for your help!
I'm a bit disappointed that there seems to be no easy way to do such kind of
transformation in a save, automatic way. 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.
Gerhard
> On 1/5/07, ZINTEL Gerhard <gerhard.zintel at faurecia.com> wrote:
> > EQ1: Zo*C*L+Zo*A*L-Zo*D*K+Zo*B*K-Zo*C*J-Zo*A*J-Zo*D*I+Zo*B*I+B*L-D*J
> >
> > Now I know the most compact form would be
> >
> > EQ2: Zo * ((C+A)*(L-J) + (B-D)*(K+I)) + B*L - D*J
> >
> > How to make MAXIMA finding EQ2 from EQ1?
>
> In general, scanmap(factor,...) doesn't do anything useful, because it
> recurses over individual terms; neither does
> scanmap(factor,...,bottomup). Factorsum handles some cases like this,
> but not all. I have written combinatorial search functions for
> simpler forms, but they can get very time-consuming.
>
> In this particular case, it seems that the approach to take manually
> is fairly straightforward:
>
> map(factorsum,rat(EQ1,Zo));
>
> or
>
> dd: divide(EQ1,Zo)$
> Zo*factorsum(dd[1])+dd[2]) ;
>
> Of course, this doesn't generalize to arbitrary expressions....
>
> -s
[ZINTEL Gerhard]
Zo*A11*A22*T14*T45*T56 - Zo*A12*A21*T14*T45*T56
+ Zo*A11*T12*T45*T56 - Zo*A12*T11*T45*T56 - Zo*A11*A22*T15*T44*T56
+ Zo*A12*A21*T15*T44*T56 - Zo*A11*A22*T13*T44*T56
+ Zo*A12*A21*T13*T44*T56 + Zo*A21*T12*T44*T56 - Zo*A22*T11*T44*T56
+ Zo*A11*A22*T14*T43*T56 - Zo*A12*A21*T14*T43*T56
+ Zo*A11*T12*T43*T56 - Zo*A12*T11*T43*T56 - Zo*A11*T15*T42*T56
- Zo*A21*T14*T42*T56 - Zo*A11*T13*T42*T56 - Zo*T11*T42*T56
+ Zo*A12*T15*T41*T56 + Zo*A22*T14*T41*T56 + Zo*A12*T13*T41*T56
+ Zo*T12*T41*T56 + A11*A22*T14*T35*T56 - A12*A21*T14*T35*T56
+ A11*T12*T35*T56 - A12*T11*T35*T56 - A11*A22*T15*T34*T56
+ A12*A21*T15*T34*T56 - A11*A22*T13*T34*T56 + A12*A21*T13*T34*T56
+ A21*T12*T34*T56 - A22*T11*T34*T56 + A11*A22*T14*T33*T56
- A12*A21*T14*T33*T56 + A11*T12*T33*T56 - A12*T11*T33*T56
- A11*T15*T32*T56 - A21*T14*T32*T56 - A11*T13*T32*T56 - T11*T32*T56
+ A12*T15*T31*T56 + A22*T14*T31*T56 + A12*T13*T31*T56 + T12*T31*T56
- Zo*A11*A22*T14*T46*T55 + Zo*A12*A21*T14*T46*T55
- Zo*A11*T12*T46*T55 + Zo*A12*T11*T46*T55 + Zo*A11*A22*T16*T44*T55
- Zo*A12*A21*T16*T44*T55 + Zo*A11*T12*T44*T55 - Zo*A12*T11*T44*T55
+ Zo*A11*T16*T42*T55 - Zo*A11*T14*T42*T55 - Zo*A12*T16*T41*T55
+ Zo*A12*T14*T41*T55 - A11*A22*T14*T36*T55 + A12*A21*T14*T36*T55
- A11*T12*T36*T55 + A12*T11*T36*T55 + A11*A22*T16*T34*T55
- A12*A21*T16*T34*T55 + A11*T12*T34*T55 - A12*T11*T34*T55
+ A11*T16*T32*T55 - A11*T14*T32*T55 - A12*T16*T31*T55
+ A12*T14*T31*T55 + Zo*A11*A22*T15*T46*T54 - Zo*A12*A21*T15*T46*T54
+ Zo*A11*A22*T13*T46*T54 - Zo*A12*A21*T13*T46*T54
- Zo*A21*T12*T46*T54 + Zo*A22*T11*T46*T54 - Zo*A11*A22*T16*T45*T54
+ Zo*A12*A21*T16*T45*T54 - Zo*A11*T12*T45*T54 + Zo*A12*T11*T45*T54
- Zo*A11*A22*T16*T43*T54 + Zo*A12*A21*T16*T43*T54
- Zo*A11*T12*T43*T54 + Zo*A12*T11*T43*T54 + Zo*A21*T16*T42*T54
+ Zo*A11*T15*T42*T54 + Zo*A11*T13*T42*T54 + Zo*T11*T42*T54
- Zo*A22*T16*T41*T54 - Zo*A12*T15*T41*T54 - Zo*A12*T13*T41*T54
- Zo*T12*T41*T54 + A11*A22*T15*T36*T54 - A12*A21*T15*T36*T54
+ A11*A22*T13*T36*T54 - A12*A21*T13*T36*T54 - A21*T12*T36*T54
+ A22*T11*T36*T54 - A11*A22*T16*T35*T54 + A12*A21*T16*T35*T54
- A11*T12*T35*T54 + A12*T11*T35*T54 - A11*A22*T16*T33*T54
+ A12*A21*T16*T33*T54 - A11*T12*T33*T54 + A12*T11*T33*T54
+ A21*T16*T32*T54 + A11*T15*T32*T54 + A11*T13*T32*T54 + T11*T32*T54
- A22*T16*T31*T54 - A12*T15*T31*T54 - A12*T13*T31*T54 - T12*T31*T54
- Zo*A11*A22*T14*T46*T53 + Zo*A12*A21*T14*T46*T53
- Zo*A11*T12*T46*T53 + Zo*A12*T11*T46*T53 + Zo*A11*A22*T16*T44*T53
- Zo*A12*A21*T16*T44*T53 + Zo*A11*T12*T44*T53 - Zo*A12*T11*T44*T53
+ Zo*A11*T16*T42*T53 - Zo*A11*T14*T42*T53 - Zo*A12*T16*T41*T53
+ Zo*A12*T14*T41*T53 - A11*A22*T14*T36*T53 + A12*A21*T14*T36*T53
- A11*T12*T36*T53 + A12*T11*T36*T53 + A11*A22*T16*T34*T53
- A12*A21*T16*T34*T53 + A11*T12*T34*T53 - A12*T11*T34*T53
+ A11*T16*T32*T53 - A11*T14*T32*T53 - A12*T16*T31*T53
+ A12*T14*T31*T53 + Zo*A11*T15*T46*T52 + Zo*A21*T14*T46*T52
+ Zo*A11*T13*T46*T52 + Zo*T11*T46*T52 - Zo*A11*T16*T45*T52
+ Zo*A11*T14*T45*T52 - Zo*A21*T16*T44*T52 - Zo*A11*T15*T44*T52
- Zo*A11*T13*T44*T52 - Zo*T11*T44*T52 - Zo*A11*T16*T43*T52
+ Zo*A11*T14*T43*T52 - Zo*T16*T41*T52 + Zo*T14*T41*T52
+ A11*T15*T36*T52 + A21*T14*T36*T52 + A11*T13*T36*T52 + T11*T36*T52
- A11*T16*T35*T52 + A11*T14*T35*T52 - A21*T16*T34*T52
- A11*T15*T34*T52 - A11*T13*T34*T52 - T11*T34*T52 - A11*T16*T33*T52
+ A11*T14*T33*T52 - T16*T31*T52 + T14*T31*T52 - Zo*A12*T15*T46*T51
- Zo*A22*T14*T46*T51 - Zo*A12*T13*T46*T51 - Zo*T12*T46*T51
+ Zo*A12*T16*T45*T51 - Zo*A12*T14*T45*T51 + Zo*A22*T16*T44*T51
+ Zo*A12*T15*T44*T51 + Zo*A12*T13*T44*T51 + Zo*T12*T44*T51
+ Zo*A12*T16*T43*T51 - Zo*A12*T14*T43*T51 + Zo*T16*T42*T51
- Zo*T14*T42*T51 - A12*T15*T36*T51 - A22*T14*T36*T51
- A12*T13*T36*T51 - T12*T36*T51 + A12*T16*T35*T51 - A12*T14*T35*T51
+ A22*T16*T34*T51 + A12*T15*T34*T51 + A12*T13*T34*T51 + T12*T34*T51
+ A12*T16*T33*T51 - A12*T14*T33*T51 + T16*T32*T51 - T14*T32*T51
This electronic transmission (and any attachments thereto) is intended
solely for the use of the addressee(s). It may contain confidential or
legally privileged information. If you are not the intended recipient of
this message, you must delete it immediately and notify the sender.
Any unauthorized use or disclosure of this message is strictly prohibited.
Faurecia does not guarantee the integrity of this transmission and shall
therefore never be liable if the message is altered or falsified nor for any
virus, interception or damage to your system.