Discussion #10 1/16 Discussion #10 Logical Equivalences.

Slides:



Advertisements
Similar presentations
Propositional Equivalences
Advertisements

TRUTH TABLES Section 1.3.
TRUTH TABLES The general truth tables for each of the connectives tell you the value of any possible statement for each of the connectives. Negation.
Logic & Critical Reasoning
Propositional Equivalences
CSE 311: Foundations of Computing Fall 2013 Lecture 3: Logic and Boolean algebra.
Disjunctive Normal Form CS 680: Formal Methods Jeremy Johnson.
Propositional Equivalences. L32 Agenda Tautologies Logical Equivalences.
Discussion #18 1/13 Discussion #18 Resolution with Propositional Calculus; Prenex Normal Form.
Copyright 2013, 2010, 2007, Pearson, Education, Inc. Section 3.2 Truth Tables for Negation, Conjunction, and Disjunction.
Laws of , , and  Excluded middle law Contradiction law P   P  T P   P  F NameLaw Identity laws P  F  P P  T  P Domination laws P  T  T P.
Discussion #12 1/22 Discussion #12 Deduction, Proofs and Proof Techniques.
1 Section 1.2 Propositional Equivalences. 2 Equivalent Propositions Have the same truth table Can be used interchangeably For example, exclusive or and.
1 Math 306 Foundations of Mathematics I Math 306 Foundations of Mathematics I Goals of this class Introduction to important mathematical concepts Development.
EE1J2 – Discrete Maths Lecture 5
CSE 311 Foundations of Computing I Autumn 2011 Lecture 2 More Propositional Logic Application: Circuits Propositional Equivalence.
Propositional Logic 7/16/ Propositional Logic A proposition is a statement that is either true or false. We give propositions names such as p, q,
Truth Tables for Negation, Conjunction, and Disjunction.
3.2 – Truth Tables and Equivalent Statements
Copyright 2013, 2010, 2007, Pearson, Education, Inc. Section 3.2 Truth Tables for Negation, Conjunction, and Disjunction.
Normal or Canonical Forms Rosen 1.2 (exercises). Logical Operators  - Disjunction  - Conjunction  - Negation  - Implication p  q   p  q  - Exclusive.
Chapter 1 Section 1.4 More on Conditionals. There are three statements that are related to a conditional statement. They are called the converse, inverse.
The Foundations: Logic and Proofs
Course Outline Book: Discrete Mathematics by K. P. Bogart Topics:
Discrete Maths 2. Propositional Logic Objective
Normal Forms, Tautology and Satisfiability 2/3/121.
CS1502 Formal Methods in Computer Science
Propositional Equivalences
CSNB143 – Discrete Structure LOGIC. Learning Outcomes Student should be able to know what is it means by statement. Students should be able to identify.
Chapter 8 – Symbolic Logic Professor D’Ascoli. Symbolic Logic Because the appraisal of arguments is made difficult by the peculiarities of natural language,
Propositional Logic. Propositions Any statement that is either True (T) or False (F) is a proposition Propositional variables: a variable that can assume.
Lecture 9 Conditional Statements CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
How do I show that two compound propositions are logically equivalent?
Chapter 7 Logic, Sets, and Counting Section 1 Logic.
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;
Discrete Mathematics CS 2610 September Equal Boolean Functions Two Boolean functions F and G of degree n are equal iff for all (x 1,..x n )  B.
Logical Form and Logical Equivalence M Logical Form Example 1 If the syntax is faulty or execution results in division by zero, then the program.
CS203 Discrete Mathematical Structures
The Foundations: Logic and Proof, Sets, and Foundations PROPOSITIONS A proposition is a declarative sentence that is either True or False, but not the.
CSNB143 – Discrete Structure Topic 4 – Logic. Learning Outcomes Students should be able to define statement. Students should be able to identify connectives.
Boolean Logic.
Simplifying Boolean Expressions. Boolean Operators (T/F) xyx AND y FFF FTF TFF TTT xyx OR y FFF FTT TFT TTT xyx XOR y FFF FTT TFT TTF xNOT x FT TF.
TRUTH TABLES. Introduction The truth value of a statement is the classification as true or false which denoted by T or F. A truth table is a listing of.
Propositional Equivalence A needed step towards proofs Copyright © 2014 Curt Hill.
Joan Ridgway. If a proposition is not indeterminate then it is either true (T) or false (F). True and False are complementary events. For two propositions,
Symbolic Logic The Following slide were written using materials from the Book: The Following slide were written using materials from the Book: Discrete.
1 Section 6.2 Propositional Calculus Propositional calculus is the language of propositions (statements that are true or false). We represent propositions.
Outline Logic Propositional Logic Well formed formula Truth table
رياضيات متقطعة لعلوم الحاسب MATH 226. Text books: (Discrete Mathematics and its applications) Kenneth H. Rosen, seventh Edition, 2012, McGraw- Hill.
Mathematics for Computing Lecture 2: Computer Logic and Truth Tables Dr Andrew Purkiss-Trew Cancer Research UK
TRUTH TABLES Edited from the original by: Mimi Opkins CECS 100 Fall 2011 Thanks for the ppt.
Spring 2003CMSC Discrete Structures1 Let’s get started with... Logic !
The Logic of Boolean Connectives Chapter 4 Language, Proof and Logic.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
Reasoning and Proof Chapter Use Inductive Reasoning Conjecture- an unproven statement based on an observation Inductive reasoning- finding a pattern.
Logic and Truth Tables Winter 2012 COMP 1380 Discrete Structures I Computing Science Thompson Rivers University.
Propositional Logic.
Chapter 1 Logic and proofs
2. The Logic of Compound Statements Summary
The Foundations: Logic and Proofs
Discussion #10 Logical Equivalences
Elementary Metamathematics
Discrete Mathematics CS 2610
Propositional Equivalences
Information Technology Department
Propositional Equivalence (§1.2)
Propositional Equivalences
Lecture 2: Propositional Equivalences
Presentation transcript:

