Yes

October 30, 2008 11:26AM
I know what you are saying. I can recursively search my tree for operators whose children (operands) are all constant (non-variables) and perform the operation on them. For example,

x+2+3 would be parsed into + x + 2 3 (read it backwards and it's RPN)

My program would identify the second + node and see that it has two children, 2 and 3, and perform the operation. The resulting tree would simply be + x 5.

However, 2+x+3 would be parsed into + 2 + x 3

Here there is no easy solution. There are no nodes with all constant children. It would seem that I have to somehow detect that the two + nodes are commutative, and try mixing the children around until I get a node with two constants.

Quite a brainteaser, but I know that computer algebra systems have been around for forty years. Actually, I got the incentive to start this project because my TI-89 graphing calculator is basically a computer algebra system that supports factoring, differentiation, integration, limits, sums, and products, matrices, etc.
Subject Author Posted

Has anyone ever delved into computer algebra?

Tiberius Odgen October 30, 2008 07:47AM

Parse your set of vars

torak October 30, 2008 09:47AM

pretty much..

Jib October 30, 2008 10:41AM

Yes

Tiberius Odgen October 30, 2008 11:26AM

Three stacks

Rade October 30, 2008 12:51PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 24
Record Number of Users: 2 April 29, 2024
Record Number of Guests: 258 May 03, 2024