Exam IntrotoLogic2017 18final
Exam IntrotoLogic2017 18final
+ Only write your student number at the top of the exam, not your name. Also write your
student number at the top of any additional pages. In this way we will be able to grade
anonymously.
+ Leave the first ten lines of the first page blank (this is where the calculation of your grade
will be written).
+ Only hand in your definite answers. You can take any drafts home.
+ When you hand in your exam, wait until the supervisors have checked whether all informa-
tion is complete. They will indicate when you can leave.
+ By writing your student number and tutorial group on all pages, you earn a first ‘free’ 10
points. With the regular exercises, you can earn 90 points. With the bonus exercise, you
can earn 10 extra points. The exam grade is:
(the number of points you earned with the regular and bonus exercises + the first
‘free’ 10) divided by 10, with a maximum grade of 10.
Here H1 is the grade for homework assignment 1, H2 is the grade for homework assignment
2, M is the midterm grade, and E is the grade for this final exam.
Good luck!
2: Translating to first-order logic (10 points) Translate the following sentences to first-
order logic. Provide one translation key for both sentences. The domain of discourse is the set of
all people.
a. Aaron cooks for all his friends who cook for him.
b. If there is someone for whom Barbara cooks, then she cooks for Aaron, who is the only
vegetarian among Barbara’s friends.
1
3: Formal proofs (20 points) Give formal proofs of the following inferences. Do not forget
the justifications. Remember you can only use the Introduction and Elimination rules and the
Reiteration rule.
a. ¬(A → B) c.
B∨C (∃xP (x) → Q) ↔ ∀x(P (x) → Q)
C with x not occurring free in Q
b. d. ∃y∀xR(x, y)
(¬(A ∧ B) ∨ C) → (A → (B → C)) ∀x∃yR(x, y)
4: Truth tables (10 points) Answer the following questions using truth tables. Write down
the complete truth tables and motivate your answers. Order the rows in the truth tables as
follows:
b. Check with a truth table whether the conclusion is a logical consequence of the premises
for the following argument. Indicate clearly which rows are spurious.
¬FrontOf(a, b)
¬(a = b)
BackOf(a, b)
Provide a conjunctive normal form (CNF) of the following formula. Show all of the intermediate
steps.
¬(A ∨ B) → (¬A ∧ ¬(B ∨ C))
6: Normal forms for first-order logic and Horn sentences (10 points)
a. Provide a Prenex normal form of the following sentence
¬(∃xP (x) ∨ ∀x∀y∃zQ(x, y, z))
Show all intermediate steps.
2
b. Provide a Skolem normal form of the following sentence
Use the Horn algorithm and indicate the order in which you assign truth values to the
atomic sentences. If you prefer the conditional form, you may also use the satisfiability
algorithm for conditional Horn sentences.
In the world displayed above, a, b and f are small, e and d are large and c is medium sized.
a. In the world displayed above, all and only the tetrahedrons are large. Express this with
one sentence in the language of Tarski’s World. The sentence should be true in all worlds
in which all tetrahedrons are large and no other object is large, and false in all worlds in
which either some tetrahedron is not large or some other object is large.
b. Indicate of the sentences below, whether they are true or false in the world displayed above.
You do not need to explain your answers.
c. Explain how the formula below can be made false by changing the position of one object in
the world displayed above. Explain which object to move and to which position by saying
how many cells to the right or left, and how many cells up or down the object should be
moved.
3
8: Translating function symbols (5 points) Translate the following sentences using the
translation key provided. The domain of discourse is the set of all Renaissance painters.
r: Raphael
m: Michelangelo
a. Raphael’s first master is more famous than Michelangelo’s first master but there is someone’s
first master who is more famous than both Michelangelo’s and Raphael’s first masters.
b. Michelangelo is Raphael’s chief rival if and only if Raphael is Michelangelo’s chief rival.
Let a model M with domain M(∀) = {Rock, Scissors, Paper} be given such that
• M(a) = Rock
• M(Frequent) = { Rock }
• M(Infrequent) = { Scissors }
• h(x) = Rock,
• h(y) = Scissors,
• h(z) = Paper.
Evaluate the following statements. Follow the truth definition step by step.
c. M |= ∃x∀yBeats(x, y)[h]
Give a formal proof of the following inference. Don’t forget to provide justifications. You can
only use the Introduction and Elimination rules and the Reiteration rule.
∀x∃yR(x, y) → ∃y∀xR(x, y)
∃x(∀y¬R(x, y) ∨ ∀yR(y, x))