Discussion #10 1/16 Discussion #10 Logical Equivalences

Discussion #10 2/16 Topics Laws Duals Manipulations / simplifications Normal forms –Definitions –Algebraic manipulation –Converting truth functions to logic expressions

Discussion #10 3/16 Laws of , , and  Excluded middle law Contradiction law P   P  T P   P  F NameLaw Identity laws P  F  P P  T  P Domination laws P  T  T P  F  F Idempotent laws P  P  P P  P  P Double-negation law  (  P)  P

Discussion #10 4/16 Commutative laws P  Q  Q  P P  Q  Q  P NameLaw Associative laws (P  Q)  R  P  (Q  R) (P  Q)  R  P  (Q  R) Distributive laws (P  Q)  (P  R)  P  (Q  R) (P  Q)  (P  R)  P  (Q  R) De Morgan’s laws  (P  Q)   P   Q  (P  Q)   P   Q Absorption laws P  (P  Q)  P P  (P  Q)  P

Discussion #10 5/16 Can prove all laws by truth tables… T F T F T T T F T T F F T T T T F F F T T T T F FF TF FT TT QQ PP  (P  Q)  QP De Morgan’s law holds.

Discussion #10 6/16 Absorption Laws Prove algebraically … P  (P  Q)  (P  T)  (P  Q)identity  P  (T  Q)distributive (factor)  P  Tdomination  Pidentity P  (P  Q)  P P  (P  Q)  P Venn diagram proof … P Q

Discussion #10 7/16 Duals To create the dual of a logical expression 1) swap propositional constants T and F, and 2) swap connective operators  and . P   P  TExcluded Middle   P   P  FContradiction The dual of a law is always a law! Thus, most laws come in pairs  pairs of duals.

Discussion #10 8/16 Why Duals of Laws are Always Laws Start with law P   P  T Negate both sides  (P   P)   T Apply De Morgan’s law  P   P   T Simplify negations  P  P  F Since a law is a tautology,  (  P )  (  P )  F substitute  X for X Simplify negations P   P  F We can always do the following:

Discussion #10 9/16 Normal Forms Normal forms are standard forms, sometimes called canonical or accepted forms. A logical expression is said to be in disjunctive normal form (DNF) if it is written as a disjunction, in which all terms are conjunctions of literals. Similarly, a logical expression is said to be in conjunctive normal form (CNF) if it is written as a conjunction of disjunctions of literals.

