Professional Documents
Culture Documents
Propositional Logic
7.4 In all cases, the question can be resolved easily by referring to the definition of entailment.
a. False |= True is true because False has no models and hence entails every sentence
AND because True is true in all models and hence is entailed by every sentence.
b. True |= False is false.
c. (A ∧ B) |= (A ⇔B) is true because the left-hand side has exactly one model that is
one of the two models of the right-hand side.
d. A ⇔B |= A ∨ B is false because one of the models of A ⇔B has both A and B
false, which does not satisfy A ∨ B.
e. A ⇔B |= ¬A ∨ B is true because the RHS is A ⇒ B, one of the conjuncts in the
definition of A ⇔B.
f. (A∨ B) ∧ (¬C ∨ ¬D∨ E) |= (A ∨ B ∨ C) ∧ (B ∧ C ∧ D ⇒ E) is true. The RHS is
equivalent to (A ∨ B ∨ C) ∧ (¬B ∨ ¬C ∨ ¬D ∨ E); so both conjuncts of the LHS are
weakened on the RHS by the addition of disjuncts, allowing more models.
g. (A∨ B)∧ (¬C ∨ ¬D∨ E) |= (A∨ B)∧ (¬D∨ E) is false; removing a disjunct allows
fewer models.
h. (A ∨ B) ∧ ¬(A ⇒ B) is satisfiable; model has A and ¬B.
i. (A ∧ B) ⇒ C |= (A ⇒ C) ∨ (B ⇒ C) is true because the RHS is false only
when both disjuncts are false, i.e., when A and B are true and C is false, in which case the LHS is also false.
This may seem counterintuitive, and would not hold if ⇒ is
interpreted as “causes.”
j. (C ∨ (¬A∧ ¬B)) ≡ ((A ⇒ C)∧ (B ⇒ C)) is true; proof by truth table enumeration,
or by application of distributivity (Fig 7.11).
k. (A ⇔B) ∧ (¬A ∨ B) is satisfiable; RHS is entailed by LHS so models are those of
A ⇔B.
l. (A ⇔B) ⇔C does have the same number of models as (A ⇔B); half the
models of (A ⇔B) satisfy (A ⇔B) ⇔C, as do half the non-models, and there
are the same numbers of models and non-models.
7.10
a. Valid.
b. Neither.
c. Neither.
d. Valid.
e. Valid.
f. Valid.
g. Neither.
7.17
a. A simple truth table has eight rows, and shows that the sentence is true for all models
and hence valid.
b. For the left-hand side we have:
(Food ⇒ Party) ∨ (Drinks ⇒ Party)
(¬Food ∨ Party) ∨ (¬Drinks ∨ Party)
(¬Food ∨ Party ∨ ¬Drinks ∨ Party)
(¬Food ∨ ¬Drinks ∨ Party)
and for the right-hand side we have
(Food ∧ Drinks) ⇒ Party
¬(Food ∧ Drinks) ∨ Party
(¬Food ∨ ¬Drinks) ∨ Party
(¬Food ∨ ¬Drinks ∨ Party)
The two sides are identical in CNF, and hence the original sentence is of the form
P ⇒ P, which is valid for any P.
c. To prove that a sentence is valid, prove that its negation is unsatisfiable. I.e., negate
it, convert to CNF, use resolution to prove a contradiction. We can use the above CNF
result for the LHS.
¬[[(Food ⇒ Party) ∨ (Drinks ⇒ Party)] ⇒ [(Food ∧ Drinks) ⇒ Party]]
[(Food ⇒ Party) ∨ (Drinks ⇒ Party)] ∧ ¬[(Food ∧ Drinks) ⇒ Party]
(¬Food ∨ ¬Drinks ∨ Party) ∧ Food ∧ Drinks ∧ ¬Party
Each of the three unit clauses resolves in turn against the first clause, leaving an empty
clause.
7.25
a. St+1 ⇔[(St ∧ at) ∨ (¬St ∧ bt)].
b. Because the agent can do exactly one action, we know that bt ≡ ¬at so we replace bt
throughout. We obtain four clauses:
1: (¬St+1 ∨ St ∨ ¬at)
2: (¬St+1 ∨ ¬St ∨ at)
3: (St+1 ∨ ¬St ∨ ¬at)
4: (St+1 ∨ St ∨ at)
c. The goal is (¬St ∧ at) ⇒ ¬St+1. Negated, this becomes three clauses: 5: ¬St; 6: at;
7: St+1. Resolving 5, 6, 7 against 1, we obtain the empty clause.
FOL
8.10
a. Every cat loves its mother or father.
(i) ∀ x Cat (x) ⇒ Loves(x,Mother (x) ∨ Father (x)).
(2) Syntactically invalid. Cannot have a disjunction inside a term.
(ii) ∀ x ¬Cat(x) ∨ Loves(x,Mother (x)) ∨ Loves(x,Father (x)).
(1) Correct. (Rewrite as implication with disjunctive consequence.)
(iii) ∀ x Cat (x) ∧ (Loves(x,Mother (x)) ∨ Loves(x,Father (x))).
(3) Incorrect. Use of ∧ with ∀ means that everything is asserted to be a cat.
b. Every dog who loves one of its brothers is happy.
(i) ∀ x Dog(x) ∧ (∃ y Brother (y, x) ∧ Loves(x, y)) ⇒ Happy(x).
(1) Correct.
(ii) ∀ x, y Dog(x) ∧ Brother (y, x) ∧ Loves(x, y) ⇒ Happy(x).
(1) Correct. Logically equivalent to (i).
(iii) ∀ x Dog(x) ∧ [∀ y Brother (y, x) ⇔Loves(x, y)] ⇒ Happy(x).
(3) Incorrect. States that dogs are happy if they love all of, and only, their brothers.
c. No dog bites a child of its owner.
(i) ∀ x Dog(x) ⇒ ¬Bites(x,Child(Owner (x))).
(3) Incorrect. Uses Child as a function instead of a relation.
(ii) ¬∃ x, y Dog(x) ∧ Child(y,Owner (x)) ∧ Bites(x, y).
(1) Correct.
(iii) ∀ x Dog(x) ⇒ (∀ y Child(y,Owner (x)) ⇒ ¬Bites(x, y)).
(1) Correct. Logically equivalent to (ii).
(iv) ¬∃ x Dog(x) ⇒ (∃ y Child(y,Owner (x)) ∧ Bites(x, y)).
(3) Incorrect. Uses ⇒ with ∃ .
d. Everyone’s zip code within a state has the same first digit.
(i) ∀ x, s, z1 [State(s) ∧ LivesIn(x, s) ∧ Zip(x)=z1] ⇒
[∀ y, z2 LivesIn(y, s) ∧ Zip(y)=z2 ⇒ Digit(1, z1)=Digit(1, z2)].
(1) Correct.
(ii) ∀ x, s [State(s) ∧ LivesIn(x, s) ∧ ∃ z1 Zip(x)=z1] ⇒
[∀ y, z2 LivesIn(y, s) ∧ Zip(y)=z2 ∧ Digit(1, z1)=Digit(1, z2)].
(2) Syntactically invalid. Uses z1 outside scope of its quantifier. Also uses ∧ as
the main connective in the universally quantified RHS.
(iii) ∀ x, y, s State(s)∧ LivesIn(x, s)∧ LivesIn(y, s) ⇒ Digit(1, Zip(x)=Zip(y)).
(2) Syntactically invalid. Cannot use equality within a term.
(iv) ∀ x, y, s State(s) ∧ LivesIn(x, s) ∧ LivesIn(y, s) ⇒
Digit(1, Zip(x))=Digit(1, Zip(y)).
(1) Correct. Since Zip is a function, there is no need to define additional variables
to name the zip codes.
8.11
a. People who speak the same language understand each other.
b. Suppose that an extended interpretation with x → A and y → B satisfy
SpeaksLanguage(x, l) ∧ SpeaksLanguage(y, l)
for some l. Then from the second sentence we can conclude Understands (A,B). The
extended interpretation with x → B and y → A also must satisfy
SpeaksLanguage(x, l) ∧ SpeaksLanguage(y, l) ,
allowing us to conclude Understands(B,A). Hence, whenever the second sentence
holds, the first holds.
c. Let Understands(x, y) mean that x understands y, and let Friend(x, y) mean that x
is a friend of y.
(i) It is not completely clear if the English sentence is referring to mutual understanding
and mutual friendship, but let us assume that is what is intended:
∀ x, y Understands(x, y)∧ Understands(y, x) ⇒ (Friend(x, y)∧ Friend(y, x)).
(ii) ∀ x, y, z Friend(x, y) ∧ Friend(y, z) ⇒ Friend(x, z).
Inference in FOL
9.4 This is an easy exercise to check that the student understands unification.
a. {x/A, y/B, z/B} (or some permutation of this).
b. No unifier (x cannot bind to both A and B).
c. {y/John, x/Jerry}.
d. No unifier (because the occurs-check prevents unification of y with Father(y)).