



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




[ Dog(x) ∧ Bone(y) ] ⇒ Likes(x, y) (*) not correct in general, except for Problem 2.a.
engaged in Knowledge Engineering for the Wumpus Cave. An expert on the Wumpus Cave tells you, among other things, “A breeze in square (2,1) is equivalent to a pit in square (1,1) or a pit in square (2,2) or a pit in square (3,1).” “A breeze in square (1,2) is equivalent to a pit in square (1,1) or a pit in square (2,2) or a pit in square (1,3).” You translate this into propositional logic, “(B21 ⇔ P11 ∨ P22 ∨ P31),” and “(B12 ⇔ P11 ∨ P22 ∨ P13),” then CNF: “(¬B21 ∨ P11 ∨ P22 ∨ P31) ∧ (¬P11 ∨ B21) ∧ (¬P22 ∨ B21) ∧ (¬P31 ∨ B21)” “(¬B12 ∨ P11 ∨ P22 ∨ P13) ∧ (¬P11 ∨ B12) ∧ (¬P22 ∨ B12) ∧ (¬P13 ∨ B12)” Now it is time for the first “live” test of your system. An agent has been lowered down into the Wumpus cave, and reports back by radio, “I am alive, so Square (1,1) does not have a pit. Square (2,1) has a breeze. Square (1,2) does not have a breeze” You translate this knowledge into propositional logic as “(¬P11) ∧ (B21) ∧ (¬B12)”. Next the agent asks by radio, “Is it true that square (3,1) has a pit?” You translate this query into propositional logic as the goal sentence “(P31)” and form the negated goal as “(¬P31).” Now your knowledge base plus negated goal is: (¬B21 ∨ P11 ∨ P22 ∨ P31) (¬P11 ∨ B21) (¬P22 ∨ B21) (¬P31 ∨ B21) (¬B12 ∨ P11 ∨ P22 ∨ P13) (¬P11 ∨ B12) (¬P22 ∨ B12) (¬P13 ∨ B12) (¬P11) (B21) (¬B12) (¬P31) Run resolution on this knowledge base until you produce the null clause, “( )”, thereby proving that the goal sentence is true. The shortest proof I know of is only five lines, including the first example line. It is OK to use more lines, if your proof is correct. SHOW YOUR WORK. Repeatedly choose two clauses, write one clause in the first blank space on a line, and the other clause in the second. Apply resolution to them. Write the resulting clause in the third blank space, and insert it into the knowledge base. The first one is done for you as an example.
Resolve (¬B21 ∨ P11 ∨ P22 ∨ P31) and (B21) to give (P11 ∨ P22 ∨ P31).
Resolve (P11 ∨ P22 ∨ P31) and (¬P11) to give (P22 ∨ P31).
Resolve (P22 ∨ P31) and (¬P31) to give (P22).
Resolve (P22) and (¬P22 ∨ B12) to give (B12 ).
Resolve (B12 ) and (¬B12) to give ( ).
Resolve and to give.
Resolve and to give.
Resolve and to give.
Resolve and to give.
Other proofs are OK as long as they are correct.
Here are some common mistakes on Problem 2, with explanations of why they are wrong. As is the usual convention, wrong sentences are marked with “()” (pronounced “a starred example” or “a starred sentence”).*
Remember that implication ( ⇒ ) is the natural connective to use with universal quantification, and conjunction ( ∧ ) is the natural connective to use with existential quantification. This simple rule explains everything below.
2.b. (8 pts) “Some dog likes some bone.”
∃x ∃y [ Dog(x) ∧ Bone(y) ] ⇒ Likes(x, y) ()* This answer is wrong because it is true in a world which has no dogs and no bones; and yet, the English sentence asserts the existence of at least one dog and at least one bone. For example, the substitution “x = y = Prof. Lathrop” makes the wff true, because the antecedent is false (I am neither a dog nor a bone) and consequently the implication is true. A world with exactly one object, which is “Prof. Lathrop,” makes this wff true.
∃x ∃y [ Dog(x) ⇒ Likes(x, y) ] ∧ Bone(y) ()* This wff is true in worlds that contain an object that is not a dog (x) and an object that is a bone (y), even if that world contains no dogs. And yet, the English sentence asserts the existence of at least one dog. For example, “x = Prof. Lathrop and y = Bone-1” (where Bone-1 is a bone) makes it true, because the antecedent of the implication is false.
2.c. (8 pts) “For every dog, there is a bone that the dog likes.”
∀x ∃y [ Dog(x) ∧ Bone(y) ] ⇒ Likes(x, y) ()* This sentence is true in any world in which there exists anything that is not a bone (because Bone(y) will be false for that object, making the antecedent false, and thus the implication true). For example, this wff is true for any world which contains the object “Prof. Lathrop,” even if that world contains no bones (“y = Prof. Lathrop” makes the implication true). And yet, if the world contains at least one dog, the English sentence asserts the existence of at least one bone.
∀x ∃y Dog(x) ∧ Bone(y) ∧ Likes(x, y) ()* This sentence is wrong because it asserts, among other assertions, that everything is a dog.
∀x ∃y [ Dog(x) ⇒ Bone(y) ] ⇒ Likes(x, y) ()* This sentence is true in a world in which there are some dogs but no bones, because Bone(y) will be false for every y, so the antecedent of the outer implication will be false when x is a dog, and so the outer implication will be true. And yet, if the world contains at least one dog, the English statement asserts that the world must contain at least one bone.
2.d. (8 pts) “For every bone, there is a dog that likes that bone.”
∀y ∃x [ Dog(x) ∧ Bone(y) ] ⇒ Likes(x, y) ()* This wff is true in any world that contains any object that is not a dog, because that object will make the antecedent false and therefore the implication true. In particular, it is true in every world that contains no dogs. And yet, if the world contains at least one bone, the English sentence asserts the existence of at least one dog.
∀y ∃x Dog(x) ∧ Bone(y) ∧ Likes(x, y) ()* This sentence is wrong because it asserts, among other assertions, that everything is a bone.
∀y ∃x [Bone(y) ⇒ Dog(x) ] ⇒ Likes(y, x) ()* This sentence is true in a world which contains only bones and no dogs, because Bone(y) will be true for every y and Dog(x) will be false for every x, so the antecedent of the outer implication will be false, and he outer implication will be true. Yet, if the world contains at least one bone, the English statement asserts the world must contain at least one dog.
2.e. (8 pts) “There is a bone that every dog likes.”
∃y ∀x [ Dog(x) ∧ Bone(y) ] ⇒ Likes(x, y) ()* This wff is true in any world in which there exists an object that is not a bone, because the antecedent is false and so the implication is true. For example, “y = Prof. Lathrop” makes this wff true, even in worlds in which there are no bones; and yet the English sentence asserts the existence of at least one bone.
∃y ∀x Bone(y) ⇒ [ Dog(x) ∧ Likes(x, y) ] ()* This wff is true in any world in which there exists an object that is not a bone, because the antecedent is false and so the implication is true. For example, “y = Prof. Lathrop” makes this wff true, even in worlds in which there are no bones; and yet the English sentence asserts the existence of at least one bone.
∀x ∃y Dog(x) ∧ Bone(y) ∧ Likes(x, y) This sentence is wrong because it asserts, among other assertions, that everything is a dog.
∀x ∃y [ Dog(x) ∧ Bone(y) ] ⇒ Likes(x, y) ()* This wff is true in any world in which there exists an object that is not a bone, even in worlds with no bones, And yet, the English statement asserts the existence of at least one bone.
2.f. (8 pts) “There is a dog that likes every bone.”
∃x ∀y [ Dog(x) ∧ Bone(y) ] ⇒ Likes(x, y) ()* This wff is true in any world that contains any object that is not a dog, because that object will make the antecedent false and therefore the implication true. For example, this wff is true for any world which contains the object “Prof. Lathrop,” even if that world contains no dogs. And yet, the English sentence asserts the existence of at least one dog.
∃x ∀y Dog(x) ⇒ [Bone(y) ∧ Likes(x, y) ] ()* This wff is true in any world that contains any object that is not a dog, as above, even if that world contains no dogs. And yet, the English sentence asserts the existence of at least one dog.
∃x ∀y Bone(y) ⇒ [ Dog(x) ∧ Likes(x, y) ] ()* This wff is true in any world that contains no bones, even if that world contains no dogs. And yet, the English sentence asserts the existence of at least one dog.
∃y ∀x [ Dog(x) ∧ Bone(y) ] ⇒ Likes(x, y) ()* This wff is true in any world that contains any object that is not a bone, because that object will make the antecedent false and therefore the implication true. For example, this wff is true for any world which contains the object “Prof. Lathrop,” even if that world contains no dogs. And yet, the English sentence asserts the existence of at least one dog.
∀x ∃y [ Dog(x) ∧ Likes(x, y) ] ⇒ Bone(y) ()* This sentence is true in any world in which there are no dogs, because the antecedent will always be false and so the implication will always be true. And yet, the English sentence asserts the existence of at least one bone.