Discussion #10 10/16 Disjunctive Normal Form (DNF) (.. .. .. )  (.. .. .. )  …  (.. .. ) Term Literal, i.e. P or  P Conjunctive Normal Form (CNF) (.. .. .. )  (.. .. .. )  …  (.. .. ) Examples:(P  Q)  (P   Q) P  (Q  R) DNF and CNF Examples:(P  Q)  (P   Q) P  (Q  R)

Discussion #10 11/16 Converting Expressions to DNF or CNF The following procedure converts an expression to DNF or CNF: 1.Remove all  and . 2.Move  inside. (Use De Morgan’s law.) 3.Use distributive laws to get proper form. Simplify as you go. (e.g. double-neg., idemp., comm., assoc.)

Discussion #10 12/16 CNF Conversion Example (.. .. .. )  (.. .. .. )  …  (.. .. )  ((  P  Q)  R  (P  Q))   ((  P  Q)  R  (  P  Q)) impl.   (  P  Q)   R   (  P  Q) deM.  (  P   Q)   R  (  P   Q) deM.  (P   Q)   R  (P   Q) double neg.  ((P   R)  (  Q   R))  (P   Q) distr.  ((P   R)  (P   Q))  distr. ((  Q   R)  (P   Q))  (((P   R)  P)  ((P   R)   Q))  distr. (((  Q   R)  P)  ((  Q   R)   Q))  (P   R)  (P   R   Q)  (  Q   R) assoc. comm. idemp. (DNF)

Discussion #10 13/16 CNF Conversion Example (.. .. .. )  (.. .. .. )  …  (.. .. )  ((  P  Q)  R  (P  Q))   ((  P  Q)  R  (  P  Q)) impl.   (  P  Q)   R   (  P  Q) deM.  (  P   Q)   R  (  P   Q) deM.  (P   Q)   R  (P   Q) double neg.  ((P   R)  (  Q   R))  (P   Q) distr.  ((P   R)  (P   Q))  distr. ((  Q   R)  (P   Q))  (((P   R)  P)  ((P   R)   Q))  distr. (((  Q   R)  P)  ((  Q   R)   Q))  (P   R)  (P   R   Q)  (  Q   R) assoc. comm. idemp. (DNF) CNF Using the commutative and idempotent laws on the previous step and then the distributive law, we obtain this formula as the conjunctive normal form.

Discussion #10 14/16 CNF Conversion Example (.. .. .. )  (.. .. .. )  …  (.. .. )  ((  P  Q)  R  (P  Q))   ((  P  Q)  R  (  P  Q)) impl.   (  P  Q)   R   (  P  Q) deM.  (  P   Q)   R  (  P   Q) deM.  (P   Q)   R  (P   Q) double neg.  ((P   R)  (  Q   R))  (P   Q) distr.  ((P   R)  (P   Q))  distr. ((  Q   R)  (P   Q))  (((P   R)  P)  ((P   R)   Q))  distr. (((  Q   R)  P)  ((  Q   R)   Q))  (P   R)  (P   R   Q)  (  Q   R) assoc. comm. idemp. (DNF) (P   R)  (P   R   Q)  (  Q   R)  (P   R)  (P   R   Q)  (F   Q   R) - ident.  (P   R)  ((P  F)  (  Q   R)) - comm., distr.  (P   R)  (F  (  Q   R)) - dominat.  (P   R)  (  Q   R) - ident.

Discussion #10 15/16 DNF Expression Generation F T F F F T T F FFF TFF FTF TTF FFT TFT FTT TTT  RQP (P  Q   R) (P   Q  R) (  P   Q  R)   (P  Q   R)  (P   Q  R)  (  P   Q  R) minterms The only definition of  is the truth table

Discussion #10 16/16 CNF Expression Generation 1.Find . 2.Find the DNF of . 3.Then, use De Morgan’s law to get the CNF of  (i.e.  (  )   ) T F T F  FFF TTF FFT TTT  QP (P   Q) (  P  Q) (  P   Q) (P  Q)   (P   Q)  (  P   Q) DNF of    f   ((P   Q)  (  P   Q))   (P   Q)   (  P   Q) De Morgan’s  (  P  Q)  (P  Q) De Morgan’s, double neg. max terms } Form a conjunction of max terms