Topic 6: Logical Reasoning & Proof Techniques

Data-Driven vs Goal-Driven Reasoning

Back to Lecture 7 Overview

Reasoning Strategies

There are two main approaches to logical reasoning: forward chaining (data-driven) and backward chaining (goal-driven). Each has its advantages and use cases.

Key Distinction:
  • Forward Chaining: Start with known facts, derive new facts
  • Backward Chaining: Start with goal, work backwards to find support
  • Resolution: Complete inference method using contradiction

Forward Chaining (Data-Driven)

Forward chaining starts with known facts and applies inference rules to derive new facts until the goal is reached or no more facts can be derived.

Forward Chaining Algorithm:
  1. Start with known facts in KB
  2. Find rules whose premises are satisfied
  3. Apply rules to derive new facts
  4. Add new facts to KB
  5. Repeat until goal reached or no more facts
Advantages:
  • Natural: Mimics human reasoning from observations
  • Complete: Will find all derivable facts
  • Efficient: Good for multiple queries
  • Incremental: Can add new facts easily
Disadvantages:
  • Inefficient: May derive irrelevant facts
  • No Focus: Doesn't target specific goals
  • Memory Intensive: Stores all derived facts

Backward Chaining (Goal-Driven)

Backward chaining starts with a goal and works backwards to find the facts and rules needed to support it.

Backward Chaining Algorithm:
  1. Start with goal to prove
  2. Find rules whose conclusion matches goal
  3. Try to prove premises of those rules
  4. Recursively apply to subgoals
  5. Stop when all subgoals are facts
Advantages:
  • Focused: Only derives relevant facts
  • Efficient: Good for specific queries
  • Memory Efficient: Doesn't store all facts
  • Goal-Oriented: Directly targets the question
Disadvantages:
  • Incomplete: May miss some derivable facts
  • Complex: Requires sophisticated control
  • Redundant: May re-derive same facts

Forward vs Backward Chaining

Aspect Forward Chaining Backward Chaining
Direction Facts → Rules → New Facts Goal → Rules → Subgoals
Efficiency Good for multiple queries Good for specific queries
Memory Stores all derived facts Minimal memory usage
Completeness Finds all derivable facts May miss some facts
Focus No specific target Goal-oriented
Use Case Expert systems, monitoring Question answering, proving

Resolution: Complete Inference Method

Resolution is a complete inference method that works by assuming the negation of what we want to prove and showing it leads to a contradiction.

Resolution Principle:

If we have P ∨ Q and ¬P ∨ R, then we can derive Q ∨ R. This eliminates complementary literals and combines the remaining information.

Resolution Example:

Goal: Prove Q from {P → Q, P}

  1. Convert to CNF: {¬P ∨ Q, P}
  2. Add negation of goal: {¬P ∨ Q, P, ¬Q}
  3. Apply resolution:
  4. 4. Q (from P and ¬P ∨ Q)
    5. ⊥ (from Q and ¬Q)
  5. Contradiction found, so Q must be true

Resolution Rules

Basic Resolution
P ∨ Q, ¬P ∨ R ⊢ Q ∨ R
Eliminate complementary literals
Unit Resolution
P, ¬P ∨ Q ⊢ Q
Special case with unit clause
Factoring
P ∨ P ⊢ P
Remove duplicate literals
Subsumption
P ∨ Q, P ⊢ P
Remove subsumed clauses

Modus Ponens and Variants

Modus Ponens is the fundamental inference rule that forms the basis of many reasoning systems.

Modus Ponens
P → Q, P ⊢ Q
If P implies Q, and P is true, then Q is true
Modus Tollens
P → Q, ¬Q ⊢ ¬P
If P implies Q, and Q is false, then P is false
Hypothetical Syllogism
P → Q, Q → R ⊢ P → R
Chain implications together
Disjunctive Syllogism
P ∨ Q, ¬P ⊢ Q
If P or Q is true, and P is false, then Q is true

Efficiency Considerations

Real-world reasoning systems must balance expressiveness with computational efficiency:

Performance Factors:
  • Knowledge Base Size: Larger KBs require more computation
  • Rule Complexity: Complex rules are harder to match
  • Query Specificity: Specific queries are more efficient
  • Inference Strategy: Choice of forward vs backward chaining
Trade-offs:
  • Expressiveness vs Efficiency: More expressive languages are slower
  • Completeness vs Speed: Complete methods may be very slow
  • Memory vs Time: Can trade memory for speed
  • Accuracy vs Approximation: May need to approximate for speed

Practical Applications

Different reasoning techniques are suited for different applications:

Forward Chaining:
  • Expert systems
  • Monitoring systems
  • Data analysis
  • Real-time reasoning
Backward Chaining:
  • Question answering
  • Theorem proving
  • Diagnostic systems
  • Planning systems
Resolution:
  • Automated theorem proving
  • Logic programming
  • Verification systems
  • Constraint satisfaction

Key Takeaways

Forward Chaining:
  • Data-driven reasoning
  • Good for multiple queries
  • Finds all derivable facts
  • Memory intensive
Backward Chaining:
  • Goal-driven reasoning
  • Good for specific queries
  • Focused and efficient
  • May miss some facts
Resolution:
  • Complete: Can prove any true statement
  • Sound: Only derives true conclusions
  • Efficient: Good for automated systems
  • Versatile: Works with any logical language
Next Steps:

Now that we understand reasoning techniques, we'll see how they apply in practice with the classic Topic 7: Wumpus World Case Study.

Previous: First-Order Logic Next: Wumpus World