---
title: "Rule based reasoning; backward chaining"
subject: "Artificial Intelligence"
chapter: 4
key: "semester_6/artificial_intelligence:rule-based-reasoning-backward-chaining"
source: https://www.bctengineer.com/q/semester_6/artificial_intelligence/rule-based-reasoning-backward-chaining
site: BCT Engineering
---

# Rule based reasoning; backward chaining

Artificial Intelligence · Chapter 4: Knowledge Representation, Inference & Reasoning

- Asked in: 2072 Magh, 7 marks
- Video: [Artificial Intelligence part 6: Backward chaining (Inference mechanism of Expert System)](https://www.youtube.com/watch?v=b3djECBNZRg) — Shree Ram Khaitu
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_6/artificial_intelligence/rule-based-reasoning-backward-chaining
- Whole chapter: https://www.bctengineer.com/md/semester_6/artificial_intelligence/chapter-4

## Question

What is rule based reasoning? Explain Backward Chaining with suitable example.

## Short answer

Rule-based reasoning uses IF-THEN rules, facts, and an inference engine. Backward chaining is goal-driven: it starts with a goal, finds rules concluding it, proves their sub-goals recursively, backtracking on failure. Example: proving a car doesn't start by showing the battery is dead because headlights are dim.

## Answer

#### Rule-based reasoning
**Rule-based reasoning** is a way of solving problems with a set of **IF-THEN rules** (production rules) kept in a rule base, together with a fact base (working memory) and an inference engine. The inference engine matches the rules against the facts and fires them to derive new facts or conclusions, using forward or backward chaining. It is the basis of expert systems such as MYCIN. Advantages: knowledge is modular and easy to add or change, and conclusions can be explained by listing the rules used.

#### Backward chaining
Backward chaining is a **goal-driven** inference method. It starts with a goal and looks for rules whose THEN part concludes that goal. The IF conditions of such a rule become new sub-goals, which are proved recursively from known facts (or by asking the user). If every sub-goal succeeds, the goal is proved; if a rule fails, the next rule is tried (backtracking).

#### Example: diagnosing why a car does not start
Rules:
- R1: IF battery is dead THEN car does not start
- R2: IF fuel tank is empty THEN car does not start
- R3: IF headlights are dim THEN battery is dead
- R4: IF fuel gauge reads zero THEN fuel tank is empty

Facts: headlights are dim. Fuel gauge reads half.

**Goal:** Car does not start - why?

| Step | Goal | Action / result |
|---|---|---|
| 1 | car does not start? | Try R1: sub-goal "battery is dead" |
| 2 | battery is dead? | Rule R3: sub-goal "headlights are dim" |
| 3 | headlights are dim? | Known fact: TRUE |
| 4 | R3 fires, so battery is dead is TRUE | R1 fires: goal proved |

```text
car does not start
   |-- R1: battery is dead
   |        |-- R3: headlights dim [fact] TRUE
   |-- R2: fuel tank is empty          (not needed)
            |-- R4: gauge reads zero [FALSE]
```
**Conclusion:** The car does not start because the battery is dead. Since R1 already proves the goal, R2 is not needed; it would fail anyway because the fuel gauge does not read zero. So only the relevant rules are used.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Which set lists the components of a rule-based system?
   A. Frames, slots and facets
   B. Rule base, fact base (working memory) and inference engine
   C. Nodes, arcs and inheritance links
   D. Population, fitness and mutation
   Answer: B. The inference engine matches rules in the rule base against the fact base. (Key point: Rule-based system parts)

2. In backward chaining, what happens if a rule's sub-goal cannot be proved?
   A. The whole goal is declared true
   B. All facts are deleted and the search restarts
   C. That rule fails and the next rule for the goal is tried
   D. The sub-goal is added as a fact
   Answer: C. Failure of a rule leads to backtracking to another rule. (Key point: Backtracking)

3. Facts: headlights dim, fuel gauge half. Why is the car not starting according to backward chaining?
   A. Battery is dead (R3 then R1); R2 fails as the gauge is not zero
   B. Fuel tank is empty (R4 then R2)
   C. Both R1 and R2 succeed
   D. Neither rule succeeds
   Answer: A. Headlights dim proves battery dead via R3; the fuel path fails since the gauge reads half. (Key point: Car example)

## Related in Artificial Intelligence

- [Knowledge, reasoning; forward chaining](https://www.bctengineer.com/question.md?key=semester_6%2Fartificial_intelligence%3Aforward-chaining-kr-reasoning) — Artificial Intelligence, chapter 4
- [Forward vs backward chaining](https://www.bctengineer.com/question.md?key=semester_6%2Fartificial_intelligence%3Aforward-vs-backward-chaining) — Artificial Intelligence, chapter 4, asked 3×
- [Backward chaining with example](https://www.bctengineer.com/question.md?key=semester_6%2Fartificial_intelligence%3Abackward-chaining-example) — Artificial Intelligence, chapter 4

## Related in other subjects

- [Rule based classifier; coverage and accuracy](https://www.bctengineer.com/question.md?key=semester_7%2Fdata_mining%3Arule-based-classifier-measures) — Data Mining, chapter 3
- [Rule based classifier pros and cons](https://www.bctengineer.com/question.md?key=semester_7%2Fdata_mining%3Arule-based-pros-cons) — Data Mining, chapter 3
- [Sequential covering for rule induction](https://www.bctengineer.com/question.md?key=semester_7%2Fdata_mining%3Asequential-covering) — Data Mining, chapter 3
