Solving an Equation by Search
We can perform algebraic operations by manipulating the list structure representation of an expression tree (taking apart the original tree and constructing a new tree). To solve an equation e for a desired variable v:
Often, there are two possible ways to rewrite an equation; it is necessary to try both. Thus, the process will be a binary tree search.
We are rewriting an equation in every possible legal way; most of these will not be what we want, but one may work. If we find one that works, we return it.