8
Exercises for CS1512 Weeks 7 and 8 Propositional Logic 1 (questions)

Exercises for CS1512 Weeks 7 and 8 Propositional Logic 1 (questions)

Embed Size (px)

Citation preview

Page 1: Exercises for CS1512 Weeks 7 and 8 Propositional Logic 1 (questions)

Exercises for CS1512Weeks 7 and 8

Propositional Logic 1

(questions)

Page 2: Exercises for CS1512 Weeks 7 and 8 Propositional Logic 1 (questions)

Exercise 1

1. Express each formula using only (at most) the connectives listed. In each case use a truth table to prove the equivalence. (Note: is exclusive `or`)

a. Formula: pq. Connectives: {,}.b. Formula: pq. Connectives: {,,}. c. Formula: pq. Connectives: {, }.d. Formula: (pq) ((p)q). Conn: {,}.

Page 3: Exercises for CS1512 Weeks 7 and 8 Propositional Logic 1 (questions)

Ex. 2. Which of these are tautologies?

1. p (q p)2. p (p p)3. (q p) (p q) 4. (q p) (p q)5. (p (q r)) (q (p r))

Please prove your claims, using truth tables. (Hint: Ask what assignment of truth values to p,q, and r would falsify each formula. In this way you can disregard parts of the truth table).

Page 4: Exercises for CS1512 Weeks 7 and 8 Propositional Logic 1 (questions)

Ex. 3. Reading formulas off truth tables

• Background: In class, a proof was sketched for the claim that every propositional logic formula can be expressed using the connectives {, }. The proof proceeded essentially by “reading off” the correct formula off the truth table of any given formula.

• Task: Use this meticulous method to construct a formula equivalent to pq.

Page 5: Exercises for CS1512 Weeks 7 and 8 Propositional Logic 1 (questions)

Question 4a

• In class, it was proven that {, } is a functionally complete set of connectives. Making use of this result, can you prove that {,} is also functionally complete?

Page 6: Exercises for CS1512 Weeks 7 and 8 Propositional Logic 1 (questions)

Question 4b

• In class, it was proven that {, } is a functionally complete set of connectives. Making use of this result, can you prove that {NAND} is also functionally complete?

[Explanation: (p NAND q) is TRUE iff (pq) is FALSE. This connective is also called the Sheffer stroke and written (p|q).)

Page 7: Exercises for CS1512 Weeks 7 and 8 Propositional Logic 1 (questions)

Question 4c

• Given this result, why do we bother defining and using more than one connective?

Page 8: Exercises for CS1512 Weeks 7 and 8 Propositional Logic 1 (questions)

Question 5

• Translate into propositional logic (abbreviating ‘it has rained’ as r, ‘it’s been cold’ as c, and ‘the plant is dead’ as d):a. If it has rained and it’s been cold then the

plant is deadb. If it has rained then either it hasn’t been cold

or the plant is dead

• Use truth tables to determine whether these two statements are logically equivalent