com364
com364
Data Provided:
Natural Deduction Rules (page 5)
Clausal Form Conversion Steps (page 5)
F (M ) = {Adam, Harry}
F (W ) = {Jane, Emily}
F (P ) = {Adam, Jane}
F (C) = {hHarry, Adami, h Harry, Janei, hEmily, Adami, h Emily, Janei}
Determine whether the following formulae are true or false in this model. Justify your
answer.
c) Provide natural deduction proofs for the following derivabilities. [N.B. A listing of the
natural deduction proof rules is given at the end of the exam paper.]
(i) p ∧ q, q → r ` s ∨ r [15%]
(ii) p → (q ∧ r), (q ∨ r) → s ` p → s [15%]
(iii) p ∨ q, ¬p ` q [15%]
(iv) ¬a ∧ ¬b ` ¬(a ∨ b) [15%]
COM364 2 CONTINUED
COM364
2. a) Translate the following sentences into formulae of predicate logic. (Be sure to state
what each predicate symbol or constant used in the translation means.)
b) Consider the two following possible translations for the sentence “Every child has a
mother.”:
Translation 1: ∃y∀x(C(x) → M (y, x))
Translation 2: ∀x(C(x) → ∃yM (y, x))
where C = is child and M (x, y) = x is mother of y
Which of the translations is more likely to be correct? Explain your answer. [15%]
c) Provide natural deduction proofs for the following derivabilities. [N.B. A listing of the
natural deduction proof rules is given at the end of the exam paper.]
(i) Convert the formulae to clausal form, showing the results produced at each
stage of the conversion process. [NB: A list of the steps of the conversion
process is given at the end of the paper.] [25%]
(ii) Provide a resolution proof over the clausal form formulae produced in 2(d)(i).
[10%]
b) Define a predicate items/2 which, when provided with a list L returns the number of
items in L. For example, items([1, 3, 5, 7, 9], X) would return X = 5. [10%]
c) Define a predicate split/4 which, when provided with a list L and integer N returns
two lists, A and B, where A contains the items in L that are greater than or equal to
N and B contains the items that are lower than N. For example, the goal split([1,
5, 2, 3, 4], 3, A, B) should return A = [5, 3, 4] and B = [1, 2]. [10%]
d) Define a predicate triangle/2, which when given a natural number N for its first
argument, computes the Nth triangular number (i.e. the sum of the integer values
from N down to 1). For example, a goal triangle(4,X) should succeed, returning
X=10 (since 4 + 3 + 2 + 1 = 10). [15%]
e) Show how a cut and fail combination can be used to define a predicate non zero/1
which returns false when provided with a list containing 0 and true when provided one
that does not. For example, the goal non zero([1, 2, 3]) should return true
while the goal non zero([3, 2, 1, 0]) should return false. [10%]
f) Consider the following predicate min/3 which takes two numbers as the first two
arguments, X and Y, and returns the smaller of the two as the third argument. For
example, min(1, 2, Z) returns Z = 1 and min(3, 2, Z) returns Z = 2.
min(X, Y, X) :- X =< Y.
min(X, Y, Y) :- Y < X.
Show how the predicate can be rewritten using a red cut. Explain why the cut used
in your answer is red rather than green. [15%]
END OF QUESTIONS
COM364 4 CONTINUED
COM364
(¬¬E):
Disjunction Biconditional Existential
(∨I): (↔I): ¬¬P (∃I):
! P
P (or Q) P→Q φ(c)
! P∨Q Q→P ! ∃x.φ(x)
! P↔Q (⊥E):
(∨E): (∃E):
⊥
P∨Q ! P ∃x.φ(x)
P→R (↔E): c
Copy
Q→R P↔Q φ(c)
! R (=): P
! P→Q :
(or Q→P) : ψ
! P ! ψ
COM364 5