Download presentation

0
**ICS 253: Discrete Structures I Propositional Logic Logical Equivalence**

Spring Semester 2014 (2013-2) Propositional Logic Logical Equivalence Dr. Nasir Al-Darwish Computer Science Department King Fahd University of Petroleum and Minerals

1
**Tautologies, contradictions, contingencies**

A compound proposition is a tautology if it is always true no matter what truth values its atomic propositions have. Example: p ¬p The opposite to a tautology, is a compound proposition that’s always false – a contradiction. Example: p ¬p On the other hand, a compound proposition whose truth value isn’t constant is called a contingency. Example: p ¬p

2
**Tautologies and contradictions**

The easiest way to see if a compound proposition is a tautology or a contradiction is to use a truth table.

3
**Tautology Example Demonstrate that [¬p (p q)]q**

is a tautology in two ways: Using a truth table – show that [¬p (p q)]q is always true Using a proof (will get to this later). Note: The LHS asserts (states) two facts: ¬p and (p q) Clearly, these assertions taken together imply q.

4
**Tautology Example - Part 1: by truth table**

q ¬p p q ¬p (p q) [¬p (p q)]q F T

5
**Tautologies, contradictions and programming**

Tautologies and contradictions in your code usually correspond to poor programming design. Examples: while(x <= 3 || x > 3) x++; if(x > y) if(x == y) return “never got here”;

6
Logical Equivalence Definition: Two compound propositions p, q are logically equivalent if their truth tables are the same. Alternative Definition: Two compound propositions p, q are logically equivalent if their biconditional joining p q is a tautology. Logical equivalence is denoted by p q or p q. Example: A logical implication is equivalent to its contrapositive. That is, p q ¬q ¬p.

7
**Logical Equivalence - Example 1**

The easiest way to test for logical equivalence is to check if the truth tables of both propositions have identical last columns Example: Is p q ¬q ¬p? T F p q q p T F ¬q¬p p ¬p q ¬q Note that because the last columns are identical, it follows that (p q) (¬q¬p) is a tautology, which is consistent with the second def. of equivalence in previous slide.

8
**Logical Equivalence - Example 2**

Show that ┐(p v q) and ┐p ˄ ┐ q are equivalent

9
**Logical Non-Equivalence of Conditional and Converse**

The converse of a logical implication is the reversal of the implication. I.e. the converse of p q is q p. Example: The converse of “If Donald is a duck then Donald is a bird.” is “If Donald is a bird then Donald is a duck.” As we’ll see next: p q and q p are not logically equivalent.

10
**Logical Non-Equivalence of Conditional and Converse**

p q p q q p (p q) (q p) T F Note that because the columns for p q and qp are not identical, we can immediately conclude that these propositions are not equivalent.

11
**Derivational Proof Techniques**

When a compound proposition involves many atomic components, the size of the truth table for the compound proposition becomes large Q1: How many rows are required to construct the truth-table of: ((q(pr )) ((sr)t) ) (qr) ? Q2: How many rows are required to construct the truth-table of a proposition involving n atomic components? A1: 32 rows, each additional variable doubles the number of rows A2: In general, 2n rows Therefore, as compound propositions grow in complexity, truth tables become more and more unwieldy. In such cases, it is better to use derivational proof techniques

12
**Derivational Proof Techniques**

Example: consider the compound proposition (p p ) ((sr)t) ) (qr ) Q: Why is this a tautology?

13
**Derivational Proof Techniques**

Answer: The part (p p) is a tautology and the disjunction (or) of True with any other compound proposition always results in True: (p p ) ((sr)t )) (qr ) T ((sr)t )) (qr ) T Derivational techniques formalize the intuition of this example.

14
**Tables of Logical Equivalences**

Identity laws Like adding 0 Domination laws Like multiplying by 0 Idempotent laws Delete redundancies Double negation “I don’t like you, not” Commutativity Like “x+y = y+x” Associativity Like “(x+y)+z = y+(x+z)” Distributivity Like “(x+y)z = xz+yz”

15
**Tables of Logical Equivalences**

Excluded middle Negating creates opposite Definition of implication in terms of Not and Or

16
DeMorgan Identities DeMorgan’s identities allow for simplification of negations of complex expressions Conjunctional negation: (p1p2…pn) (p1p2…pn) “It’s not the case that all are true iff one is false.” Disjunctional negation: (p1p2…pn) (p1p2…pn) “It’s not the case that one is true iff all are false.”

17
**Tautology Example - Part 2**

Demonstrate that [¬p (p q )]q is a tautology in two ways: Using a truth table (was done previously) Using a proof relying on Tables 5 and 6 of Rosen, section 1.3 to derive True through a series of logical equivalences

18
**Tautology by proof [¬p (p q )]q [(¬p p)(¬p q)]q Distributive**

[ F (¬p q)]q ULE [¬p q ]q Identity ¬ [¬p q ] q ULE [¬(¬p) ¬q ] q DeMorgan [p ¬q ] q Double Negation p [¬q q ] Associative p [q ¬q ] Commutative p T ULE T Domination

19
**Important Equivalences**

p q (p q) // meaning of p q p q // simplify RHS of 1 p q q p // contrapositive (p q) p q // negation of 1 (p q) (p r) p (q r) (p q) (p r) p (q r) (p r) (q r) (p q) r (p r) (q r) (p q) r p q (p q) (q p) (p q) p q

Similar presentations

© 2021 SlidePlayer.com Inc.

All rights reserved.

To make this website work, we log user data and share it with processors. To use this website, you must agree to our Privacy Policy, including cookie policy.

Ads by Google