90 likes | 198 Views
Exercises for CS3511 Week 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`) Formula: p q. Connectives: {,}.
E N D
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`) • Formula: pq. Connectives: {,}. • Formula: pq. Connectives: {,,}. • Formula: pq. Connectives: {, }. • Formula: (pq) ((p)q). Conn: {,}. • Formula: p. Conn: { | } (the Sheffer stroke).
Answer to Exercise 1. (Other answers possible) a. Formulapq. Connectives: {,}. Answer: pq • 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? • p (q p) • p (p p) • (q p) (p q) • (q p) (p q) • (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 • p (q p) Tautologous • p (p p) Tautologous • (q p) (p q) Contingent • (q p) (p q) Tautologous • (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: • Construct the truth table of pq. 2. Mark those two rows in the table that make pq TRUE. • Corresponding with these two rows, construct a disjunction of two formulas, one of which is (pq), and the other (qp). • 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.)