10 13 15
play

10/13/15 Nega%on Truth Table A A Propositional Logic and - PDF document

10/13/15 Nega%on Truth Table A A Propositional Logic and Truth Tables 0 1 (Rosen, Sections 1.1, 1.2, 1.3) 1 0 TOPICS Propositional Logic Logical Operations Logical Equivalences CS160 - Fall Semester 2015 Truth


  1. 10/13/15 Nega%on ¡Truth ¡Table ¡ A ¬ A Propositional Logic and Truth Tables 0 1 (Rosen, Sections 1.1, 1.2, 1.3) 1 0 TOPICS • Propositional Logic • Logical Operations • Logical Equivalences CS160 - Fall Semester 2015 Truth ¡Table ¡for ¡Conjunc%on ¡ Truth ¡Table ¡for ¡Disjunc%on ¡ A B A ∧ B A B A ∨ B 0 0 0 0 0 0 0 1 0 0 1 1 1 0 0 1 0 1 1 1 1 1 1 1 CS160 - Fall Semester 2015 CS160 - Fall Semester 2015 1

  2. 10/13/15 Condi%onal ¡& ¡Bicondi%onal ¡ Implica%on ¡ Exclusive ¡Or ¡ n The ¡condi%onal ¡implica%on ¡connec%ve ¡is ¡ → n The ¡“or” ¡connec%ve ¡ ∨ ¡is ¡inclusive: ¡it ¡is ¡true ¡ if ¡either ¡ or ¡both ¡arguments ¡are ¡true ¡ n The ¡bicondi%onal ¡implica%on ¡connec%ve ¡is ¡ ↔ n These, ¡too, ¡are ¡defined ¡by ¡truth ¡tables ¡ n There ¡is ¡also ¡an ¡exclusive ¡or ¡ ⊕ A B A ⊕ B A B A → B A B A ↔ B 0 0 0 0 0 1 0 0 1 0 1 1 0 1 1 0 1 0 1 0 1 1 0 0 1 0 0 1 1 0 1 1 1 1 1 1 CS160 - Fall Semester 2015 CS160 - Fall Semester 2015 Compound ¡Truth ¡Tables ¡ Tautology and Contradiction n Truth ¡tables ¡can ¡also ¡be ¡used ¡to ¡determine ¡ n A tautology is a compound proposition that is the ¡truth ¡values ¡of ¡compound ¡statements, ¡ always true. such ¡as ¡(A ∨ B) ∧ ( ¬ A) ¡(fill ¡this ¡as ¡an ¡exercise) ¡ n A contradiction is a compound proposition that is always false. A B ¬ A A ∨ B (A ∨ B) ∧ ( ¬ A) n A contingency is neither a tautology nor a contradiction. 0 0 1 0 0 n A compound proposition is satisfiable if there is 0 1 1 1 1 at least one assignment of truth values to the variables that makes the statement true. 1 0 0 1 0 1 1 0 1 0 CS160 - Fall Semester 2015 CS160 - Fall Semester 2015 2

  3. 10/13/15 Logical Equivalence Prove ¬ (p ∧ q) ≡ ¬ p ∨ ¬ q n Two compound propositions, p and q, are p p q ¬ p ¬ q (p ∧ q) ¬ (p ∧ q) ¬ p ∨ ¬ q q logically equivalent if p ↔ q is a tautology. n Notation: p ≡ q 0 0 1 1 0 1 1 n De Morgan’s Laws: 0 1 1 0 0 1 1 ¬ (p ∧ q) ≡ ¬ p ∨ ¬ q ¬ (p ∨ q) ≡ ¬ p ∧ ¬ q 1 0 0 1 0 1 1 n How so? Let’s build a truth table! 1 1 0 0 1 0 0 = = CS160 - Fall Semester 2015 CS160 - Fall Semester 2015 Show ¬ (p ∨ q) ≡ ¬ p ∧ ¬ q More Equivalences p p q ¬ p ¬ q (p ∨ q) ¬ (p ∨ q) q Equivalence Name ¬ p ∧ ¬ q Identity p ∧ T ≡ p 0 0 1 1 0 1 1 p ∨ F ≡ p Commutative 0 1 1 0 1 0 0 p ∧ q ≡ q ∧ p p ∨ q ≡ q ∨ p 1 0 0 1 1 0 0 Absorption p ∨ (p ∧ q) ≡ p p ∧ (p ∨ q) ≡ p 1 1 0 0 1 0 0 See Rosen for more. = = CS160 - Fall Semester 2015 CS160 - Fall Semester 2015 3

  4. 10/13/15 Converse, Contrapositive, Inverse Logical Equivalences n The converse of an implication p → q n Show page of inference rules and reverses the propositions : q → p logical equivalences on course web site – ignore the inference rules for the n The inverse of an implication p → q inverts moment. both propositions: ¬ p → ¬ q n The contrapositive of an implication p → q reverses and inverts: ¬ q → ¬ p The converse and inverse are not logically equivalent to the original implication, but the contrapositive is, and may be easier to prove. CS160 - Fall Semester 2015 CS160 - Fall Semester 2015 Same proof using a truth table: Logical Equivalence Proof ¬ (p ∨ ( ¬ p ∧ q)) ≡ ¬ p ∧ ¬ q (Cannot use Inference Rules!) Prove: ¬ (p ∨ ( ¬ p ∧ q)) ≡ ¬ p ∧ ¬ q p q ¬ p ¬ q ¬ p ∧ q p ∨ ( ¬ p ∧ q) ¬ (p ∨ ( ¬ p ∧ q)) ¬ p ∧ ¬ q ¬ (p ∨ ( ¬ p ∧ q)) ≡ ¬ p ∧ ¬ ( ¬ p ∧ q) n By 2nd DeMorgan’s T T F F F T F F ≡ ¬ p ∧ ( ¬¬ p ∨ ¬ q) n By 1st DeMorgan’s T F F T F T F F ≡ ¬ p ∧ (p ∨ ¬ q) n By Double Negation ≡ ( ¬ p ∧ p) ∨ ( ¬ p ∧ ¬ q) n By 2 nd Distributive F T T F T T F F ≡ F ∨ ( ¬ p ∧ ¬ q) n By Negation Law F F T T F F T T ≡ ( ¬ p ∧ ¬ q) ∨ F n By Commutative Law ≡ ( ¬ p ∧ ¬ q) n By Identity Law = = CS160 - Fall Semester 2015 CS160 - Fall Semester 2015 4

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend