Hello! The task is to simplify the mathematical expression whenever possible. To simplify is to result in a shorter look. The expression is stored in reverse polish notation, or as a tree. For example, the expression x*2-(x+x) is stored as a tree -

  (-) / \ (*) (+) / \ / \ (x) (2)(x)(x) 

or in the SCR - x2*xx+- Tell me, what algorithms are there for this.

    1 answer 1

    You can try to use ready-made solution wolframalpha API , if this is suitable for your task.

    • one
      They are interested in algorithms, since it is interesting to do everything with your own hands. But look, thanks. - Rennorb