1
Cogs 502 – Prog. & Log. Fall 2015 Homework 3 Due 13 Nov 2015, midnight Question 1 (25%) Define unless as a truth function (e.g. by giving its truth table), for its usage in the following sentences. (a) The temperature is 90 degrees, unless the thermometer is wrong. (b) We will stay inside, unless the weather is fine. Question 2 (25%) Let ‘’ denote the binary truth function tabulated below: P Q P Q 1 1 0 1 0 1 0 1 1 0 0 0 Construct a truth table for ‘( p q) ((q p) p)’. Question 3 (25%) Exercise 9.1 of the lecture notes, repeated below: Given ‘ p q’, state which of the following imply or are implied by it: - p q - p q q r p q r p r q p q r ( p q) r -q →- p p r q Question 4 (25%) (a) Determine whether ‘ p (q r)’ implies ‘r (q p)’ or vice versa. (b) Do the same for ‘( p q r) p q’ and ‘( p q r) p q’.

cogs502-hw3-2015-Fall

Embed Size (px)

DESCRIPTION

predicate logic practice

Citation preview

Page 1: cogs502-hw3-2015-Fall

Cogs 502 – Prog. & Log.Fall 2015 Homework 3 Due 13 Nov 2015, midnight

Question 1 (25%)Define unless as a truth function (e.g. by giving its truth table), for its usage in the following sentences.

(a) The temperature is 90 degrees, unless the thermometer is wrong.

(b) We will stay inside, unless the weather is fine.

Question 2 (25%)Let ‘↑’ denote the binary truth function tabulated below:

P Q P ↑ Q1 1 01 0 10 1 10 0 0

Construct a truth table for ‘(p→ q) ↑ ((q→ p)→ p)’.

Question 3 (25%)Exercise 9.1 of the lecture notes, repeated below:Given ‘p→ q’, state which of the following imply or are implied by it:

−p q −p∨q q∧ rp→ q∨ r p∨ r→ q

p→ q∧ r (p→ q)∨ r −q→−p p∧ r→ q

Question 4 (25%)

(a) Determine whether ‘p↔ (q↔ r)’ implies ‘r↔ (q→ p)’ or vice versa.

(b) Do the same for ‘(p↔ q∧ r)→ p∧q’ and ‘(p→ q∧ r)↔ p∧q’.