Contents    Page-10    Prev    Next    Page+10    Index   

Recursive Tree Search

In effect, the search process will rewrite the original equation in every possible legal way. Most of these will not be what we want, and will fail, but one of them will be solved for the desired variable.


>(solve '(= y (+ x b)) 'x)

  1> (SOLVE (= Y (+ X B)) X)
    2> (SOLVE (= (- Y X) B) X)
    <2 (SOLVE NIL)
    2> (SOLVE (= (- Y B) X) X)
    <2 (SOLVE (= X (- Y B)))
  <1 (SOLVE (= X (- Y B)))

(= X (- Y B))

>(solve '(= y (+ (* m x) b)) 'x)

(= X (/ (- Y B) M))