Forward Chaining

Suppose that we have formulas such as the following:
A
B
D
A &and B &rarr C
C &and D &rarr E

From A and B , it is possible to derive C and save it as a new fact; then from C and D , E can be derived.

The forward chaining algorithm is as follows:

When a new fact is presented to the database manager,

  1. Add the new fact to the database.

  2. For each rule that has the new fact as part of its premise, if the rest of the premise is true, add the conclusion to the database.
This cycle is repeated until activity stops or until the desired fact is added to the database.

With careful implementation, forward chaining can run in linear time.

Contents    Page-10    Prev    Next    Page+10    Index