Homework assignment for chapters 8 and 9 in Russell & Norvig
1. Modified from 8.7 on page 269: Represent the sentence “All Germans speak the same
languages” in predicate calculus. Use Speaks(x,l), meaning that person x speaks
language l, and German(y), meaning that y is a German person.
Here are some correct answers that I encountered:
∀ x , y , l German x ∧German y ∧Speaks x , l ⇒ Speaks y , l
∀ x , y German x ∧German y ⇒ ∀ l Speaks x , l ⇔ Speaks y , l
x ∧Speaks x , l ⇒ ∀ y German y ⇒ Speaks y , l
∀ l ∀ x German x ⇒ ¬Speaks x , l ∨ ∀ y German y ⇒ Speaks y , l
∀ x ,l
German
It’s good practice to try to put all of these into English. You should also try to reduce
these to CNF to convince yourself that they are actually all equivalent. (I chose the
variables such that you do not need to rename to make the sentences equivalent.)
Here are some incorrect answers that I encountered, and what they mean:
∀ x ∃l German x ⇒ Speaks x , l
∀ x , y ∃l German x ⇒ Speaks x , l ∧German y ⇒ Speaks y , l
∀ x , y German x ∧German y ⇒ ∃l Speaks x , l ∧Speaks y , l
These can all be interpreted as “there exists a language that all Germans speak.” This is
wrong because it leaves open the possibility that there are languages spoken by some
Germans that are not spoken by others. Although this sounds plausible, it is not the
sentence that was asked for. A very common mistake with propositional logic is to read
too much into what is being asked for. The sentence that you were asked to represent
allows for the possibility that all Germans speak Japanese and Chinese while none of
them speak German. It is also useful to convert these three sentences to CNF to verify
that they are exactly identical.
∃ x , l German x ∧Speaks x , l ⇒ ∀ y German y ⇒ Speaks y , l
This says that if there exists a German who speaks a language, then all Germans speak
that language. This sounds reasonable at first, but it is incorrect as it only works if all
Germans speak zero or one language. It’s extremely important to understand why this is
incorrect as it is an easy trap to fall into. Think about it in a very simple world with two
Germans (Hans und Franz), and three languages (German, French, and Spanish). If Hans
speaks German and French, and Franz speaks German and Spanish, then it is true that
there exists a German (say Hans) and a language (say German) such that German(Hans)
and Speaks(Hans, German) implies that all Germans speak German. This world therefore
satisfies this statement, but does not satisfy the sentence that “all Germans speak the same
languages”.
∀ x , y , l , m German x ∧German y ∧Speaks x , l ∧Speaks y , m ⇒ l =m
This says that all Germans who speak, speak only one language. This is wrong because it
ignores the possibility that all Germans speak more than one language as well as allowing
for Germans who don’t speak a language at all.
∀ x , l German x ⇒ Speaks x , l
At first, this would seem to imply that all Germans speak all languages. However, this is
even stronger – this sentence implies that all Germans speak everything, including
themselves! (Personally, I’m not sure how one speaks Ben.)
Credit was only given for correct answers. For those getting no marks, 16 points are
available to those who reduce the four correct sentences and three similar incorrect
sentences to CNF. CNF means no existential qualifiers. You must show your work to get
this credit.
2. What axiom is needed to infer the fact Sister(Laura, Jim) given the facts Male(Jim),
Female(Laura), Father(John, Jim), Father(John, Laura), Mother(Luann, Laura), and
Mother(Luann, Jim)? (Jim, John, Laura, and Luann are constants)
Here’s the simplest correct answer:
∀ x , y Female x ∧∃ z Father z , x ∧Father z , y ∧∃ w Mother w , x ∧Mother w , y ⇒ Sister x , y
Full marks (20 points) were given for any correct answers, even those that were
ludicrously strong.
3. Modified from 8.10 on page 269: Rewrite the propositional wumpus world facts from
Section 7.7 into first-order logic.
∀ [ x , y ] , [ a , b ] Adjacent
[ x , y ] , [ a , b ] ⇔ [ a , b ] ∈ { [ x1, y ] , [ x−1, y ] , [ x , y1 ] , [ x , y−1 ] }
∀[ x , y ],[a ,b ]
Pit [ x , y ] ∧ Adjacent [ x , y ] , [ a , b ] ⇒ Breezy [ a , b ]
∀ [ x , y ] , [ a , b ] Wumpus [ x , y ] ∧ Adjacent [ x , y ] , [ a , b ] ⇒ Stench [ a , b ]
∃ [ x , y ] Wumpus [ x , y ]
∀ [ x , y ] , [ a , b ] Wumpus [ x , y ] ∧ [ x , y ] ≠[ a , b ] ⇒ ¬Wumpus [ a , b ]
Many students added lots of other useful facts, but these were the rules we were
interested in.
Full marks (20 points) were given for answers that seemed reasonable. Answers that only
approached being reasonable were given 16 points. Answers that were omitted or showed
no significant thought received no points.
9.4 on page 316: For each pair of atomic sentences, give the most general unifier if it
exists:
a. P(a,b,b), P(x, y, z). { x / a , y /b , z /b }
b. Q(y, G(a, b)), Q(G(x, x), y). { a / x , b / x , y /G x , x }
c. Older(Father(y), y), Older(Father(x), John). { y / John , x / John }
d. Knows(Father(y), y), Knows(x, x). fail
Full marks (5 points) were given for any correct answers that produced the most general
unifier, or indicated failure on part d. 4 points were awarded for answers that incorrectly
produced the most general unifier, for example, by replacing Father(y) with Father(John)
instead of by replacing y with John – the ends don’t completely justify the means. 4
points were also awarded on part b if the assumption was made that the two y’s were
meant to be different variables and hence should be standardized apart.
4. 9.17 on page 318: How can resolution be used to show that a sentence is valid?
Unsatisfiable?
If we cannot resolve the negation of the sentence with an empty knowledge base, then the
sentence is valid. Using the resolution algorithm, this means that if we can resolve the
sentence (i.e., the negation of the negation of the sentence) to true (i.e., the empty
statement), then the sentence is valid. For example, p ∨¬ p can be resolved to true,
so it is valid – i.e., a tautology. If we cannot resolve the sentence with an empty
knowledge base, the sentence is unsatisfiable. Using the resolution algorithm, this means
that if we can resolve the negation of the sentence to true, then the sentence is
unsatisfiable. For example, the negation of p ∧¬ p , i.e. ¬ p ∧¬ p =¬ p ∨ p ,
can be resolved to true, so p ∧¬ p is unsatisfiable.
For full marks (10 points each on valid/unsatisfiable) on this question, the student should
demonstrate that they understand what valid and unsatisfiable mean, and how resolution
works. Repeating phrases from the book do not demonstrate this. For example, what does
it mean “to derive a contradiction”? 8 out of 10 points were awarded if it was felt that the
student might have been able to produce the answer if they had been asked to explain
themselves in more detail. No points were awarded for untrue statements, e.g., that if a
sentence is not unsatisfiable, it must be valid.
© Copyright 2026 Paperzz