Presentation is loading. Please wait.

Presentation is loading. Please wait.

Exercises for CS3511 Week 31 (first week of practical) Propositional Logic.

Similar presentations


Presentation on theme: "Exercises for CS3511 Week 31 (first week of practical) Propositional Logic."— Presentation transcript:

1 Exercises for CS3511 Week 31 (first week of practical) Propositional Logic

2 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: p  q. Connectives: { ,  }. b.Formula: p  q. Connectives: { , ,  }. c.Formula: p  q. Connectives: { ,  }. d.Formula: (p  q)  ((  p)  q). Conn: { ,  }. e.Formula:  p. Conn: { | } (the Sheffer stroke).

3 Answer to Exercise 1. (Other answers possible) a. Formula p  q. Connectives: { ,  }. Answer:  p  q b.Formula: p  q. Connectives: { , ,  }. Answer: (p   q)  (q   p) c. Formula: p  q. Connectives: { ,  }. Answer: (p  q)  (q  p) d. Formula: (p  q)  ((  p)  q). Conn: { ,  }. Answer: q (This was a trick question, since you don’t need any connectives.) e. Formula:  p. Conn: { | } (the Sheffer stroke). Answer: p|p

4 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).

5 Answer to Ex.2 1.p  (q  p) Tautologous 2.p  (  p  p) Tautologous 3.(q  p)  (p  q) Contingent 4.(q  p)  (p  q) Tautologous 5.(p  (q  r))  (q  (p  r)) Tautologous 1,2,4,5 are known as “ ’paradoxes’ of implication”, because they contrast with implication in ordinary language.

6 Ex. 3a. 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 p  q.

7 Answer to Ex. 3a. Steps: 1.Construct the truth table of p  q. 2. Mark those two rows in the table that make p  q TRUE. 3.Corresponding with these two rows, construct a disjunction of two formulas, one of which is (p  q), and the other (q  p). 4.Use the De Morgan Laws to convert this disjunction (p  q)  (q  p) into the quivalent formula  (  (p  q)  (q  p)) [5. Use truth tables again to check that these two formulas are indeed equivalent.]

8 Ex. 3b. Reading formulas off truth tables As Ex. 3, but with a difference: Task: Use this meticulous method to construct a formula equivalent to p|q. Question : Does this meticulous method always produce the shortest answer (i.e. the shortest formula that is logically equivalent to the original while still only using negation and conjunction)?

9 Answer to 3b For p|q, we start with the disjunction (p  q)  (q  p)  (  p  q) After getting rid of the disjunctions, this is much lengthier than the logically equivalent formula  (p  q). (Lesson: the procedure in the proof does not always get you the shortest answer.)


Download ppt "Exercises for CS3511 Week 31 (first week of practical) Propositional Logic."

Similar presentations


Ads by Google