(∀x) [ clear(x) ⊕ (∃y) on(y,x) ]
exclusive or operator in terms of and, or, and not.
(∃X) grandfather-of(X,X) from the knowledge base with the following clauses:
1. grandfather-of(X1,Y1) ∨ ¬father-of(X1,Z1) ∨ ¬parent-of(Z1,Y1) 2. grandfather-of(X2,Y2) ∨ ¬wife-of(W2,X2) ∨ ¬grandmother-of(W2,Y2) 3. grandmother-of(X3,Y3) ∨ ¬mother-of(X3,Z3) ∨ ¬parent-of(Z3,Y3) 4. grandmother-of(X4,Y4) ∨ ¬wife-of(X4,Z4) ∨ ¬grandfather-of(Z4,Y4) 5. parent-of(X5,Y5) ∨ ¬father-of(X5,Y5) 6. parent-of(X6,Y6) ∨ ¬wife-of(W6,X6) ∨ ¬mother-of(W6,Y6) 7. parent-of(X7,Y7) ∨ ¬mother-of(X7,Y7) 8. parent-of(X8,Y8) ∨ ¬wife-of(X8,Z8) ∨ ¬father-of(Z8,Y8) 9. wife-of(alice, bob) 10. wife-of(donna, calvin) 11. mother-of(alice, calvin) 12. mother-of(donna, bob)Use a dummy answer predicate to find the final binding for
X. Do not use Prolog notation for your clauses.
¬gt(x,y) ∨ ¬gt(y,z) ∨ gt(x,z) ¬succ(a,b) ∨ gt(a,b) ¬gt(x,x)why does the following attempt at a resolution proof of
gt(5,2)
run into problems? Here the predicate names gt and succ are abbreviations for is-greater-than and is-a-successor-of.
The negation of the query (omitting the quantifier ∀) is
0. ¬gt(5,2)
Assuming that the sentences of the knowledge base are numbered in order beginning with 1, then
Unifying 0 and 1 by the unifying substitution {5/x, 2/z}, we get
4. ¬gt(5,y) ∨ ¬gt(y,2)
Unifying 4 and 2 by the unifying substitution {y/a, 2/b}, we get
5. ¬gt(5,y) ∨ ¬succ(y,2)
Unifying 5 and 1 by the unifying substitution {5/x, y/z}, we get
6. ¬gt(5,y) ∨ ¬gt(y,y) ∨ ¬succ(y,2)
But now, since the middle disjunct is in the knowledge base, we cannot hope to derive a contradiction from this clause, regardless of whatever other clauses might be in the knowledge base.
moveToTable(?x): [on(?x, ?y), clear(?x)], [ontable(?x), clear(?y)], [on(?x, ?y)] moveFromTable(?x,?y): [ontable(?x), clear(?x), clear(?y)] [on(?x, ?y)] [ontable(?x), clear(?y)] move(?x, ?z): [on(?x, ?y), clear(?x), clear(?z)] [on(?x, ?z), clear(?y)] [on(?x, ?y), clear(?z)]
on(c,a) ^ on(a,b) [clear(a), ontable(a), clear(b), on(b,c), ontable(c)]
(∀?x) [(clear(?x) ⊕ (∃?y) on(?y, ?x)) ^ (ontable(?x) ⊕ (∃?z) on(?x, ?z))]