Task 3
Question
Consider the KB
(A => C) AND (B <=> C) AND (D => A) AND E AND [(B AND E) => G] AND (B => F) AND D
Show that this entails G (if possible) by
i. Forward Chaining
ii. Backward Chaining
iii. Resolution
Answer
To show that the given knowledge base entails
Knowledge Base (KB)
The knowledge base can be represented as:
i. Forward Chaining
In forward chaining, we start with the known facts and apply inference rules to derive new facts until we either reach the goal or exhaust all possibilities.
- Start with the known facts:
and . - From
and , infer . - From
and , infer . - From
and , infer . - Now we have
and , so from , we can infer .
Thus, using forward chaining, we have shown that
ii. Backward Chaining
In backward chaining, we start with the goal and work backwards to see if it can be deduced from the known facts.
- Goal:
. - To infer
, we need . is a known fact. - To infer
, we look at . We need either or . can be inferred from (using ). can be inferred from (using ). is a known fact.
Since we can trace back from
iii. Resolution
In resolution, we convert all statements into clauses and use the resolution rule to derive contradictions or the goal.
Convert KB into clauses:
becomes . becomes . becomes . . becomes . becomes . .
Using resolution:
- Resolve
and to get . - Resolve
and to get . - Resolve
and to get . - With
and (known fact), we get from .
- Resolve
Thus, by resolution, we can derive
In summary, all three methods — forward chaining, backward chaining, and resolution — demonstrate that