Discrete Mathematics and Its Applications Lecture 1: The Foundations: Logic and Proofs (1.3-1.5) MING GAO DASE @ ECNU (for course related communications) mgao@dase.ecnu.edu.cn Sep. 9, 2019
Outline Logical Equivalences 1 Propositional Satisfiability 2 Predicates 3 Quantifiers 4 Applications of Quantifiers 5 Nested Quantifiers 6 Take-aways 7 MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Sep. 9, 2019 2 / 28
Logical Equivalences Motivation Example There are two kinds of inhabitants in an island, knights, who always tell the truth, knaves, who always lie. You encounter two people A and B . What are A and B if A says “ B is a knight” and B says “The two of us are opposite types”?
Logical Equivalences Motivation Example There are two kinds of inhabitants in an island, knights, who always tell the truth, knaves, who always lie. You encounter two people A and B . What are A and B if A says “ B is a knight” and B says “The two of us are opposite types”? Solution: p : “A is a knight;” q : “B is a knight;”
Logical Equivalences Motivation Example There are two kinds of inhabitants in an island, knights, who always tell the truth, knaves, who always lie. You encounter two people A and B . What are A and B if A says “ B is a knight” and B says “The two of us are opposite types”? Solution: p : “A is a knight;” q : “B is a knight;” If A is a knight, we have p ∧ q ∧ (( ¬ p ∧ q ) ∨ ( p ∧ ¬ q )).
Logical Equivalences Motivation Example There are two kinds of inhabitants in an island, knights, who always tell the truth, knaves, who always lie. You encounter two people A and B . What are A and B if A says “ B is a knight” and B says “The two of us are opposite types”? Solution: p : “A is a knight;” q : “B is a knight;” If A is a knight, we have p ∧ q ∧ (( ¬ p ∧ q ) ∨ ( p ∧ ¬ q )). If A is a knave, we have ¬ p ∧ ¬ q ∧ (( p ∧ q ) ∨ ( ¬ p ∧ ¬ q )).
Logical Equivalences Motivation Example There are two kinds of inhabitants in an island, knights, who always tell the truth, knaves, who always lie. You encounter two people A and B . What are A and B if A says “ B is a knight” and B says “The two of us are opposite types”? Solution: p : “A is a knight;” q : “B is a knight;” If A is a knight, we have p ∧ q ∧ (( ¬ p ∧ q ) ∨ ( p ∧ ¬ q )). If A is a knave, we have ¬ p ∧ ¬ q ∧ (( p ∧ q ) ∨ ( ¬ p ∧ ¬ q )). The problem is how to determine the truth value of the propositions. MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Sep. 9, 2019 3 / 28
Logical Equivalences Logical equivalences Definition Compound propositions that have the same truth values in all possible cases are called logically equivalent. MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Sep. 9, 2019 4 / 28
Logical Equivalences Logical equivalences Definition Compound propositions that have the same truth values in all possible cases are called logically equivalent. Compound propositions p and q are called logically equivalent if p ↔ q is a tautology, denoted as p ≡ q or p ⇔ q . MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Sep. 9, 2019 4 / 28
Logical Equivalences Logical equivalences Definition Compound propositions that have the same truth values in all possible cases are called logically equivalent. Compound propositions p and q are called logically equivalent if p ↔ q is a tautology, denoted as p ≡ q or p ⇔ q . Remark: Symbol ≡ is not a logical connectives, and p ≡ q is not a proposition. MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Sep. 9, 2019 4 / 28
Logical Equivalences Logical equivalences Definition Compound propositions that have the same truth values in all possible cases are called logically equivalent. Compound propositions p and q are called logically equivalent if p ↔ q is a tautology, denoted as p ≡ q or p ⇔ q . Remark: Symbol ≡ is not a logical connectives, and p ≡ q is not a proposition. One way to determine whether two compound propositions are equivalent is to use a truth table. MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Sep. 9, 2019 4 / 28
Logical Equivalences De Morgan’s laws Laws ¬ ( p ∧ q ) ≡ ¬ p ∨ ¬ q ¬ ( p ∨ q ) ≡ ¬ p ∧ ¬ q
Logical Equivalences De Morgan’s laws Laws ¬ ( p ∧ q ) ≡ ¬ p ∨ ¬ q ¬ ( p ∨ q ) ≡ ¬ p ∧ ¬ q ¬ ( p 1 ∧ p 2 ∧ · · · ∧ p n ) ≡ ¬ p 1 ∨ ¬ p 2 ∨ ¬ · · · ∨ ¬ p n , i.e., ¬ � n i =1 p i ≡ � n i =1 ¬ p i . ¬ ( p 1 ∨ p 2 ∨ · · · ∨ p n ) ≡ ¬ p 1 ∧ ¬ p 2 ∧ ¬ · · · ∧ ¬ p n , i.e., ¬ � n i =1 p i ≡ � n i =1 ¬ p i .
Logical Equivalences De Morgan’s laws Laws ¬ ( p ∧ q ) ≡ ¬ p ∨ ¬ q ¬ ( p ∨ q ) ≡ ¬ p ∧ ¬ q ¬ ( p 1 ∧ p 2 ∧ · · · ∧ p n ) ≡ ¬ p 1 ∨ ¬ p 2 ∨ ¬ · · · ∨ ¬ p n , i.e., ¬ � n i =1 p i ≡ � n i =1 ¬ p i . ¬ ( p 1 ∨ p 2 ∨ · · · ∨ p n ) ≡ ¬ p 1 ∧ ¬ p 2 ∧ ¬ · · · ∧ ¬ p n , i.e., ¬ � n i =1 p i ≡ � n i =1 ¬ p i . The truth table can be used to determine whether two compound propositions are equivalent. p q p ∧ q ¬ ( p ∧ q ) ¬ p ¬ q ¬ p ∨ ¬ q T T T F F F F T F F T F T T F T F T T F T F F F T T T T MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Sep. 9, 2019 5 / 28
Logical Equivalences Logical equivalence Table of logical equivalence equivalence name p ∧ T ≡ p Identity laws p ∨ F ≡ p p ∧ p ≡ p Idempotent laws p ∨ p ≡ p ( p ∧ q ) ∧ r ≡ p ∧ ( q ∧ r ) Associative laws ( p ∨ q ) ∨ r ≡ p ∨ ( q ∨ r ) p ∨ ( p ∧ q ) ≡ p Absorption laws p ∧ ( p ∨ q ) ≡ p p ∧ ¬ p ≡ F Negation laws p ∨ ¬ p ≡ T MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Sep. 9, 2019 6 / 28
Logical Equivalences Logical equivalence Cont’d Table of logical equivalence equivalence name p ∨ T ≡ T Domination laws p ∧ F ≡ F p ∧ q ≡ q ∧ p Commutative laws p ∨ q ≡ q ∨ p ( p ∧ q ) ∨ r ≡ ( p ∨ r ) ∧ ( q ∨ r ) Distributive laws ( p ∨ q ) ∧ r ≡ ( p ∧ r ) ∨ ( q ∧ r ) ¬ ( p ∧ q ) ≡ ¬ p ∨ ¬ q De Morgan’s laws ¬ ( p ∨ q ) ≡ ¬ p ∧ ¬ q ¬ ( ¬ p ) ≡ p Double negation law MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Sep. 9, 2019 7 / 28
Logical Equivalences Equivalence of implication Equivalence law p → q ≡ ¬ p ∨ q
Logical Equivalences Equivalence of implication Equivalence law p → q ≡ ¬ p ∨ q The truth table can be used to determine whether two compound propositions are equivalent. p → q ¬ p ¬ p ∨ q p q T T T F T T F F F F F T T T T F F T T T MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Sep. 9, 2019 8 / 28
Logical Equivalences Logical equivalences involving conditional statements Table of logical equivalences involving conditional statements p → q ≡ ¬ p ∨ q
Logical Equivalences Logical equivalences involving conditional statements Table of logical equivalences involving conditional statements p → q ≡ ¬ p ∨ q p → q ≡ ¬ q → ¬ p
Logical Equivalences Logical equivalences involving conditional statements Table of logical equivalences involving conditional statements p → q ≡ ¬ p ∨ q p → q ≡ ¬ q → ¬ p p ∨ q ≡ ¬ p → q
Logical Equivalences Logical equivalences involving conditional statements Table of logical equivalences involving conditional statements p → q ≡ ¬ p ∨ q p → q ≡ ¬ q → ¬ p p ∨ q ≡ ¬ p → q p ∧ q ≡ ¬ ( p → ¬ q )
Logical Equivalences Logical equivalences involving conditional statements Table of logical equivalences involving conditional statements p → q ≡ ¬ p ∨ q p → q ≡ ¬ q → ¬ p p ∨ q ≡ ¬ p → q p ∧ q ≡ ¬ ( p → ¬ q ) ¬ ( p → q ) ≡ p ∧ ¬ q
Logical Equivalences Logical equivalences involving conditional statements Table of logical equivalences involving conditional statements p → q ≡ ¬ p ∨ q p → q ≡ ¬ q → ¬ p p ∨ q ≡ ¬ p → q p ∧ q ≡ ¬ ( p → ¬ q ) ¬ ( p → q ) ≡ p ∧ ¬ q ( p → q ) ∧ ( p → r ) ≡ p → ( q ∧ r )
Logical Equivalences Logical equivalences involving conditional statements Table of logical equivalences involving conditional statements p → q ≡ ¬ p ∨ q p → q ≡ ¬ q → ¬ p p ∨ q ≡ ¬ p → q p ∧ q ≡ ¬ ( p → ¬ q ) ¬ ( p → q ) ≡ p ∧ ¬ q ( p → q ) ∧ ( p → r ) ≡ p → ( q ∧ r ) ( p → q ) ∨ ( p → r ) ≡ p → ( q ∨ r )
Logical Equivalences Logical equivalences involving conditional statements Table of logical equivalences involving conditional statements p → q ≡ ¬ p ∨ q p → q ≡ ¬ q → ¬ p p ∨ q ≡ ¬ p → q p ∧ q ≡ ¬ ( p → ¬ q ) ¬ ( p → q ) ≡ p ∧ ¬ q ( p → q ) ∧ ( p → r ) ≡ p → ( q ∧ r ) ( p → q ) ∨ ( p → r ) ≡ p → ( q ∨ r ) ( p → r ) ∧ ( q → r ) ≡ ( p ∨ q ) → r
Recommend
More recommend