Exercises for CS3511 Week 31 (first week of practical)
-
Upload
ciaran-wolf -
Category
Documents
-
view
26 -
download
0
description
Transcript of Exercises for CS3511 Week 31 (first week of practical)
Exercises for CS3511Week 31 (first week of practical)
Propositional Logic
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: {,}.e. Formula: p. Conn: { | } (the Sheffer stroke).
Answer to Exercise 1. (Other answers possible)
a. Formula pq. Connectives: {,}.Answer: pqb. Formula: pq. Connectives: {,,}.Answer: (p q)(q p)c. Formula: pq. Connectives: {, }.Answer: (pq)(q p)d. Formula: (pq) ((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
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).
Answer to Ex.2
1. p (q p) Tautologous2. p (p p) Tautologous3. (q p) (p q) Contingent4. (q p) (p q) Tautologous5. (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.
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 pq.
Answer to Ex. 3a. Steps:
1. Construct the truth table of pq.
2. Mark those two rows in the table that make pq TRUE.
3. Corresponding with these two rows, construct a disjunction of two formulas, one of which is (pq), and the other (qp).
4. Use the De Morgan Laws to convert this disjunction (pq)(qp) into the quivalent formula ((pq) (qp))
[5. Use truth tables again to check that these two formulas are indeed equivalent.]
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)?
Answer to 3b
• For p|q, we start with the disjunction (pq) (qp) (pq) After getting rid of the disjunctions, this is much lengthier than the logically equivalent formula (pq).
(Lesson: the procedure in the proof does not always get you the shortest answer.)