Tautologies, contradictions, contingencies

Slides:



Advertisements
Similar presentations
Propositional Equivalences
Advertisements

Propositional Equivalences
Grading Lecture attendance: -1% per 2 unexcused absences
Propositional Equivalences. L32 Agenda Tautologies Logical Equivalences.
CS128 – Discrete Mathematics for Computer Science
1 Section 1.2 Propositional Equivalences. 2 Equivalent Propositions Have the same truth table Can be used interchangeably For example, exclusive or and.
1 Inference Rules and Proofs Z: Inference Rules and Proofs.
First Order Logic. Propositional Logic A proposition is a declarative sentence (a sentence that declares a fact) that is either true or false, but not.
Chapter 2: The Logic of Compound Statements 2.1 Logical Forms and Equivalence 12.1 Logical Forms and Equivalences Logic is a science of the necessary laws.
Propositions and Truth Tables
Propositions and Truth Tables. Proposition: Makes a claim that may be either true or false; it must have the structure of a complete sentence.
Discrete Maths 2. Propositional Logic Objective
MATERI II PROPOSISI. 2 Tautology and Contradiction Definition A tautology is a statement form that is always true. A statement whose form is a tautology.
Discrete Mathematics CS 285. Lecture 12 Section 1.1: Logic Axiomatic concepts in math: Equals Opposite Truth and falsehood Statement Objects Collections.
Mathematical Structures A collection of objects with operations defined on them and the accompanying properties form a mathematical structure or system.
Copyright © Curt Hill Truth Tables A way to show Boolean Operations.
Chapter 3 Section 3 - Slide 1 Copyright © 2009 Pearson Education, Inc. AND.
Discrete Mathematics. Propositional Logic 10/8/2015 What’s a proposition? PropositionsNot Propositions = 32Bring me coffee! CS173 is Bryan’s favorite.
Review I Rosen , 3.1 Know your definitions!
Propositional Equivalences
Lecture 1.2: Equivalences, and Predicate Logic* CS 250, Discrete Structures, Fall 2011 Nitesh Saxena *Adopted from previous lectures by Cinda Heeren, Zeph.
1 CMSC 250 Discrete Structures CMSC 250 Lecture 1.
Reading: Chapter 4 (44-59) from the text book
CS 381 DISCRETE STRUCTURES Gongjun Yan Aug 25, November 2015Introduction & Propositional Logic 1.
September1999 CMSC 203 / 0201 Fall 2002 Week #1 – 28/30 August 2002 Prof. Marie desJardins.
Lecture 9 Conditional Statements CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Section 1.2: Propositional Equivalences In the process of reasoning, we often replace a known statement with an equivalent statement that more closely.
Propositional Logic ITCS 2175 (Rosen Section 1.1, 1.2)
Extra slides for Chapter 3: Propositional Calculus & Normal Forms Based on Prof. Lila Kari’s slides For CS2209A, 2009 By Dr. Charles Ling;
CS203 Discrete Mathematical Structures
Chapter 1: The Foundations: Logic and Proofs
Chapter 1: The Foundations: Logic and Proofs
Conditional Statements – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Conditional Statements Reading: Kolman, Section 2.2.
The Foundations: Logic and Proof, Sets, and Foundations PROPOSITIONS A proposition is a declarative sentence that is either True or False, but not the.
Propositional Equivalence A needed step towards proofs Copyright © 2014 Curt Hill.
Lecture 1.2: Equivalences, and Predicate Logic CS 250, Discrete Structures, Fall 2015 Nitesh Saxena Adopted from previous lectures by Cinda Heeren, Zeph.
Symbolic Logic The Following slide were written using materials from the Book: The Following slide were written using materials from the Book: Discrete.
LECTURE 1. Disrete mathematics and its application by rosen 7 th edition THE FOUNDATIONS: LOGIC AND PROOFS 1.1 PROPOSITIONAL LOGIC.
1 Section 6.2 Propositional Calculus Propositional calculus is the language of propositions (statements that are true or false). We represent propositions.
Mathematics for Comter I Lecture 3: Logic (2) Propositional Equivalences Predicates and Quantifiers.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 01: Boolean Logic Sections 1.1 and 1.2 Jarek Rossignac.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
Module Code MA0003NI: Computing mathematics Lecture for Week Autumn.
Chapter 1 Propositional Logic
2. The Logic of Compound Statements Summary
Lecture 1.2: Equivalences, and Predicate Logic
The Foundations: Logic and Proofs
Citra Noviyasari, S.Si, MT
MATH 245 Spring 2009 This is mathematics for computer science
Classwork/Homework Classwork – Page 90 (11 – 49 odd)
COT 3100, Spr Applications of Discrete Structures
(CSC 102) Discrete Structures Lecture 2.
Mathematics for Computing
1.2 Propositional Equivalences
Propositional Equivalences
Information Technology Department
Propositional Equivalence (§1.2)
CS 220: Discrete Structures and their Applications
CSE 311 Foundations of Computing I
Propositional Equivalences
CSE 311 Foundations of Computing I
Discrete Mathematics and Its Applications Kenneth H
Lecture 2: Propositional Equivalences
Discrete Mathematics CMP-200 Propositional Equivalences, Predicates & Quantifiers, Negating Quantified Statements Abdul Hameed
Symbolic Logic 2/25/2019 rd.
1.2 Propositional Equivalences
Statements of Symbolic Logic
Foundations of Discrete Mathematics
Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements.
Discrete Structures Prepositional Logic 2
Presentation transcript:

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 darwish@kfupm.edu.sa

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

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

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.

Tautology Example - Part 1: by truth table q ¬p p q ¬p  (p q) [¬p  (p q)]q F T

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”;

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.

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.

Logical Equivalence - Example 2 Show that ┐(p v q) and ┐p ˄ ┐ q are equivalent

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.

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 qp are not identical, we can immediately conclude that these propositions are not equivalent.

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(pr ))  ((sr)t) )  (qr) ? 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

Derivational Proof Techniques Example: consider the compound proposition (p p )  ((sr)t) )  (qr ) Q: Why is this a tautology?

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 )  ((sr)t ))  (qr ) T  ((sr)t ))  (qr ) T Derivational techniques formalize the intuition of this example.

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”

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

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

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

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

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