cs221 Section9 Problems
cs221 Section9 Problems
Week 9
1
2) [CA session] Problem 2: Proof by Resolution
In this question we practice proving by resolution on the following knowledge base:
Either Heather attended the meeting or Heather was not invited. If the boss wanted
Heather at the meeting, then she was invited. Heather did not attend the meeting. If
the boss did not want Heather there, and the boss did not invite her there, then she is
going to be fired. Prove Heather is going to be fired.
2
3) [CA Session] Problem 3
Translate the following English sentences into first-order logic formulas:
(c) No student failed Chemistry but at least one student failed History.
4) Problem 4
Translate each of the following sentences into first order logic using only the predicates
listed below:
• Teacher(x): x is a teacher.
• Student(x): x is a student.
• Test(x): x is a test.
• Passed(x, y): x passed y.
3
(iii) [3 points] There is a test that every student has passed.
4
5) Problem 5
Imagine we are building a knowledge base of propositions in first order logic and want
to make inferences based on what we know. We will deal with a simple setting, where
we only have three objects in the world: Alice, Carol, and Bob. Our predicates are as
follows:
• Employee(x): x is an employee.
• Boss(x): x is a boss.
• Works(x): x works.
• Paid(x): x gets paid.
(a) Boss(Carol)
(b) Employee(Bob)
(c) Paid(Carol) ∧ Works(Carol)
(d) Paid(Alice)
(e) ∀x (Employee(x) ↔ ¬ Boss(x))
(f) ∀x (Employee(x) → Works(x))
(g) ∀x ((Paid(x) ∧ ¬ Works(x)) → Boss(x))
(i) [2 Point] We know from class that one technique we can use to perform infer-
ence with our knowledge base is to propositionalize the statements of first-order
logic into statements of propositional logic. Practice this by propositionalizing
statement (f) from our knowledge base.
(ii) [3 Points] If we translated the statement "Anyone who is not a boss either works
or does not get paid" into first-order logic and added it to our knowledge base,
how would the size of the set of valid models representing our knowledge base
change, and why?
5
(iii) [7 Points] Using only our original knowledge base (not including the statement
from part (ii)), we want to answer the question "Does everyone work?" We first
translate the sentence "everyone works" into first order logic as statement f .
Determine the answer to our query by considering the following questions of sat-
isfiability:
1 [3 points] Is KB ∪ ¬f satisfiable? Answer yes/no. If yes, fill in the following
○
table with T for true and F for false to show that there is a satisfying model.
x Employee(x) Boss(x) Works(x) Paid(x)
Alice
Bob
Carol
3 [1 points] Based on your answers to the previous two parts, does our knowl-
○
edge base entail f , contradict f , or is f contingent? And what should the
answer to our original question "Does everyone work?" be?