User Tools

Site Tools


teaching:is:prop-rules-solutions

Solutions to the Propositions and Inference lab

5.1

% heating_k1 is true if kettle k1 is heating 
heating_k1 <-
   plugged_into_k1_p1 & 
   live_p1 & 
   turned_on_k1 & 
   filled_with_water_k1.

% plugged_into_k1_p1 is true if k1 is plugged into power outlet p1
plugged_into_k1_p1.
plugged_into_k2_p2.

% turned_on_k1 is true if k1 is turned on 
turned_on_k1.
turned_on_k3.

% filled_with_water_k1 is true if k1 is filled with water 
filled_with_water_k1.

5.2

(a)

pressurized p3 <- on t1 & pressurized p1.
wet sink <- on t3 & pressurized p3.
flow d3 <- wet sink & unplugged sink.
flow d1 <- flow d3.

(b) We would expect the user of the house to be able to determine whether the taps are on and whether the plugs are in or not.

(c) Here is the minimal set of clauses:

wet floor <- wet sink & plugged sink. 
wet floor <- wet bath & plugged bath.

(d) The denotation is given in the diagram: Here is the simplest axiomatization:

pressurized hws <- on t4 & pressurized p2. 
pressurized p4 <- pressurized hws. 
pressurized p5 <- pressurized hws.
flow shower <- on t5 & pressurized p5.
wet sink <- on t6 & pressurized p4.

The file http://www.cs.ubc.ca/spider/poole/aibook/figures/ch05/plumbing2.ailog contains a solution that will run in AILog.

5.3

(a) Give a model of the model of the knowledge base: The minimal model has { a, c, e, f, g } true and { b, d, h } false. Another model is where all atoms are true.

(b) Give an interpretation that is not a model of the knowledge base: The interpretation with a false, and all other atoms true is not a model as the first clause is false in this interpretation. The interpretation with all atoms false is not a model as the 7th clause is false in this interpretation.

(c) Give two atoms that are logical consequences of the KB: Any two of { a, c, e, f, g } .

(d) Give two atoms that are not logical consequences of the KB: Any two of { b, d, h } .

5.4

(a)

C={}
C={c,e} (by 4 & 5)
C={c,e,b} (by 3)
C={c,e,b,a} (by 1)
C={c,e,b,a,j} (by 9)

(b) each of {c,e,b,a,j} is true and the other atoms (including f) are false.

(c) The rightmost branch is the top-down derivation:

   {yes⇽a}
       |
   {yes⇽b,c}
        / \
{yes⇽d,c} {yes⇽e,c}
    |         |
{yes⇽h,c} {yes⇽c}
              |
          {yes⇽}
teaching/is/prop-rules-solutions.txt · Last modified: 2020/06/24 10:06 by Franconi Enrico