in reply to Perl and maths

One problem that occurs to me is that there are many ways of "simplfying" such mathematical expressions, and it would be very difficult to formulate rules to choose an efficient sequence of simplifications. For example one could proceed by simplifying the "innermost" expressions and proceed outward, but that might be very inefficient in some cases. I.e., if we had an expresion of the form:
(a+b)(c+d)+(a+b)(e+f)+(a+b)(gh+ij+kl) then one should clearly factor out (a+b) first instead of computing a+b 3 times. Of course, one could just formulate some simplification scheme, but it might not be at all like what one would do in practice in many cases.
Maybe I didn't understand what you wanted to do completely, though.
chas

Replies are listed 'Best First'.
Re^2: Perl and maths
by ReinhardE (Sexton) on Feb 16, 2005 at 10:10 UTC
    Yes. You're rigth.
    There are many ways of solving such an equation.
    So it would also be great to have an interactive tool to follow up the semplification.
    Furthermore sometimes we just see the most elegant way to perform semplification.
    I do not expect me from a programming language to "Just See" the correct way.
    Getting philosophical now ????

    However putting together a little bit of what I understood:
    -- first we have to parse the formula
    -- then we have to project the formula onto an internal representation ( a tree with single objects representing the numbers, maybe one object holding the fraction ? )
    -- present this graphically shouldn't be so difficult.
    -- Ask the user how to proceed further
    -- present the result of the semplification choosed by the user
    -- ask again the user for the next step
    present .......
    -- and so on

    cheers reinhard