Symbolic Computation Using Tree-Structured Mathematical Expressions
A method for performing symbolic computations on a mathematical expression. The mathematical expression may be converted to a tree structure having one or more parent nodes and one or more child nodes. Each parent node may be a mathematical operation. Each child node may be a mathematical expression on which the mathematical operation is performed in a specified order. Each child node may be in a hierarchical relationship to one of the parent nodes. The parent nodes, the child nodes or both may be manipulated to perform a first symbolic computation on the mathematical expression.
1 . A method for performing symbolic computations on a mathematical expression, comprising:
converting the mathematical expression to a tree structure having one or more parent nodes and one or more child nodes, each parent node being a mathematical operation and each child node being a second mathematical expression on which the mathematical operation is performed in a specified order, each child node being in a hierarchical relationship to one of the parent nodes; and
manipulating the parent nodes, the child nodes or both to perform a first symbolic computation on the mathematical expression.
2 . The method of claim 1 , wherein each child node has an index number that indicates the specified order.
3 . The method of claim 1 , wherein manipulating the parent nodes, the child nodes or both comprises swapping the specified order in which the mathematical operation is performed on two of the child nodes.
4 . The method of claim 1 , wherein manipulating the parent nodes, the child nodes or both comprises:
adding a new child node to the one of the parent nodes; and
modifying the specified order such that the mathematical operation is performed on the new child node before a child node of the one of the parent nodes.
5 . The method of claim 1 , wherein manipulating the parent nodes, the child nodes or both comprises replacing the one of the parent nodes with the child nodes being in the hierarchical relationship with the one of the parent nodes.
6 . The method of claim 1 , wherein manipulating the parent nodes, the child nodes or both comprises replacing one of the child nodes with a replacement mathematical expression.
7 . The method of claim 1 , wherein manipulating the parent nodes, the child nodes or both comprises:
swapping the one of the parent nodes with a parent node of the one of the parent nodes;
selecting a child node of the one of the parent nodes based on a right or left direction from the one of the parent nodes to the parent node of the one of the parent nodes; and
moving the selected child node of the one of the parent nodes to become a child node of the parent node of the one of the parent nodes.
8 . The method of claim 1 , wherein manipulating the parent nodes, the child nodes or both comprises removing one of the child nodes from the tree structure.
9 . The method of claim 1 , wherein manipulating the parent nodes, the child nodes or both comprises:
adding a new child node to the one of the parent nodes; and
modifying the specified order such that the mathematical operation is performed on the new child node last.
10 . The method of claim 1 , wherein the first symbolic computation is one of:
a polynomial expansion operation;
a rational together operation;
an apart operation; and
a partial fraction operation.
11 . The method of claim 1 , further comprising performing a second symbolic computation using the first symbolic computation.
12 . The method of claim 11 , wherein the second symbolic computation is one of:
a resultant computation operation;
a factorization operation; and
a greatest common divisor operation.
13 . The method of claim 1 , wherein one of the child nodes comprises a parent node having one or more of the child nodes.
14 . A computer-readable medium comprising instructions executable by a processor to cause a computer to:
convert a mathematical expression to a tree structure having one or more parent nodes and one or more child nodes, each parent node being a mathematical operation and each child node being a second mathematical expression on which the mathematical operation is performed in a specified order, each child node being in a hierarchical relationship to one of the parent nodes; and
manipulate the parent nodes, the child nodes or both to perform a first symbolic computation on the mathematical expression; and
perform a second symbolic computation using the first symbolic computation.
15 . The computer-readable medium of claim 14 , wherein each child node has an index number that indicates the specified order.
16 . A system, comprising:
a processor; and
a memory comprising computer-executable instructions executable by the processor to:
convert a mathematical expression to a tree structure having one or more parent nodes and one or more child nodes, each parent node being a mathematical operation, each child node being a second mathematical expression on which the mathematical operation is performed in a specified order, each child node being in a hierarchical relationship to one of the parent nodes, and one of the child nodes comprises a parent node having one or more of the child nodes; and
perform a first symbolic computation on the mathematical expression by:
swapping the one of the parent nodes with a parent node of the one of the parent nodes;
selecting a child node of the one of the parent nodes based on a right or left direction from the one of the parent nodes to the parent node of the one of the parent nodes;
moving the selected child node of the one of the parent nodes to become a child node of the parent node of the one of the parent nodes; and
replacing one of the child nodes with a replacement mathematical expression.
17 . The system of claim 16 , wherein the first symbolic computation is a polynomial expansion operation.
18 . The system of claim 16 , wherein the first symbolic computation is an apart operation.
19 . The system of claim 16 , further comprising performing a second symbolic computation using the first symbolic computation.
20 . The system of claim 19 , wherein the second symbolic computation is one of:
a resultant computation operation;
a factorization operation; and
a greatest common divisor operation.