Up
Go up to Question 1

Solution

  1. Give a sequence of atoms added to the consequence set for a bottom-up proof procedure. Show clearly what is the consequence set.

    Here is one such sequence:

    pressurised(p1)
    on(t1)
    pressurised(p2)
    pressurised(p3)
    on(t2)
    flow(shower)
    wet(bath)
    off(t3)
    off(t4)
    off(t5)
    on(t6)
    unplugged(bath)
    flow(d2)
    flow(d1)
    plugged(sink)
    
    This is the sequence that results from selecting the topmost applicable rule at each stage. Many other sequences are possible, as long as the body of a clause is derived before the head.
  2. Give a top-down derivation for the query
    ?flow(d1).

    Here is such a derivation (always selecting the leftmost atom in the body):

    yes <- flow(d1).
    yes <- flow(d2).
    yes <- wet(bath) & unplugged(bath).
    yes <-  flow(shower) & unplugged(bath).
    yes <- on(t2) & pressurised(p2) & unplugged(bath).
    yes <- pressurised(p2) & unplugged(bath).
    yes <- on(t1) & pressurised(p1) & unplugged(bath).
    yes <- pressurised(p1) & unplugged(bath).
    yes <- unplugged(bath).
    yes <- .
    
  3. Give a failing derivation for the query ?flow(d1).

    Here is a failing derivation (always selecting the leftmost atom in the body):

    yes <- flow(d1).
    yes <- flow(d3).
    yes <- wet(sink) & unplugged(sink).
    yes <- on(t3) & pressurised(p3) & unplugged(sink).
    
This fails as there is no clause with on(t3) in the head.
David Poole

Up