Contents
Page-10
Prev
Next
Page+10
Index
Solving Equations
Simple equations can be solved by search, using rules of algebra
as operators to transform equations into equivalent forms until
an equation for the desired variable is produced.
We will think of the same data structure in several ways:
- Equation: y = m · x + b
- List structure: (= Y (+ (* M X) B))
or ( op lhs rhs ) recursively
- Tree:
- Node of a Tree: an equation is a node in a search tree
whose nodes are equivalent equations.
- Executable code: eval can evaluate an expression
using a set of variable bindings.